modbus USB temperature sensor

Hi, i'm about to buy this sensor: PyroMiniUSB | Calex

Will it be possible to connect it to the Arduino and get the temperature reading using the ModbusMaster library?

I haven't used this type of protocol before.

Any help is appreciated.

Regards,

Liviu

Any help?

I'll start with the difference between a USB host and USB device... well maybe I'll just link to the spec and then add some simple stuff.

http://www.usb.org/developers/docs/

The host controls all communication on the bus when they connect one acts as the host while all others act as a device.

Most Arduino's are USB devices (I don't think they have OTG* capability).

The part you have linked may work with a Raspberry Pi* or a Teensy 3.6**, which have a USB host controller.

Another option is to use the sensor that has an analog output (e.g. 4-20mA) that can work with the Arduino ADC.

http://www.calex.co.uk/product/temperature-measurement/infrared-temperature-sensors/pyrocouple/

Thanks for the answer Ron.
We already purchased the usb sensor. I'm thinking on purchasing this.
But i was thinking on using the Modbus examples to get something from the sensor, but so far i had no success

I've seen Modbus on RS-485, but not sure how it would be done on USB. If you plug the sensor into a computer does is enumerate as a serial device (e.g. COM1 on Windows, /dev/ttyUSB1 on Linux), it might be that the Modbus is done over a USB to UART bridge, which could work like the RS-485 stuff I have seen. If so you may look around for some software to test the Modbus communication from a PC to see it working.

The MAX3421E on that shield looks like no fun, it is a bridge between USB and SPI, I am guessing the Modbus examples would need a complete overhaul to work with it.

Hi Ron,

Thanks for the answer, when i connect the sensor to pc it is shown as COM7:

I know it uses the Modbus protocol from the specification sheet:

Ok, so it is a bridge device for USB to UART serial (using an FTDI chip).

If you look over this GitHub for that MAX3421E-based shield you will start to see what your up against when acting as a host side USB.

It mentions FTDI, so perhaps it can enumerate your sensor as a host, but making a Modbus master function over it looks like a big learning curve.

With that in mind, I think the Teensy 3.6 would be of similar complexity to work with and I'm not sure anything has been started on its USB host side software so I'm going to retract that suggestion.

The Pi seems like a reasonable choice because Linux will take care of the USB host side, but you still have to write or find some Modbus software. Why not just use the Windows computer with one of the ready-made Modbus software options?

I look at libmodbus* from time to time, it should compile on a Pi (or Windows with MinGW)

That would be one way to connect an Arduino Modbus slave to a Pi Modbus master for example.

Hi Ron,

Thanks for the answer, we did managed to get information about the sensor like the vendor id, product id, etc

Maybe if we can add some lines to request a reading from the address 0x10, we can get the temperature.

Best regards,

Liviu

Hi.
I'm also stuck with the same thing. Please share the solution.

Connect usb to 'USB to TTL converter' and that to arduino and use ModbusMaster library.? Does this work.?