Electronics > Projects, Designs, and Technical Stuff
Why is my microcontroller and Mosfets failing in this circuit?
(1/5) > >>
Civilenjuneer:
Hi girls (I hope I'm not the only one) and guys,

I'm not an EE by trade, just a hobbyist but I have been dabbling for a while now - yet I am at a loss to know what exactly is going on here.

I built a little LED light for my motorcycle... just a couple of strings of LED's that shine through a mask and light up the area around the bike with our club logo.  I have a couple of pushbutton switches with 14.4V on one side (with a diode and voltage divider) which, when pressed, input 2.7v into two microcontroller inputs and controls the LED's on/off.  The MCU turns on the gate of either of two N-FET's which let power flow through the corresponding group of LED's.  I potted the whole thing with thermal potting epoxy (made for electronics) so I also have a hall switch which lets me use a magnet to cycle through various pre-defined flashing patterns stored in the MCU.

It has been working fine for a year or two.  Some of the other girls and guys in the club asked me to make them one, so I made a batch and gave them away as door prizes at last years big club meet.  And about half of them failed.  Some failed as soon as they were installed.  Some when the motorcycle was started up.  Some after a few days or a few weeks.  I've gotten several of the failed units back.  When I took them apart, it seems the microcontroller is dead most of the time, and also most of the time one of the FET's (or both) are also dead. 

The LED's are high power Cree X-Lamp LED's rated for 1A and I run them around 400mA at Vin of 14.5.  The resistors are 5W and I actually ran 2 in parallel (not shown on schematic).   The LED's, resistors and FET's are all attached to a machined heat sink which touches all the parts and is secured with thermal epoxy.  I've measured the thing at full power and it definitely isn't overheating... plus I don't think it's a heat problem because sometimes they fail immediately at first turn-on after install, just giving a split-second flash and then dead.  I've verified that my voltages and currents are all OK when running from my power supply.  I am using a Cypress PSOC4 chip and I have my inputs set to resistive pull down and my outputs set to resistive pull up/down.

My hobbyist-shot-in-the-dark theory is that the ground is going below 0V, which makes the 3.3V out from my microcontroller fry the FET, since is has a max Vgs of +/- 12V.  Or if ground is going below 0V, then maybe it's exceeding the max Vds on the FET of 20v.  The FET I am using is a DMG6968U.  I have a TVS on the input (SMAJ16CA) with a 16V standoff and 18V breakdown voltage.  I've also had a few people say their unit worked fine until they tried to use the hall switch when the bike was running, and it died immediately.   I used the same PSOC4 chip and voltage regulator for the previous year door prize, but that just used a little RGB light off the regulated supply and no fets.  I never had any issues with those.  Plus, on these failed ones the regulator and TVS still work fine... so that makes me think it's something with the FET's.  They do have an internal bi-directional TVS from gate to source, but it seems that wouldn't protect against ground going below 0V (or in fact would actually cause my microcontroller to maybe see a big current from the output pin to Vs on the FET?).

Can anyone give me some pointers?  I know it's probably something simple I am overlooking but I can't figure it out.  The failures were on bikes that aren't local to me, so I can't just hook up a scope to see what happened. 
Mr.B:
Welcome to the forum.
I am by no means an expert, but I would have thought that only a TVS diode was insufficient protection in an automotive application.
There are a number of automotive experts on this forum, so hopefully one will chime in for you shortly.
TiN:
I agree with point, that automotive power is electrically dirty with lot of noise and big spikes (including undervoltage), especially when motor start up. You can search for some automotive-aware DC/DC designs and regulators to get the overall idea how much overengineering might be required to get robust operation of electronic device, without having it release blue smokes. I would also use MOSFET that is at least rated for 60 V in this application, there could be large spikes of voltage over the maximum 20V spec of DMG6968 listed on schematics.

Few extra 0.1uF/1uF capacitors right next to Hall sensor, MCU would be helpful too as decoupling. Watchout for LDO regulator capacitor requirements, some of LDOs can be picky and require not too small and not too big capacitance at the input/output.

Without seeing layout, it's hard to advice on physical things, but taking care about ground return copper is also a good thing. Those LEDs quite hungry, and you would want to connect ground from FETs directly to power entry point, so crap and noise injected into ground is not going thru sensitive hall sensor/MCU.. Treat ground not as ground which is always zero, but as another voltage rail that return currents to power supply.
floobydust:
You have to protect against negative voltage transient spikes, say to -200V worst case.
So use of a SMAJ16CA bi-directional TVS is wrong, it would clamp to +/-26V. The negative voltage can kill the LDO and LED's.
First have a fuse, then series input diode before going to the TVS and Vreg.
Civilenjuneer:

--- Quote from: TiN on May 29, 2019, 04:16:38 am ---I agree with point, that automotive power is electrically dirty with lot of noise and big spikes (including undervoltage), especially when motor start up. You can search for some automotive-aware DC/DC designs and regulators to get the overall idea how much overengineering might be required to get robust operation of electronic device, without having it release blue smokes. I would also use MOSFET that is at least rated for 60 V in this application, there could be large spikes of voltage over the maximum 20V spec of DMG6968 listed on schematics.

Few extra 0.1uF/1uF capacitors right next to Hall sensor, MCU would be helpful too as decoupling. Watchout for LDO regulator capacitor requirements, some of LDOs can be picky and require not too small and not too big capacitance at the input/output.

Without seeing layout, it's hard to advice on physical things, but taking care about ground return copper is also a good thing. Those LEDs quite hungry, and you would want to connect ground from FETs directly to power entry point, so crap and noise injected into ground is not going thru sensitive hall sensor/MCU.. Treat ground not as ground which is always zero, but as another voltage rail that return currents to power supply.

--- End quote ---

Thanks for your reply TiN!

I will look for a FET with higher specs.  Do you think it's more the Vds rating that would be a problem than the Vgs?  I have used the same regulator and regulator caps before in a couple other projects and haven't had any issues (even for things I made for previous give-aways), so it seems the FET are more likely the issue.  I did make sure the ground return path from the FET is directly connected to the copper pour on one side of the PCB and is just a few millimeters away from the power entry point.  I only have one 0.1uF cap right at the MCU (other than the 2.2uF caps on the 3.3V regulator)... the hall switch is directly next to the MCU though, but I can certainly add decoupling directly to it also.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod