separate power supply for outputs

SallyW

New Member
Hello. I'm making a robot using the 28 pin project board. Because it has motors and a servo I decided to make use of the separate power supply facility for the outputs, thinking that would solve the problem of electrical noise. It has a Sharp IR sensor for object avoidance. Alas, when it's running it keeps "seeing" objects which aren't there - it doesn't run forwards for very long without going unnecessarily to the "avoid" subroutine. I checked it with a program that just gets it to light LEDs, red for too close, green for OK. It behaves very nicely.
Does this mean I need to put capacitors across the motors anyway? And the servo? Thanks
 

inglewoodpete

Senior Member
You need to have back-emf quenching of some sort anyway - even when using two power supplies. There can be electromagnetic induction between the two circuits.

I had a set-up a few years ago where we had two power sources that were completely separated. The "Robot" had over 60 electric motors - plenty of electrical noise. We ended up using opto-isolators between the two power circuits so that there were no electrical connections whatsoever: not even a common ground. The logic-level components on the motor-side of the opto-isolators had their own 5v regulator sourced from the motor supply.

In your case, it may not be necessary to have opto-isolators. Start with good back-emf control on the motors.

Note that Sharp IR sensors can be quite noisy when working at the limit of their range. Refer to screen-grab.
SensorOutput.jpg
 
Last edited:

stan74

Senior Member
Stick a 10uF and 0.1uf capacitor in parallel to ir supply next to the ir might help and quick to try.
 

SallyW

New Member
Thanks for replies. I've had a busy day or two but will try all the suggestions soon. As I'm using a motor driver chip on the project board I'm assuming that the diodes are taken care of for back emf suppression.
 

erco

Senior Member
From https://www.pololu.com/product/136 :

Average current consumption: 30 mA (note: this sensor draws current in large, short bursts, and the manufacturer recommends putting a 10 µF capacitor or larger across power and ground close to the sensor to stabilize the power supply line)

I add the cap right at the sensor pins. Watch polarity.
 

stan74

Senior Member
Sharp should have fitted one. I'm still waiting for the pigeon to arrive with mine. With us range finders I ignore results below 5, I got 0's and 4's occasionally. BTW erco, I've had success with a £1 arduino/china modules, quite stable and predicable, and indoors, bright sunlight through window, no prob. I couldn't make one for that price. Ideal for a stepper motor table bot. They see the edges of the table and don't interfere with each other.
 

erco

Senior Member
No. Quicker, dirtier & more compact.

Ultra 1,B1 reads ultrasonic sensor on pin 1, measures pulse, converts to CM, and stores as variable B1. Beat that!

BTW 1K8 is the preferred resistor value from what I've read. It matters more on some micros.

I'm not a fan of those unmodulated IR sensors you linked to. Ambient light trips them up more than 38 kHz types.

 

stan74

Senior Member
Yes erco, ultra would be better. I don't bother converting to cm. The 10mS resting time between pulses can be lost doing some other task like pulse the motors every reading when turning until object is avoided so isn't a problem. BTW there's a post about pixy cameras and I found there's free libraries for RPi object detection and the RPi camera is only 7 quid. There's options for using lasers! Hey, 2 cameras on servos and a bit of trig and maybe some serious mapping, probably need wheel encoders or stepper motors.
I've spent too much time trying to convert this program to picaxe basic. Darn those negative numbers. https://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm
 
Top