Multi uart sensors on same hardware serial port

Hi there,

I need to read from several Atlas Scientific sensors (orp, do, ec and ph) over uart one by one. The sensors are physically close to each other.
I have the following limitations:

  1. have only 1 hardware serial port (software serial is not an option).
  2. the length between the sensors cluster and the controller is around 10 meters.

My idea for now is as in the attached image:
connecting all the sensors to the same Tx/Rx/GND wires (with diodes) and control their power with a decoder (such as 74HC238) using 3 GPIO pins, so I can enable the power for one at a time and read from it.
I prefer to use 9600 baud rate (as it's the default for these sensors).

My questions:

  1. Is the 10 meters limitation achievable without extra hardware?
  2. Is there a better solution?

Use RS-485 and enable the line driver of the selected sensor.

Hi, @trashneed
Welcome to the forum.

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

What model controller are you using?
There are controllers with more than one UART port.

How often do you sample from each sensor?
Can you please post a link to specs/data of the sensors?

Have you been able to communicate with each of them wire on their own to the controller?

Thanks... Tom.. :grinning: :+1: :coffee: :australia:

I would like to keep my system as low-cost as possible. If I understand correctly I need 1 + X RS-485 modules (1 for the controller and X for the X sensors).

I don't really mind about my controller, for now I have Adafruit feather M0 express.

I will sample once every 5 minutes.

Specs:

I can communicate with each of them.

Thanks!

The problem with what you propose is that even with the power removed they will probably draw power from the controller to their Rx pin through their protection diodes. Search for parasitic powering.

As already suggested, try RS485.

I had a similar problem and solved it using WiFi with ESP8266s.

I assume you already know you have to initially program EACH of the devices before you can do that.

We used the (discontinued) Atlas Scientific Tentacle board for the interface. We used the I2C interface because I thought it was easier. The upper right corner of the schematic shows how they used a 74HCT4052 to multiplex the serial interface.
tentacle_schematic.pdf (102.5 KB)

We used a level shifter that allowed the Tentacle board to be powered down between readings. They were built by hooking 2 generic level shifters back to back. In this configuration the "Lower voltage side" can also be 5V.

DualI2C

i2c_ls_bluec

The corresponding HV pins on the level shifters are tied together, the devices are connected to the LV pins on each side.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.