Tuesday, April 2, 2013

Drive a DC motor (send data to the arduino)

Exercise 3º Drive a DC motor

The simplest and not for a real use.

Till now, I was communicating from the arduino to the cubieboard, this is quite important, but now, I've to send the information from the cubieboard to the arduino.

For example, I send the amount of milliseconds that the dc-motor must be running.

The circuit is on of the most simplest
You can find all the information here (very good tutorials)
http://www.jeremyblum.com/2011/01/31/arduino-tutorial-5-motors-and-transistors/

I took this schema

http://www.jeremyblum.com/2011/01/31/arduino-tutorial-5-motors-and-transistors/

and here is the circuit, I had to change some values about resistor, transistor, etc. Cause I've to reutilizes some old components

By the moment this circuits just is used to show how we can send information from the cubieboard to the arduino, in the real world I'll make this circuits with Half-H drivers (L293 or similar) like this

And here the code at the arduino, to send the data from cubieboard I used the command
cu -s 115200 -l /dev/ttyS0

Obvious it can be do better, but just is to show the idea.

No comments:

Post a Comment