How can I check the distance?? Part II, near, far.

Almost of us remember how Grover (super Coco in Spain)  teached us the concepts about “NEAR” “FAR”, now like a child , the drones, robots  need this concepts to.

After a few exercises with the Infrared sensors. I made something closer to the project for drones.
The infrared sensors that I use (GP2D120XJ00F, GP2Y0A21YK) has a lot of noise in his signal, and to have an stable signal we need to add some capacitors. (this is a very good page,
But the drone will work with the concepts near, far, so we can work with a noise signal, by the moment, in the future I’ll reduce the noise with the capacitors, but for a trial it’s ok

.Near_Far_II Near_Far

I read directly the signal from the sensor, and change to a cm approximately, near and far are abstract concepts.

Free way Nothing close II

Nothing close :),
30 means : 30 cm or far

The back sensor (13) is the short range

So I defined a differents thresholds for the GP2Y0A21YK
Green: >15 cm
Yellow: <=15 &&  >10cm
Red <= 10 cm

For the short distance (GP2D120XJ00F)

Green >10 cm;
yellow <=10 && >5;
red <=5;

The measures were taken by the empiric mode,  with my straightedge, and the reference is the box not the sensor, by  this I have measures lower than 10 in the sensor. (every thing is relative 🙂 )

Surronded Surronded

The blue value is the time in milliseconds to take 100 measures for each sensor.
To have a quite stable value, I took 100 measures for each sensor and I use the mean.
For the final project I’ll add the capacitors to have an stable signal, and I’ll take less measures, to reduce this time to 4 milliseconds or less


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s