DRIVING MOSFETS - Page 1
Forum section: electronics / projects

author: MrsR
author_rank: Regular Contributor
timestamp: February 05, 2013, 03:49:42 pm
content: Hi! Guys,I have a bit of a problem, I am using a ATMEGA48V Microcontroller driving 2 IRF7389 Mosfets through Rohm Epetaxial NPN twin Transistors as gate drivers. Using pins 13 to 16 for output signals a Max of 380 Hz. I am trying to change to Mosfet drivers and here I am totally lost. I have an area problem so the package size can't be much larger than 3mm square.Can any one help me in finding the right driver/sAt present the closest driver I have found is Texas Ins. LM5112. 6 leg package.I can post a Diagram of the circuit layout,I don't think I should call it a schematic.The reason I am looking at changing from the transistors is that I have had some latch ups and can't find why.Also I was thinking that the p side would have to be crossed RHS Driver to LHS Mosfet.Rachael

author: Niklas
author_rank: Frequent Contributor
timestamp: February 05, 2013, 06:53:51 pm
content: Have you checked the ground return path from the present driver transistors? Do you have local decoupling capacitors? If not, that might be the cause of the latch ups.There is some layout info in the LM5112 datasheet and Microchip has an appnote about the problems:http://ww1.microchip.com/downloads/en/AppNotes/00763c.pdf

author: Kibi
author_rank: Unknown
timestamp: February 05, 2013, 07:17:42 pm
content: How about using a Logic Level MOSFET?Diodes do one here:-http://www.diodes.com/datasheets/DMC3028LSD.pdf

author: fcb
author_rank: Super Contributor
timestamp: February 05, 2013, 07:51:19 pm
content: Might be worth showing a schematic of what you are trying to achieve and a better description. Are you trying to build a pair of half-bridges? 380Hz seems pretty slow, so I'm gusessing you aren't doing motor control.

author: MrsR
author_rank: Regular Contributor
timestamp: February 06, 2013, 04:19:33 pm
content: Thanks for answering my question.The design is for high powered servo, it has a normal type Analog input being a 50 Hz signal with a min pulse width of .9ms and a max of 2.1 the motor drive is digital which runs at a higher frequency. his gives more pulses per ms which gives more torque faster start and stop times and more accurate centering.The PCB size is 16mm x 30mm and this small board doesn't give much room to play with.Although there hasn't been very many latch ups just one can be expensive.I include a PDF of the digital circuit and I have down loaded the suggested PDFs and will read them today.Unfortunately we had a lightning strike last month and most of my gear was fried to a crisp and I lost my main computer that had all the maths in it, I put all my formula on spread sheets and that makes it easy to redo calculations for other work.The pins 27 and 28 go to drain and are at 1kHz. The question about Caps. I think it was found that they would make more problems than they would solve, but I am making a couple of experiment boards and I will allow space to try them. The reason I make larger test boards is that it is easier to use 0603s instead of 0402 components. Thanks for helping.Rachael

author: hlavac
author_rank: Frequent Contributor
timestamp: February 06, 2013, 04:46:47 pm
content: You are supposed to put something like 10 ohm resistor between the MOSFET gate and whatever you are driving it with.It dampens the ringing (stray leads inductance and gate capacitance form an LC resonant tank) and it also slows the fast rise time on the gate that may be causing your latchups.

author: ConKbot
author_rank: Super Contributor
timestamp: February 06, 2013, 05:12:57 pm
content: Quote from: hlavac on February 06, 2013, 04:46:47 pmIve seen it suggested (cant find a reference at the moment) to set the RC time constant of the gate capacitance (look up the gate charge at your drive voltage) to about 5x of the MOSFET turn on time to use as a starting point. Obviously increase the resistance if you need a slower turn on or lower if you need faster turn on.

author: MrsR
author_rank: Regular Contributor
timestamp: February 08, 2013, 05:38:49 pm
content: AcHmed99,Actually if you bring the top and bottom of your drawing closer together you will find it is nearly identical.The tracks from pins 27,28 are to drain which goes to the motor. THEY ARE NOT JUST OFF PINS GOING TO THE MOTOR.I have made about 30 differant H Bridge type motor drives and this is the best due to the number of functions that the motor circuit is programable for like over load reduction in power to the motor etc.BUT THE DESIRE IS TO USE DRIVERS INSTEAD OF THE TRANSISTORS and is the 5112 driver compatable or is there a better suited driver. Come on guys my head is hurtingand the wall isn't bleeding it's my headany one got an idea???Rachael

