dermobb
Hi everyone,

this is a very exciting project. Congratulations for what has been achieved so far! It makes me want to investigate further.

I'm in the planning process for a specific application, where I need some remote IOs and I'm looking for the most convenient solution. As it's a hobby project, price also plays a role (of course).

I'm running a raspberry Pi 4 in my home network for other use cases already. In a remote location (garden house), which also is connected to my home network via LAN cable, I want to install some weather sensors for weather logging and a few valves for garden irrigation. All this could then be controlled by OpenPLC on the Pi.

What I've seen so far suggests that remote IOs can be connected as Modbus TCP Slaves. That would fit my setup perfectly, as the network cable is already there.

I have a hard time finding suitable hardware for my needs. With 8 digital inputs, 8 digital outputs and 8 analog inputs, I think I would have all I need.

What are your recommendations for Modbus TCP Slaves enabling me to connect to remote IOs as described.

Thank you very much.

Greetings
Nils
Reply 0 0
thiagoralves
The cheapest option would be to just use an Arduino as your Modbus slave. OpenPLC already has a firmware for that available on the website. Since you want to use Modbus/TCP, you might need to modify the firmware a little bit to make use of the Arduino Ethernet shield. Of course you will also have to work around some peripheral electronics to connect your sensors and actuators to the Arduino, since it is a raw board. But this is definitely the cheapest option. You would spend only a few tens of dollars to buy everything you need. Another option is the ADAM modules from Advantech. They come ready to use and are very plug and play with PLC-like IOs, but on the other hand cost a lot more.
Reply 0 0
dermobb
Thanks Thiago.

The cheapest option would be to just use an Arduino as your Modbus slave. OpenPLC already has a firmware for that available on the website.

That would mean I2C, correct? Not really an option in my case because of distance. I could better setup another Pi at the remote location and run OpenPLC on it and use its GPIO directly. It's an option.

The ADAM modules look fantastic. I would love to use something like that. I was hoping there are more alternatives between the two solutions. Maybe others have experience with Modbus TCP slaves? 
Reply 0 0
thiagoralves
dermobb wrote:

That would mean I2C, correct? Not really an option in my case because of distance. I could better setup another Pi at the remote location and run OpenPLC on it and use its GPIO directly. It's an option.
 

No, of course not. Arduino Ethernet shield uses Ethernet. That's exactly the point. You have an Arduino at the remote location with the Ethernet shield attached running OpenPLC modbus slave firmware talking to OpenPLC host over Modbus/TCP Ethernet. The original OpenPLC Arduino firmware talks over Modbus RTU through the USB port. But it can be easily modified to make use of the Ethernet shield instead. Here is a modification for it that someone posted here in the forum in 2019:  https://openplc.discussion.community/post/arduino-mega-modbus-tcp-slave-10377935?pid=1310268483&highlight=arduino+ethernet
Reply 0 0
Reply