mrboni:
Hi dhenry.Can you point me towards any example circuits that show how to 'utilize a transistor's b-e junction non-linearity' in this way? Also how do you work out the curve that a particular transistor would give you?
Btw, I plant use this if possible in two scenarios -
One is pwm source > non linear correction > mosfet (to control 12 led strip)
The other is pwm source > non linear correction > transistor + constant current source (to control a single hight power led)
Do you think your example can integrate with both these systems?
Many thanks
All the analog routes are going to be less efficient than PWM, but fortunately for LEDs only a little bit less efficient
due to the small changes in forwards voltage with current (so that the wasted volts at low current aren't much more than
at full current). Logarithmic converters are prone to temperature sensistivity unless a rather complex circuit using two
transistors and an opamp are used - suggests the proper route is to find a specialised IC that does the appropriate
gamma correction and PWM drive all in one unit - but they don't seem to exist.
The timer1 on standard Arduinos can be set to any cycle count from 2 to 2^16 so much higher PWM resolutions are possible
(on pins 9 and 10 only). Arduino Megas have mainly 16 bit timer/counter units so much more capable.