2
\$\begingroup\$

I've got 5 little Sharp IR sensors I need to wire to an Arduino.

These are the sensors: https://www.sparkfun.com/products/242

Trouble is, I need to put the connections in a relatively small area.

Is there any reason I shouldn't "daisy chain" them together in parallel like this?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ Yeah, sorry, I left those connections out to make the diagram easier to make and read. \$\endgroup\$
    – fatman
    Commented Mar 22, 2014 at 14:24

2 Answers 2

2
\$\begingroup\$

Each device has three terminals, not just the two that you show.

Yes, you can connect Vcc and Gnd in parallel to all of the sensors, but you'll need a separate Vo connection from each one to one of the analog input pins on your Arduino.

\$\endgroup\$
2
\$\begingroup\$

While there's no problem connecting the power rails in parallel something you should be aware of with Sharp distance measurement sensors is that while the average current draw of 30mA shown in the datasheet is correct during the measurement cycle there are peaks of around 100mA. Here are some current measurements I just made of a single sensor at 1000 samples per second so the X axis is in millseconds:

IR sensor current chart

IR sensor current measurement without capacitor

I've found them to be very sensitive to supply voltage fluctuations and in your case you may have short peaks up to 500mA that your power supply may not cope with well. As well as 0.1uF decoupling capacitors across each device you may find it benefical to also place a larger value capacitor near the devices to help smooth out the peak current demands. Here is the latter measurement taken again with a 2200uF capacitor across the supply rails:

IR sensor current measurement with capacitor

You can see the peak current has dropped to 36mA and the span of current measurements has dropped from 93 to 27mA which your power supply should be a lot happier with when you multiply those numbers by five. For the 0.1uF capacitors because the plastic enclosure extends somewhat below the PCB you can solder those directly to the sensor PCB without taking up any additional room.

Determining the best amount of capacitance will be somewhat experimental but if you find your readings are erractic try a single 2200uF for the entire sensor group as a starting point and see how things go from there, you'll probably find a smaller value will be fine. I've also seen suggestions such as here that adding a small amount of capacitance to the analog output can be beneficial if you continue to get noisy output once the power supply is clean.

\$\endgroup\$
1
  • \$\begingroup\$ Great! Thank you. I finally got back to building this, and I set it up just as you said, and so far so good! \$\endgroup\$
    – fatman
    Commented Apr 25, 2014 at 3:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.