I am building a largish robot with many Sharp IR sensors.
In particular I am using several of the GP2D12s.
These are known to create noise spikes on the power rails.
Typically, there are 30 mv or so negative and positive spikes,
about 10 usec duration each, every 1 ms (each time the internal
LED is fired).
I've tried putting 10 uf tantalum caps directly on the sensors
and 100 uf caps on the input and output of the regulator. No
caps give even bigger spikes. I'm wondering if the electrolytics
don't catch the fast pulses (the regulator output also has a 0.1 uf
A second "feature" is that 7 D12s take about 200 ma but the
regulator, LM7805, gets hot. The mean consumption of one unit
is 35 ma but the its peak is 200 ma, presumably during the short
LED pulses. Can this low duty cycle peak current, multiplied
7 time, asynchronistically, heat up the regulator?
Hi John. Those devices are pretty noisy, and you need a lot of
filtering, especially with 7 of them, as the peak pulse currents are so
large. I'm including below an interchange regarding these units that
took place on the Front-Range-Robotics yahoo forum. You can't view it
unless logged into the forum, so I included the entire text. Terry has
some good pictures online. Might help.
Regards the heat buildup in the 7805, this depends upon *both* average
load current and voltage drop across the regulator, and whether you
have a good heatsink. If using 12v supply [??], you'll have
(12-5v)*0.2A = 1.4W. Even that starts to heat up the v.reg.
BTW, you have to be careful when using the GP2 devices on "moving"
bots, because of the long readout integration period [about 40 msec],
and the fact that they use triangulation, which is highly susceptible
- dan michaels
Date: Sat Sep 11, 2004 8:02 pm
Subject: Re: Sharp GP2Y0A02YK 0.2 to 1.5 meter analog distance sensors
Yes!! Here is a picture of a moving object vs the pulses and output:
It takes a bunch or readings and "then" outputs a fixed level for the
next 40mS. It only give a new reading every 40mS (25 Hz) and that is
delayed about 40mS too!!!
BTW - Here is a scope pic of the actual IR signal out of the sensor
(blue trace) taken with a 1GHz IR receiver module:
The IR signal is very powerful and they probably just blasts the poor
IR LED with short duration but high current (250mA) pulses.
It might work if you take the above graph into account. But it might
be slow... If the robot is moving, goodness knows what problems you
could run into. Bottom line is that the sensors response is TOO
SLOW... If the point is very small and the objects out there are
complex, you may just get garbage data back. You would almost have to
come to a dead stop and scan each point (stopped) at the beam width...
Not a problem for my outdoor robot since it does things very slowley
anyway. Stopping and painfully scanning everything for minutes on end
is not a problem.
Sumos have to "think fast" so the slow sensor my be a terrible
problem. Things like the object grabbers can spend far more time and
may be better suited.
There is no "analog" ground on the sensor!! Those current pulses show
up on the main ground wire. (the current scope probe is a fully
The solution is to put a big bypass cap on the sensor so all the
spikes are kept local to the sensor and not pushed out onto the lines.
Here is the spike:
Now I soldered a tiny 4.7uF 6.3V Tantalum SM1206 cap (DigiKey
PCS1475CT-ND) across the connector power leads (+ and -, fits nice
It drastically reduced the spikes:
It also bashed the ringing and rise time way down:
This added cap will probably fix the signal distorion "enough" and fix
the spikes messing up the rest of the bot's power supplies. It could
use even a bigger cap, but this is the one I had here on-hand. They
have enough room on the tiny PC board to add a tantalum cap here...
Maybe Sharp needs to make a new and improved version ;-)) I worry
that the dV/dT "spike current" may exceed the little cap's rating,
that will take more thinking the check %:o)) Darn Panasonic does not
give V/uS ratings...
BTW - I think you mentioned once what happens when one "plays" with
the little screw on the back of the sensor???
I use 8 of these on REGIS, and have been doing so for a while.
Basically, each unit pulls more like 300ma when the LED is firing, and
can indeed create substantial noise on the power supply. The led runs at
1khz, with a 10% duty cycle.
I did the following to clean up the supply. First of all, I use a
separate, heat-sinked regulator (7805) for the board that controls the
sensors. Where the battery (12V) power rails attach to the board I used
a 220uf electrolytic (I found this value through trial and error). I
also had better luck using 100 uf caps across the power inputs for each
sensor. Much of this was done through trial and error, but the results
are that the PS noise is brought down to nearly nothing.
Note that on my subsequent largish robot, I only used a couple of these
as invisible "whiskers", (and one other mounted with a sonar as a
supplemental mapping sensor) mainly because not only is powering them
problematic, but their narrow cone of detection makes them poorly suited
for dealing with obstacles.
I think I posted a bit about this on this NG a few years back. Search
the archives if you already haven't done so.
Hope that helps -- tAfkaks
(Replies: cleanse my address of the Mark of the Beast!)
I do use a separate regulator and have a 100 uf cap where you
have 220. I guess I need to try several of the suggestions. I
always thought that the electrolytics were not very good in
passing spikes so I should probably also try putting a 0.1 uf
across each sensor (one is already at the power rails after the
regulator). Some one suggested that the spikes may be produced
by the regulator, being a reaction of the internal op amp trying to
keep the input/output differential equal to zero and the delay between
the positive and negative spikes, 125 usec, a result of the op amp
slew rate. If this is so perhaps the problem is that the regulator
doesn't respond quickly enough to the short demand for 300 ma
when the LED is fired. In that case the cap on the each sensor
should be about 60 uf and a type that can supplying current
quickly may be preferable. I'll try 100 uf on each sensor and see
what that does.
I can get the noise down by using 1000 uf caps on the input and
output of the regulator for the Sharps. Then the noise is about
25 mv. I stopped there but the problem isn't solved yet. The robot
still won't run; the motor has fits of starting and stopping. I suspect
the motor driver is having problems so that's the next thing to take a
look at. It runs fine if I disconnect the power to the Sharps. Maybe the
noise is EMI.
One other thing to keep in mind is that the instantaneous demand for
current may well exceed 300ma by a pretty large factor, since more than
one LED may be switched on at the same instant in time. Obviously, the
more sensors you're running, the more acute the problem.
I vote for massive current demand as the underlying cause.
Cheers - m
(Replies: cleanse my address of the Mark of the Beast!)
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.