Pages: [1]   Go Down
Author Topic: need help, Dc motor control using single switch  (Read 853 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm new user in arduino and i have low experience in programming, so i need help
i want to control Dc motor using single switch
when i press first time, motor turns clockwise
when i press again, motor stops
when i press third time, motor turns anti clockwise
when i press again, motor stops and so on.
Thanks in advance
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that can be pretty easily accomplished with an arduino. For minimum hardware you need any arduino board, a push-button momentary switch, and a motor H-drive controller and power source rated to run the motor in question. The rest is fairly simple sketch software commands.

 If you don't require variable speed control for the motor (just full speed forward or reverse, or stopped) then it is possible to replace the H-drive controller with a DPDT relay and a couple of switching transistors, if your switching frequency is not too high. One transistor controls the relay for direction control, and the other transistor switches power on and off for the motor circuit.

Lefty
Logged

Indiana, US
Offline Offline
Full Member
***
Karma: 12
Posts: 204
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome!

I see Lefty beat me to it...  As he says, an H-bridge is the simplest way to go, especially for a new programmer (I assume you are also new at electronics, too).

Google H-bridges and see how to connect them to motors and to see how to use a switch.  They both should be fairly easy to understand.

Look online for the parts.

Logged

There are 10 types of people in the world, those that understand binary, and those that don't.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks alot for your help smiley
Logged

Pages: [1]   Go Up
Jump to: