Society of Robots - Robot Forum
Software => Software => Topic started by: clone on January 27, 2009, 10:07:10 AM
-
OK so I'm using the arduino board with atmega168, and i basically just want to adjust the speed of a DC motor using a potentiometer and PWM.
How do i do this???!!
thanks
-
Member Tutorials:
PWM on ATmega168: http://www.societyofrobots.com/member_tutorials/node/226
PWM Overview: http://www.societyofrobots.com/member_tutorials/node/228
Not sure how you would do it using a pot, but you can adjust the speed with just pwm
-
Connect the pot to an ADC to give you a value from 0 to 255 and then use this to adjust the duty cycle of the PWM.
-
im under the understanding that you cant have a DC motor hooked up directly to the arduino or it will have disasterous affects.. and also i watn to run the DC motor at 12 volts.. so what should i use as a 'motor driver'??
-
You need to find the maximum (stall) current for your motor and then find a motor controller that can supply it. Hard to recommend any driver without knowing the current requirement.