CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Half-Bridge Output Driving a Full-Bridge Circuit

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kenken



Joined: 10 Feb 2011
Posts: 5
Location: Japan

View user's profile Send private message

Half-Bridge Output Driving a Full-Bridge Circuit
PostPosted: Wed Mar 27, 2013 8:41 am     Reply with quote

Hi everyone. Very Happy
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: 9169
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 27, 2013 9:25 am     Reply with quote

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: 19358

View user's profile Send private message

PostPosted: Thu Mar 28, 2013 3:54 am     Reply with quote

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

View user's profile Send private message

Thanks both of you.
PostPosted: Sat Mar 30, 2013 8:25 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group