I'm building a lamp and want to integrate an analog voltmeter (0-300 volts AC) in to the circuit. It has an LED backlit dial that requires a separate, 6.3v power supply. Any suggestions on how an idiot (that's me) can pull this off inside a very small wooden box that I am using for the base of the lamp?
Power an LED from 120v
led
Related Solutions
Given: Cree XM-L LED.
Want: Up to 2A drive, PWM controled by PC via USB.
This can be two parts. ie actual LED drive and PC to LED drive interface. These may or may not be integrated.
A "very easy" approach is to
1. use an off the shelf USB to "output" device. "Output" may be analog level, PWM, 8 bit port etc to control ...
2. An off the shelf LED driver that uses analog or PWM input.
For example, the circuit below using a RT8482 requires an analog input level or PWM with a simple RC filter (to convert the PWM to analog). The analog could be provided by a USB to analog output I/O device (COTS) or by a USB to parallel port device (not a printer port per se) (COTS) with a simple R2R digital to analog converter (about 16 resistors plus maybe a cheap op-amp).
Many examples of R-2R ladders here - links live
Or a microcontroller with USB capability could have a relatively simple program written to provide PWM or analog output. A USB enabled Arduino or a Raspberry Pi would do this. (USB has to be slave not host mode).
LED drive:
(1) "Off the shelf" complete units that do the LED drive part of this job well are available at good prices from eg ebay, or Mouser and similar. Using such is a good default solution unless you have some reason to do otherwise.
(2) DIY LED driver.
Digikey LED drivers are found here. Alas the parametric search is poor in this case (which is unusual).
Searching using LED driver 2A gives better results.
There will be a nummber.
Example only: For $US1.52/1 in stock Digikey you get
1
Ricktek RT8482, buck or boost, LED driver.
Drives external MOSFET so LED current capability essentially unlimited.
Looks like a good start. 350 kHz for smallish inductors.
- High Voltage Capability : VIN Up to 36V, VOUT Up to
48V
Buck, Boost or Buck Boost Operation
C u r r e n t M o d e P W M w i t h 3 5 0 k H z S w i t c h i n g Frequency
Easy Dimming : Analog, PWM Digital or PWM
Converting to Analog with One External Capacitor
Programmable Soft Start to Avoid Inrush Current
Programmable Over Voltage Protection
VIN Under Voltage Lockout and Thermal Shutdown
16-Lead WQFN and SOP Packages
RoHS Compliant and Halogen Free
A MOSFET suitable for use as M1 would be eg ONSEMI NTD4960 $US0.40/1 in stock Digikey, 30V, 9A, 9 milliohm on resistance nominal, logic gate - data sheet curves show good at 4V gate and say 4A.
ADDED:
Should I be looking at specific types of inductors for this sort of application
Inductors are very special for best results. If this is a one-off then off the shelf inductors from eg Digikey or similar are wise. We can give advice in this when final real spec is known.
I'm assuming all of the caps in this type of application would be ceramic?
Ceramic capacitors will work well for all capacitors shown. At least 10V rating. More or much more voltage OK.
D1 is Schottky and should have current rating equal or greater than LED max current.
Now I just need to figure out how to generate the PWM signal.
PWM is "easy" [tm] and may not be needed. Above LED controller example can use analog or PWM control.
USB to I/O
This USB to paraell FIFO I/O module](http://www.ftdichip.com/Support/Documents/DataSheets/DLP/usb245r-ds-v10.pdf) uses FTDI's FT245R USB-parallell FIFO interface IC - datasheet here .
Vast amounts of related FT245 information here
FT245 available from Digikey ~= $US4.50/1 from here
FT245 based module from Digikey for about $40/1 here
This page discusses a DIY USB printer port which, as you have complete control over the hardware and how it acts, could "easily" meet your need. Based on a PIC18F4550 microcontroller and not much else. All software PCB patterns, circuit etc free.
The question aroused my interest enough to set up an experiment. I changed the question's parameters in one key aspect: Instead of an LED strip with multiple LEDs in series, I hooked up 3 blue LEDs (Vf = ~2.8 Volts each) in parallel, with a single 100 Ohm resistor to limit current to all 3, to a 0.047 Farad, 5.5 Volt coin type "motherboard supercap".
I know, sharing a resistor is really bad practice, so just use separate resistors for your own experiment.
The supercap was charged from a pair of AA alkaline cells (~3.12 Volts across capacitor after 3 minutes), then the wires to the battery were pulled out.
simulate this circuit – Schematic created using CircuitLab
While the dimming effect was an expected outcome, the results were startling: The LEDs stayed lit at diminishing intensity for over a minute after disconnecting the battery. Here is the video I took of the experiment.
The reason the LEDs stayed lit so much longer than expected is that a typical LED continues to be illuminated down to well under 5% of its nominal current - In the case of the LEDs I used, at around the 1 minute mark they were quite visible, if dim, with a mere 1 mA split between all three.
The LEDs finally dimmed to nothingness after perhaps 15 minutes.
Conclusions:
- A much smaller capacitance than the 0.047 Farad supercapacitor used here would be preferred for the purpose envisaged.
- If one must use a 12 Volt 20 mA LED strip, instead of LEDs in parallel, then a set of 3 of these coin supercaps in series would work: The resultant capacitance of around 0.0157 Farad will provide a dimming duration closer to the OP's target of 2 to 10 seconds, instead of the unbearably long 1 minute dimming observed in the video.
- The reason some previously posted capacitance calculations including my own 0.5 Farad comment were far off the mark is because the reducing current flow due to discharge, i.e. the very dimming effect being sought, was unaccounted for.
- For any comments that might arise about the "unacceptably high" ESR of these motherboard supercaps, it is clear that theory needs to be backed up by practical experimentation, as done for this answer.
The supercapacitor I used is sold for under $2 a pair, including international shipping, on eBay:
Not quite the tens or hundreds of dollars that I, and others, had previously mentioned.
Addeddum thanks to discussion with @DavidKessener:
- If using multiple supercaps in series and charged to a higher voltage for the string, than the individual capacitor's rated voltage, biasing resistors are required to prolong the life of the capacitors. Without these, the capacitors will charge unevenly, and will eventually die faster.
- Based on this Maxwell appnote, and taking a leakage current per capacitor of 10 uA (the actual leakage current of these particular caps is much lower, so even safer), we get a 55 kOhm value for biasing resistors to pass
10 x 10 = 100 uA
, so add 3 new 56k resistors as below, for using a 12 Volt supply and a 12 Volt LED strip
Best Answer
You could use a small 4.5v transformer with a bridge rectifier and filter, but that would be overkill. And a transformerless design most probably too dangerous, so yes, go with the batteries.