Introduction: Interfacing Any Arduino With a Cellphone
When using an Arduino, it may result quite annoying to not be able to use it just because you do not have a computer available. Maybe the Windows or Mac OS isn't compatible, you don't have any computer at all or you just want more freedom for interfacing your board. The solution: a simple OTG (On The Go) cable and an app capable of this task. The most known one is ArduinoDroid, which is apparently available for Android. This software gives you the ability to make, modify, compile and upload Arduino sketches to your board from your mobile phone and even tablets. It also acts as a Serial Monitor, but sadly it doesn't include a Plotter yet. Have in mind that your operative system version has to be compatible.
Besides this IDE, there are also serial monitor apps which can receive and send info to the boards but cannot upload anything. These occupy less memory that ArduinoDroid, since the latter includes, naturally, a lot of libraries and examples. Now that the basic introduction is over, let's start with the Materials and Steps.
Step 1: Materials
The materials needed for this project are surprisingly few. Of course, you will need:
- Android cellphone (or even tablet);
- OTG cable compatible with your cellphone;
- Arduino Board;
- Arduino Board data cable or programmer;
- Lastly, the ArduinoDroid app or another Serial Terminal/Monitor software.
Now that we are done with this, let´s pass on to connecting everything.
Step 2: Connections
- Arduino to Cable or Programmer:
If your Arduino is not a Pro Mini, you will just have to grab the corresponding USB data cable and plug it in.
If, on the other hand, your board is a Pro Mini, grab the 5 or 6 pin USB programmer and connect, using female-female jumper cables, (programmer pin first, Arduino pin later) the 5v or 3.3v to Vcc on the board, the Gnd to Gnd,the Rxd to the Txo, and the Txd to the Rxi (when uploading, remember to press the Reset button on the board after the sketch has finished compiling and is starting to upload).
2. Cable/Programmer to OTG:
Simply connect the male USB A to the female one on the OTG cable.
3. OTG to cellphone or tablet:
Connect the USB Micro, C or Lightning connector to the phone or tablet's port.
Step 3: The ArduinoDroid App
- Search ArduinoDroid on Google Play, Play Store, App Store, or whichever one you have.
- Install it and open it.
- Look at the images above and read the commentaries.
- Since it is a quite complex app, I suggest you should explore all the options. I included some of the functions and how to achieve them in the commentaries.
- If you'd like an interesting project to make with Arduino, see this Instructable.
Step 4: Other Serial Monitor Apps (Just to Receive and Send Info to and From the Board)
- Enter your app store app (huh!) and search for a Serial Monitor App for Arduino. Make sure they rely on USB connection and not on Bluetooth. I really like one called USB Serial Console. Check in the images above to make sure which one it is.
- Proceed to install it and open it.
- The interface is relatively basic. You have a section for writing messages using the keyboard and then a button to send them to the board, most of the screen shows the info received from your Arduino, and then you have three dots on the top right which give access to the menu.
- If you click the three dots, there will appear a small menu at the top right with different options such as settings, connect, etc. Click "Settings" to choose important things regarding the Serial Port, the Connection, the License, etc. Baud Rate can be set by clicking "Serial Port" and then proceeding to adjust it.
- After connecting the Arduino and OTG cable to the phone/tablet, click the three dots and then "Connect". Choose the correct settings and you should start receiving your info. You can decide if the app stamps the time on every line in the Settings section.
- You are finally done! Enjoy the new versatility using your Arduino with your phone or tablet gives you!
Step 5: Troubleshooting
- To say the truth, there aren't many possible complications in this project. I will start from hardware problems to those regarding software.
- First of all, your Arduino may not be connected properly to the data cable or programmer. Make sure they are and then proceed to the next.
- Make sure the data cable/ programmer is connected correctly to the OTG cable. If it still doesn't work, go to the next step.
- Check if the connection between the OTG cable and the cellphone works correctly. It once happened to me that the OTG contacts were a little old and dirty, so the board would power on but no info would be sent. I used a small screw driver to clean it and it worked perfectly afterwards.
- If all hardware is properly set up (and the board actually works), but still it doesn't work, check if the Android version is compatible with the app. I do not possess an Apple device, so I cannot tell you if it works with all of these phones.
- Second, make sure you "told" the app to connect the programmer or board. Usually, when you plug the OTG cable in, a message should appear suggesting you to connect it.
- Last of all, make sure the baud rate (for serial monitor) is the same as the one specified in the sketch.
Step 6: The End
Thank you very much for having read this Instructable! Hope it turned out to be useful! If there is anything I haven't left clear, don't hesitate in consulting me!
4 years ago on Step 3
No ArduinoDroid App found in the Apple App store!
Reply 4 years ago
Sorry about that! Will edit as soon as possible! Any Serial Terminal ones?
Reply 4 years ago
Would this not work?
Reply 4 years ago
that App has terrible reviews in the App store. People say it doesn't work.
Reply 4 years ago
Not so sure about reviews on Apple version. I think the Android version is better than its counterpart