Mechanics and Construction > Mechanics and Construction

Starting Out

(1/2) > >>

yettti:
I am planning to start out building robots and am a bit confused over something. I am basically trying to start out simple; i can already program in C and can solder ect. but i am baffled when it comes to motor control i have heard of d.c motor controller what is, is it needed or can i wire a motor directly into a micro controller? If anyone could help it would be greatly appreciated.

Thanks in advance  ;D

annoyin_kid:
well i only started electronics last year and over the last month my understanding of electronics has grown rapidly through trial and error and just like you when my school holidays finished i too wanted to wire a motor to an ic and get it to work but i realised there was more to it than doing just that. normal ic dont give you enough juice to run the motor and you need to use a transistor to amplify the signal. just recently i modifyed my first servo (steering device) so it runs like a motor.

i use picaxe (basicly a special pic with a bootstrap pogramme). it is really easy to learn the language and apperantely it is similar to pic basic stamp and the programming software costs just... well... nothing!!! you just need to make a programming cable around ($5 max) get a bread board, one of those chips, download the software (it comes with extensive help pdfs and there is also a support forum if you need help with almost anything electronic). the ics are really cheap. goto www.picaxe.com, get a few 08m chips (i only have 1 08m chip  and get along fine) a few leds a few 22k, 10k, 390r resistors 1-3 peizos and 1-2 ldrs and have a read through the pdf help files and learn how to use them in a circuit. at school i made an alarm which is triggered by someone stepping on a floor mat with a piezo underneath it. then leds and a sound is given off and to turn it off you push a reset button. then when you are ready you can do infrared and more complicated stuff.

yettti:
Yes so what your saying is that the power going through the microprocesser isn't enough to run the motor. so would it be possible to wire the processor into a relay which operated the motors as i am not too worried about variable speeds

JesseWelling:
Generaly what you want is an H-bridge.
http://www.dprg.org/tutorials/1998-04a/

Then using that you produce a square wave at a certain frequency. so let's say you can switch the motor on or off 100 times a second. Then if you turn you motor on 50% of the second you will be giving it 50% of the voltage....so that's like half throttle, but remember on a some cars just giving 10% gas won't make them go. Same applies for DC motors, there is some point which you have to go past for movement to happen.

So that was the simple version. What you really want to do is look at Pulse Width Modulation (PWM) as it relates to voltage.
http://en.wikipedia.org/wiki/Pulse-width_modulation

Most uC should be able to do PWM but you will need to take a look at it's data sheet, and also look at your motor to see what PWM duty cycle works best.

Se also:
http://societyofrobots.com/actuators_dcmotors.shtml
http://societyofrobots.com/schematics_h-bridgedes.shtml

JesseWelling:

--- Quote from: yettti on January 26, 2007, 02:18:18 AM ---so would it be possible to wire the processor into a relay which operated the motors as i am not too worried about variable speeds

--- End quote ---

sorry didn't read the whole thing....
Yes a relay would work but if you need both directions of spin you still need an h-bridge (requiring 4 relays).
If you only need one direction of spin one relay would suffice as well.

Navigation

[0] Message Index

[#] Next page

Go to full version