go_away

Author Topic: problem with Sharp IR Sensor -GP2Y0A21YK0F  (Read 857 times)

0 Members and 1 Guest are viewing this topic.

Offline mondo32Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
problem with Sharp IR Sensor -GP2Y0A21YK0F
« on: November 10, 2012, 11:12:33 AM »
hi everyone  8)
i bought one of Sharp IR Sensor -GP2Y0A21YK0F .... and it looks easy to use 3 pins vcc , gnd & signal ....
but when i try it it has no response for changing distance .... Have i done something wrong here ?  :'(  .... please help i'm new in robotics and i definitely need some help
thanx alot guys
« Last Edit: November 10, 2012, 11:14:19 AM by mondo32 »

Offline zwarte

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #1 on: November 10, 2012, 12:33:01 PM »
Check the tutorial you should Calibrate it first.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,919
  • Helpful? 97
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #2 on: November 10, 2012, 01:29:50 PM »
Quote
but when i try it it has no response for changing distance
What exactly did you try?
Start with a voltmeter on the Sharp sensor output. The voltage should vary as a detected object (or wall) changes distance.

What power supply are you using?
the Sharp sensor draws a bit of current (100mA) when it pulses its IR LED on. If the power supply voltage sags too much then the sensor doesn't work.
« Last Edit: November 10, 2012, 01:31:55 PM by waltr »

Offline mondo32Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #3 on: November 10, 2012, 03:40:03 PM »
I used a 9 volt battery and then regulated by 7805 IC then connect +ve 5 volt to VCC wire of the sensor and the ground with GND , and connect the signal pin to the +ve side in the voltmeter and the -ve with the same ground of the circuit , and try to move objects front of the sensor and nobody's home 

Offline mondo32Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #4 on: November 10, 2012, 03:43:01 PM »
Check the tutorial you should Calibrate it first.
how can i do that ?? can you give me a link for calibration tutorial  ;D

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,919
  • Helpful? 97
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #5 on: November 10, 2012, 05:00:19 PM »
what voltage do you measure on the Sharp's output?
Are you sure you have the + and - input pins correct?
Is the regulator (7805) output always +5V (+-0.1V)?
Do you have caps on the regulator input and output?
Do you have another power supply to feed the regulator? A 9VDC, 300 to 600mA wall wart would do fine.
I've used these and the only issues has been the high current spikes causing other circuits to reset.

Quote
Quote from: zwarte on Today at 12:33:01 PM

    Check the tutorial you should Calibrate it first.

how can i do that ?? can you give me a link for calibration tutorial  ;D

The Sharp sensor do not need calibration. What zwarte may be thinking is that you are using the ADC input of a processor which might need calibration to translate V out to distance (ie the $50 robot expansion).

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: problem with Sharp IR Sensor -GP2Y0A21YK0F
« Reply #6 on: November 12, 2012, 06:08:45 PM »
Hi,

I used a 9 volt battery and then regulated by 7805 IC then connect +ve 5 volt to VCC wire of the sensor and the ground with GND
Are you sure you got it connected the right way around? (It may be hard to see which is pin 1).

The sensor draws pulses of more than 200mA, so if your 9V battery is an alkaline PP3/"Transistor battery", it hasn't got the stamina for the task.
You can test if that's the case by measuring the input to the regulator. If it gets under 7.5..8V, it won't quite cut it.

A capacitor right at the sensor supply terminals is needed, no matter the supply.

A cap of at least 100F (up to say 470F), will help if it's a fresh alkaline PP3 - if it's not fresh... Forget it). Let the cap charge to the full voltage before you connect the sensor.
Placing this cap before the regulator is best (and a smller one may do it then. This is because you have a bit more allowed voltage drop before things go wrong than on the 5V side.

To sum up: Cap of 100..470F on the input of the regulator, ~22F on the output of the regulator and 10..47F right on the terminals of the sensor.
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here