Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Dc Motor speed control By PWM (( AVR))

Status
Not open for further replies.

kemo0o

New Member
hey ;

i am going to control speed for dc motor by using pwm

i am using ikalogic h-bridge that using l298 and drives 4A current

its my first time to control motors so i built it on proteus 7.1
(( the file is in attach))

when i generate the code the motor doesn't work :confused:

the h-bridge is works perfectly ;) But my code isn't OK:(

the code is attatched and the proteus file

see it in attatchments and plz hlp me
 

Attachments

  • pmw + proteus.zip
    24.6 KB · Views: 1,724
i have search in forum and i found that the h-bridge must have PWM input

but ikalogic's one hasn't the pwm input

so can i use it or no ??
 
kemo0o said:
i have search in forum and i found that the h-bridge must have PWM input

but ikalogic's one hasn't the pwm input

so can i use it or no ??

ANy solid-state H-bridge should be able to handle PWM. THe way PWM works has more to do with the way a motor's inductance and inertia more than it does with the H-bridge. THe H-bridge just has to be fast enough.
 
In Ikalogic's schematic they've combined the inputs with the enables. That's kind of stupid, but does make it very simple to use. What you need to do is separate them, so you can turn your motor on and off with the inputs and send PWM to the enables to control speed.

EDIT: I may be mistaken. If so, you would still have to separate the inputs and enables, but you would set the enable high and send PWM to the input pin instead.

I'm not sure which way is correct, but it won't hurt anything to try both ways. Use whichever one works.

EDIT2: Oops! Old thread! :D
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top