Half-way there?

Today I changed some things on my previous setup, after testing & concluding that XBee IO Change detection doesn’t work during sleep, which I already anticipated.

I changed some settings in the XBee and I added a wire to Pin 9, the Pin Sleep Control Line. The XBee is now in Sleep Mode 5 (Cyclic Sleep Pin-Awake), which means the XBee wakes on timer expiration or when Pin 9 changes from high to low state. The latter (Pin 9 change) is what the extra wire is for; it connects the output of the Hall-effect sensor to Pin 9, so that when the sensor output changes, the state of Pin 9 changes also.

Now the Xbee sends an IO Data Sample frame each 28 seconds based on the sleep settings, but also when the magnet is being moved towards the sensor – because the XBee Pin 9 becomes low, the XBee wakes up and starts to send an IO Data Sample Frame. Great! So now I know instantly when the magnet comes close to the sensor; exactly what I need.

But that’s only half of what I need of course, because when the magnet is being moved away from the sensor, the sensor output (and XBee pin 9) changes back to high, but that’s not triggering a wake up of the XBee… hmm.

So I started searching the net and read about all kinds of latches, NOT gates, flipflops, and saw more circuits than I’ve never seen before in my life. I haven’t found what I’m looking for yet – I don’t even know if it can be done – but I’ll continue my search for a way to shortly ground the XBee pin 9 whenever the sensor output changes from high to low or vice versa.

Yeah I know, an ATMega, duh.

Tagged , . Bookmark the permalink.

3 Responses to Half-way there?

  1. Sim says:

    Hi,
    I am interested to know how you managed to handle the issue when the magnet is moved away from the sensor.
    I have a similar problem that I would like to solve but I couldn’t think of any solutions.

    • Not really… it’s one of those things I have to finish some day.
      Someone gave me a tip back then about using 2 x NE555 and a 4049 hex inverter, I was half way with that but never finished it.
      It’s still on the shelf, half finished.

Leave a Reply

Your email address will not be published. Required fields are marked *