If you’re reading this you should already be familiar with the previous build, if not you can find that post here.
The previous post solved was a great proof of concept and was pragmatic and functional. This update adds a bit of flair and builds on the previous ideas. Basically we are doing what several other electronic devices have done over the years, we are going wireless! Thats right! Using Xbee modules the arduinos can use the same serial communication it did in the previous project and the Xbee shield has space to mount all the hardware we had to use breadboards.
Here is a list of the parts you will need:
(2) Arduino uno
(2) Xbee shields
(1) red LED
(1) yellow LED
(1) green LED
(1) 270Ω resistor 1/4 watt
(2) ultra sonic distance sensors
(10) female pin header
Hookup Wire / Jumpers cables
Some tools you will need:
-Soldering set up
-Bit with diameter of sensor heads (about 1 inch)
-Ruler to measure placement of holes in the dumbwaiter
The schematic is similar to the last one but there are a few changes
Preparing Xbee shield Tx
Now its time to start the upgrade!
This time we will begin by working on the Xbee Shield’s empty space. Grab a Xbee Shield and we will solder a female header right next to the 5V pin. You can lineup the labeled Arduino in case your Xbee shield isn’t labeled
Next we need to connect the pin header to the 5V pin, I used a stripped piece of hookup wire and soldered it to 5V pin and the female pin header
This XBee shield is ready to be installed on the Arduino Tx, the one with the Ultra sonic distance sensors. The hook up is identical to the last post. simply connect the ground to ground pins and now the board has 2 5V pins eliminating the need for the bread board. And the Signal pins are connected to pin 12 or 13
Preparing Xbee shield Rx
Now we move on to the other XBee shield, this one needs a little more work, have the Pin headers and the resistor on hand. Instal the resistor and female pin headers as shown.(don’t snip the resistors legs!!)
Solder like so
The resistor protects the LEDs and the female pin headers make swapping of LEDs very easy.
Now this Shield is also ready to be installed on to the Arduino. The hook up is simple place the LEDs on the female pin headers that are spaced apart with the cathode(negative/flat side) on the side of the resistor. then use jumpers wires to connect them to pin 7,6 and 5. Before you test the project be sure to read the notes section for some important information.
Some Notes/ Troubleshooting
-The Xbees act like a wireless version of serial communication therefor there is a Tx and Rx and they need to be set properly or the Xbees wont communicate. Reference the Images Provided
-If you attempt to power both arduinos with 9V batteries the transmitting Arduino will not transmit any data, you must use an external power source or 4 AA batteries.
-The code used in each Arduino is exactly the same but here it is again Arduino Tx Arduino Rx
–If you try to upload the code with the Xbee shield in place the Arduino IDE will not allow it and give you error codes, simply remove the shield when uploading the code and reinstall it when done uploading the code.