Old School I/O without 'Arduino' !!! - Page 1
Forum section: electronics / projects

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2020, 11:17:14 am
content: Don't know what time I have left!, but I've been coding a project for years, to create a Windows based graphical programming & controller, to interface with (initially!) multiple custom made I/O boards, via RS232/USB to the PC/Laptop. I'm simulating an old Honeywell system I used to work with, called 'Excel', (notto be confused with Microsoft's product!!), using something like it's 'RACL', (Row And Column Language), except with a nice graphical interface for circuit layouts & control. The result is like a 'P.L.C.' being used to receive many inputs (analog & digital) and control outputs, for the purpose of relatively simple Process Control, small building HVAC systems, Security systems etc. No prob there, and its looking good!The 'problem' I have, is that I've only fairly recently been 'discovering' all this 'Arduino' stuff. (With all their I/O attachments). I'm a bit 'Old School', and I definitely want to keep my Graphics/FrontEnd, as the whole idea was that anyone with an old Laptop can run the software, and cheaply interface to single/multiple RS232/USB ports!! (Very limited need for purchase of parts! Existing Laptop etc becomes the full P.L.C.).Is this 'Arduino' stuff all it is cracked up to be?... And yes, I've noticed the cheap 'copies' on the Net...I just wanted something that anyone can run and use with what they've got, except for the I/O boards they can make/buy from my plans.(And yes, I have various plans for certain bought/custom I/O boards from USB etc.)

author: greenpossum
author_rank: Frequent Contributor
timestamp: April 24, 2020, 11:24:44 am
content: You don't need an Arduino if you just want digital (or even analog) GPIO pins. Your PC already has the processing power. Search for something called "USB GPIO expander".

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2020, 11:35:12 am
content: Quote from: greenpossum on April 24, 2020, 11:24:44 amYea, thanks mate. I haven't seen the 'numato' products before. One example below...https://numato.com/product/32-channel-usb-gpio-module-with-analog-inputs

author: RoGeorge
author_rank: Super Contributor
timestamp: April 24, 2020, 11:40:32 am
content: To be honest, I don't understand what you are really asking.Arduino is an 8 bit microcontroller from the AVR family, for example ATmega8. Readthe datasheet of ATmega8to see what an arduino is. It has it's own internal RAM and Flash memory. It can do what any 8 bit computer can do. All it needs is to write a program for it, like you would write a program for a PC/Laptop.Later, other microcontroller models were used, too, on a similar board with the older 8 bits Arduino. Some of these newer models are more powerful, based on ARM microcontrollers.They all can be programed the same, in C/C++. You can think about an Arduino to be an 8 bit computer with a lot of input/output ports, both analog and digital.The tool with which you usually write programs for an Arduino board, the IDE (Integrated Development Environment) is also called "Arduino", like the board, and that adds a lot of confusion. Software people usually think about the C/C++ IDE when they talk about Arduino, while hardware people usually think about an AVR microcontroller when they talk about Arduino.Depending on what you need to control with the PLC, an Arduino board alone can be more than enough, without any laptop attached to it.Also, for industrial PLC, having a PC/laptop involved in the control loop is something to be avoided, because consumer PC/laptops are not ruggedized for industrial environments, while PLC usually are.Does this answer the question?

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2020, 12:25:18 pm
content: Quote from: RoGeorge on April 24, 2020, 11:40:32 amPartly. I understand about the processing power of the controllers you mention, using C/C++ etc, but what I talk of requires and is part of a Graphical customer/controller interface. I understand too when you talk of equipment needing to be 'ruggedized', and I've seen the good & the bad over the years with my work, but the 'Pseudo' P.L.C. (Laptop!) is in an Office environment etc. (Unlike a PLC out in the field).It just seems to me, that a lot of these Arduino 'modules' (Shields??!!!) are fine for making toys/robots. All self contained. Of course I could not explain enough about the scenarios for use in my case in a short description, but it is not in heavy industrial environments. I was only wondering if my 'old school' methods are redundant in this 'Arduino' world now, or If I should ignore them. Hard to describe, sorry.

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2020, 12:53:23 pm
content: (Nice to be informed I was moved. Let me guess who...)

