Friday 17 February 2012

Testing the radios: Doorbell project

I am going to try the doorbell project from the book.

There are a few things i have to do to configure the radios for this purpose. 

I am going to use X-CTU to do this rather than teraterm or coolterm as neither came with my computer, so i had to edit the instructions from page 76. I'm taking note of these steps to make it easier to do in the future

  1. I inserted my radio into the adapter, opened X-CTU and tested the connection
  2. I then went to the 'modem configuration' area and selected 'read'.
  3. I selected a new PAN ID in the 'modem configuration' window, and set it to '123456789'.
  4. I then needed to enter the high and low parts of the radios address
  5. In 'addressing' i set the DH to '0013A200' and the DL to '407635AE' which was found on the bottom of the radio
  6. I then selected 'write' to update the xbee with these settings.
The second radio has been configured in  exactly the same way, but with its own DL address.

I now need to go back a bit in the instructions and set up the xbees on the boards connected to an arduino. I still need to solder the breakout boards so will do that now.

I followed the tips from the tutorial video i watched and managed to solder both boards in an hour. Thanks to mistakes made a few days ago, i knew to make sure that the components were stable, and didn't accidentally solder anything upside down. Soldering instructions are on p68 of the book.

Below: soldered xBee breakout boards. I used 4X2mm 10 pin headers and 4X straight breakaway headers.




The soldering iron (above) has degraded massively. There is corrosion at the base as well as on the tip, which has literally crumbled during this session. I believe that this due in part to the overly girrty sandpaper-quality of the wiping kit that came with the set (was meant to be a sponger). In the future i will know how to use a sponge and will also order a higher quality soldering iron

The next step are to connect the xBee radios to the breadboard. This is in the book (p69).

  1. Placed the xbee on top of its breakout board, and connected it up
  2. We needed a momentary switch, but i dont have a 2-pin one, so i wired up a 4-pin one as i'd learnt in the past. I tested it with the arduino button code and an LED just to ensure it worked, which it did. I disconnected the xbee for testing purposes (removed TX/RX) connections
  3. Attached a buzzer to the other board: i didnt have one with wires, so again I had to adapt it to the breadboard.
  4. NOTE: always remove RX connection when uploading code to the arduino
The code was easily downloaded from http://www.faludi.com/bwsn_book/code/

Note: New arduino UNO board isnt working (cant see COM port) so i am going to restart my computer and retest it.

After this it didnt work that there was the possibility that i needed to install the drivers for every new board, so i followed these instructions http://arduino.cc/it/Guide/Windows#toc4 and did so. This was successful!

However, when both radios were plugged in there was no communication. I tried replacing the buzzer with an LED.

Below: button circuit


Below: Buzzer (LED circuit)


 Below: both xbees together



This doesnt work as expected. I am going to retry the xbee adapter hack. This now works as i've soldered the board down. Turns out that this was the only problem and i didnt need an actual adapter! I am going to have to go back and re-test that the radios themselves are working correctly. The reason i didnt do this originally was because i only had one adapter, but now that the adapter board hack works i can do it. This will be tested during the rest of the day.

No comments:

Post a Comment