Wednesday, May 22, 2013

xBee Motion Sensor testing

I've been meaning to do some battery tests with these things for a long time. An xBee can sleep at nearly no power use until it gets a wakeup signal. I'm not sure what the power usage of the PIR sensor is, but we'll find out.

In full on mode it works fine, but that will run the battery down fairly quickly. I'd like to set a periodic wakeup once an hour or so to just report in battery voltage or at least to give a ping that it's still there and of course it needs to wakeup whenever the PIR fires.

So now off to study the sleep settings.


2 comments:

  1. So any results to this test wanna add some of these around the house and pool.

    ReplyDelete
  2. that depends ;) If you have power then this works perfectly. If you want to run on batteries then there are still problems. The xBee have excellent sleep capabilities, and can be woken up by a signal on a pin. And we have a signal from the PIR. unfortunately the PIR goes high when there is motion and the xBee wants the pin to be grounded to wake up. It seems to me that a very simple NPN transistor between the PIR output to switch the pin to ground should be enough to make it work. But I've tried this on the breadboard and so far it's not working.

    You also have to be careful to get 3v PIR's. These are 5v pir's and i actually bypassed the onboard voltage regulator to get them to work on 3v. Save yourself that trouble and get the right ones ;)

    I really haven't played with it much past the initial, something isn't working yet. And then I had to make updates to the xBee driver in XTension so that I could send configuration packets to remote xBees without removing them and bringing them up to the computer to be connected to the digi configuration program and now thats working. So I can now setup the parent child relationship remotely but it just hasn't all come together yet.

    ReplyDelete

.code { background:#f5f8fa; background-repeat:no-repeat; border: solid #5C7B90; border-width: 1px 1px 1px 20px; color: #000000; font: 13px 'Courier New', Courier, monospace; line-height: 16px; margin: 10px 0 10px 10px; max-height: 200px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 90%; } .code:hover { background-repeat:no-repeat; }