In this project I connect my Arduino Board to a WiFly module (https://www.sparkfun.com/products/10822) from Roving Networks and stream audio to the PC, so that BitVoicer (http://www.bitsophia.com/BitVoicer.aspx) can perform speech recognition. By using a wireless module, I managed to add speech recognition features to my microcontroller without the need of a physical connection with the PC.
The LEDs do the same basic things they did in my last project (http://arduino.cc/forum/index.php/topic,138246.0.html), but now I eliminated the PC wire connection, so I can finally have a speech activated Arduino anywhere my wireless network reaches.
Here is the YouTube video of the project:
I used a WiFly module from Roving Networks (https://www.sparkfun.com/products/10822) because I read somewhere that it would work with the XBee Shield I had (SparkFun XBee Shield - WRL-12847 - SparkFun Electronics). Unfortunately, I found out the hard way that a diode between the Arduino TX and the WiFly RX was blocking the signal. I had to rip out the diode and add a voltage divider between the TX/RX pins of the Arduino and the WiFly module because the RX pin of the WiFly is 3.3V tolerant and the Arduino TX works at 5V. It does not seem to be the best approach, but it worked and I was able to send and receive data from the module. I found out that Sparkfun released a new version of the XBee Shield (SparkFun XBee Shield - WRL-12847 - SparkFun Electronics) and that the diode level shifter was replaced with a more robust MOSFET level shifter. This should solve the diode problem.
This is how my project looked like after I added the voltage divider:
I believe any of the following wireless modules could be used. You just have to find out which one of them best fits your needs:
- http://arduino.cc/en/Main/ArduinoWiFiShield
- http://www.rovingnetworks.com/products/RN171XV
- XBee Buying Guide - SparkFun Electronics (you will need a XBee Explorer Dongle to connect the XBee to your computer: SparkFun XBee Explorer Dongle - WRL-11697 - SparkFun Electronics)
- Many other Arduino WiFi Shields can be found here: Arduino Wireless Projects and Shields | 2019 Handbook
The setup process of the WiFly module can be tricky, so I’m also adding a step-by-step tutorial on how to do it. In my case, I use a regular access point/router from D-Link to implement my private wireless network. This tutorial should work with any access point out there.
-
- Disconnect your computer from any wireless network
-
- Set the GPIO9 pin of the WiFly module to high (3.3V) at power up. This enables adhoc mode on the module. I used the 3.3V source from the Arduino board and an ordinary jumper wire. Right after the power up, remove the wire and follow the next steps. Module datasheet: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/WiFi/WiFly-RN-XV-DS.pdf
-
- On your computer, search for available networks and connect to the WiFly module network (WiFly-GSX-XX). It may take a few seconds before your computer gets an IP address from the module.
-
- Download and run a free software called TeraTerm (http://www.rovingnetworks.com/resources/download/86/Teraterm)
-
- Enter the following settings and click on OK: IP Address: 169.254.1.1; TCP port: 2000; Service: Telnet; Protocol: IPv4
-
- You should see the word “HELLO” on the screen
-
- Type $$$ to enter command mode
-
- Type scan and hit enter to scan for available access points
-
- If your network uses WPA authentication, use the command set wlan phrase to set the pass phrase. For WEP, set the key using the set wlan key command. My network is WEP secured, so I had to use the second command. The problem is that the key must be entered ASCII/HEX encoded and it MUST have exactly 26 characters. I found this page that converts text to ASCII/HEX: String to Hex Online Converter | String Functions.
-
- Type set wlan ssid , where XXXX is the SSID of you network (look at the results of step 8 )
-
- Type save
-
- Type join (look at the results of step 8 )
-
- The WiFly-GSX-XX will disappear from the windows network list
-
- Close Teraterm
-
- Reconnect your computer to your local wireless network
-
- Turn your Arduino board OFF and back ON
-
- Write down the IP number assigned to the WiFly module by your access point (usually, you can find this info on the access point DHCP page)
-
- Open Teratem using the new IP address and the other settings from step 5
-
- Type $$$ to enter command mode
-
- Type set comm close 0 and hit enter
-
- Type set comm open 0 and hit enter
-
- Type set comm remote 0 and hit enter
-
- Type set comm size 1460 and hit enter
-
- Type set comm time 1000 and hit enter
-
- Type set comm baud 115200 and hit enter (the same baud rate I used in my sketch)
-
- Type save and hit enter
-
- Type exit and hit enter
-
- Close Teraterm
Now your WiFly module should be able to communicate with BitVoicer and your PC. The WiFly user’s manual can be downloaded here: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/WiFi/WiFly-RN-UM.pdf
This post ended up too big, so I had to split it into 2 posts. Here is the second part: http://arduino.cc/forum/index.php/topic,140766.0.html