Darfield Earthship

A Cold Climate Homesteading Adventure

  • Home
  • About Us
  • Plans
  • Photos
  • Map of Canadian Earthships
  • Visit Us
You are here: Home / Technology / Arduino / My first project: talking to a Bluetooth Enabled Arduino Uno

May 30, 2011 by Chris

My first project: talking to a Bluetooth Enabled Arduino Uno

My first project: talking to a Bluetooth Enabled Arduino Uno

In my last post I described setting up a development environment for working with the Arduino Uno micro controller.

This post describes my first project; getting an Arduino connected to a bluetooth modem to talk to my Android based cell phone.  the parts I used for this project include:

  • 1 x Arduino Uno,
  • 1 x Sparkfun Electronics Bluetooth Mate Silver modem board,
  • 1 x 40 pin connecter,
  • 2 x 220 ohm resistors,
  • 2 x 5mm LED’s (green, yellow),
  • 1 x breadboard,
  • wire connectors,
  • 9 volt DC telephone wall transformer re-wired so that positive voltage is in centre of jack.

The following is an image (done with the Fritzing software package) of my breadboard layout for this project.

My first step was to solder a 6 pin connector (trimmed from the 40 pin connector) to the modem board.  I used a straight pin connector, but it would make more sense to use a 90 degree connector I think.

After the connector was soldered to the modem board I laid out the circuit shown above.

My sketch (the code I used to control the Arduino is included.  Click on this link (boardtest).

I tested the board layout and the code by initially leaving the Rx Tx lines to the modem board disconnected.  I was then able to use the Arduino Serial Monitor to emulate sending and receiving data between the Uno and the modem.  Remember to reset the Serial Monitor to communicate at the same baud rate as is set in the setup() function of the sketch (Serial.begin(115200);).  Otherwise you will just see gibberish on the communication link.

The Sparkfun Electronics modem communicates at 115200 by default.  Unless you change this speed you must match it (as is done in the setup() function).  I struggled with this problem for a long time until I figured it out; the modems were paired and connected, but only gibberish was communicated between the two boards.

After the board was laid out and the sketch was uploaded and tested via the Arduino serial monitor I connected the Tx Rx lines to the modem and connected the Arduino to the external power supply.  I then performed the following steps:

  1. On my cell phone I paired to the Arduino Modem board (passcode 1234),
  2. On my cell phone I launched the btterm application and connected to the modem board. (If this is successful the led on the modem board will go from blinking red to solid green),
  3. I then used the btterm application to send text to the modem and watched the LED’s change from low to high depending on what was pressed.

Eventually it all worked!  The hardest part of this project was getting the modems communicating to each other.

Some references I found on the internet:

  • https://www.orangezebra.eu/wordpress/?p=43
  • http://wiring.org.co/learning/tutorials/bluetooth/
  • https://www.orangezebra.eu/wordpress/?p=73
  • http://arduino.cc/en/Tutorial/Blink
  • http://www.homeroasters.org/php/forum/viewthread.php?thread_id=2154
  • http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1240951777
  • http://forum.sparkfun.com/viewtopic.php?f=13&t=20344&p=97668#p97668
  • http://www.jhwarren.com/bluetooth-mate/

 

 

 

  • Tweet
  • Facebook
  • LinkedIn
  • Tumblr
  • Stumble
  • Digg
  • Delicious

Filed Under: Arduino, Technology

Comments

  1. Amah says

    October 16, 2011 at 8:38 am

    Thanks for this post as I need to interface a bluetooth silver mate with the Uno that I had just returned. Thanks to your post I’m going to hurry and re-purchase my Uno board.
    This is for a school project and the intention is to send physiological data to an android phone. This helped move my project forward a little bit thank you.

  2. Nahum says

    March 30, 2012 at 4:55 am

    Hi, we have a proyect on arduino with bluetooth. We are trying to driving a control car though arduino UNO and bluetooth, we have to program the interface in android, but i would like to learn how to set up the bluetooth with arduino and getting control in my computer. Thanks

Sandra and Chris

Welcome to our homesteading adventure in south central BC, Canada! In 2009 we started building an earthship in Darfield. We moved in three and a half years later. Now that the biggest jobs are finished we are having fun homesteading in a modern world. Join us for discussions about finishing the earthship, food preservation, beekeeping, livestock, permaculture and how we interact with technology. It's all about simple living and stewardship of the land without deprivation. Together with our three teenagers we're learning as we go.

Check us out!

  • Email
  • Facebook
  • Pinterest
  • Twitter
  • YouTube

Copyright © 2025 · Generate Pro Theme on Genesis Framework · WordPress · Log in