piclist-bounces@mit.edu wrote: > Why do I need a zener diode? two reasons. one to limit the gate-drive voltage from the drive circuit. two, when mosfets fail, its often a short from drain-source. Then the drain voltage appears to the drive circuitry. I'm not an expert in this field, so I advise additional research :) > Perhaps I should draft up a > sample circuit and post it for everyone to pick apart? I'm sure you'd get plenty of feedback. > I was also intrigued by the current sink idea Phil proposed. > I think I understand the idea (using the LED string to drop > the voltage). Again, I have no experience with these, so > please don't think too harshly of me for these questions. > Would I just use an opamp current sink circuit between the > end of the LED chain and ground? There are several ways to do this. The basic idea of a NPN current source is to put a resistor between the emitter and ground. Call this Re. Then apply a voltage to the base with no base resistor beteen the voltage and base. Call this Vbase. Now assuming the base voltage is high enough to turn the NPN on, the emitter current will be approximately Ie=(Vbase-Vbe)/Re. The collector current is approximately equal to Ie (note that this depends on hfe:Ie=(hfe+1)/hfe)Ic, but for large hfe they are almost equal) your base voltage would be the PWM through a low-pass filter, buffered via something that can supply enough current to the base (a unity-gain opamp might be enough for low currents, or you may need a transistor in addition). Otherwise the filtered PWM output will sag as the transistor turns on. Another method I have used is a MOSFET in the linear region. Place a small resistor between source and ground. measure the voltage across the resistor using an op-amp. Use a second opamp to compare the PWM setpoint to the actual current (as measured via the first opamp). the output of the second opamp drives the gate of the MOSFET. Two things to watch out for. First, you are using the MOSFET in the linear region, so power dissipation is an issue (heat sink!). Second, there is a very strong likelyhood of oscillation unless you compensate the opamp network. I have seen some design ideas using this type of circuit, but it only works for relatively low currents before it begins to oscillate (ask me how I know!). A simple fix that worked for me was to add a low-pass RC between opamp output and MOSFET gate. It would have been more professional to add a compensation network, but it was a one-off design so I didn't bother. This was for a 15 amp current sink, and it was good for closer to 20. And it was easy to parallel. I used it to simulate the the current draw of a battery-operated tool in order to evaluate different batteries. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist