Use your android phone sensors on the arduino !

 by a1r

Step 3: The level shifter

HPIM6527.JPG
HPIM6528.JPG
Note : If you bought a bluetooth module from sparkfun , skip this step, and head to step four.

Since the Arduino's serial output (Tx pin) is 5-volt logic, if we connect it directly to the Rx pin of the Bluetooth module - which is using 3.3-volt logic -  it will fry the Bluetooth chip. Fortunately, the Arduino supports 3.3-volt logic in reception (Rx pin), so no complex circuit is needed. All we have to build is a simple voltage divider :

- take your breadboard
- grab the resistors and some jumper wires
- connect one end of the 20k resistor to the ground
- connect the other end of the 20k to the 10k resistor
- connect these two ends to the Rx pin of the Bluetooth module
- connect the last end of the 10k resistor to the Tx pin of the Arduino (pin 1)
- check the photos to see if you've wired it correctly
- you're done

Now, head over to step 4 : Wiring everything
 
Remove these adsRemove these ads by Signing Up
merlin13 says: Sep 22, 2012. 9:06 PM
Awesome instructable, thank you so much for all the work and the details. I got the cheaper BT module and all the steps worked great! Just one thing: the Test app in the Amarino examples is set to 57600 baud - I used it as is and nothing worked. Thought I messed up something till I decided to change it to 9600 and all worked great. It looks to me that 9600 is the default setting - is there a way to change it? Thanks again for this awesome project!
bwrussell says: Feb 29, 2012. 12:21 PM
Glad I stumbled on this page before my BT module showed up for a different project, probably would have cooked it with 5 V. Thanks!
francisroan says: Dec 15, 2011. 6:57 AM
hey thats a gr8 post !! im using a aubtm 20 bt module which is a 3.3V module !! so could i use the same level shifter principle u used? and i dont have a 20K resistor so can i use two 10K resistors together?(like one after the other??(serial))
a1r (author) in reply to francisroanDec 16, 2011. 5:37 AM
Yes you can use two 10k in series. And no, I don't have the accelerometer code (android side), I only have the arduino code. If you want details on the android app, visit the official website : amarino-toolkit.net
francisroan in reply to a1rDec 16, 2011. 6:20 AM
what did u mean by android side??? did u mean that the app doesnt support accelerometer untill we program it'?? aka i have to make an (separate) app for the acceleromter? ? u said u have the arduino code pls send it to me!! thanks my email id: francisroan@gmail.com
send it via email pls!!
a1r (author) in reply to francisroanDec 17, 2011. 3:57 AM
Nah, just follow Step 7 and you'll be happily using the accelerometer without having to type a single line of code ;)
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!