DC dimmer circuit

The resistor shown as 10K in the schematic is actually 1K in the photo, but that doesn't matter. The wiring to the chip in the photo looks OK as far as it goes, assuming you have the chip the right way round (as it is upside down, I can't see which end has the pin 1 marking). Can you post a photo of the whole setup, so I can see how the chip is connected to the mosfet, Arduino and power supply?

Thanks for your time dc42.

Here is the whole circuit. The violet wire from the top is 12v and the red wire (top-right) is ground, both from the power supply. There are several other things going on too, but i hope you can make out the connections for the mosfet.

I should note that the middle pin (pin 2, D) on the IRF5210 is bent forward a little, it is not attached to the resistor.

I can't see anything obviously wrong with the wiring in your photo. There is the possibility that the mosfet gate oxide may have been damaged by static charge. Try disconnecting one end of the 47 ohm resistor and measuring the output from the TC4429 again. Also check that the ground pins of the TC4429 really are at 0v all the time, in case you have a bad joint.

Try disconnecting one end of the 47 ohm resistor and measuring the output from the TC4429 again

Okay, I tried that and I get the same result 11.99v when input is high and 11.65v when input is low.

Also check that the ground pins of the TC4429 really are at 0v all the time, in case you have a bad joint.

It reads a perfect 0v.

Do you think the TC4429 is bad? Luckily I ordered two; I will try replacing it.

TNX

Hooray! It works!

Replacing the TC2249 solved the problem.

Thanks, dc42 for helping me track this down.

