cheap Arduino based programmable logic controller - Page 1
Forum section: electronics / projects

author: universal-solder
author_rank: Newbie
timestamp: March 25, 2020, 09:29:33 pm
content: Just want to spread the word:We released another Arduino based PLC DIY kit, with 8 inputs and 10 outputs, analog/digital, with RTC on board, powered by an Arduino NANO V3.The module size is 100 x 80 mm, and it requires 12V DC power supply and a CR2032 backup battery for the RTC.And it is a lot cheaper than you would expecthttps://www.universal-solder.ca/product/canaduino-plc-mega328-programmable-logic-controller-electronics-diy-kit-for-arduino-nano-includedOr see the documentation here:

author: Doctorandus_P
author_rank: Super Contributor
timestamp: March 25, 2020, 10:39:32 pm
content: Meh, check out the FN2 clones on Ali / Ebay / China.Nice PCB with lots of optocouplers, an SMPS with industrial looking Common mode chokes, plenty of transistors or Relay outputs, and an easily programmable STM32 so you can use normal C++ instead of the *&^%$#@! ladder logic or whatever.Boards range from EUR15 to EUR35 depending on options such as number of I/O and casing for DIN rails, etc. Oops, correction. I think it's FX2N. Ali is full of these boards, but I am disliking Ali because they are doing difficult for letting me find anything there without logging in. On Ebay these closes seem harder to find.

author: Circlotron
author_rank: Super Contributor
timestamp: March 25, 2020, 10:54:27 pm
content: Quote from: Doctorandus_P on March 25, 2020, 10:39:32 pmThat's all fine and good if you understand C and it's variations, but if you're already into PLCs then this might be easier to get up and running. FWIW I'm not familiar with either. .asm for me!

author: universal-solder
author_rank: Newbie
timestamp: March 27, 2020, 04:34:29 pm
content: The Chinese PLCs are for a different audience. Our kits are made for hobbyists, enjoying soldering a PCB, and maybe have some experience programming an Arduino. And even without any programming knowledge, there is Mitov's "Visuino", a simple but powerful visual editor.We used one of our PLCs for garden watering last year, measuring soil moisture, precipitation and temperature on different patches, and controlled 5 watering zones. In the office we use one to scroll through different light scenes by pressing only 1 button several times, or holding it to dim the lights up and down.Of course, you can buy all of this plug and play in a plastic box on Amazon. But this is not our market.

author: bd139
author_rank: Super Contributor
timestamp: March 27, 2020, 04:58:01 pm
content: Quote from: Doctorandus_P on March 25, 2020, 10:39:32 pmJust tripped over this comment. Holy crap those are cheap. $17 inc shipping or slightly more if you want an enclosure with a DIN rail mount (!).https://www.aliexpress.com/item/32894331223.html... and yes they support ladder logic. See the body comment.I need to build something non critical soon that I was going to fish out for an Eaton unit for. Ladder logic is fine for my requirements on that but just as a point they expose ST Link on the header by the looks if you must do something C related (wholly unnecessary for me). Looks like core is STM32F103.

author: Wilksey
author_rank: Super Contributor
timestamp: March 27, 2020, 05:56:44 pm
content: Does such a thing exist a 8 bit micro open source PLC which can be programmed with ladder?Most older PLC's had a small microcontroller running presumably a ladder interpreter.Seems it'd be a good idea for the O/S solution to not only allow to program yourself if you are that way inclined, or use an existing PLC tool like ladder, not necessarily for seasoned PLCers as they would probably use the Allan Bradley or Siemens of the world, but for someone wanting to get into PLC's without having to spend a fortune on hardware.

author: bd139
author_rank: Super Contributor
timestamp: March 27, 2020, 05:59:54 pm
content: Yep!https://cq.cx/ladder.pl

author: Wilksey
author_rank: Super Contributor
timestamp: March 27, 2020, 06:16:05 pm
content: Ah, yes, LDMicro, that produces a HEX file that you have to program to the micro?I meant anything that runs the ladder "interpreter" on chip and you can load the ladder program from a SD or store onboard on the flash.

author: dany-boy
author_rank: Contributor
timestamp: April 07, 2020, 02:29:01 pm
content: QuoteMan I used to think just like that until I actually had to do an automation project. Its like VHDL or verilog on super easy mode and graphical.Also @universal-solder you might want to consider 24v compatibility since its a widely used industrial standard for automation. Lots of sensors and actuators made for 24vCheers!

author: universal-solder
author_rank: Newbie
timestamp: April 07, 2020, 02:48:40 pm
content: We have a bigger kit for 24V, based on Arduino MEGA2560, with 16 digital 3-24V inputs, 14 relay outputs 5A, 8 analog (0-10V) inputs and outputs. The kit is (without the Arduino module) about 50 USD.https://www.universal-solder.ca/product/canaduino-plc-300-24-arduino-mega2560-based-diy-kit/The smaller DIY PLC kit needs 12V power supply, this is not easily to change, but we add a 2nd resistor network for the optocoupler inputs to the kit, which makes the inputs compatible with 5-24V levels (instead of 3-15V). Its your choice which resistor you are going to assemble.The analog in/out are 0-10V to be compatible with lighting solutions.

author: coromonadalix
author_rank: Super Contributor
timestamp: April 07, 2020, 05:58:33 pm
content: Seems nice to me, a small comment would be: input protection for the analog ports, something like tvs tds surge supressors or even zennerssince the mega analog inputs are 3.3v if i recall ??

author: universal-solder
author_rank: Newbie
timestamp: April 07, 2020, 09:23:43 pm
content: The analog inputs on the Atmega are limited to supply voltage, which is 5V on the MEGA2560 board. The chip has diodes on the inputs, to drain higher voltages on the puts to ground. These diodes can handle max. 1mA, and we use a voltage divider made of 2 x 27k on the analog pins, to achieve the 0-10V range, and to limit the input current. That way, the analog inputs can easily handle the 24V power supply level on them without damage (safe limit is 30V).