AirsoftMechanics.com
September 08, 2010, 12:39:10 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the NEW AirsoftMechanics.com Discussion Forums!
 
   Home   Help Login Register  
Poll
Question: You are in a realy bad spot on your local game.  The choice is, do you wish 50 more shots at the very real risk of doing $50 worth of damage to your gun?
I need those 50 rounds NOW!!  So the heck with the $50 in damaged parts! - 30 (31.3%)
Time to just "stop" now!!  I will live to fight another day with the gun I have not all busted up... - 66 (68.8%)
Total Voters: 94

Pages: 1 ... 24 25 [26]
  Print  
Author Topic: Computerized AEG Controller (Read 37175 times)
salamander
Recognition
Sergeant
*

Reputation Power: 23
Reputation: salamander barely matters.salamander barely matters.
[view reputation]

Online Online

Posts: 199



« Reply #375 on: May 12, 2010, 11:05:48 PM »

Guys what frequency are you using to drive your FETs? I was trying to feed the IRLB3034 with 4kHz without mosfet driver, but iam getting too much heat with 100R gate resistor. If i recall correctly from Sinewave's code i got that he is using 4kHz and searching around i found that even frequency as low as 50Hz is used by some. Currently it runs cool at about 500Hz, but i would like to bring it up a little as iam planning to do current measurements at the PWM rate and 500Hz is too slow. Any workaround without using decicated mosfet driver chip? I think the low current sourcing capable pins of the microcontroller are one of the reasons, also how much i can lower the gate resistor?

Update: Driving the FET thru driver have not helped in any way and the heat is still about the same. Only other thing that my design is missing now is the TVS. Could be that the voltage spikes when FET is switching are source of the heating? I will try to add TVS when i get one.
« Last Edit: May 14, 2010, 11:53:15 AM by salamander » Logged
Gandolf
High Voltage Guru
Global Moderator
Colonel
*

Reputation Power: 98
Reputation: Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.
[view reputation]

Offline Offline

Posts: 1593



WWW
« Reply #376 on: May 14, 2010, 12:25:56 PM »

I think mine run at 4000Hz too.  Pretty slow to keep heating down but I don't see heating problems.  Check the gate waveform to be sure it is clean.  Maybe the FET gate is damaged.


I found this.

It should not be spikes unless you have long wires running all over the place.  Just twisting the motor wires will take care of that.  You can double the gate resistor to 50 ohms with no problem.
Logged
salamander
Recognition
Sergeant
*

Reputation Power: 23
Reputation: salamander barely matters.salamander barely matters.
[view reputation]

Online Online

Posts: 199



« Reply #377 on: May 14, 2010, 01:21:33 PM »

Heh i just smoked one 1.5kW 15V TVS. It got shorted after the failure, but luckyly desoldered itself and fell of. Nice failsafe, FET is alive luckyly. When i had TVS there most of the heat was on the TVS instead of FET. When i checked it on scope there are large voltage spikes on the FETs drain when it turns off. About 50V without TVS and 25V with 15V TVS. What concerns me is the spike duration is about 100us which is a lot compared to the PWM switching period which is 500us.

Also when i put the PWM to 250Hz and give it 50% duty cycle the mechbox is cycling. Doing that at 2kHz the motor just whines and can't turn the gears even when piston is in the forward position.

I will try to clean up the cabling a bit, can't twist the wires much as they are relatively short, about 20cm from the FET to the motor and only stick like 7cm from the rear of the mechbox.

Update:
I found out that those spikes are generated in the motor inductance when it is switched off. Tiding the cables a bit didn't changed much and since i ran out of another options i started to look what is still different with my circuit and yours. Only thing that mine was missing was the active braking FET and its TVS. I remembered that i had nasty problems driving some nasty solenoid valves some time ago and the thing that solved it that time was antiparallel diode to the solenoid coil. The diode in braking FET and TVS diode here does basically the same thing when the voltage is cut from the motor coil, it allows the reverse current to flow thru that diode which reduces the spikes massively as i found out. It still gets a little warm, but nothing like before at 2kHz PWM now.

So even when active braking is not used the braking part of the circuit (or some equivalent diode) is necessary when higher frequency PWM is used.
« Last Edit: May 15, 2010, 04:02:58 AM by salamander » Logged
Gandolf
High Voltage Guru
Global Moderator
Colonel
*

Reputation Power: 98
Reputation: Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.
[view reputation]

Offline Offline

Posts: 1593



WWW
« Reply #378 on: May 15, 2010, 02:21:47 PM »

Oh yeah!!!  I had forgotten about this since it never was a problem since...

The anti-parallel diode in the active breaking FET dumps the spike energy back into the battery voltage rails.  A neat trick all FET H-bridges use now.



http://extreme-fire.com/Panther/Panther-DriveUnit-105a.jpeg

At first it might appear that the TVSs have no function.
The TVSs actually should only see the super high powered super fast spikes that the big old slow FET diodes can't stop.  