author: Kremmen
author_rank: Super Contributor
timestamp: February 09, 2013, 08:25:29 am
content: Some of the requirements from your original post may make this one a bit complicated. The basic solution is a piece of cake: pick a pair of half-bridge drivers like IR2110 or similar and 4 N-channel FETs with suitable specs. Sprinkle with the few auxiliary components needed for the high side pump and you are done. Only in your case the high side switch is P-channel so that doesn't work. And anyway, all half-bridge drivers i have seen are made to take like 600V voltage stress from the high side. That is not compatible with a package size anywhere near 3mm square. Can't be done.And no offense intended but i have to agree with AcHmed - do draw the schematics using proper component symbols instead of component outlines. They add no value and just make the schematic impossible for anyone to follow. There is a default way how to draw the H bridge as demonstrated already. Why not use that and make everyone happy.My point being, if the problem is tough, don't make it tougher needlessly.Just a tangential thought: there is this thing some programmers do: obfuscated C. They compete who can make the most incomprehensible piece of C source code that has to be valid C and produce the desired end result. The point being that it is as hard as possible for a human to decipher what that result will be, just looking at the source code.http://www.ioccc.org/And here for your amusement (or at least those who do C), one of the winning entries of 2012 contest. What does it do?#define o(a,b,c,d) a##f b##f c##f d; a##g b##g c##g d;q--#define Z(z)if(*j==z)#define c(z,p) Z(z){y;v p##=r;o(b,[q-1]=b, p b,);}#define y q+=t;t=0#define r w#define v w[q-1]#define w(a,m,f) Z(a){y;r=m(r);q++;o(b,[q-1] = -b,[q-1]*f(r)+0*b,);}#define A(p,w,o) for(p=0;p<w;p++)_(o)#define P(a) for(a=Z;a<Z;a++)#define _ putchartypedef double o;typedef char z;o A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y, E_, w, bf, bg,x=-1.3/8,p,d,l=0,h=4e-3,f,m;z e = "FKE<<gMAQUDIYO9\"=", *k, *j; o g(o p, o d){int q =-1,t=0;j=k;while( *j ){c(45,-);Z(100){y;q++;r=v;q=bf[q-1];q=bg[q-1];}Z(42){y;v*=r;o(b,[q-1]=r*b,[q-1] + v*b,);}Z(44){t=0;q++;}Z(116){f=v;v=r;r=f;f=bf;q=bf[q-1];bf[q-1]=f;f=q;bg=(q-1);bg[q-1]=f;}c(43,+);Z(47){y;v/=r; o(b,[q-1]=b,[q-1]/r-v/ (r*r)*b,);}Z(121){y;q++ ;r=d; bf[ q]=0;bg=1;}Z(94){y;f=v;v=pow(v,r) ;o(b,[q-1]=r*b,[q-1]* pow(f,r-1)+0*b,);}w(115 ,sin,cos);w(99,cos,sin);Z(120){y;q++;r=p;bf =1;bg=0;}if(*j>=48 &&*j<58){q++;t=1;r=*j-48 ; bf = 0;(q--) = 0;}j++;}H=bf ;K= bg[ 0]; return w;}void s(){int e=0;X=Q*8;f=g (Y*8, L*8 );e=(f-X<0)?1: -1;l=0;while((l+=h)<{V=Y*8+l*R;W=L* 8+l*D;X= Q*8+l*U;f=g(V,W);if((f -X)*e>0){if(V>-1&&V<1&&W>-1&&W<1){p=V;d=W;return ;}else e/=-1;}}p=d=-10 ;}int main(int argc, z **argv){int c, f;z b,Z ;S=0,C=1;k=argv;Z = atoi(argv)>>1;b=Z*2&255;b=Z>> 9;J= 3.1415/Z;A(f,6,f^f+1);while(--f>1)_((f%2));_(246);A(c,384,c/3%2?c/6<<2:0);_(_(0));_(_((_(33)<<3)-9)/23);for(f+=5;f < c/22 ; f++) _(e ^ f - 3);for(;f> c/29;f--)_(f>15?2*f-31:c);_(0);for(f=0;f<=Z*2 ; f++){N = S;E_=1-J*J/2;T=J*(1-J*J/6);S=S*E_+C*T;C=C*E_-N*T;A=-(C*C-S*S);P=-A*C;E=A*S;G=S*C*2;I=-G*S;F=G*C;_((_(e/2-1)<<3)-18);for(c=-1;c<5;c++)_((c+1)%2?0:-2*c*c+3*c+9);_(44);A(c,9,c&4?(1-c%2):0);_(7);for(B=-Z ; B<Z ; B++){_(Z+2);for(O=-Z;O<Z;O++){Y= (E - P*B/Z - G*O/Z)*x;L = (I - F*B/Z - A*O/Z)*x;Q = (-C +S*B/Z)*x;R = - Y + E; D =-L+I; U =-Q-C;s();3 = sqrt(R*R + D*D + U*U);m=p==-10?1:(4=sqrt(H*H+K*K+1)*w,H/=-4,K/=-4,fabs(H*R + K*D + U/4)*exp(-l*l/2) );_((z)(m * 63)*2 + ((z)((p+1)*6) % 2 + (z)((d+1)*6) % 2 == 1 ? 1 : 0));O?l:(_(128),_(B!=Z-1 ? Z : Z+1));}_(128);}_(_(129)-129);}_(0x3b);}

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: February 09, 2013, 09:41:29 am
content: My best guess, it puts the letters of the alphabet in a circle??

