Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Hbridge cct

Hbridge cct

2004-12-10 by kc wong

dear all:
i m using bascom AVR and AtMega8535 chip to program to switching the 4 mosfet on off in a Hbridge cct. i want to generate ac squarewave output from the Hbridge cct but i cant get it because it look like not square completely.the output is to control a motor(15V 2A) in 50 Hz.
(1) my simple program like this
Do
reset pind.2
set pind.1
reset pind.2
waitms 20
reset pind.1
set pind.2
waitms20
loop
one output is to 2 mosfet. can anyone suggest other command other than the above one? coz the timing may be not accurate.later i want to switching 12 mosfet so i cant use PWM command.
(2) have anyone use IR2110 mosfet driver before.i am using it now but it is complicated in connection. i need to connect the chip to optocoupler to mosfet driver and then to the mosfet.
thanks
from kim

Do you Yahoo!?
All your favorites on one personal page � Try My Yahoo!

Re: [AVR-Chat] Hbridge cct

2004-12-10 by Robert Adsett

At 07:15 PM 12/9/04 -0800, you wrote:
>dear all:
>
>i m using bascom AVR and AtMega8535 chip to program to switching the 4 
>mosfet on off in a Hbridge cct. i want to generate ac squarewave output 
>from the Hbridge cct but i cant get it because it look like not square 
>completely.the output is to control a motor(15V 2A) in 50 Hz.

<snip>

>
>         one output is to 2 mosfet. can anyone suggest other command other 
> than the above one? coz the timing may be not accurate.later i want to 
> switching 12 mosfet so i cant use PWM command.

I don't follow you here.  If it is still an H bridge than the number of 
MOSFETs in it isn't particularly relevant to whether or not you use a 
PWM.  The only other interpretation I make of this would involve a 6 phase 
setup and that seems irregular as well.

>
>(2) have anyone use IR2110 mosfet driver before.i am using it now but it 
>is complicated in connection. i need to connect the chip to optocoupler to 
>mosfet driver and then to the mosfet.

You are using an optocoupler to drive a 2110?  That seems ummm..., 
unusual... Is your motor power supply floating relative to your control 
power supply?

Also 50Hz strikes me as awfully slow for a 2110 unless you are running a 
floating power supply for the high side gate drive.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [AVR-Chat] Hbridge cct

2004-12-10 by kc wong

hi robert:
sorry, i skip some description.my motor is a linear synchronous motor(LSM)
 
(1) first i do a single phase hbridge cct which use 2 pchannel(high side) n 2 nchannel(low side) power mosfet.left high side mosfet(drain) is connected to gate of right low side mosfet. right hide side mosfet (drain) is connected to left low side(gate) mosfet. which means when left high side mosfet is on, then right low side mosfet will also on. same with right high side mosfet n left low side mosfet will on together in next stage. i use 2 BJT to switching both high side pchannel mosfet.so i set two output from 8535 chip to the BJT throug 2 optocoupler without using IR2110. everything goes find except i cant get purely squarewave output. so any suggestions on the commands which can generate the squarewave waveforms.
 
(2) after that i will try 3 phase by building 3 set of the hbridge cct above so totally 12 mosfet.
    my professor ask me to do this instead of just using 6 mosfet in a cct...
 
(3) later only i will try use IR2110 to directly switching the 4 mosfet in single phase hbridge cct without using 2 BJT....and then later switching 12 mosfet from output of the chip....but i m new in IR2110 and dont know how to use it correctly...i dont know how to connect the Vb,Vcc,Vs,Vdd,Vss and what voltage to supply them?
 
 
(4) yes i have to connect optocouple 4N26 between IR2110 and 8535chip to protect the chip coz later the supply voltage to 3phase cct may goes up to 100V (10A)..no choice...
 
(5) my motor power supply is separated from the control power supply... 
 
thanks again
 
from kim
 

