I am using line following IR sensor with arduino mega. I need the sensor 2-3m away from arduino since the length of rover is 2m (sensor front & motor back). However, I cannot get accurate analog reading due to voltage drop so that is giving me a problem.

What I tried:-

1) I tried to supply 5.4V to the sensor but had no effect and it might damage the sensor so avoided it. 2) tried to keep the controller close to Arduino and let the wire between controller and BLDC motor be long but didnt work

More info about the project:- -> Using 2 BLDC motor at the back and caster wheels in front with sensor -> car length is 2m

What could be the best way to solve this problem?

Note:- if the short wire is the only way then is keeping the motor in front with sensor and caster wheels at back a good idea?

  • I would use Nano or Mini at sensors location and communicate with the Mega over RS485 or CAN.
    – Juraj
    Nov 26, 2019 at 11:44
  • I do not think that the voltage drop is a big problem. As the Arduino's Analog Pins have a very high resistance there is very low current on the signal wire. So the drop is minimal using normal wire diameters. It also seems that there is a OpAmp on the sensor board and a potentiometer where you can regulate the voltage. You can make reference measurements with the mega for white and black obstacles. Why do you think there are voltage drops, and are they so big that you can not decide between black and white anymore? Nov 26, 2019 at 12:00
  • yes, when I take sensor reading closer (30cm) to arduino then it works perfectly but at 3m length there is negligible detection. I am not sure about voltage drop since volatge was almost same when Imeasured in both cases. Plus I am using wires of jumper wire thickness.
    – suu
    Nov 26, 2019 at 12:15
  • 1
    Those sensors are digital, not analog, as far as I know. The potentiometer on the sensor sets the amount of reflectivity (of the surface) needed to set its output HIGH (or LOW).
    – Gerben
    Nov 26, 2019 at 14:45
  • It has both digital and analog options in my sensor. Sorry I put wrong sensor in the above link which I updated just now.
    – suu
    Nov 27, 2019 at 6:17


Your Answer

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