-
HWPWM and 4 motors
Hello,
I want to control 4 DC motors (single direction, no H-bridge) using 4 HWPWM outputs from a PIC. The PWM frequency is the same on all 4 outputs, the only thing that is different is duty cycle (since I want to change speed). I am also monitoring the BEMF from each motor commutation to "close the loop" and maintain set speed.
I looked at the 16F616, this is set up to drive 1/2 bridge or full bridge but does NOT allow all 4 HWPWM output at the same time. I would appreciate input from the group, if anyone has experience with this, your insight would be greatly appreciated!!!!
Best Regards,
Nick
-
At least, 4 possible solutions
1. Use 4 different PIC like 12F683 wich have PWM, ADC, and comparator available
2. Use one pic but no HPWM. You do your PWM signal using an TIMER interrupt. Once in the interrupt routine you just play with the duty delay of each outputs. Depending the frequency... it could work really well
3. Use external DAC converter OR digital pots.
4. Search for another PIC that allow 4 independant PWM... if it exist.
-
Have a look at the 16F684...
-
Muti_SPWM
Hi Nick,
Taylor made to your request, 2 years in advance. :)
Multiple Slow speed Software PWM
http://www.pbpgroup.com/modules/wfse...p?articleid=12
<br>
-
The 16F684 is a 1/2 or full bridge driver. It will only output PWM on 2 ports and give steering logic to activate an H-bridge (FWD / REV). Has anyone used it to put out 4 PWM signals? I don't think it is possible per spec sheet.
Best Regards,
Nick
-
You are correct!
You can only get 2 PWM's from it.
The ECCP does have several outputs. But, they can not be configured to output different frequencies or PWM dutycycles.
<br>
-
If you want more PWM's have a look at the 18F2431 - sports up to 4 PWM's with complimentary outputs...
-
Now that's a Cool chip.
I can't believe I haven't seen it before.
Wow, all those PWM's, and Capture channels.
Built in Quadrature Encoder Interface.
Super Fast A/D.
And everything else a good 18F would have.
Geez, where have I been..
Thanks fanie!
<br>
-
I have to agree it's a nice PIC even if it's hundred times too big for a so simple task.
Sorry to be a pest but, the Darrel's Link or the interrupt based routine is still the cheapest solution and will learn you something.