1

This may seem a little stupid, i apologize if so as i'm new to electronics/arduino.

I have 4, 4-pin ping sensors. I'm running out of available pins on my UNO.

I had a ponder & wondered if it was possible to link all 4 sensor's trig pins to a single digital pin, with the echo pins assigned to their own pin. In my head, on each sensor call (sorry i'm used to programming terms) all 4 sensors would send a pulse, then only the sensor (or echo pin) in question would be read. Is that plausible? each ping sensor is about 20-30 cm separated, but facing internally, in a spiral downwards.

asked Dec 19, 2014 at 17:48
3
  • I don't see a problem. Should work. Commented Dec 19, 2014 at 18:59
  • The problem with this wiring is that you won't be able to use pulseIn method to get the echo pins durations. Commented Dec 19, 2014 at 20:24
  • well, pulseIn will not stop working, but it can only measure one of the sensor's results at a time so the others signals are wasted. It is possible to write something that could measure all the pulses simultaneously, although it is not the easiest thing in the world to do. Commented Dec 19, 2014 at 21:05

1 Answer 1

1

I was able to achieve the result using my suggested method in the question. As BrettAM stated, the signals are wasted on the other 3 pins when checking 1. This solution was suitable as a proof of concept

answered Feb 23, 2016 at 14:36
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.