author: mrflibble
author_rank: Super Contributor
timestamp: February 09, 2013, 02:29:17 pm
content: A schematic might help a little. ;-) Other than that ... I notice you have a bit of a curious circuit to drive the mosfet bases. If you want fast on/off switching then you may want to use a push-pull stage. As in a npn+pnp pair for each mosfet gate. And as has been pointed out, put a ~ 10 Ohm resistor between the gate driver and the mosfet gate to prevent fun oscillations.As for using integrated gate drivers, generally those are cheaper for bridges with N-channel mosfets on both the low side and high side.

author: Kremmen
author_rank: Super Contributor
timestamp: February 09, 2013, 06:23:19 pm
content: Quote from: HackedFridgeMagnet on February 09, 2013, 09:41:29 amSorry about the OT garbage, and i'll shut up after this, but -Not even close## Author's comments:Remarks-------This program renders a generic RPN expression in ray-traced animated GIF form.The expression in spatial variables x and y is specified on the command-line with the required resolution,and an animated GIF showing a fly-around of the resulting surface is output to stdout.Usage-----The program should be run as:./blakely xy* 32 > pic.gifwhere the first parameter is a RPN expression, and the second is the width of the required GIF, up to a maximum of 250.The expressions are written in Reverse Polish Notation with the following characters recognised:* +,-,\*,/ - usual arithmetic operations* ^ - Exponentiation - valid for constant exponent only* s - sin* c - cos* 0-9 - single digit integers* d - duplicate number on stack* t - transpose top two elements on stack* x - x coordinate value* y - y coordinate valueNB all arithmetic is done in double precision, so 23/ is two-thirds, rather than 0The surface plotted corresponds to -1 <= x,y <= 1 and for best results, the generated z value should lie between -1 and 1.If there is a division by zero, square-root of a negative number, or similar operation, then the results are undefined.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: February 09, 2013, 10:35:37 pm
content: I saw argv but somehow forgot about it.I saw the Pythagorean calculations but didn't see it was in 3d.I saw the clue in the ascii art but completely misinterpreted it.Got to love those single character defines.Oh well, I failed badly but it was a nice thread hijack on your part anyway.Sorry MrsR about the hijack, one thing I noticed is should you have caps to ground on pins 27 and 28 to make a LPF and maybe offer some protection against transients. I am assuming they are inputs.

author: MrsR
author_rank: Regular Contributor
timestamp: February 13, 2013, 11:02:56 am
content: I am sorry there is no Schematic but it was on my computer that got struck by lightning. What I have shown in the pdf is a block diagram I used to work out placement of components for my PCB I might add I lost all my test gear and my contents Insurer won,t cover the loss Including a new Rigol DSO ( I told them DAVE recomended them) said I would Dave. Due to me not listing them on my contents policy.I tryed the 10ohm resistor and it made the latch up worse.Something to do with the internal make up of the mosfet. A friend told me what happened but I got lost after the he said "The internal make up in part resembles an scr. " So I will continue looking at Tech. Sheets on drivers until I can find a Driver small enough.THANKSRachael

