Arduino Wireless communication methods
Having spent some time working with the Arduino I have had the need, and opportunity to work with various methods of wireless communication. Each of these methods have their Pros and Cons. Here I will attempt to explain the methods I have worked with and where I believe each may be most useful. with the Wireless methods that connect via the Serial Protocol. I recommend using the software serial library which leaves open the USB Serial port for debugging purposes. this will add at least 4,500 bytes to your project so if your project is already tight on space you may not want to use it.
The HC 05 alone has a couple extra features that may be useful, but it happens to have a very low tolerance for voltages over 3.3V. the JY-MCU module has a built in voltage regulator requiring a slightly higher low end voltage of 3.6V but it allows the device to be powered by up to 6V. this means that you can not power the JY-MCU from the Arduino’s 3.3V line but must have it plugged into either the 5V line or one of the digital pins set as an output and on HIGH. The serial TX/RX lines are not protected from high voltages so make sure that you wire the device correctly or you may fry your module. then again at less than 9 dollars this isn’t tat big of an issue.
I first used the JY-MCU module in my ArduCar project. and while it worked I was unable to get the distance I sought with the RC Car. Bringing up one of the major issues with Bluetooth. It is a short-range wireless connection (< 30′ LOS) making it impractical for many uses.
Some of the good projects that it can be used for are:
- Bluetooth media center remote
- RC car controller (really useful when you use the state pin as an auto cutoff when the car is out of range)
- Visual Notifier cube (when paired to a smartphone or computer I have used this with a script on my computer to notify me when I receive an email)
- Remote programming or debugging of an enclosed standalone project (I had to use the following command to get remote programming to work in ubuntu.)
sudo ln -s /dev/rfcomm /dev/ttyACM1
Some of the things it does not do well are:
- Interfacing with the internet (possible but requires a computer and additional scripting)
- long-range communications
- Building Sensor Networks
The technical documents for the HC 05 may be found here.
The Official Arduino WiFi Shield
## Begin excerpt from arduino.cc
The Arduino WiFi Shield allows an Arduino board to connect to the internet using the 802.11 wireless specification (WiFi).
It is based on the HDG104 Wireless LAN 802.11b/g System in-Package.
An Atmega 32UC3 provides a network (IP) stack capable of both TCP and UDP.
Use the WiFI library to write sketches which connect to the internet using the shield.
The WiFI shield connects to an Arduino board using long wire-wrap headers which extend through the shield. This keeps the pin layout intact and allows another shield to be stacked on top.
The WiFi Shield can connect to wireless networks which operate according to the 802.11b and 802.11g specifications.
There is an onboard micro-SD card slot, which can be used to store files for serving over the network. It is compatible with the Arduino Uno and Mega. The onboard microSD card reader is accessible through the SD Library. When working with this library, SS is on Pin 4.
Arduino communicates with both the Wifi shield’s processor and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the HDG104 and pin 4 for the SD card. These pins cannot be used for general I/O. On the Mega, the hardware SS pin, 53, is not used to select either the HDG104 or the SD card, but it must be kept as an output or the SPI interface won’t work.
Digital pin 7 is used as a handshake pin between the WiFi shield and the Arduino, and should not be used.
Some of the good projects that it can be used for are:
- connecting and sending data to services such as cosm.com
- Giving your arduino project a web interface.
- longer distance communication
- accessing your arduino from the web
Some Bad ideas for projects using the wifi shield
- Remote controlled vehicles (network lag can cause crashes)
- doorbells (serious overkill)
- large sensor networks(no meshing capability)
|Xbee Pro 528 63mW with Wire Antenna (Up to 3.2KM LOS)|
The Xbee modules are produced by Digi. they work on the 802.15.4 wireless protocol, are relatively easy to set up, and have a few nice features that make them one of the favored systems out there for wireless communication of devices and sensors, including:
- Low power consumption
- Configurable network topologies
- Self-healing wireless meshing
- Reliable data transfer speeds
- Up to 40 mile line-of-sight communication (With the right module and a high gain antenna)
|Xbee XTend® 1-Watt RF Module (Up to 40 miles LOS)|
- ZigBee networks always have a single coordinator device. This radio is responsible for forming the network, handing out addresses, and managing the other functions that define the network, secure it, and keep it healthy.
- A router is a full-featured ZigBee node. It can join existing networks, send information, receive information, and route information from other devices that are too far apart to communicate with the coordinator on their own.
- End device
- There are many situations where the hardware and full-time power of a router are excessive for what a particular radio node needs to do. They can join networks and send and receive information, and can go temporarily into a non-responsive sleep mode. End devices always need a router or the coordinator to be their parent device.
The Xbee is good for projects such as:
- Wireless sensor networks (any size)
- Home automation
- RC Vehicles
- Long-Distance communication.
- Security systems
The Xbee is not good for projects that require:
- Video streaming
- High speed communication (>250Kbps)