ADC Lightning Sensor fails very strange


I have set up a Sensor for Temperature and Lightning - based on the “Building Wireless Sensor Networks”-Book which I love g

Config of my XBEE Router (AT Firmware - the latest).
PAN ID - same as concentrator :wink:
D0 - ADC
D1 - ADC

Everything else is (re)set up with the default settings of X-CTU.

On D0 i’ve added a LM35DZ - Thermistor (Thermal Sensor) - works great - I’m getting back values which look good.

On D1 i would add a Light-Sensor (like in the book mentioned above).

And there my problem begins…

If I reproduce the cabeling like in the book on page 105 (available on google books for reference), only difference: I only have an 22k resistor, but better more - than less:
BOTH D1 and D0 go up to 1023, if the sensor is in bright light.

If the lightning Sensor is dimmed light (holding my hand infront of the sensor) - the values look good.

My tries which all result in the same (both D’s up to 1023):

  • Adding more Resistors
  • Try the cabeling from ladyada (
  • Reducing the current which comes from the source (from 4 Volts to 3 Volts)
  • Different Light Sensor (Same model - never used)
  • Different Radio

If i add a second LM35 (Thermistor) - it sends my a valid result back - the same as the other LM35

So I’m stucked and suffering for help from you…

Thanks in advance


Are you sure, The output you are getting at the light sensor is Analog one?. I am sure that LM35 gives analog output thats why you are getting the perfect behaviour. Are you sure that are you providing differential voltage to the sensor, because I hope in normal case light sensor provides change in current. I hope you should provide differential voltage to the ADC pin of xbee. For that you may require I to V converter.

yes it is analog acording to the documentation:

It’s a VT900 Series.

I really don’t understand why this is happening…

I think I found the solution:

When I’m using the power supply - the behavior is reproduce able.

If I use a battery as power source - the values are right - and keep continuously right…

So I think I need a better power supply…