author: jerry507
author_rank: Regular Contributor
timestamp: February 13, 2013, 04:45:55 pm
content: Seriously, it's not a complicated circuit. You can sketch it on a piece of paper in 5 minutes. It will make life much better, especially because this is a rather complicated transistor drive arrangement. I don't mean to be overly rude here, but you're coming to us asking for help. If you expect us to put in the effort to think about it, please put in the effort to make it as easy for us as possible.Now, I spent 5 minutes of MY time here at work (I'm bored, so w/e I don't mind as much) drawing half of your schematic. I'd post it but I forgot my phone todayAnd it's strange! What is with R17 and R18? Why do you have R11 for pin16 but no resistor for pin14? This has got to be the strangest drive circuit I've ever seen.

author: mrflibble
author_rank: Super Contributor
timestamp: February 13, 2013, 05:16:32 pm
content: Quote from: jerry507 on February 13, 2013, 04:45:55 pmHeh, no kidding. I tried to hint at that novel gate driving arrangement earlier.Quote from: mrflibble on February 09, 2013, 02:29:17 pmI think I see all sorts of problems with this circuit, but my brain moves on to better documented pastures after about 1 minute. Put another way: you can help us help you by kindly providing a readable schematic.

author: Niklas
author_rank: Frequent Contributor
timestamp: February 13, 2013, 11:40:41 pm
content: I think I have a clue about how the circuit is suposed to work and what might be the problem. :-)IC7 and IC8 are both complementary pairs (N+P) of MOSFETs, with the N-channel one on pins 1,2,7 and 8. IC7 is one leg in the H-bridge and IC8 is the other one. R17 and R19 are both pulldown resistors on the N-channel MOSFETs' gates to hold them default off. In parallell with R17 is an NPN transistor (IC6, pin 4 and 5) that is held on by R12 if IC9 is not active. That will also result in a low drive voltage on the P channel MOSFET's gate and it will turn on and connect the motor to V+.To turn on the N-channel MOSFET in IC7, you must have a logic high level on pin 16 on the microcontroller. The signal will pass through R11 and is suposed to turn on the other transistor in IC6 (pin 1, 5 and 6) and give V+ to G2 (P-channel MOSFET gate) on IC7. The gate of the N-channel will be charged through R18 and turned on if the NPN in parallell with R17 is turned off. That is done by outputing a logic high signal on pin 15 on the microcontroller. No series resistor is needed for IC5 as it has internal base resistors.C8 and R16 are probably there to filter the forward voltage drop of the N-channel MOSFET and read as an analog voltage by the microcontroller. That will be some kind of crude over current protection or end point detection.So what might be the problem causing latchups?The microcontroller is supplied with 3 Volts and the MOSFETs with V+ of about 8 Volts. All the transistors in IC4, IC5 and IC6 are of NPN polarity. To turn the transistor on pins 1, 5 and 6 in IC6 on, a forward voltage must be applied over the base-emitter junction. Think of G2 on IC7 as a capacitor that is charged through the IC6 transistor. The capacitor is discharged and then a logic high of 3 Volts is applied the NPN base pin. The base emitter diode has a positive forward voltage of 0.6 Volts and the remaining 2.4 Volts are over R11. As G2's voltage increases to 2.4 Volts, the base emitter voltage of the NPN is starting to reduce and will soon be shut of. There is no way that G2 will be charged close to V+ and turn of the P-channel MOSFET in IC7. A PNP transistor (E on V+, C on G2 and with a pullup resistor from the base to V+) would be a better way to do it. However, the base of that PNP must be pulled low by an NPN transistor through a series resistor to do the voltage level conversion.Check the third schematic on the linked page to get an idea of the combined NPN and PNP drive stage:http://jeelabs.org/2012/11/12/high-side-switching/The box with the question mark is where the P-channel MOSFET's gate is.

author: MrsR
author_rank: Regular Contributor
timestamp: February 15, 2013, 04:43:38 pm
content: Niklas,I thought you were Neil when I read your post, He helped me with the circuit back in 2007/8 He also recomended using a PNP as a better method, I loojed at the circuit you pointed to and going on memory that looks like it. I am going to go and have a good look at it when I can.You are right about looking at it logically. I had another look at the PDF I posted and it is easier to follow than the schematic sheet, thank you for an intelligent description . The reason we didn't go that way was lack of boardspace.Rachael