-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Nov 16, 2007 at 12:59:34PM -0500, Spehro Pefhany wrote: > > V+ > > | > > LED > > | > > C > > 3.3V---B< > > E > > | > > R > > | > > GND > > > > 'Cause I built one, and it seems to do all sorts of weird and wonderfull > > things only somewhat related to current limiting... Not sure if I'm > > understanding it correctly. > > It forms a current sink, but the voltage at the collector has to be > more than the base (approximately, it can be a bit less in fact, more > like 2.6V as you observed since Vce saturates at some tens of mV) for > it to work properly. If the condition you are mentioning can exist you > might want to add a base resistor of Re * 10 or so to keep the current > out of the PIC within reason. Ahh, good point, forgot about that. Could even be causing some of the weirder stuff I was seeing as the amount of current that would be flowing would end up being a big fraction of the total power consumption. I think the voltage at the base vs. the collector thing might have been doing it. I noticed that after reaching a bit of a "plateau" in the limiting, current started actually going *down* as I applied more voltage to the leds. Then again, at one point it also looked like I was getting 10mA of current to flow through a 1n4001 in the reverse direction. > The main difference between using Vbe and the above type of circuit is Could you draw a schematic of what using Vbe looks like then? I don't think I understand the difference between what I built, and what you were describing. > that the unit-to-unit variation and temperature change in Vbe doesn't > impact the above type of circuit nearly as much, since the 0.6-0.7V is > swamped by the 3.3V voltage, so it's 5x better in performance. The > downside is that you waste a bit of power and drop a bit of voltage in > the resistor. If you want the best of both worlds you have to put more > circuitry in there, such as an op-amp to use a very low value resistor > (eg. 100mV drop), but then you might have to worry about response times > with the PWM. The transistor won't have any problems with the PWM > frequency and the circuit is very simple. Short-circuit proof too, > like any constant-current circuit. > > Say, didn't someone around here mention something about a beer sometime, > Peter? We did you know. I'm pretty busy this week, but drop me a line offlist about the week after. - -- http://petertodd.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHP0ub3bMhDbI9xWQRAmkkAJ4wA5/rDBGjUmgpwYkpZkXPY1HnTgCfU7Ez qRo8RSUqm1wt6OE16JSHDEQ= =KFbd -----END PGP SIGNATURE----- -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist