Wednesday, March 21, 2018

Cool Modbus Sensor server

Hi folks!  It's been a while since I've posted anything.  I found something recently I want to mention since its pretty useful.

http://www.modbusmonitor.com/home

This allows you to use your Android phone as a "sensor" node.  Basically, everything in your phone, such as your sensors for your gyroscope, gps, accelerometer, compass, etc, are available as sensor data that can be available on a Modbus Server.

This is incredibly useful.  If your controller has a Modbus Master capability, you can easily get this data, ready to use.  This means no conversions, calibrations (unless you want to), scaling, nothing if you don't want.  It costs a couple bucks, but it's worth it for what your getting.

You could take an old Android phone with wifi, bolt it to your robot, and have instead sensor data without dealing with a bunch of custom electronics to interface to your controller.  It opens up a ton of possibilities.  Only thing I had to do that was non-standard, was switch the Modbus server port from 502, which is the standard, to one that Android has open.  I found 15000 to be open, but I'm sure more are available.  If the phone is rooted, you could use 502, but this was easy to get around.

With a Codesys soft PLC like a Pi or Beaglebone, this would be a nice and clean way to get a ton of data into the controller.

I think I can set up a pretty neat little test project with this.

Pretty damn neat.

Hear are some screenshots.

Modbus Master in PC polling Modbus Server in phone

Modbus Server Accelerometer Data in phone