Home › Forums › Mayfly Data Logger › Interference between HYDROS CTD and Yosemitech Turbidity Sensor › Reply To: Interference between HYDROS CTD and Yosemitech Turbidity Sensor
Modbus stop bits are high, which leaves the AltSoftSerial trans
Modbus stop bits are high, which leaves the AltSoftSerial transmit pin (5 or 6) at 3.3V when the sensor power shuts down. This then bleeds through RS485 converter (when it is powered off) over to the switched power rails, which then interferes with the startup of some other sensors, such as the MaxSonar. For a solution, see ModularSensors Issue “Add to Modbus an AltSoftSerial “flush” or “end” function, to set pins low #140″ for the coding solution.
The coding solution is now provided in the complex_loop
option shown in the menu_a_la_carte.ino
example. Specifically, at the end of every loop, the AltSoftSerial pins need to be set to low before the system is put to sleep, as shown here: https://github.com/EnviroDIY/ModularSensors/blob/292371055ab9d9b884f8fedb7c9587181cf7789d/examples/menu_a_la_carte/menu_a_la_carte.ino#L2928-L2932
This in turn required an altSoftSerial.begin(9600);
statement at the top of every measure loop, as shown here: https://github.com/EnviroDIY/ModularSensors/blob/292371055ab9d9b884f8fedb7c9587181cf7789d/examples/menu_a_la_carte/menu_a_la_carte.ino#L2850-L2854
This means that you must use the complex loop every time you use these Modbus Wings.
Let us know if that solves it.