Seeing that scope picture made me put in big dual super speed TVSs Cheesy  The scope's trigger managed to catch them.  I finally pinned them down once I knew where to look.  Frightening beasts they are!  That FET breaks down at 24V and that 35V spike probably put a nice tiny pinhole in it.  Not bad enough to destroy it out right, but over time they will weaken and kill it.

FETs can't handle those and they can in fact destroy the FET despite the normal diodes trying to clamp them (they don't).  AIrsoft guns are unusually good at making high speed noise spikes like this so it is a special problem for us!  We don't have a nice LC load or anything.  Our load is a cross between a radio jammer and an atomic bomb Cheesy  The TVSs love those spikes but they can't take the pure heat energy of the full spiking like the big diodes in the FET can.  So they share the load and work together.  

The TVS take the super fast (sub pico-second if needed) super power spikes while the FET anti-parallel diodes do must of the slower inductive energy  dumping back into the battery rails.

Here is the bare FET trying to chop one down:

Note the top of the spike is 'sort of' clamped at 25V as the FET breaks down due to over voltage  Tongue

Here is the TVS actually doing it:

The 18V TVS kicks in fast at about 21V and eats the spike right up!  Wink

Gandolf
« Last Edit: May 15, 2010, 02:34:28 PM by Gandolf » Logged
salamander
Recognition
Sergeant
*

Reputation Power: 23
Reputation: salamander barely matters.salamander barely matters.
[view reputation]

Online Online

Posts: 199



« Reply #379 on: May 15, 2010, 02:35:15 PM »

Good that you tried all this man, your design seems to be really mature and bulletproof Smiley. Experimenting with this stuff is quite fun.

One question about the energy dumping, i can't quite imagine how the current flows during the spike supression, which way it gets dumped into battery? I mean if it is discharging the battery, or going opposite and "recharging it".

Btw after i fixed the PWM problems i also managed to adapt the detection algorithm to work with the PWM and iam able to reliably fire single or 3 round bursts. Now i have to decide what next, i will send you an PM.
Logged
Gandolf
High Voltage Guru
Global Moderator
Colonel
*

Reputation Power: 98
Reputation: Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.
[view reputation]

Offline Offline

Posts: 1593



WWW
« Reply #380 on: May 15, 2010, 04:16:15 PM »

Quote
Btw after i fixed the PWM problems i also managed to adapt the detection algorithm to work with the PWM and iam able to reliably fire single or 3 round bursts. Now i have to decide what next, i will send you an PM.
 
Cyclops  Cyclops  Cyclops  COOL!!!

Quote
One question about the energy dumping, i can't quite imagine how the current flows during the spike supression, which way it gets dumped into battery?

That's because the components are not doing what we would like for them to do.  We beat them up pretty badly and the laws of physics take over and leave the nice text book ideal stuff behind.  But we can use the ground and positive voltage rails from the battery with their massive capacitance as a sink for voltage clamping.  It is pretty easy to see.

First, here is the gun running happily:



The current flow is in red and the motor is like a big inductor.  I drew in the anti-parallel diodes on the FETs since the schematic program did not have them.

Now, lets turn off Q2 and break the current path:



Almost instantly the voltage on "-M" rockets up to say 1000V from the inductive kick of the motor!  So Q1D has the 10V battery on the cathode an 1000V on the anode.  Too bad it does NOT conduct the spike away  Shocked  It's too darn slow!!!  Tongue  Tongue  It was made for running a nice slow ferrite transformer or LC circuit that would not have a giant dV/dT spike.  Q2 ends up breaking down first and absorbs the spike as a little hot spot on the FET die.  Let's look at this in the real case:



On the yellow voltage trace you can see the FET getting the off signal to the gate at about 5.5uS where the first glitch is.  The gate capacitance and the FETs own speed make the actual switching not start until 7uS and then the voltage starts to ramp up (green). 

The ramp is slow due the that gate capacitance (and gate resistor) so it ramps at about 15V/us.  It just keeps on going up and up 'totally free' until the FET (Q1) breaks down at 25V (IRF1324).  Shocked  The red circle shows Q1 clamping and absorbing the energy.  Sad

At 10uS the energy has cooked a little crater in Q1 (just a small dent) and the voltage finally drops below 24V and the Q1 drops off again.   The voltage rings and stutters around 18V.

Then at 13uS (circled in red)...  Guess what that is?  It that Anti-parallel diode!!!  Cheesy  Clamps that darn voltage right back the the 13V battery!!  It only took 5uS to wake up  Cheesy  Cheesy  When they say slow soft reverse recovery, they are NOT kidding!! 

Normally that is a really good thing in say a switching power supply circuit with a nice load...  In our case it's a PITA and we need the TVS in parallel with the diode to do all the work for it.  In the real, case the slow diode really does take off a lot of the heat and the TVS are pretty well heat sinked (they should be) too.  The diode and TVS really do dump the current back into recharging the battery so we have regenerative recharging!!  But unlike the RC folks, our efficiency there is about zero...