Robert Adsett <subscriptions@aeolusdevelopment.com> wrote:
At 07:15 PM 12/9/04 -0800, you wrote:
>dear all:
>
>i m using bascom AVR and AtMega8535 chip to program to switching the 4 
>mosfet on off in a Hbridge cct. i want to generate ac squarewave output 
>from the Hbridge cct but i cant get it because it look like not square 
>completely.the output is to control a motor(15V 2A) in 50 Hz.

<snip>

>
>         one output is to 2 mosfet. can anyone suggest other command other 
> than the above one? coz the timing may be not accurate.later i want to 
> switching 12 mosfet so i cant use PWM command.

I don't follow you here.  If it is still an H bridge than the number of 
MOSFETs in it isn't particularly relevant to whether or not you use a 
PWM.  The only other interpretation I make of this would involve a 6 phase 
setup and that seems irregular as well.

>
>(2) have anyone use IR2110 mosfet driver before.i am using it now but it 
>is complicated in connection. i need to connect the chip to optocoupler to 
>mosfet driver and then to the mosfet.

You are using an optocoupler to drive a 2110?  That seems ummm..., 
unusual... Is your motor power supply floating relative to your control 
power supply?

Also 50Hz strikes me as awfully slow for a 2110 unless you are running a 
floating power supply for the high side gate drive.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
 The all-new My Yahoo! � What will yours do?

Re: [AVR-Chat] Hbridge cct

2004-12-10 by Robert Adsett

At 10:21 PM 12/9/04 -0800, you wrote:
>hi robert:
>sorry, i skip some description.my motor is a linear synchronous motor(LSM)
>
>(1) first i do a single phase hbridge cct which use 2 pchannel(high side) 
>n 2 nchannel(low side) power mosfet.left high side mosfet(drain) is 
>connected to gate of right low side mosfet. right hide side mosfet (drain) 
>is connected to left low side(gate) mosfet. which means when left high 
>side mosfet is on, then right low side mosfet will also on. same with 
>right high side mosfet n left low side mosfet will on together in next 
>stage. i use 2 BJT to switching both high side pchannel mosfet.so i set 
>two output from 8535 chip to the BJT throug 2 optocoupler without using 
>IR2110. everything goes find except i cant get purely squarewave output. 
>so any suggestions on the commands which can generate the squarewave waveforms.

You do realize the P channel MOSFET requires a different drive than the N 
channel?  One of the big (very big) advantages of using something like the 
IR2110 is that you can use N channels on both the high and low sides taking 
advantage of the far better N channel devices.

Oops I think I misread the above.  I'd skip using the optos and PFets and 
go directly to using the 2110.  Or I'd not use the 2110.  You will probably 
have enough to do getting one drive circuit to work along with the rest of 
what you want to do.

What do you mean you can't get a square wave?  Are you referring to duty 
cycle or the rise and fall of the edges?  If it's duty cycle just adjust 
your timing.

I'm more concerned about your frequency.  If you are driving some sort of 
DC (brushless, Switched reluctance etc) motor 50Hz is likely to produce a 
significant amount of ripple.

>
>(2) after that i will try 3 phase by building 3 set of the hbridge cct 
>above so totally 12 mosfet.
>     my professor ask me to do this instead of just using 6 mosfet in a cct...

Just a note: IR does make 3 phase drivers.

You actually need 3 full H bridges, not 1/2H bridges?

>
>(3) later only i will try use IR2110 to directly switching the 4 mosfet in 
>single phase hbridge cct without using 2 BJT....and then later switching 
>12 mosfet from output of the chip....but i m new in IR2110 and dont know 
>how to use it correctly...i dont know how to connect the Vb,Vcc,Vs,Vdd,Vss 
>and what voltage to supply them?
>
>
>(4) yes i have to connect optocouple 4N26 between IR2110 and 8535chip to 
>protect the chip coz later the supply voltage to 3phase cct may goes up to 
>100V (10A)..no choice...

Umm, the 2110 does provide isolation for up to 600V.  That should be 
sufficient for 100V supply.  IR does have app notes showing hookups for the 
2110 and this is the usual configuration.

