go_away

Author Topic: Weird IR reciever values  (Read 1196 times)

0 Members and 1 Guest are viewing this topic.

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Weird IR reciever values
« on: November 07, 2009, 09:24:59 AM »
Hey All,

Anyone know why I would get values in the range of 65533 - 65535 on an ADC measurement?  I only seem to get this on my IR receiver from my ATXMEGA chip.

I've verified that we're not exceeding any electrical characteristics.

I have an interrupt that keeps sampling the ADC pin and updated a variable.

Could I be sampling too fast or something?  ???

Offline bsamuels

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Weird IR reciever values
« Reply #1 on: November 13, 2009, 10:42:00 PM »
Try it with another IR sensor, or another microcontroller and make sure the problem isn't hardware related.

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: Weird IR reciever values
« Reply #2 on: November 14, 2009, 08:44:44 AM »
Heh.  Sorry for not updating this sooner.

The problem is actually cause because the Voltage was too small for the resolution selected on the ADC.

Thanks,


Offline bo13th

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Weird IR reciever values
« Reply #3 on: November 14, 2009, 08:48:41 AM »
what type of ADC?

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: Weird IR reciever values
« Reply #4 on: November 14, 2009, 08:51:16 AM »
The Xmega128A1 ADC.

For some reason it was not resolving values less than 1.7 ma.  ???

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,652
  • Helpful? 169
    • Society of Robots
Re: Weird IR reciever values
« Reply #5 on: November 14, 2009, 10:23:52 PM »
The Xmega128A1 ADC.

For some reason it was not resolving values less than 1.7 ma.  ???
ma or mV?

Is it 10 bit ADC?

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: Weird IR reciever values
« Reply #6 on: November 29, 2009, 08:12:43 PM »
mV ... Yes, 10 bit.  It ends up being a moot problem since I don't need to filter out ambient light in the s/w ... We have a hardware filter on it ;)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,652
  • Helpful? 169
    • Society of Robots
Re: Weird IR reciever values
« Reply #7 on: November 29, 2009, 08:16:23 PM »
Well

5V/(2^10 bit) = 0.0049 V

or 4.9mV

So getting 1.7mV resolution with a 10 bit system is impossible :P

. . . well, unless you are making assumptions based on a timer in a dynamic system . . .

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: Weird IR reciever values
« Reply #8 on: November 29, 2009, 08:22:35 PM »
Doh!  Now that is good to remember! Thanks.

 


Get Your Ad Here