If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #176
Joined: Tue Feb 14 2006, 09:35PM
Location:
Posts: 44
Hi All,
It has been awhile since I have posted here. I am currentley designing a RGB LED controller using a PIC microcontroller.
The whole thing is going to be based on a PIC18F1320 a 18 pin PIC microcontroller that comes in SMD form but also has a DIP version that I am using in the prototype. Microchip sent me 3 of these devices. I will be programming the entire thing in PIC C (Microchip C18 compiler). The compiler is free from microchip for Students and all the books to learn it are free PDF downloads or for a small charge they will send you a printed copy. I am just waiting for my books to arrive.
This little 18 pin chip has lots of goodies on board. 8K of flash programming memory, 256 bytes of EEPROM, 16 IO, PWM, USART, 2V to 5V voltage range and with nano watt technology.
This will also be my first PIC C project. I am learning it now as I need to use it in the furture in my BENG degree.
I hit a small problem that I cannot seem to find a solution for. I want to drive luxeon LED module.
For any one who has not seen a luexon module before there is a photo of one below:
You can get these in red, green and blue. I will use 3 to produce RGB. Red Green and Blue are the 3 primary colour so any colour can be generate by mixing these 3 colours. I should be able to create a nice morphing effect.
The problem is that these modules do not emit the same Lumens. In order to get a constant brightness from each unit I need a constant current source. Each luxeon would have its own calibrated constant current source so I can get the same light output. Control would be easy as I would just need to turn them on and off for starters but also I need PWM controll to due HSB colour space I plan to use to give some intresting morphing effects.
What is the best way to build a constant current source that is capable of a constant 400mA (yes these suckers need that). I can sort the PIC control out later as if the constant current sources are made from discrete opamps there are numerous ways to controll them.
The PIC prototype will just use standard LEDS to produce the actual code then swap to the luxeons but before I start the project I need some ideas on how to produce a decent constant current source.
The whole project is going to be powered of a custom DC DC converter. Based around the boost topology so I can use a single battery low voltage high current to supply the project.
Efficenciy is eveything here as it will be powered from batterys at some point.
I played with transistor constant current sources but rather use opamps if I can. Any one suggest where I should start? Just the name of a topology would help as I do not want any one to go out of there way to design it for me just some pointers where I can start.
Registered Member #30
Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Hi Adam
There's loads of different ways to drive lasers and LEDs with a constant current. At work, we use a switched-mode circuit running at 300kHz to drive higher powered devices where efficiency is important. When we're more worried about stability and low noise, we use a transistor or MOSFET in linear mode. The current goes through a precision resistor, and we sense the voltage across the resistor and use feedback with an op-amp. It's much the same as the current source circuit I used in my OLTC trigger pulse generator but upside-down.
For your application, I'd avoid the fancy active current source circuits and just use a resistor in series with the LED. Choose the resistor values for the three LEDs to get the same brightnesses when running off constant 5v. To PWM it, just put a power MOSFET in series with each LED, driven straight off the PWM waveforms from the controller. The LED actually blinks on and off very fast at full brightness, and your eye averages it out. I think that's how Big Clive's RGB driver works.
The resistor wastes power, but any of the linear current source circuits would waste just the same amount.
Registered Member #162
Joined: Mon Feb 13 2006, 10:25AM
Location: United Kingdom
Posts: 3140
If you have one boost convertor per led you need no power-wasting resistor or constant-current source each led POWER will be precisely determined by (Supply Voltage - Switch Voltage), On time and repetition rate.
For switching times equal for equal brightness choose inductors to match leds (i.e. less current = more inductance)
Registered Member #15
Joined: Thu Feb 02 2006, 01:11PM
Location:
Posts: 3068
wrote ...
The problem is that these modules do not emit the same Lumens. In order to get a constant brightness from each unit I need a constant current source.
Not only that, but the sensitivity of the human eye varies from wavelength to wavelength, so x lumens of red will not appear as "bright" as the same number of lumens of green.
As far as variable current source, simply use PWM on each LED and vary the pulsewidth to vary apparent brightness. You can make this a true current source by simply monitoring voltage across resistor (put resistor from cathode of LED to ground), and use this voltage as feedback to control the PWM. Of course, its not a true boost converter which is common with LED current source supplies, but you will be limited to the voltage you have.
Here is a constant current supply i made a long long time ago in a galaxy far far way. . .
Registered Member #176
Joined: Tue Feb 14 2006, 09:35PM
Location:
Posts: 44
EastVoltResearc wrote ...
wrote ...
The problem is that these modules do not emit the same Lumens. In order to get a constant brightness from each unit I need a constant current source.
Not only that, but the sensitivity of the human eye varies from wavelength to wavelength, so x lumens of red will not appear as "bright" as the same number of lumens of green.
As far as variable current source, simply use PWM on each LED and vary the pulsewidth to vary apparent brightness. You can make this a true current source by simply monitoring voltage across resistor (put resistor from cathode of LED to ground), and use this voltage as feedback to control the PWM. Of course, its not a true boost converter which is common with LED current source supplies, but you will be limited to the voltage you have.
Here is a constant current supply i made a long long time ago in a galaxy far far way. . .
These sold like hotcakes, i think the full schematic is in the datasheet.
The schematic is not in the datasheet but your post Dan gave me an idea.
I do not need a boost converter (step up) but even better a buck converter (step down).
If you take a standard buck converter and use the LED in sersies with a low ohmic resistor as a current shunt and you use the interal comparator on the opamp you can have a very nice high power LED driver.
Now we want the inductor operating in continous current mode so the current does not drop to zero where in discontinus mode the current does drop to zero.
There will be some AC component in the voltage output in the form of voltage ripple superimposed on the DC component and this can be elimated with a capacitor. But I am thinking that this will not matter with an LED as a load and the capacitor can be eliminated.
The mosfet and diode in the buck converter will have to correctley chosen and same with the inductor. So I am going to have to do some math. But the PIC can control everything and have full error control using the internal comparator and A2D so I can have over voltage over current and under current fault protection all thrown in. Just need to learn how to programme it all!
But I was thinking if each of these LED modules I use has its own converter on a small SMD PCB with a small 8 pin pic (16f675 is a good part for this) mounted on the back of the module then all I have to do is programme a serial routine so I can control these LED modules from a master PIC controller that can do effects. This way eveything is made super small and is efficent.
I could make as many of these little modules as I require and they can be used standalone if require. There is plenty of IO on a 675 so I can add a button to control brightness if in standlone mode and serial mode to do RGB used with other LED modules.
This is start to become an intresting project and has had me reading into physics and colour spaces and other stuff I have never done before. I need to order some parts in so I can build a prototype and start programming.
I will write up everything as an open source package.
Registered Member #56
Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
If you really want a simple current source, all you need is a npn power transistor (that will be on a small heat sink to be able to disapate a few watts) with a variable 100r resistor in series with the gate going to the outputs of the pic. You dial the resistor in to give the disired current, and viola it works. And best of all it is a true current source, so as long as the output from the pic is regulated you can vary the input voltage and the led's output would stay constant. Almost any transitor should work, just make sure it has a decently high gain (Hfe>100)
If you choose that topology, I would recomend getting a little low dropout 3.3v regulator (there are tons of them out there, get one that has <1v of dropout at 100ma and you should have no problems) to power the pic, then wire the transistor open collector (ie emiter grounded, collector->led->v+) and you can vary the input voltage of the circuit from 4.5->max input of voltage regulator.
I am guessing that this isn't going to be battery powered, so you aren't worried about efficieny, and since you have luxeons you are going to need to disapate a ton of heat anyway... Might be the best solution.
Registered Member #30
Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Adam wrote ... If you take a standard buck converter and use the LED in sersies with a low ohmic resistor as a current shunt and you use the interal comparator on the opamp you can have a very nice high power LED driver.
That is roughly how our switched mode laser drivers work. We have a more elaborate filter instead of just a single inductor. They do run in continuous current mode.
I was puzzling a related problem when trying to design some luxeon headlights for my mountain bike. I wanted to run two luxeons in series off a nominally 6V battery that could range from less than 5V to more than 7V. But each luxeon has a voltage drop of about 3V, so I would need a boost converter when the battery was flat and a buck converter when it was fresh. I don't want to change the battery voltage because I already have a halogen headlamp that needs 6v.
I guess I could use some kind of buck-boost circuit, but today I thought of a simpler solution: get another LED so I can have three in series
I believe EVR has designed these things in the past, so maybe he'll have some thoughts on the matter.
Registered Member #176
Joined: Tue Feb 14 2006, 09:35PM
Location:
Posts: 44
Steve Conner wrote ...
Adam wrote ... If you take a standard buck converter and use the LED in sersies with a low ohmic resistor as a current shunt and you use the interal comparator on the opamp you can have a very nice high power LED driver.
That is roughly how our switched mode laser drivers work. We have a more elaborate filter instead of just a single inductor. They do run in continuous current mode.
I was puzzling a related problem when trying to design some luxeon headlights for my mountain bike. I wanted to run two luxeons in series off a nominally 6V battery that could range from less than 5V to more than 7V. But each luxeon has a voltage drop of about 3V, so I would need a boost converter when the battery was flat and a buck converter when it was fresh. I don't want to change the battery voltage because I already have a halogen headlamp that needs 6v.
I guess I could use some kind of buck-boost circuit, but today I thought of a simpler solution: get another LED so I can have three in series
I believe EVR has designed these things in the past, so maybe he'll have some thoughts on the matter.
Well as the PIC as an A2D and I fought about this problem I am going to take a sense of the battery voltage and alter the PWM so you do not notice a brigtness adjust when the battery starts to loose some voltage. If the battery goes to a voltage that is to low it stops the output totally. The idea is so that you do not see any diffrence depending on supply voltage.
The software has become really complicated and I need to simulate it all just the buck converter so I can see what is happening and get some parts in. I have a flowchart on paper but I will have to type eveything up and create a webpage about it as I think this is an intresting project.
I read that microchip were developing a prototype board for luxeons but have not see anything. I have a current limited bench power supply at home so I will order some luxeons from RS and play next week.
Cooling these suckers is going to be a problem and I think a peliter eliment might help here but using PWM I can make it more efficent. Gah my do my projects start simple end up a complicated mess of hardware and software.
Registered Member #56
Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
Not to get too far off topic, but pielters and batteries are not a good combination... I would highly recommend that you just have a decent heat sink and fan, as what you loose in led efficiency will be greatly less than what a peltier would do for you IMHO
And to help point things backvat Adam, you need to account for the fact that eyes are very sensitive to differences in wavelengths. I don't have the chart handy, but you need like 3x as much red as 1.5x as much blue than you do green, something to take into consideration...
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.