The solution to all evil…
Proview, Arduino and other free software/hardware resources builds interesting concepts for future control systems. The range stretches from simple sequences in small machines to complex factory wide or even global processes.
The star in this niche is a system called Proview.se While the name may not be familiar to most people, the system has proved itself in the Swedish steel manufacturing business for more than two decades. It is actively developed and maintained and has a very interesting and active forum.
Arduino is a project aiming for easy prototyping of smaller electronic systems. It is widely used in hobby projects and is spread to all corners of the world, There are many free software projects that runs on Arduino boards. There are industrial protocols implemented, for example ModbusTCP.
My project is to provide an I/O module based on Arduino but designed to work in industrial environment with noise, dust etc. This module will be usable together with Proview.
I will post my progress here….
The tests I have carried out so far is with an Arduino Ethernet card arduino.cc/en/Main/ArduinoBoardEthernet
I have (today) extended the functionality of the “Mudbus” project http://code.google.com/p/mudbus to include Modbus Functions 15 and 16 (write to multiple coil and multiple registers). So far it is not tested properly and I have had no reviewer looking at it yet… I put the Git repo here git://gitorious.org/mudbus/mudbus.git so have a look…
My plan is to include function code 2 (read discrete inputs) and then we will see… Dee Wykoff, who has written the Mudbus lib has been very positive so far. We’ll see if my dirty hacks will reach his QA levels in the future… His code is quite neat…
I will try to focus on price reduction later on when I at least have a card that works. The ethernet chip is of course one of the candidates but I haven’t though much about it. I’m willing to help though.
SGS Thomson’s old VNQ810-E is probably still a good 24V high side driver although there are newer replacements but VNQ810-E is quite cheap… I have only checked prices in couple of places so far though…
I will use Muratas NFM61R filter on basically every input and output. I have used them in the old days when I made my first designs compatible with the CE mark… They are double inductor and cap in between and they can handle 2A… so you can use them on almost everything in a PLC. Maybe there are more compact ones today, I have to check. the NFM60R is smaller but rated 25VDC which is not enough… be careful when you use filter components and read everything you can find on the subject…
I used to always do 4 layer PCB designs with separate layers for gnd and the 5V… for my first prototype I think I will use two layers only…
For 24V signal inputs I use Murata filter and then a voltage divider and a Zener + cap and then a Schmit trigger 74HC14 or something…and then into the shift register that I shift in to the Arduino…
My thought is that I will use an enclosure that is DIN rail mounted, but skip the modularity the Wago and Beckhoff way. They spend a lot of money on the connectors and modular plastic enclosures. My thought is make a series of boxes from 8/8 up to to 32/32 but without any possibility to expand a box. After all, you can just buy one more if you need more signals.
The 6 analog inputs of the Arduino can be used with proper buffering and signal conditioning but they are only 10bit… enough for some measurements but not for any high accuracy stuff…
For more demanding tasks I’m convinced that a dedicated AD/DA converter should be used in a separate box without any digital signals.
PWM outputs can be nice but not on the same board as any high resolution ad converters…
Oops it’ late….
———— If you want my versions of Mudbus – here is how to get it ————–
You can visit my clone of Mudbus here gitorious.org/mudbus/mudbus
To get the project to your computer you need to install git.
If you are on a debian/ubuntu machine:
sudo apt-get install git git-gui gitk git-doc
If you are on windows code.google.com/p/msysgit/downloads/list
take the Git-1.7.9-preview20120201.exe or whatever is latest and install it… easy.
From the command line in linux
git clone git://gitorious.org/mudbus/mudbus.git mudbus
in windows right-click on a folder and take “git bash”
There will be a commandline interface comming up
git clone git://gitorious.org/mudbus/mudbus.git mudbus
Please let me know if there are any problems…
—————— Progress report 12 February 2012 ——————-
I have a running version of Mudbus that supports most things needed for use with Proview… but it needs more testing. Run it if you want but not on any important applications yet.
Blue ones are working in the original Mudbus library but it didn’t support multiple requests in one ip message.
Read coils (FC 1) 0x
Read input discretes (FC 2) 1x
Read multiple registers (FC 3) 4x
Read input registers (FC 4) 3x
Write coil (FC 5) 0x
Write single register (FC 6) 4x
Force multiple coils (FC 15) 0x
Write multiple registers (FC 16) 4x
Red means warning… actually I should red-mark all of it since code in all FCs has been modified.
I added FC2 FC4 FC15 and FC16 and support for multiple requests in one ip message.
What is next?
We have to make more testing. I need to write test applications in Proview and for Arduino to stress the protocol.
And I need to clean out a number of ugly Q&D hacks. The code from Dee was quite neat from the beginning and I have messed it up…
Wireshark shows no errors or any strange messages any longer…
These are the areas that this version is using:
Digital outputs address range 0x
Digital inputs address range 1x
Mb.IR[0-15] signed int
Input registers (for AD converters, counters etc) address range 3x
Mb.R[0-15] signed int
Holding registers (for DA converters, frequency outputs etc) address range 4x
——————— Update 13 February 2012 —————————————–
Did som cadding today. Schematics is not ready yet, LEDs are missing and the power suppy is not there yet.
Analog channels is also missing but it will be a jumper for 4-20mA and 0-10V without it…
I have decided to threw away some of the schematics and go for the VN808 octal driver instead. It is more expensive per output but saves space on the board. There will also be opto couplers… get rid of some of the filter components that way and I’ll try to protect the processors as much as I can.
The basic concept is still the same with shift registers… I’ll be back with news during this week…
——————— Update 18 February 2012 —————————————–
I thought of using the Infineon ISOFACE components for this project… I just regret spending a day reading data-sheets.
Technically the ISOFACE is what I need but the business side is below any standard I have seen before…
No one stock these devices except Mauser.com and they seem to have lost confidence in Infineon too…
They give strange price indications, marking the devices as “obsolete” and “end of life”.
I’m still working with the PCB layout of the I/O module…
Mockup of the box. I have not decided if I should make it for mounting like this or if shall make turn it 90 deg, card edge to the DIN rail, to save width in the cabinet. In that case the LEDs are not going to be where it is written on the foam…
There will be expansion module too…
Or maybe put the Arduino on top and cut the thing?
And yes, finally my Raspberry Pi arrived from Element14. So now I will compile Proview.se for ARM and see if it works.
Raspberry Pi is bigger than the Arduino but I think I make one version of the board and the box to fit both of them.