Google+

Monday, 23 June 2014

Program your Arduino with an Android device!

Hi,
in this Instructable I want to show you, how you can program your Arduino with your Android device. It is very simple and cheap. Also it allows us to program our Arduino where ever we want, this is usefull for permanently installed Arduino boards, like in light controllers...
So lets get started! :)


Step 1: Materials and Tools

Materials:
A USB-Host cable (OTG cable) ( http://www.amazon.de/USB-OTG-Adapterkabel-Adapter-... )
An Arduino( http://de.farnell.com/ )
1 LED (for testing)
A Android device with Android 4.0.0+ (or with host aviability)
Software:
ArduinoDroid or
ArduinoCommander from the Google Play store

Step 2: The USB-Host cable

Such a USB-Host cable is basicaly just a USB cable, but just with a few changed resistors in the mikro USB plug. The internal resistors let the Android device activate the USB-Host mode, in this mode you can also use USB-Sticks or other usb applications on the device. That is very useful, now you could plug a usb-printer in.
The problem is now, that every USB device which you plug in, will now run on the energy of your device, what realy can bring the akku down.

Step 3: Connections

This step is very simple and doesn´t require much text. Just plug the USB-A to USB-B cable into the female USB of the Host cable. Then plug the USB-B plug into the Arduino and the Mikro USB into the Android device.

Step 4: Arduino power up

Now it should look like the connections on the picture. Also your Arduino should now power up and load the last code you uploaded. On my Arduino was the Blink sketch. If it doesn´t power up, check connections.

Step 5: The apps

Now your Arduino is ready to get coded, but your Android device isnt...
Lets change that!
Currently there are 2 apps which allow us to work with our Arduino via the Host mode.
To get them we have to go to the Play Store, then type into the search bar "Arduino". Now tap on "Apps", now there should be only apps. We want the apps "ArduinoDroid" and "ArduinoCommander". Install them and launch "ArduinoDroid", it has to update the IDE, that will need some time. "ArduinoCommander" should be ready sofortly.
Note: We dont need both apps, i just want to show you both! :)

Step 6: ArduinoCommander by Anton Smirnov

Okay, the first app I want to show you is "ArduinoCommander". It is by Anton Smirnov and is for Andorid 2.2 or higher.
This app is for working with the Arduino on an Android device, you can change pins easy (directly set pins hight or low), upload sketches or read analog pins with a oscilloscope mode.
The app is easy to understand, even if the controlls are unusual. It finds the Arduino automatical and doesnt crash.
But sadly some of the functions didnt work when i tried to use them, hopefully that get fixed. Uploading a sketch worked very good!
So I would give this app 4.0 out of 5 stars :)
I want to show you short how you can connect to the Arduino:

Step 7: Step 1

First we have to start the app, now a blue window wih 4 options should appear. As we want to connect via USB we tap on "USB-Device" (on the picture in german :) ).
Other options are:
Ethernet
Bluetooth
USB-extras

Step 8: Step 2

Now tap on "Autodetect", the Android device will now scann for Arduino(s) nad show them on the screen. We will pic our Arduino ( just tap on it ).

Step 9: Step 3

After we did that the app will now show us our Arduino as a drawn animation. Normally it is colored and you can tap the pins, to change their mode. This didnt work for me, sadly i couldnt fix it for me, maybe it works for you. when you tap in the down right corner you get to the menu, where you can upload sketches from your SD-card, what works very well.

Step 10: ArduinoDroid

Now the seccond app, which allows us to upload sketches to our Arduino. This app is called "ArduinoDroid" and is for Android 4.2.2 or higher. It is also by Anton Smirnov!
This app is an IDE, a compiler and an uploader for Arduino, it also uses the host mode to upload sketches, which you can write directly in the app.
After you wrote a code, you can compile it with the "Lightning-Button", that needs some time, but works good.
when its compiled you can press the upload button (the to the right).
The upload should take only secconds.
After that my Arduino started the new code --> It worked very good!
For testing I used the "Blink" sketch.
Why am i talking?! here is a short video of the app compiling and uploading a sketch:

