Society of Robots - Robot Forum
|
Robot Tutorials
|
FAQ
|
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Squirrels have fuzzy tails.
Home
Help
Search
Login
Register
Society of Robots - Robot Forum
»
Software
»
Software
»
Help with PWM on ATMega168!
Print
Author
Topic: Help with PWM on ATMega168! (Read 3565 times)
0 Members and 1 Guest are viewing this topic.
clone
Jr. Member
Posts: 38
Helpful? 0
Help with PWM on ATMega168!
«
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
Logged
yerbie
Full Member
Posts: 62
Helpful? 3
Re: Help with PWM on ATMega168!
«
Reply #1 on:
January 27, 2009, 11:39:37 AM »
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
«
Last Edit: January 27, 2009, 11:41:35 AM by yerbie
»
Logged
Webbot
Expert Roboticist
Supreme Robot
Posts: 2,165
Helpful? 111
Re: Help with PWM on ATMega168!
«
Reply #2 on:
January 28, 2009, 03:09:06 PM »
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.
Logged
Webbot Home:
http://webbot.org.uk/
WebbotLib online docs:
http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood:
http://www.hovinghamspa.co.uk
clone
Jr. Member
Posts: 38
Helpful? 0
Re: Help with PWM on ATMega168!
«
Reply #3 on:
January 29, 2009, 10:32:04 PM »
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'??
Logged
Webbot
Expert Roboticist
Supreme Robot
Posts: 2,165
Helpful? 111
Re: Help with PWM on ATMega168!
«
Reply #4 on:
January 29, 2009, 10:50:20 PM »
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.
Logged
Webbot Home:
http://webbot.org.uk/
WebbotLib online docs:
http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood:
http://www.hovinghamspa.co.uk
Print
Society of Robots - Robot Forum
»
Software
»
Software
»
Help with PWM on ATMega168!