PDA

View Full Version : turning Motor left & right using pic Help plz



janosandi
- 26th March 2016, 06:27
hello guys
im designing something like a washer machine which i need to run the motor right for 5 seconds then left for 5 seconds for hundreds of times
any idea plz to do that

thx
John

HenrikOlsson
- 26th March 2016, 15:27
Sure, several but which one to use depends on the specifics - as always.

1) Use a dual supply setup with and connect one side of the motor to GND, use relays or transistors to connect either +xxV or -xxV to other terminal of the motor. Drive the relays or the transitors from the PIC.

2) Use a relay to switch Power to the motor and use another, double pole double throw, relay to switch the polarity of the motor.

3) Use a H-bridge constructed of BJTs, MOSFETs or relays.

4) Use an off the shelf motor drive from AMC, Kollmorgen or whatever.

For the DIY solutions number (3) is the most flexible but also the most complicated one. Depending on the specifications of the motor an off the shelf H-bridge driver IC can possibly be used.

/Henrik.

janosandi
- 26th March 2016, 21:18
Sure, several but which one to use depends on the specifics - as always.

1) Use a dual supply setup with and connect one side of the motor to GND, use relays or transistors to connect either +xxV or -xxV to other terminal of the motor. Drive the relays or the transitors from the PIC.

2) Use a relay to switch Power to the motor and use another, double pole double throw, relay to switch the polarity of the motor.

3) Use a H-bridge constructed of BJTs, MOSFETs or relays.

4) Use an off the shelf motor drive from AMC, Kollmorgen or whatever.

For the DIY solutions number (3) is the most flexible but also the most complicated one. Depending on the specifications of the motor an off the shelf H-bridge driver IC can possibly be used.

/Henrik.
thx Henrick i was looking how to do that in pic basic to drive relays
its ok now i've used Repeat > Until & it works

John

Sam
- 27th March 2016, 02:41
I've used this basic circuit for DC motor directional control. But along with what Henrik said, relays probably aren't the best choice for hundreds of times over and over.

HTH

Dave
- 28th March 2016, 22:47
You can also add an N Channel FET in series with the battery return connection from the relays and be able to do PWM for the motor speed.