Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: Wingshield for Modbus Communication with Isco Signature

Home Forums Mayfly Data Logger Wingshield for Modbus Communication with Isco Signature Reply To: Wingshield for Modbus Communication with Isco Signature

#13396
Sara Damiano
Moderator

    I’ve only ever used a much older ISCO automated sampler and that only using its internal programming. This is something new to me; I’m skimming your manual. The Signature itself is obviously more powerful than the Mayfly. Are you just looking to use the Mayfly to report live data in order to avoid buying the ISCO supplied modem? Doing that looks like it would be relatively straightforward.

    Based on my read of the manual, here’s what I’d do:

    Don’t bother with the wing thing. It’s really nice if you’re going to power the your RS485 sensor through the Mayfly and connect to multiple RS485 devices, but since the Signature needs way more power than the Mayfly can provide and you haven’t mentioned any other RS485 gadgets, you’re not getting anything out of using it. The wing board also limits you to AltSoftSerial which may or may not work. Just use an RS485 adapter by itself. Do get one that uses 3.3V logic with automatic flow control.

    You need to set up the Signature to use Modbus output following 2.6.4 in the manual. Pick any device ID, just be sure to make note of it. Pick ‘RTU’ protocol type; 2400 bps (Mayfly is too slow to use 115200); 8 data bits; ‘none’ parity; 1 stop bit. Power cycle the Signature to make sure the settings take effect.

    Connect the Signature’s DO- to A-; DO+ to B+; and ground to ground on the RS485 adapter.

    Connect the RS485 adapter to power and ground on the Mayfly. Also connect data out of the RS485 adapter to Mayfly pin 6 and data in to pin 5. I’ve gotten adapters with Tx and Rx labeled differently so if you get no communication, try flipping them.

    Program your Mayfly using AltSoftSerial (https://www.pjrc.com/teensy/td_libs_AltSoftSerial.html) and SensorModbusMaster (https://github.com/EnviroDIY/SensorModbusMaster). AltSoftSerial says that it can be used stably at 2400 baud, but I’ve never tested it at that low a speed on the Mayfly. Be prepared to test and switch to using HardwareSerial if communication isn’t stable enough and values get garbled. If you need to use HardwareSerial to talk to the Signature and you still want to use the XBee slot to for external communication you can cut both sides of SJ8 and SJ9 on the Mayfly to disconnect the XBee slot from Serial1 and run jumper wire on the back of the Mayfly to connect pin 6 to pin 2 of the XBee slot and pin 5 to pin 3.

    I’ll upload a code snippet for you in a bit. I’d had something all typed out and then clicked away and it disappeared on me.