View previous topic :: View next topic |
Author |
Message |
kenken
Joined: 10 Feb 2011 Posts: 5 Location: Japan
|
Half-Bridge Output Driving a Full-Bridge Circuit |
Posted: Wed Mar 27, 2013 8:41 am |
|
|
Hi everyone.
I'm trying to make a circuit that can operate Full bridge by 2pins half bridge (ECCP P1A % P1B).
Device PIC16f1827
compiler version 4.128
I got the information from datasheet.
DS41391D-page 215 FIGURE 24-9: EXAMPLE OF HALF-BRIDGE APPLICATIONS
->Half-Bridge Output Driving a Full-Bridge Circuit.
http://ww1.microchip.com/downloads/en/DeviceDoc/41391D.pdf
I want to make motor controller that can operate forward and reverse by only 2pins.
(like a CCP_PWM_FULL_BRIDGE_REV and CCP_PWM_HALF_BRIDGE)
And I need the information that how to set duty rate and direction.
ex. set_pwm1_duty(xxx); CCP_PWM_half_BRIDGE_REV;
But I can't find any information from 16f1827.h file, manual, this forum,etc.
Please help me and let me know how to make this code. Thank you. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Wed Mar 27, 2013 9:25 am |
|
|
Simply put...
send PWM signal to one 'diagonal' set of drivers ( upper left, lower right), and direction to other set (lower left, upper right).
As to how to setup the PWM, that's up to you. I don't know frequency of motor, HP, driver rates, etc.
In fact you don't even need the hardware PWM, simple bitbanging can easily handle the task.
There is a TON of examples on this site, probably in the EXAMPLES folder that CCS supplies and of course the Internet is full of code too.
Without a lot more information I can't help any further...
cheers
jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Thu Mar 28, 2013 3:54 am |
|
|
I think the Microchip data here is slightly misleading.
If you think about it if you drove both PxA, and PxB, with the circuit as shown, all you would do is blow up the circuit!.....
What you have to do is run the half bridge setup as effectively a single PWM, driving Just PxA _or_ PxB. Switching which one is used, gives you forward/reverse. The other output has to be set 'off'.
Now the polarities needed will depend on whether you have inverting or positive logic drivers.
There is actually no advantage to using the 'half bridge' setup here. Simpler just to use the pulse steering option with the single PWM output.
Best Wishes |
|
|
kenken
Joined: 10 Feb 2011 Posts: 5 Location: Japan
|
Thanks both of you. |
Posted: Sat Mar 30, 2013 8:25 am |
|
|
temtronic and Ttelmah
Thank you so much for your comments.
It seems I got wrong understanding from the data sheet
I realized the half bridge ECCP function is suitable for push pull circuit.
Now I can handle the forward and reverse operation with single PWM(2ways).
Ttelmah, I agree the datasheet is misleadingly then I wanted to try the function.
Best Regards |
|
|
|