Go Down

Topic: Arduino Uno & HC-SR04. What sensor to trigger? (Read 1 time) previous topic - next topic

I wanted to connect 12 HC-SR04 to the arduino and needed to cycle through them to obtain a distance reading. Do you know which trigger sensor I can use to cycle through each sensor?

Also my intention is to power the arduino, 12 distance sensors & trigger off of my usb connection on my PC. Will my PC provide enough power for everything?

Thanks

johnwasser

The HC-SR04 draws 15 mA (http://www.micropik.com/PDF/HCSR04.pdf)  so 180 mA total, well below the 400 mA that the USB connection can spare.

To trigger the 12 ultrasonic sensors I would try a CMOS 16-channel multiplexer like the CD4067.  Use four outputs to select which sensor is connected to the pulse pin.  You can use another CD4067 to select which sensor is connected to the input pin.  Both multiplexers can share the same address pins so the total pin count is 6 (4 address pins, 1 pulse out pin, 1 pulse in pin).
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

winner10920

Two shift register could work like the 74hc595, to pulse the correct device, and you could probably tie all the outputs together(maybe a resistor between just in case) to one input pin since your only timing one at a time and you would know which one is responding already
so that'd be 4 pins(one input, one serial out, one clock line, one output enable)

johnwasser


Two shift register could work like the 74hc595, to pulse the correct device, and you could probably tie all the outputs together(maybe a resistor between just in case) to one input pin since your only timing one at a time and you would know which one is responding already
so that'd be 4 pins(one input, one serial out, one clock line, one output enable)


Since the Output Enable on the 74595 puts the outputs in a high-impedance state you will need a pull-down resistor for each of the outputs.

I don't think you can hook all of the outputs to a single pin, even with resistors.  The one HIGH pin would be fighting the 11 LOW pins.  You'd need a 12-input OR gate made from a couple of CD4072s or CD4073s.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up