I would like to develop a project with electricimp modules and read some particulate contamination sensor in hydraulic oil according to ISO contamination standards.
Someone is familiar with this type of sensors and cleanliness Codes?
and know that it would be better, if read through 4-20 mA , modbus rs-485 or analog signals in the imp.
Hello Hugo,
I do not have a sensor in specific I am looking to integrate OEM equipment, but in recent research, I have determined that the best option is through modbus rtu.
for this the impAccelerator ™ Fieldbus Gateway would be perfect, but the cost of using one in each machine is not competitive against existing equipment.
Ideally, I would have an impExplorer ™ Developer Kit + Modbus rtu at a lower cost
The fieldbus gateway accelerator is not intended to be an end product; it is just for PoC use. It has way, way too much stuff in there for most applications (PoE etc), but it’s a useful tool.
The designs are open source, so it’s easy for customers to cut out parts they don’t need and make something optimized.
Note also that RTU is multidrop so you would generally have one gateway for multiple RTU sensors, but that may require more wiring (no idea how far apart these machines are).
Connect DE and RE together and connect these to a “transmit enable” pin on the imp (pick one and tell the modbus library about it), then RO (receive out) connects to an imp UART RX pin and DI (data in) connects to an imp UART TX pin.
You can hook to your 4-20ma loop and the imp can read it (SPI).
The t-click is a way to transmit 4-20ma (if you need to do that sometime).
Whether you use digital rs485 or analog 4-20ma depends on your accuracy required. Resolution will be different for different methods. Also, what existing transmitter you already use. Retransmitting a PV out of the analog output of your transmitter may “skew” the accuracy. A PV of 123.56, might end-up with an error of +/- .5
I like 4-20ma because the wire runs can be really long without losses. It’s simple too. You might already have the 4-20ma loop going to a PLC. You can tap into that loop anywhere and use the imp to monitor or log it.
A lot of new transmitters are now HART communications broadcast over the 4-20ma loop. Not sure about HART to SPI/I2C modules, but the imp can read SPI/I2C pretty slick.
Thanks mlseim , I find it very interesting to use 4-20 mA for future projects,
I will try to get a module for tests.
for this current project, I am trying to make a rs485master with the imp, to read and write the HR of a modbus slave sensor of oil quality.,
This sensor will deliver in registers numbers that are cleaning codes according to an ISO classification table. in this way, the accuracy depends on the brand of the sensor.
today I tested according to what Hugo told me, but without success. only error 80 time out…
I have recently need to use UART on imp Explorer Kit, and this combination would work:
local receiver = hardware.uart12;
local transmitter = hardware.uart57;
receiver.configure(19200, 8, PARITY_NONE, 1, NO_CTSRTS+NO_TX, readback);
transmitter.configure(19200, 8, PARITY_NONE, 1, NO_CTSRTS+NO_RX);
But on this case of ModbusSerialMaster library, looks like need to modify the constructor to take two UARTs, one for TX one for RX. May be better to get imp004-breakout for example?
Hi Akmandala,
i think in this case the ModbusSerialMaster are ready to make the constructor,
a few months ago, I made a project using an impAccelerator ™ Fieldbus Gateway, and it works perfectly, the equipment was installed and working in the factory many hours away from my location. the libraries are great, but since the gateway is more expensive for this new application, I want to reduce the cost with a prot explorer + rs485 ttl prototype.
some body can test this code, and verify the same error.
Well the other option is to use hardware.uart57 and a bit of soldering needed to bring the pin7 out as RXD, and use pin2 for TX_EN. As long as pin1 kept low, you won’t see LED blinking.