Hi,
I have a need to control a DC motor for my cattle gate. I was wondering if anyone has ever used a PIC to control a DC motor, and how you would handle ramping the voltage up slowly to avoid jerk on a chain drive system. I plan on using a 15W solar cell to charge a battery system, and use the PIC to monitor and control stuff. Any thoughts or ideas would be greatly appreciated.
Thanks
DC Motor Control
Moderators: David Barker, Jerry Messina
- Senacharim
- Posts: 139
- Joined: Tue Aug 10, 2010 5:19 pm
- Location: Ventura, CA
You'll want to look at PWM (Pulse Width Modulation) for that.
Also, if you connect a amperage-reading sensor you could monitor the motor load; which can give you indicators for if it has become stuck on something while attempting to move.
Also, if you connect a amperage-reading sensor you could monitor the motor load; which can give you indicators for if it has become stuck on something while attempting to move.
Surviving Member
Bermuda Triangle Battalion
from 2026 to 1992
Voted "Most likely to time travel"--Class of 2024.
Bermuda Triangle Battalion
from 2026 to 1992
Voted "Most likely to time travel"--Class of 2024.
Assuming it is a brushed DC motor, then a half-bridge implemented using the ECCP module of the PIC will drive the motor forward and/or reverse. Instead of ramping the voltage (poor torque at low voltage), use PWM and ramp the duty cycle from 0-100%.
Why use 8 bits when you can have 32?
ARM CORTEX Rules!!!
ARM CORTEX Rules!!!
Stepper Motor
Hi,
Thanks for the input. I am actually leaning towards a stepper motor closed loop system, but I need a 1/4 Horsepower DC motor, and I am not sure of cost and availability. Would the ECCP module in a PIC control this type of motor ?
Thanks
Thanks for the input. I am actually leaning towards a stepper motor closed loop system, but I need a 1/4 Horsepower DC motor, and I am not sure of cost and availability. Would the ECCP module in a PIC control this type of motor ?
Thanks
Yes, you can control the 1/4HP DC motor with a PIC using PWM - assuming you have a sufficiently beefy out stage. A stepper is not closed loop unless you add an encoder and do the loop control in software - you can also do the same with the DC motor. Why would you need close loop for a cattle gate? It would be more appropriate to use limit switches for the open and close positions. Unless you want to be able to partially open the gate.
Why use 8 bits when you can have 32?
ARM CORTEX Rules!!!
ARM CORTEX Rules!!!