Google+
Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

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


Thursday, 3 April 2014

DIY handmade Hexapod with arduino (Hexdrake)

Hello, I,m David and in this instructable I`ll show how I made this hexapod whose name is Hexdrake.
Since I was 16 I became interested in electronic and later in robotics. After getting some level and programming skills using arduino I decided to build a robot, but not a simple robot with one pair of wheels, something more interesting. I liked the idea of having a hexapod but did not have much money to buy one.
So I built a low cost 2DOF hexapod made with hand-cut wood and Sg90 servos.

Step 1: Designing the parts and making the templates

I designed the pieces according to the size of SG90 servos. The CAD file is only for reference and I did after designing the pieces by hand on paper to use as a template. I used a sheet of wood about 3 mm of thick. After having the templates the next step is to pass them on to the wooden board.
According to the size of the servo the number of pieces are:
48x A part
6x B
12x C
12x D
12x E
12x F
12x G
12x H
6x I
2x J

Step 2: Time to cut!!!

Tools:
Saw, lime, electric dril and a good hand.
Before cutting some pieces is easier to drill the holes using a 3mm drill. I advise to use a fine saw to cut all the pieces accurately. After cutting each piece filing the edges to be soft.

Step 3: Glue certain parts between them

Tools:
Glue(Superglue for more strength), twezers, toilet paper (to clean the excess glue).
To make the main parts of each leg where the servos are subject I needed to unit 4 A pieces. Then, for each leg glue a piece B with C. And the last thing to be are two H pieces together.
*Be careful to align the holes well of certain pieces or can also be done is glue before and then do drills the holes.

Step 4: Painting and Decorating

Materials and tools:
EVA foam(red and black), glue, scissors, rule, pencil and black acrylic paint.
For a more professional finish I decided paint some of the pieces with black acrylic paint, and the body and legs cover them with black and red eva foam.

Step 5: Attaching the servos to the legs and body

Materials:
A lot of screws, screwdriver and 12 SG-90 servos.

Step 6: Add electronics and connect.

Electronic:
An arduino. USC 16-channel servo controller, UBEC 8A hobbywing, lipo battery.
Power supply:
The servo controller needs two power supplies: servo power supply and chip power supply.
-Servo power supply (+): VS (left of the blue connecting terminal at Position 3 in the figure)
-Servo power supply (‐): GND (middle of the blue connecting terminal at Position 3 in the figure)
Servo power supply’s parameters depend on the parameters of the attached servo. For example, if the SG-90 servo has a power supply of 4V‐5V, the servo power supply can use the power source of 4‐5V.
-Chip power supply (+): VSS (right of the blue connecting terminal at Position 3 in the figure)
-Chip power supply (‐): GND (middle of the blue connecting terminal at Position 3 in the figure)
There is a VSS requirement of 6.5‐12V. If the chip power is input through the VSS port, the power supply has to range from 6.5 to 12V.
Connections Arduino, USC and servos:
What is marked red in the figure are the servo’s connectors for signal wires (be careful about the direction when
connecting to the servo).
To connect the USC controller simple connect de rx of the USC to the tx of arduino and the tx pin with the rx pin of the USC. And connect GND pin of USC with arduino.

usc_en.pdf431 KB

Hello, I,m David and in this instructable I`ll show how I made this hexapod whose name is Hexdrake.
Since I was 16 I became interested in electronic and later in robotics. After getting some level and programming skills using arduino I decided to build a robot, but not a simple robot with one pair of wheels, something more interesting. I liked the idea of having a hexapod but did not have much money to buy one.
So I built a low cost 2DOF hexapod made with hand-cut wood and Sg90 servos.

Step 1: Designing the parts and making the templates

I designed the pieces according to the size of SG90 servos. The CAD file is only for reference and I did after designing the pieces by hand on paper to use as a template. I used a sheet of wood about 3 mm of thick. After having the templates the next step is to pass them on to the wooden board.
According to the size of the servo the number of pieces are:
48x A part
6x B
12x C
12x D
12x E
12x F
12x G
12x H
6x I
2x J

Step 2: Time to cut!!!

Tools:
Saw, lime, electric dril and a good hand.
Before cutting some pieces is easier to drill the holes using a 3mm drill. I advise to use a fine saw to cut all the pieces accurately. After cutting each piece filing the edges to be soft.

Step 3: Glue certain parts between them

Tools:
Glue(Superglue for more strength), twezers, toilet paper (to clean the excess glue).
To make the main parts of each leg where the servos are subject I needed to unit 4 A pieces. Then, for each leg glue a piece B with C. And the last thing to be are two H pieces together.
*Be careful to align the holes well of certain pieces or can also be done is glue before and then do drills the holes.

Step 4: Painting and Decorating

Materials and tools:
EVA foam(red and black), glue, scissors, rule, pencil and black acrylic paint.
For a more professional finish I decided paint some of the pieces with black acrylic paint, and the body and legs cover them with black and red eva foam.

Step 5: Attaching the servos to the legs and body

Materials:
A lot of screws, screwdriver and 12 SG-90 servos.

Step 6: Add electronics and connect.

Electronic:
An arduino. USC 16-channel servo controller, UBEC 8A hobbywing, lipo battery.
Power supply:
The servo controller needs two power supplies: servo power supply and chip power supply.
-Servo power supply (+): VS (left of the blue connecting terminal at Position 3 in the figure)
-Servo power supply (‐): GND (middle of the blue connecting terminal at Position 3 in the figure)
Servo power supply’s parameters depend on the parameters of the attached servo. For example, if the SG-90 servo has a power supply of 4V‐5V, the servo power supply can use the power source of 4‐5V.
-Chip power supply (+): VSS (right of the blue connecting terminal at Position 3 in the figure)
-Chip power supply (‐): GND (middle of the blue connecting terminal at Position 3 in the figure)
There is a VSS requirement of 6.5‐12V. If the chip power is input through the VSS port, the power supply has to range from 6.5 to 12V.
Connections Arduino, USC and servos:
What is marked red in the figure are the servo’s connectors for signal wires (be careful about the direction when
connecting to the servo).
To connect the USC controller simple connect de rx of the USC to the tx of arduino and the tx pin with the rx pin of the USC. And connect GND pin of USC with arduino.

Step 7: Programming

Software:
Arduino IDE, USC sofware.
Before programming with arduino is necessary to know the limits of all the servos and know the limits values. For example using the mouse to drag the slider in the servo panel (drag the servo panel corresponding to the channel with which the servo is connected). So connecting the USC inside the hexapod with the usb to the program I get all de max and min values of each servo.
Now is time to program the arduino to control the USC. The servo controller is a slave device, meaning that it can either accept commands or execute preset commands. It cannot think at all. Communication protocol: serial communication (TTL level), baud rate 9600, no check bit, 8 data bits, 1 stop bit To control the servo through the servo controller. The Command format are:
-Control one single servo:
#1P1500T100\r\n
Data 1 refers to the servo’s channel.
Data 1500 refers to the servo’ location, in the range 500‐2500.
Data 100 refers to the time of execution and represents the speed, in the range 100‐9999
-Control multiple servos:
#1P600#2P900#8P2500T100\r\n
Data 1, 2, and 8 refer to the servo’s channels
Data 600, 900, and 2500 refer to the locations of the servos that correspond to three channels
Data 100 refers to the time of execution and represents the speed of three servos. Regardless of the number of servos, there is only one time, or one T. The command is executed at the same time; that is, all servos operate simultaneously.
Within the limits of each servo is necessary to calculate the maximum range or "step" of all horizontal servos to find the smallest of them and convert it as the maximum of one step. And this variable enter into the equations of all movements. The same would have to make with the vertical servos.

Step 8: Adding some personality

I was thinking things I could add to my hexapod and one of the things that came to me were add a good eyes. I decided to add the eyes to hexapod to give more expression to the time to move or express actions. Design sketches on paper of various shapes for the eyes. In the end I decided on the design of the photos.
In the end I decided on the design of the photos. This consists of a strip of 32 blue LEDs around the edge and a matrix of 5 rows and 9 columns of red LEDs. Thus the matrix can display various kinds of pupil and the pupil can move throughout the matrix.

Step 9: Eyes controller board

To control both eyes I designed a simple first version control board based on two atmega8 controlling both matrix directly. In future versions i will do an improved more effective board for complete control of the matrix and the strip of blue LEDs.

Step 10: Adding a Jaw

To make the jaw I did some previous designs in cardboard to find the most correct form to the hexapod. When I found the form, I make the jaw in a small block of aluminum from a heat sink. It is driven by two servos moving together. After, I added it inside a strip of rubber to increase grip, and paint and decorate as the same style of the hexapod.

Step 12: Final results

This is the final result. In the future i will make actualizations, for example a controller with two joysticks, etc
Read More


Join Us

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

© Copyright 2012, Design by Lord HTML.
​