Step 11: Finishing!

As you just saw, it is very easy to write, compile and upload a sketch to an Arduino with an Android device.
And here a big THANK YOU to Anton Smirnov who created the apps for Android!
Read More


Friday, 20 June 2014

Welcome to DIY hub


Welcome Folks....
this blog is for the ones who likes to take their eagerness to their peak.....
so you can DO IT YOURSELF!!!

So we will be posting techno related posts from mobile development to Robotics and much more for your intrest...

We will b providing you best contents soon.. so stay at touch...
Read More


Monday, 16 June 2014

Line Following Robot

This is a Line Following Robot. It follows a black line that is drawn. It is able to detect the black line through one photocell and one analog light sensor. There is an LED in between the two sensors that gives off red light when the Arduino is powered on. Then, when the light is reflected back, more light is detected when it is reflected on the white surface, compared to when it is reflected on the black surface. Using this, the right and left servo motors move accordingly to turn left or right when the sensors detect white surface rather than black. I used the Parallax BOEBot Robot for Arduino Kit as my base for the robot. Then I placed a breadboard in front of the base to attach all the sensors with the LED to face the black line.
Follow these steps, and you will be able to build your own line following robot! :)

Step 1: Step 1: Parts

Parts needed:
  1. Arduino
  2. Motor Shield (https://www.adafruit.com/products/1438)
  3. LED with 100 ohms resistor
  4. Photo cell with 1K ohms resistor (https://www.adafruit.com/products/161)
  5. GA1A12S202 Log-scale Analog Light Sensor (https://www.adafruit.com/products/1384)
  6. A base for the robot with 2 wheels attached to servo motors ** I used : Parallax BOEBot Robot for Arduino Kit (https://www.adafruit.com/products/749)
  7. A breadboard
  8. A battery with a battery holder
  9. Black marker or black tape with white papers
  10. Tape to tape all the parts together
  11. Wire to connect all the parts (also jumper wires)

Step 2: Step 2: Assemble 1

First, hook up all the sensors!
Connect the photo cell. One end should go to power and the other should connect to the 1K ohms resistor. Then, on the side with the photo cell and the resistor, connect to the analog pin. Next, connect the other end of the resistor to ground. Then connect the LED with the 100 ohm resistor on the breadboard. Finally connect the light sensor to the breadboard according to the label: ground, power, and one analog pin. Then connect all the wires with jumper wires to the Arduino. Make sure that your jumper wires are long enough to reach the Arduino on the base of the robot.
Second, attach the breadboard to the base of the robot.
I used tape since I couldn't really think of anything else, but you can use anything if it is going to be able to attach the breadboard (facing down) to the robot. Then, use more tape to organize the jumper wires.

Step 3: Step 3: Assemble 2

Third, prepare the base of the robot with the motor shield.
I had to screw in the servo motors to the right position. Then, screw in the wheels on the servo motors. To attach the servo motors, find the two servo pins on the corner of the motor shield. Connect the servo motors to the 2 pins. Note the servo number written on the motor shield according to which side of the motor it is attached to (right or left). Then organize the wires around the base so it would not get in the way of the wheels.
Lastly, make the track for the robot.
I used a black marker that I previously owned to draw the black line. To make the line more precise, I first taped the track with the tape that I owned, then I colored the tape with my black marker. Then, I taped the different white papers around to draw a semi-circle track.
Now, you are done! :)

Step 4: Step 4: Code

When working with the code, you will need to adjust the values for the photocell and the light sensor to change directions. To do this, just place the robot with the sensor (comment out the 2 lines of code to attach the servos in the setup) and check the values of the photocell and the light sensor when it is in the middle, right, and left edge of the black line. Then, change the values of the code accordingly for moving the servo motors.

Step 5: Step 5: Move!

When watching at the video, you will notice the Altoid tin that is taped on the Arduino. This is merely just to balance the weight between the breadboard in the front and the Arduino in the back. When the Altoid tin wasn't taped, the robot constantly tipped towards the front when moving.
I hope this was helpful! Have fun building your own line-following robot. If you have any questions or comments, feel free to leave a comment or inbox me! Thank you!
Read More


Friday, 30 May 2014

555 Pocket Keyboard

Hello every body, this is a 555 timer-musical-keyboard project, with exact sounds of the key, in this project, the keys don't give exact notes, so i designed a few things, added a few potentiometers to the circuit which helps to adjust to the exact notes you have in a normal keyboard...
You can see that the sound created by the keyboard is quite nice, and try to recognize the song i played in the video...
Before You start making this project, you should know the basic electronics properties, equipment and should know how to solder/making circuits...
Because i will not show the making of the circuit in detail, just the circuit diagram, or if you are too lazy to build the project on a perfboard like i did, i have also given the PCB design on an eagle file, you can re-check the design, because i haven't added small things like on/off button in the design, you can add it as per your requirements...
So here comes the 1st step to build this 555 based keyboard...

Step 1: Components

The basic components required to build the keyboard are :
-555 Timer
-100k (or heigher) Potentiometer
-4k7 (or lower) Potentiometer
-10k Potentiometer
- 2.2k resistors {12 peices}
-4.7k resistor
-8 Ohm Speaker
-two-way slide switch
-an LED + 470E resistor
-14 micro switch
-100nF capacitor
-10uF capacitor
-9v Battery (with connector)
-perfboard (10cm by 15cm)
Other extra components which i have used -
-Male + Female stereo Connectors [to connect the board with the Spearker]
-Glue [to stick the speaker and the battery on the board]

Step 2: Breadboarding

In this step, you must see if you have all the components with you and you can do all the connections correctly, i wil not tell you about breadboarding in detail, you can google it, or you can just look it from this link
[This picture in this step, of the breadboarded circuit, is taken from this link]
i have uploaded the circuit diagram with the breadboarded circuit, you can check out the detail of bredboarding this project from the link above...
This is just to make sure that you are comfortable with the circuit, plus breadboarding doesnt take too much of your time, you can just put up 4-5 micro switches to check the working, no need of using all 14 swtiches in the breadboard... as you ll have to take them out while building the circuit...

Step 3: Component Placement - Planning

As you can see, that i have used a big board, just so that i can have my speaker and the battery on the board...
Plus i have placed the switches with wide gap, so that only 1 button should get pushed with my finger, not more...
You can make your board however you want, you just have to be sure that you havent made any changes in the circuit...
You can use any smaller speaker, any buzzer...
or you can just use the eagle circuit board design and design your PCB yo

Step 4: Solder your components

You can make the circuit in the following sequence :
1- fix the keys
2-add resistors to the keys
3-fix the 555
4-build circuit around 555
5-connect the 555 with the keys
6-connect the speaker
7-connect the batter lead
8-check all the connections once again
9-join the battery and check the working

Step 5: Tune it and Play it

You can use a case for your keyboard, which will protect it, i didnt want to use the case because in this prefboard, there is a lot of space in the sided to hold the pcb without touching the circuit, so i skipped that part...
Now when you are prepared with your circuit, you might want to tune it first, the 100k potentiometer can be adjusted in such a way that the last 9 micro switch, or i should say that higher pitch keys [close to the 100k potentiometer] must sound synchronized, and then the 10th and 11th can be tuned with 10k potentiometer after tuning those 9 keys, after tuning them, you can tune the 12-13-14th keys with the second 10k pot.
Now you are ready to play your own made KEYBOARD...
If you have any other questions, then you are welcome to ask them here...
Thank you...! enjoy..
Read More


Join Us

//go.ad2up.com/afu.php?id=25365

© Copyright 2012, Design by Lord HTML.