0
\$\begingroup\$

U3 is the distance sensor that works great if given power by ArduinoI am working on a project that uses Sharp IR sensor, an ADC, 8051 micro controller and an LCD Module. the Sharp Sensor is giving correct readings only when its power supply comes from Arduino and the rest of the circuit works on a separate battery. I tried to connect a separate 9 V battery with 5 V regulator to the sensor, also tried giving the sensor power supply from USB ASP Programmer but both results in incorrect readings that vary too little between 1.1 - 1.3 V regardless of the distance to object.

Note: Arduino is also connected to laptop with an USB. U3 is the distance sensor that works great if given power by Arduino

\$\endgroup\$
  • 2
    \$\begingroup\$ The links to sensor and ADC as well as even simplified connection schematics will help people trying to answer a lot \$\endgroup\$ – Maple Jul 7 '18 at 8:19
  • 1
    \$\begingroup\$ You might point out in your question that the IR sensor is U3, if I'm correct. Note that you could de-clutter your schematic and greatly improve legibility by using ground and Vcc symbols right at the components. U1, U2 and U3 as well as the regulator are missing decoupling capacitors. \$\endgroup\$ – Transistor Jul 7 '18 at 9:37
  • 1
    \$\begingroup\$ A 9V battery is a poor input for an 7805, it delivers 9V nominally, bu in practice this drops down quickly to a value that might be too low for the 7805, especially under load. \$\endgroup\$ – Wouter van Ooijen Jul 7 '18 at 11:57
  • 1
    \$\begingroup\$ @JProgrammer - In addition to the helpful comments and answer already, see the links I gave in a previous answer about those Sharp distance sensors. (Note that the first half of that previous answer don't apply here, as it was specific to that previous question. It's the explanation and links in the second half which will help you understand more about the sensor, its current requirements, and some testing that you can do etc.). \$\endgroup\$ – SamGibson Jul 7 '18 at 15:52
  • 1
    \$\begingroup\$ try powering with a ~ 12V supply instead of the 9V battery. What else could you use? Something that delivers a solid 5V. 12V battery + 7805, or lower V battery + DC/DC converter? \$\endgroup\$ – Wouter van Ooijen Jul 7 '18 at 18:30
2
\$\begingroup\$

Have you tried to measure the sensor supply voltage with an oscilloscope to see if there are any noise spikes or voltage sags present?

The sharp distance sensor works by sending out short infrared pulses, that's why it will also draw current in pulses. The datasheet specifies the supply current with 30mA, but that is just the average over time. The instantaneous current draw during a pulse can be much higher.

Your 9V battery has quite a high internal resistance, which could lead to the voltage after the 7805 dropping below the minimum supply voltage during a pulse. That's why you have to add a large decoupling capacitor as close as possible to the sensor, which the datasheet recommends anyway on page 6:

In order to stabilize power supply line, we recommend to insert a by-pass capacitor of 10uF or more between Vcc and GND near this product

If you really want to be sure, you can solder a 10uF and 0.1uF capacitor directly to the sensor:

The reason it works with the Arduino board is probably because it already has enough bulk capacitance on its 5V supply rail. The schematic for the Arduino Uno shows a 47uF capacitor.

\$\endgroup\$
  • \$\begingroup\$ Thank you for your answer, I'll try and see if it works. \$\endgroup\$ – JProgrammer Jul 11 '18 at 13:53
  • \$\begingroup\$ Yes, your solution did work but not with 10uF. I had to use 100uF capacitor with 7805 regulator and 12V - 1A Power Supply to make it work. \$\endgroup\$ – JProgrammer Aug 1 '18 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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