I've ordered XBee wireless transceiver and PIR (motion, here is link) sensor.
When I enable DIO0 digital input port on XBee with "ATD0 3" command it becomes high. I measure it with volmeter and get value of 3.3v. Same with PIR sensor, when motion is detected, output pin becomes high with same 3.3v, but when it becomes low it does not pull to the ground. How is it possible to get movement alert in such scheme?
Because when movement is detected, 3.3v on both sides gives nothing, same for state of rest, when 3.3v on XBee pin and ±0v (but not ground) on PIR sensor output pin could not be detected in Xbee.
On my Arduino I had no problems with that with simply plugging PIR output pin to Digital input port.
I'm a newbie in electronics, excuse me for such dumb question and my mistakes =)
Thanks!
Answer
You need an external pull-down resister.
It sounds like your sensor can only source current, it can't sink current. The sensor can't pull it low on its own, so need a pull-down resister to do that when the sensor isn't driving the pin. Many microcontrollers have internal pull-ups or pull-downs on their inputs. Unfortunately, assuming your XBee follows this datasheet, the XBee does not have an internal pull-up. In that case you'll need an external resister to act as a pull-down for you. If you include more details on how you are wiring this up, someone may have a suggestion for how to put a pull-down in place.
No comments:
Post a Comment