McM
mcm@noway.es
Contact me: noway.es
Contact me

motion detection

Thanks to the great idea of andrew Xbee API . The initial idea is to convert this project to a bundle but I had not enought time so I have include it as a Library in one of my bundles.

General Idea

Detail

Architecture

What we need

PIR Schematics

The main point of the project is to ensure that the PIR motion sensor works properly.

You can ensure it with this simple circuit. Here is the schmematics:

It is important to put a pull resistor in the alarm pin of the sensor because the alarm pin ends in an open collector so you will need this resistor to be connected to 5 V.
If you are pulling the alarm pin up to a 5V supply you will not have any problems and then when motion is detected the voltaje of the alarm pin will go down to 0 and if you set one of the pin of the Xbee as digital pin, the input will be trigered and the Xbee will send the information of the variation to the coordination.

Setting the Xbee

These kind of devices are really easy to configure using the sofware Digi provides. Digi did a nice job providing a consistent command set across Series 1 and 2 XBees.

You can download it from here:

But first of all you will need to download the correct drivers of the Xbee devices to be detected as modems. This way, the XCU software from digi can exchange AT comands to configure the modem.

To configure these devices I have used a windows operating system because you will get better support from Digi.
Here you can find a installation guide which explains step by step what you have to do. Here I leave some captures I made during the installation:

- First you set up the drivers for a speed serial converter
- then you set up the drivers to recognize the Xbee as a modem

You can test the connection to the Xbee device:

It is recommended to restore the configuration before set the new one:

After that you can apply the configuration clicking on "load profile" in th modem configuration tab.

Final result

Share it!

Twitter Gmail Delicious Google Bookmarks Hotmail Yahoo Mail Share/Bookmark