How To Control arduino by bluetooth from PC or Pocket PC PDA


I wanted to make it possible to control an arduino board from my phone.
So that I could control other devices.
the easiest way seemed to be using bluetooth.

but when I received the parts needed I found it want quite as simple as I had hoped.
And after looking on the Internet I didn't find much information to help.

so I have decided to write this guide to help other people that are thinking of doing the same thing.


Step 1: Parts needed



  1. 1 arduino board ( I used the duemilanvoe 328)
  2. 1 bluetooth serial board ( I used the sparkfun bluesmirf)
  3. some pieces of wire
  4. 1 led
  5. A computer with bluetooth or a usb bluetooth adaptor.
  6. A pocket PC with bluetooth

Software needed


  1. The arduino enviroment software.
  2. Some serial terminal software ( I used putty)
Step 2: Wiring it all up


I linked the cts1 to the rts0 on the bluetooth module.
then I wired the tx on the module to the rx on arduino
the rx on the bluetooth to the tx on arduino

I protected the bluetooth module by sealing it with heatshrink.

I then connected +5v and 0v to the bluetooth  board from arduino and supplied the arduino board with 5volts.

and pluged an LED in to socket pin 13 and ground to test it.

as shown.

Step 3: Loading the software



Before I connected the board using bluetooth. I had to load some code on to the arduino board.
The easiest way to do this:

  1. Open the arduino enviroment software program.
  2. Connect the board to a computer using usb.
  3. Go to the tools tab and make sure the correct arduino board and usb ports are selected.
  4. Upload this code on to the board.
  5. This code will allow you to switch on and off the led by pressing 1 for on and 0 for off.
  6. from your terminal.


Step 4: Connecting over bluetooth on the PC




the next step is to connect the arduino board using bluetooth.


  • Disconnect the arduino usb cable and connect up the bluetooth module.
  • Power the arduino board. and the red led on the bluetooth module should flash.
  • Open the bluetooth control panel on your pc this can be opened from the system control panel or from the icon in the bottom right of your desktop.
  • Add a new bluetooth device.
  • Click my device is set up and ready to be found

then on the next screen to will see firefly-E754 or something similer. click next
on this screen select use the passkey found in the documentation and enter 1234.
on the last screen you will see which ports your computer assigns my computer set com11 for outgoing and com12 for incoming.

Step 5: Controlling from a terminal in windows




the next step is to connect to your arduino board using a terminal.

I used putty.

I selected the serial option and set the com port to 11 to match the bluetooth settings that my computer set.
then I set the baud rate to 115200. to match the baud rate in the code.

and clicked open

then the terminal window opens and the led on the bluetooth module turns green.

now when I press 1 the led will light up
and when I press 0 the led turns off.




Step 6: Controlling from a pocket PC PDA



the priciples are basicly the same as connecting using a PC

On the pocket pc open the bluetooth manager and serch for new device.

when you see the Firefly-E754SPP connect to it.
enter the passkey 1234

then open pocket putty.

select serial put in the com port used on my PDA it's com6. set the baud rate speed to 115200.
and click open.

and the terminal should open the led will go green on the bluetooth module. and you will be able to send commands to your arduino.






0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment