If you want to use a comparator, you will never get 2.5v when the two
sensors are equal as there will always be one greater than the other.
Remember a comparator has a very high gain, so any slight difference (such
as noise) will 'tip the balance'.
Look at using an Opamp with the +Vs connected to +5v, the -Vs connected to
0v, and the Gnd connected to 2.5v (use two 1k resistors to form a potential
divider between +5v and 0v). Now you have an Opamp whos output will swing
+-2.5v about 2.5v.
Next connect your IR diodes to each of the inputs. Left like this you have a
comparator with outputs of 5v or 0v. If you want to make the output more
analogue (so you can use with an ADC) you will need to reduce the gain of
the Opamp. You can do this by providing feedback from the output to the
Best thing to do is look at your voltages on the inputs for various extremes
of inputs, then calculate what the gain should be, then calculate the
reistor values to use in the feedback loop.
This is Fr335tyl3r's Dad (support centre!) letting you helpful people that
things are going great with the new, fantastic Junior robocup machine.
Having overcome sadly underpowered Copal motors in Italy (came 5th in world)
now using much much better FaulHaber's or Escaps - both sound and run great.
Kicker - progress here as well, instead of a pinpoint contact area with the
ball, we have a much larger contact area. Now doing acceleration tests over
1 metre and graphing results. Not the time to develop a crossbow type firing
system at the moment (National comps in 4 weeks)
It must be kept in mind that the space for the kicking mechanism is
extremely small, about 1cm high and around 6cm deep - there is no other
IR detection now working a dream - I am very pleased with the development of
this. We now have reliable, small angle IR detection - we can easily
determine if the direction of approach is from the left or the right - so
ball locating is a snap.
To manage 'straight on' detection the IR phototransistor outputs are also
managed by another op amp which simply uses the sum of the IR signal and the
output indicates a maximum (bell shape response to the IR source) i.e the
ball is directly between the two IR 'eyes'
Distance detection is fine as well - I thought of them using a mini torch
head with the IR detector at the focal point but I really think this will
not be needed.
We are using red plastic to reduce the effect of ambient 'non IR sources' -
although not really the correct filter, it does make a difference.
The ONE big problem is the ambient IR from sunlight and normal incandescent
household lamps - the unit basically gets flooded by all this IR and wont
respond properly to our much weaker IR Robocup ball.
Actually this isnt a real problem as in gameplay, the ambient lighting is
considerably reduced to prevent interference to the IR sensors on everyones
robots. This design is very tolerant of ambient IR sources. The good thing
is that the op amp uses a v reference and this means we have a reliable
'reference' voltage at the output prior to the IR source being detected,
this change then being read by the A-D in the Handyboard software -
otherwise we would need to go through a setup routine for each game.
Two things left now:
Ambient light sensor to track the grayscale on the soccer field 'floor'
How to prevent underfloor wiring from screwing up the compass.
The greyscale sensor system will be a backup to the compass. The venues
often have high current cabling set in the concrete floors and the
electronic compass just goes crazy (21cm from the floor). The compass is not
allowed to be any higher.
We looked at Mu metal - expensive but we might salvage some from surplus
For the greyscale sensor, we are going to work on a triangle system - the
sensor at the top of the triangle to measure reflected light as it moves
from light to dark (and so determines which end its heading for)
The other two sensors will be a differential arrangement where if the
reflected light is equal then everything is ok, however if one is receiving
more light than the other it means the machine has moved to the right or
left (we will ensure we can tell which by the voltage output - not
dissimilar to the IR system)
The input that all of you have made is invaluable and although working
through the maze of problems can be frustrating at times, this has set Jeff
on the way to a career in engineering I think - he loves it! The biggest
challenge has been the 3 wheel 120 degree offset design and controlling it
correctly - but thats all solved now.The other major challenge was how to
get the overall weight down - primarily in the power ccts. In Italy Jeff
proved the design and now is improving the basic concept and making
efficiencies in weight,speed and accuracy.
Starts university next year in mechanoids, I cant wait so my brain can have
a rest! - being a mentor is tough.
The problem with this is that the robocup IR ball is the IR source, no other
IR source is allowed on the robot at all. I believe the robocup soccer ball
has IR emmitters that do not modulate or do anything other than be on, hence
Jeff's problem, the ball is supplied by the officials.
If there is a stronger IR source than the ball all that can be done is make
sure the IR sensors on the robot have a shield that does not allow this
source to get in. As the walls of the field are a set height, make sure
they cannot see over that height. This does not take care of reflections
from the field or walls but may be just enough to get you by.
Only probelm with this is that we do not contorl the IR source...it is
coming out of an IR emitting ball provided byt he people at the competition,
so we cant modify it to suit our sensors. Otherwise it would be a snap.
Try building a scanning sensor with a narrow field of view (fixed photodiode,
rotating mirror sort of thing), and also use
photodiodes with built in IR filters - there are lots of these - look for one
with a big active area to get the best response. You
can also use lenses to increase the light captured from a specific direction [
But remember that the lenses must be transparent to
IR ! ]
As you scan across the fov you should get sharp rises and falls for strong
signals, wheras the background will not be so marked. So
use AC coupling to your sampler (A/D)
If you still have a strong false signal in your fov then you will need to think
about masking it out with software.
So, key points:- increase signal to noise ratio by
1) increase signal by using bigger/more sensitive photodiode, plus possibly
lens/mirror to grab more signal
2) decrease noise by only looking at a small area at a time
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.