(I'll add another one to your tab. :))

Well, the new TC2249 is now exhibiting the same problem. The only thing I did was to set it to output a 32 ?s pulse width. I was getting strange readings so I set it back to a simple digitalWrite HIGH.

Now I get a similar 11.7v on the TC2249 output instead of the expected 0v. I was careful to ground myself when working on it. Is it possible that 30kHz is burning something out?

Is there a more robust way to drive a mosfet?

TNX

I would expect the TC2249 to be quite robust. The only ways I can think of causing it to burn out and exhibit the symptom you report are to short its output to the +12v supply, or to drive continuously at a high frequency with a substantial capacitive load.

What value resistor do you have between the TC2249 output and the mosfet gate?

What value resistor do you have between the TC2249 output and the mosfet gate?

47 ohms.

Pokey:

What value resistor do you have between the TC2249 output and the mosfet gate?

47 ohms.

That should be sufficient to protect the TC2249 from just about any load. I guess the other thing that could destroy the TC2249 is a large negative-going transient on the +12v supply. Such a transient could possibly occur when the LED switches on or off. To avoid such transients, add a decoupling capacitor between the -ve side of the LED and the source of the mosfet.

How about using a motor driver such as an SN754410?

Or a TI UC2714?

My opinion of the TC2249 is at an ultimate low. I am not sure I want to order more...although its failure is probably a result of my inexperience.

Thank you for your help, dc42.

I cannot find anything on a "TC2249": DigiKey, Mouser, startpage, google. Any you're referred to it as such, "TC2249", repeatedly. I couldn't find a datasheet. It's a TC4429 - makes a difference.

You'll probably be terribly insulted, that I'm trashing your creation, and that's wholly not my intention, but I take particular issue with your grounding in addition to other aspects of your wiring and construction technique.

I think that you should work out this "DC Dimmer" disassociated from the other circuitry: just work out the dimmer aspect then you can bring in that other stuff.

A few thoughts:

  1. I can't see any wires connected to the drain terminal of the mosfet in your photo. Was the load actually connected during your testing? If so, how was it connected (in particular, where was it connected to the ground line), and how much current does the load take?

  2. What is the value of the decoupling capacitor connected between the supply and ground pins of the TC4429?

  3. What is the nature of the 12V power supply, and what is its off-load voltage? I'm wondering whether it produces a temporary voltage reversal during startup or shutdown, or alternatively that it produces a lot more than 12V when the load is not energised. Assuming you didn't short the output of the TC4429, there must be something nasty happening on the supply pins to cause it to fail, and this would likely cause any other driver chip to fail too. The Arduino is protected to some extent by the diode you put in series with the Vin pin.

  4. Why are you using a switching frequency as high as 32KHz? The higher the switching frequency, the more careful you need to be with circuit layout, to keep the inductance of critical paths low.

It's a TC4429 - makes a difference.

Well I got the numbers switched and then kept copying it. :~

You'll probably be terribly insulted, that I'm trashing your creation, and that's wholly not my intention, but I take particular issue with your grounding in addition to other aspects of your wiring and construction technique.

I'm not insulted. I am still very much a beginner. I know the circuit isn't pretty but I do make sure all the solder connections are very strong. I am grateful for any criticism.

  1. I can't see any wires connected to the drain terminal of the mosfet in your photo. Was the load actually connected during your testing? If so, how was it connected (in particular, where was it connected to the ground line), and how much current does the load take?

There was no load during my most recent test.

In a previous test, with the first TC4429 that I burned, it was connected to the 8 amp lighting. The ground lead on the board was connected to the vehicle ground. I do not know exactly where the ground wires go inside the vehicle, but I do get good continuity between my point of connection and the lighting ground.

  1. What is the value of the decoupling capacitor connected between the supply and ground pins of the TC4429?

1 ?F, 50v.

  1. What is the nature of the 12V power supply, and what is its off-load voltage? I'm wondering whether it produces a temporary voltage reversal during startup or shutdown, or alternatively that it produces a lot more than 12V when the load is not energised. Assuming you didn't short the output of the TC4429, there must be something nasty happening on the supply pins to cause it to fail, and this would likely cause any other driver chip to fail too. The Arduino is protected to some extent by the diode you put in series with the Vin pin.

My testing power supply is a switching transformer. It outputs a constant 11.9v, with or without load (load being the Arduino in this case, it is not powerful enough to power the lights). I do not have any reverse voltage protection between the power in and the TC4429, and after sleeping on it, I am thinking that may be the problem. It was working for a while with the 32KHz PWM. When I came back the next day and powered it up it had failed. So maybe it is something to do with power cycling.

In the vehicle, where the first TC4429 failed, the power is just a 13.8v lead.

Any switch can cause reverse transients can it not? I just didn't think of that before.

  1. Why are you using a switching frequency as high as 32KHz? The higher the switching frequency, the more careful you need to be with circuit layout, to keep the inductance of critical paths low.

To eliminate a disturbing hum which these lights make when pulsed. I had the dimmer working before with an IPS6021 high-side switch (I really like them), but they have a maximum frequency of 1.5KHz. At that frequency the lights sound like a horde of mosquitoes.

I have calmed down since yesterday's bitter disappointment.I will order a couple more TC4429s (maybe I should get a reel!) and put reverse protection diodes on the voltage inputs.

To avoid such transients, add a decoupling capacitor between the -ve side of the LED and the source of the mosfet.

Between pins 1 and 8 of the TC4429, correct?

Any other suggestions would be very much appreciated. I really do not want to take any more chances, I have learned my lesson. :blush:

Thanks very much.

Pokey:

To avoid such transients, add a decoupling capacitor between the -ve side of the LED and the source of the mosfet.

Between pins 1 and 8 of the TC4429, correct?

No, it should be much closer to the mosfet source and the ground side of the LED than that, so that the switching transients don’t propagate to the rest of the circuit. I would use 1uF ceramic in parallel with at least 100uF electrolytic.

I can see how the TC4429 might have been damaged when you had the load connected. Without that decoupling capacitor, the inductance formed by the long wires to the power supply, together with the existing 1uF capacitor between pins 1 and 8 of the TC4429, form a resonant circuit. This is excited when the mosfet turns on or off. The resulting oscillation may cause the supply voltage on the TC4429 to exceed its 20V rating, or to go negative.

However, this doesn’t explain how you managed to damage a TC4429 when there was no load connected - that puzzles me.

Btw when you disconnect the power supply, the presence of the supply protection diode means that the power supply capacitors in Arduino will briefly supply a burst of current through the output pin and thence through the TC4429 to whatever else is connected across the supply. To avoid this, I suggest connecting a resistor of about 220 or 470 ohms between the Arduino output pin and the TC4429 input.

No, it should be much closer to the mosfet source and the ground side of the LED than that, so that the switching transients don't propagate to the rest of the circuit. I would use 1uF ceramic in parallel with at least 100uF electrolytic.

I see, (I assume "the LED" refers to the 8 amps of DC lighting) I will do that.

However, this doesn't explain how you managed to damage a TC4429 when there was no load connected - that puzzles me.

Does that suggest the power supply disconnection causing transients then? If you are puzzled by this, imagine how I must feel!

I suggest connecting a resistor of about 220 or 470 ohms between the Arduino output pin and the TC4429 input.

I will certainly do that.

Thank you!

Pokey: I see, (I assume "the LED" refers to the 8 amps of DC lighting) I will do that.

Yes, that is what I meant.

It's just possible that the failure of the TC4429 was caused by a parasitic SCR in it being triggered when you removed the power (although I feel I am clutching at straws here). If so, adding the resistor should avoid that (maybe use a slightly higher resistor than I suggested previously, say 1K).

Phew! It is finally working!

Thank you dc42, for patiently putting up with me!

I added: A secondary mosfet in parallel (unrelated to the problem) to distribute the amperage draw, two decoupling capacitors (100?F and 1?F) to the source of the mosfets, a reverse protection diode to the power input for the whole circuit, a 1k resistor between the Arduino output and the TC4429 input, and I reduced the pwm to 25kHz just in case.

It works beautifully!

THANK YOU once again!