>
>(5) my motor power supply is separated from the control power supply...

The ground (return) for the motor supply is separate from that for the 
control circuit?  Then for a 3-phase system running with a 50Hz square wave 
you are probably going to need between 4 and 6 isolated 12 to 15V supplies 
to run the gates.  At that point I would think something like Agilents 
optoisolated gate drivers would make more sense.

Running a pwm would allow you to get rid of 3 of those supplies.

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [AVR-Chat] Hbridge cct

2004-12-11 by kc wong

thanks robert, i will try it. if IR2110 can isolate 500V then i can save my optocouplers..
i have attach my first hbridge cct without using ir2110.i only need to switching Q1 or Q2 but not the both at the same time.
 
i am using bascom AVR 1.11.7.4 with AtMega8535 chip
i use this hbridge cct to drive a single phase motor and would like to switching the mosfet at accurate timing at 50Hz.
 
(1) so what commands can i use..because now i write a simple program like below;
 
Do 
   reset pina.2
   set pina.1
   reset pina.2
   waitms 10
   reset pina.1
   set pina.2
   waitms10
 
loop
 
is these commands can be used for switching the mosfets. i try this on my first cct,i work fine for small LSM motor(12V <1A) but it seems weak when drive larger LSM motor (15V 3A),why?
 
i need to generate 2 output for now and later will modify my cct by using IR2110 and need four output from my chip but 8535chip dont have four timer or PWM so how....
 
after this i need to build 3phase also which need 12 output from chip to switching the mosfets...
 
(2) how can i change the duty cycle? because i may use 4 output from 8535chip when i use IR2110..what commands can i used??
 
thanks
from kim  

Robert Adsett <subscriptions@aeolusdevelopment.com> wrote:

At 10:21 PM 12/9/04 -0800, you wrote:
>hi robert:
>sorry, i skip some description.my motor is a linear synchronous motor(LSM)
>
>(1) first i do a single phase hbridge cct which use 2 pchannel(high side) 
>n 2 nchannel(low side) power mosfet.left high side mosfet(drain) is 
>connected to gate of right low side mosfet. right hide side mosfet (drain) 
>is connected to left low side(gate) mosfet. which means when left high 
>side mosfet is on, then right low side mosfet will also on. same with 
>right high side mosfet n left low side mosfet will on together in next 
>stage. i use 2 BJT to switching both high side pchannel mosfet.so i set 
>two output from 8535 chip to the BJT throug 2 optocoupler without using 
>IR2110. everything goes find except i cant get purely squarewave output. 
>so any suggestions on the commands which can generate the squarewave waveforms.

You do realize the P channel MOSFET requires a different drive than the N 
channel?  One of the big (very big) advantages of using something like the 
IR2110 is that you can use N channels on both the high and low sides taking 
advantage of the far better N channel devices.

Oops I think I misread the above.  I'd skip using the optos and PFets and 
go directly to using the 2110.  Or I'd not use the 2110.  You will probably 
have enough to do getting one drive circuit to work along with the rest of 
what you want to do.

What do you mean you can't get a square wave?  Are you referring to duty 
cycle or the rise and fall of the edges?  If it's duty cycle just adjust 
your timing.

I'm more concerned about your frequency.  If you are driving some sort of 
DC (brushless, Switched reluctance etc) motor 50Hz is likely to produce a 
significant amount of ripple.

>
>(2) after that i will try 3 phase by building 3 set of the hbridge cct 
>above so totally 12 mosfet.
>     my professor ask me to do this instead of just using 6 mosfet in a cct...

Just a note: IR does make 3 phase drivers.

You actually need 3 full H bridges, not 1/2H bridges?

>
>(3) later only i will try use IR2110 to directly switching the 4 mosfet in 
>single phase hbridge cct without using 2 BJT....and then later switching 
>12 mosfet from output of the chip....but i m new in IR2110 and dont know 
>how to use it correctly...i dont know how to connect the Vb,Vcc,Vs,Vdd,Vss 
>and what voltage to supply them?
>
>
>(4) yes i have to connect optocouple 4N26 between IR2110 and 8535chip to 
>protect the chip coz later the supply voltage to 3phase cct may goes up to 
>100V (10A)..no choice...

Umm, the 2110 does provide isolation for up to 600V.  That should be 
sufficient for 100V supply.  IR does have app notes showing hookups for the 
2110 and this is the usual configuration.

>
>(5) my motor power supply is separated from the control power supply...

The ground (return) for the motor supply is separate from that for the 
control circuit?  Then for a 3-phase system running with a 50Hz square wave 
you are probably going to need between 4 and 6 isolated 12 to 15V supplies 
to run the gates.  At that point I would think something like Agilents 
optoisolated gate drivers would make more sense.

Running a pwm would allow you to get rid of 3 of those supplies.

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III


Yahoo! Groups Sponsor 
Get unlimited calls to

U.S./Canada


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Easier than ever with enhanced search. Learn more.

Re: [AVR-Chat] Hbridge cct

2004-12-11 by Robert Adsett

At 11:10 PM 12/10/04 -0800, you wrote:
>thanks robert, i will try it. if IR2110 can isolate 500V then i can save 
>my optocouplers..
>i have attach my first hbridge cct without using ir2110.i only need to 
>switching Q1 or Q2 but not the both at the same time.
>
>i am using bascom AVR 1.11.7.4 with AtMega8535 chip
>i use this hbridge cct to drive a single phase motor and would like to 
>switching the mosfet at accurate timing at 50Hz.

As I said unless you are driving AC 50Hz is awfully slow.

However, you still haven't answered the question:  What do you not mean by 
not getting a square wave?  What exactly are you seeing?

And now that I've seen the circuit where are you measuring it?

Personally I wouldn't use this circuit.  In particular the drive scheme on 
the low side is going to be a potential problem source.  It's vulnerable to 
inductive kickback (you are driving a motor after all).  I'd also get rid 
of the diodes, they are doing nothing for you, particularly at 50Hz.  The 
low side drive will certainly fail at higher voltages so why use it at low 
voltages?  Since you appear to be using low voltages to test and learn (a 
good idea) you learn little if you use a totally different drive scheme for 
the two cases.

>
>(1) so what commands can i use..because now i write a simple program like 
>below;
>
>Do
>    reset pina.2
>    set pina.1
>    reset pina.2
>    waitms 10
>    reset pina.1
>    set pina.2
>    waitms10
>
>loop

Three questions:  Where are you measuring the square wave?
         What does it look like (IE what do you mean by not square)?
         Do you know what duty cycle means?


>is these commands can be used for switching the mosfets. i try this on my 
>first cct,i work fine for small LSM motor(12V <1A) but it seems weak when 
>drive larger LSM motor (15V 3A),why?

What are your rise and fall times like?
What does the power rail look like?
Have you measured the current?  If so what does that waveform look like and 
how does it compare to the ideal driving waveform?

>i need to generate 2 output for now and later will modify my cct by using 
>IR2110 and need four output from my chip but 8535chip dont have four timer 
>or PWM so how....

Why?  In fact I think generating 4 separate outputs to drive the H bridges 
is possibly the worst method.  It's certainly the most likely to result in 
timing errors.  On the upside I suppose it could allow tuning the deadband 
in SW but I don't believe you have anything fast enough to do that.

At most you should need one PWM per phase (and maybe some discrete steering 
logic).

>
>after this i need to build 3phase also which need 12 output from chip to 
>switching the mosfets...

I don't see why.

>
>(2) how can i change the duty cycle? because i may use 4 output from 
>8535chip when i use IR2110..what commands can i used??

This is a bit Socratic but I think justified (especially since this is an 
educational project).

First define duty cycle.  If you don't know what that is go and read a 
little bit on PWMs and then come back.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.