author: RoGeorge
author_rank: Super Contributor
timestamp: April 24, 2020, 01:51:39 pm
content: To me, your system seems to be the HMI side (Human–Machine Interface) of a SCADA system (Supervisory Control And Data Acquisition) for home use, where you want to use simple (as in no PLC in the field, just an I/O) digital or analog I/O ports, and do the processing on the same laptop that is running the HMI.It's possible, has been done before many times and in many ways, which means there is enough room for your design, too.Arduino is just the microcontroller soldered on a PCB, where all I/O pins of the microcontroller are exposed to the Arduino board connectors. As in the ATmega datasheet, those pins can do at most 0/5V analog or digital.Arduino shields are daughterboards that plugs in into the Arduino connectors of an Arduino board (piggybacking style) in order to extend the functionality of those 0/5V only I/O from the microcontroller. Shields can be anything, for example relays with a transistor (so they can be controlled from a 5V digital I/O to turn on/off a 220Vac lightbulb, for example, or can be a small photodiode with an amplifier to use it for example, to automate the chicken coop door, and so on.Yes, you can use Arduino boards and Arduino shields for fast prototyping. Some shields can be stacked on top of each other, but most can not, so it will be hard to find shields with the exact combination of I/O features you need. Most probably, after a while you will end up doing your own PCB where you put an ATmega microcontroller together with exactly the relays or the other type of I/O interfaces you need.Also, you may want to consider using RS485 instead of RS232 for distances longer than a couple of meters. Home indoors environments are still very harsh in RF noises and glitches from all the switching power supplies and switched LED lighting, fridge and washing machines motors, etc.Anyways, Arduino or not, sounds like you have an interesting project!

author: Renate
author_rank: Super Contributor
timestamp: April 26, 2020, 02:38:32 am
content: It sounds like what you want to do is spread out a bunch and not just, say on one lab bench.For a single lab bench I/O expanders would give you what you want.For something dispersed a bit, you can go wireless or like some mention RS-485I'm for RS-485, specifically MODBUS.It may not be the newest protocol out there, but it is well known and lots of stuff exists for it.You need to have either a PC 9 pin serial to RS-485 converter or, more likely, a USB to RS-485 converter.Then you can just connect what are known as MODBUS RTUs to it.Just go to eBay and look at all the sort of stuff you can get for $10.Yup, many of them have an Atmel processor (as used in Arduino things) but it's already programmed for you.This approach works well if what you have to connect to are contact closures and relay drivers.If you want to get fancier and put an I²C sensor or an OLED panel on the system, then you may need to program an Atmel (or Arduino) yourself.I got into this because I have a solar panel controller (EPEver) that uses the MODBUS protocol.I said, "why not?" and had everything else use the same bus.I have about 10 little Atmel AVR boards interfacing different I²C sensors to MODBUS.Running it is a Raspberry Pi. It allows human interface over HTTP/HTML & JSON.

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 27, 2020, 12:38:47 pm
content: Quote from: RoGeorge on April 24, 2020, 01:51:39 pmThank you RoGeorge, (and Renate too!). I understand what you are saying. I understand about RS485 too, and only mentioned RS232 as that was my original experimentation protocol. If I survive into next year, I'll follow up with a link to my software, as it's never now going to be 'Commercial'It will run on any old PC/Laptop, and has I/O on screen, (something like 'Spice'), but representative of a wiring schematic for machinery process control, or security systems etc, but running in a real time graphical environment on screen. I've decided to stick to my relatively customized I/O boards, somethinglikethe...https://numato.com/product/32-channel-usb-gpio-module-with-analog-inputsthat I found recently. Thank you for your kind words, too !!

author: SilverSolder
author_rank: Super Contributor
timestamp: April 27, 2020, 02:21:24 pm
content: Arduinos are good fun to work with. The Arduino programming environment comes with a stack of built in examples, that you immediately compile and upload to the board with zero work (things like making the built-in LED blink, communicating with your PC via RS232, doing analog and digital I/O, etc.). Then you start making changes to those examples, and play around with them. Someone with your obvious experience will find their way around this in just a few hours, for sure!

author: KD4CCF
author_rank: Contributor
timestamp: May 01, 2020, 01:52:36 am
content: I had looked at the Arduino, thought about the Raspberry Pi.The Arduino seems to always want a "shield" and the RPi was overkill.I settled on the ESP32 WiFi device.I just made a super simple HVAC/Temp/Humidity monitor using an ESP32.And... I have lots of extra input/outputs available, including RS232 or I2C.The ESP32 can be programmed with the Arduino IDE.My project connects to a local WiFi router.With more code, it could also include a web server and be updated remotely.Here's the video (runs a little long)The build is a little crude, but it was a one-off (actually two-off).

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 01, 2020, 02:35:56 am
content: Quote from: GlennSprigg on April 24, 2020, 11:35:12 amHaving looked at one of those for work, beware that the Python library (and likely the libraries for many other languages as well) for it has not been maintained for years. I suggest just getting an Arduino Mega and installing Firmata on it if you just want to use it as GPIO expansion for your PC.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 01, 2020, 11:12:48 am
content: Quote from: NiHaoMike on May 01, 2020, 02:35:56 amThanks for the pointer to Firmata, that looks really cool and potentially easy!

author: Mp3
author_rank: Frequent Contributor
timestamp: May 01, 2020, 12:53:21 pm
content: I can understand not wanting to use an Arduino in favor of other controllers, but, considering you can get a fully made & working Arduino Pro for under $3 if bought a few at a time, can you really get much cheaper than that?

