Author Topic: Sharp IR Help Noise?  (Read 2318 times)

0 Members and 1 Guest are viewing this topic.

Offline DomoArigatoTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 1
Sharp IR Help Noise?
« on: June 27, 2007, 03:09:56 AM »
I'm working on my first robot, and I'm having trouble getting my Sharp IR range finder (GP2Y0A02YK) working.  Any help would be greatly appreciated.  The problem is the sensor seems to be working great, and I'm getting good readings when it's pointed at something.  However, when i point it at "nothing" or cover up the sensor, I start getting random readings hovering around 250 instead of 0.  So when the sensor should see nothing, it returns values.  I'm using an ATmega128 chip on a robostix board.  Does anyone have any ideas for fixing this?  I just plugged sensor directly to input, ground, and vcc with external circuitry.  I'm pretty sure the ADC is working, I can post the code if it would help.  It seems to work fine as long as it's not pointed at infinity.

Thanks!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: Sharp IR Help Noise?
« Reply #1 on: June 27, 2007, 06:46:13 AM »
Hmmmm thats really odd . . . Ive never used that particular rangefinder, but for the ones I've used I've never seen that before . . .

Perhaps its damaged, or a fly keeps buzzing around your sensor when you arent looking :P

The quick and dirty fix would be to tell your microcontroller to ignore values of 250 . . .

if sensor > 250
  then sensor = 0;

Anyone else see this problem before?

Offline DomoArigatoTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 1
Re: Sharp IR Help Noise?
« Reply #2 on: June 27, 2007, 12:31:26 PM »
I got the sensor working now.  There were actually a few problems.  I called acroname for support.  The first problem is that covering up the sensor is not the same as pointing it into the abyss.  The guy at acroname said I was interfering with the "noise band."  The second issue was when I had the robostix plugged into a 5v wall adapter, the readings when I pointed it at nothing were bad.  When I plugged it into my 9volt battery power source, everything was fine.  I'm not sure why plugging it into the wall was so tragic, but I guess it generated a lot of noise.  Hope this helps someone else.

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Sharp IR Help Noise?
« Reply #3 on: June 27, 2007, 12:50:47 PM »
Wall transformers usually generate lots of noise cause of the lack of good grounding and the presence of high frequencies... Mostly due to the AC but aren't sure of anything... I guess a little bit of any the above!!!

I don't know if PWM wall transformers have less noise?!?! should you check it.....

Regards
Lefteris, Greece
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: Sharp IR Help Noise?
« Reply #4 on: June 27, 2007, 02:04:18 PM »
http://www.societyofrobots.com/sensors_sharpirrange.shtml

And I think you want something higher than 5V because I think the robostix uses a 5V regulator (I didnt check, but Im assuming . . .)

Offline DomoArigatoTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 1
Re: Sharp IR Help Noise?
« Reply #5 on: August 01, 2007, 03:21:49 AM »
So... I know this is a little delayed, but just to be thorough in case someone else runs into this.  The problem was not with noise from the wall adapted, although there was some.  The root of the issue is just as the admin said.  There has to be enough voltage going into the regulator on the robostix board to drive the on-board voltage regulator.  Feeding 5v into a 5v voltage regulator doesn't work.  The processor did most things ok, but the ADC choked because VCC was messed up.  So the IR range finder, when pointed at nothing now reads the right value.

 


Get Your Ad Here

data_list