Multiplexing Ultrasonic Sensors

Last week in class, we talked about the potential need to have multiple Devantech SRF-05 ultrasonic sensors connected to one LogoChip. Different LogoChip output pins could connect to the different sensors’ trigger inputs, and then the sensors’ echo signals could all feed into one LogoChip input (because only one would be triggered at a time). We were trying to draw how to connect them together without burning them up, and I knew there was a right way to do it but couldn’t think of diodes.

Here it is:

Schematic to Multiplex Ultrasonic Sensors to One Digital Input

The echo signals are TTL, active high. That means that when the signal comes back, the sensor’s output will change from 0V to 5V. Put another way, 0V is normal; 5V means an echo was detected.

The diodes are one-way “valves” that allow electricity to flow from a sensor to the LogoChip when the sensor’s output is high (echo detected), but not from one sensor to another, under any circumstances. This protects the sensors from shorting each other out. When all of the sensors’ outputs are low, no electricity flows through the diodes to the LogoChip, so the pulldown resistor connects the LogoChip’s pin to ground (weakly) for a default input of low.

You could use some of Tom’s multiplexing techniques to connect even more ultrasonic sensors, but at $25 each, I expect cost will be the issue before running out of LogoChip pins.

Leave a Reply