author: SilverSolder
author_rank: Super Contributor
timestamp: May 01, 2020, 01:45:46 pm
content: Quote from: Mp3 on May 01, 2020, 12:53:21 pmI'm amazed how cheap Arduinos are. I have purchased many different "flavours" of Arduino on eBay, and there is no way you could even buy the parts and PCB for what the entire boards are sold for. Total cheapskate's paradise!

author: PaulAm
author_rank: Frequent Contributor
timestamp: May 01, 2020, 04:06:54 pm
content: QuoteThe last time I bought Arduino nanos, I paid about $2.60 ea, quant 10. Just finishing off a PID controller for a hydronic circulator control using one. Got a wireless irrigation controller up next. Love these things: cheap, plenty of I/O and a decent code space so you can actually get something done. And there's a makefile build environment so you don't have to depend on that IDE.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 01, 2020, 06:48:47 pm
content: Yes, a cheap Arduino Pro Mini or a Nano is perfect "glue logic" for many circuits, and instantly adds a whole bunch of "nice to have" functionality to any project.The IDE isn't even that bad, for small projects.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 01, 2020, 08:31:33 pm
content: Then there's PlatformIO, if the official IDE isn't good enough. Last I checked, the official Arduino IDE doesn't handle multi architecture systems (e.g. Arduino Due + ESP8266, each part done as separate projects) very well since there isn't a per project architecture setting.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 02, 2020, 01:00:35 am
content: Yes, it is definitely irritating that the hardware settings cannot be saved with each sketch in the Arduino IDE.

author: GlennSprigg
author_rank: Super Contributor
timestamp: May 04, 2020, 11:40:16 am
content: Quote from: Mp3 on May 01, 2020, 12:53:21 pmThank you, and for the following comments by others. I understand that they can be quite cheap, but maybe you missed my requirements! If I was 'prototyping' a specifically programed 'device', that may or may not one day be put to sale as a fully self contained Unit, then all is well. (And ignoring such programming languages, & 'flashing' chips etc.). I 'likened' my design to be 'like' a P.L.C. (Programmable Logic Controller unit), with a graphical user interface for circuit/control/design layout, to be a 'programmable' substitute for a multitude of applications/systems from a PC/Laptop, communicating to various 'real-world' I/O boards for various digital/analog interfaces.If I survive the end product, (including the 'real-world' process control interfaces), all will be posted for free!

author: RoGeorge
author_rank: Super Contributor
timestamp: May 04, 2020, 12:05:51 pm
content: It'll all be OK, you'll see!

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 04, 2020, 01:41:14 pm
content: The main point of Honeywell’s RACL was robustness - you can’t create endless loops there. Arduinos, being programmed in a lower level C++, are totally different beasts from this perspective - you can easily hang up the system in a loop, crash it with some buffer overflow etc.Btw, RACL stands for “Recursive Algorithm Control Language. If by “Row And Column” you are referring to a table-like “language” used in Excel - that’s a different one (don’t remember it’s name already, there were two “normal” high level languages - tables and block diagrams, while RACL was more like an “assembler”, a rarely used lowest level language).Oh, those old times, I still have my personal XI582 terminal somewhere in the garage

author: senso
author_rank: Frequent Contributor
timestamp: May 04, 2020, 01:44:43 pm
content: Grab Codesys and use off the shelf Ethernet/IP remote IO modules and dont toy around putting Arduino crap and industrial anything..

author: GlennSprigg
author_rank: Super Contributor
timestamp: May 07, 2020, 01:36:50 pm
content: Quote from: abyrvalg on May 04, 2020, 01:41:14 pmHi there,abyrvalg. Yea, it's funny how various acronyms come from many meanings. It's like 'HVAC' systems. (Don't want to start on this! haha). In the fields I used to work in, they always said it stands for... "High Volume Air Conditioning", as in multi-story industrial systems as opposed to a small domestic unit! Other people say it is "Heating & Ventilation Air Conditioning". (Though obviously much more).The R.A.C.L. I used to know/learn/use, (and mostly in the HVAC environment!), was a 'Row And Column Language'So called, because behind the scenes within the Processors, the 'System' would look at a 'Circuit Diagram' as if it was laid out in a grid of Rows & Columns, in order to process it. Imagine a whole grid (vertically/horizontally) of circuit components (series/parallel etc) that need to be 'Processed'. The system would run through a timed sequence, of first looking at all the 1st column devices, be they inputs, outputs, analog or digital, and updating the Input components data in the following Column. Then the processor 'runs down' the following Column, with those new inputs, and resulting in THAT columns outputs after processing. As such, a continuous scan cycle would process the 'circuit' by running through all the components inputs & outputs sequentially, one row at a time. I don't know how to explain it better!!The result, is an interface that LOOKS like a P.L.C. coding, with a 10/20 msec (etc) loop period