Another point is that there are actually two inductors.  The motor winding inductance and the wiring inductance.  They are in parallel but due to their massive disproportions and distributed locations they act a bit independently.  The motor provides a lot of the slow inductive energy while the wiring's small inductance can create super fast spikes when mixed with the brush noise.  That's why the TVSs have to be super fast to catch that before the FETs do.

Now you know more about AEG FET drive than almost everyone (but me  Cheesy ) on Earth.  Cyclops  I had mentioned this all before but it is long lost in the billions of previous posts...  It needed a fresh look Wink  But all this is why Panther drive failures are measured with the number 0 Wink  Unless you hook the battery up backwards, dead short it, or run it under water, it just is not allowed to fail by itself.

Gandolf
Logged
salamander
Recognition
Sergeant
*

Reputation Power: 23
Reputation: salamander barely matters.salamander barely matters.
[view reputation]

Online Online

Posts: 199



« Reply #381 on: May 15, 2010, 04:47:58 PM »

Just WOW Gandolf, very nice explanation, i have seen you mentioning the TVS in other posts, i just haven't realized how important it really is and how big energy is generated there. Also iam the kind of guy that usually starts to look in the manual only after the things go wrong Tongue. I guess my poor IRLB3034 must have millions of little dents in its die from all the abuse in the last few days when it was driven totally unprotected at 4kHz PWM. I wonder if it is because the 40V Vds rating that it haven't failed, well i was watching its temperature carefully, but still.

Also just for comparison the TVSs i use are SMCJ15CA, i know you have 18V ones, but iam curious if they are comparable in speed.

I would give you karma but system says: Please spread the love before giving it to this user again. So, some other time Cheesy
Logged
Gandolf
High Voltage Guru
Global Moderator
Colonel
*

Reputation Power: 98
Reputation: Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.Gandolf has an aura about them.
[view reputation]

Offline Offline

Posts: 1593



WWW
« Reply #382 on: May 15, 2010, 06:26:22 PM »

Quote
Just WOW Gandolf, very nice explanation
Sometimes I get a little carried away  Smiley

There are lots of MOSFETs out there that don't have TVS's that do fine.   Wink  It is a statistical thing that has many variables and in most cases your one will do fine Wink  Now that people are even pushing 18V LiPO though it gets more intense since the energy is a v^2 function.  Simply twisting wire pairs is also a giant help!  Nowadays, all the FETs are avalanche rated too so they are supposed to be able to take a little beating.

A 40V part has a LOT more room too.  At the time our 1324 24V parts were all that we had so it was a pretty tight fit.  Now with 40V parts, the TVS side can be a lot more relaxed until they start using 36V LiPOs Cheesy

There are two types of TVSs and two speeds.  The simple unidirectional parts are rated at 1pS.  They are actually a weird thermal implanted bulk carrier thing as opposed to normal electronic IC things.  Their switching speed is actually limited by the available test equipment so they are far faster than 1pS (well into the small femto seconds).  But they say 1pS since that can be measured and guaranteed.  The bi-directional parts are vastly slower at 5nS.  They sandwich two unidirectional in effect and carriers get trapped and take a lot of time to move out in between.  Since my measured pulse was about 5nS wide I went to the 5000X faster uni-directional parts to be sure Wink

Quote
I would give you karma but system says:
No problem, I have had way too much karma in the past Cheesy
Logged
salamander
Recognition
Sergeant
*

Reputation Power: 23
Reputation: salamander barely matters.salamander barely matters.
[view reputation]

Online Online

Posts: 199



« Reply #383 on: May 16, 2010, 04:19:54 AM »

There are two types of TVSs and two speeds.  The simple unidirectional parts are rated at 1pS.  They are actually a weird thermal implanted bulk carrier thing as opposed to normal electronic IC things.  Their switching speed is actually limited by the available test equipment so they are far faster than 1pS (well into the small femto seconds).  But they say 1pS since that can be measured and guaranteed.  The bi-directional parts are vastly slower at 5nS.  They sandwich two unidirectional in effect and carriers get trapped and take a lot of time to move out in between.  Since my measured pulse was about 5nS wide I went to the 5000X faster uni-directional parts to be sure Wink

I found out that my transils are the bidirectional type. I will try to get the unidirectional and maybe after that even that little heat that is generated will disappear. But from what i see from the scope pictures the reverse diode in FET kicks in adter 5us and if the transil is even only the slower 5ns one its quite fast. I will see. At least i will be able to compare their effect. Digging in the various app notes about transil i found that the unidirectional one is acting like normal diode when positive polarised so this can be more beneficial as it helps the reverse diode in the FET
Logged
Dreamza
Newbie
*

Reputation Power: 0
Reputation: Dreamza has no influence.
[view reputation]

Offline Offline

Posts: 1



WWW
« Reply #384 on: July 10, 2010, 12:38:30 AM »

I doubt it, for them it's not "cost effective" to bring that sort of innovation into the marketplace at this time.
Logged

Pages: 1 ... 24 25 [26]
  Print  
 
Jump to:

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!