Diy Whole Tank Led Lighting Retrofit

A standard silicon diode (1N4001 for example) will drop between 0.6V and 1.2V in normal operating conditions.

I agree with this bit.

At 700mA (your drive current) it'll be dropping just over 0.9V and wasting almost two thirds of a watt which will stop you driving your LEDs properly as your transformer's output voltage is not high enough for this additional voltage drop.

I'm intrigued with this bit, how have you calculated the additional drop?
 
Hi Rabbut,

This figure in the datasheet gives an idea of the voltage drop vs. current relationship:

1n4001forwardvoltage.JPG


The pulse width is set to 300us to reduce thermal effects.

Unfortunately the story is the same for most silicon diodes which consist of a PN junction forming a diffusion region in the middle. Schottky diodes have a better characteristic because rectification is achieved mainly by majority carriers rather than by recombination of n and p carriers.

The power supplies have all the required filtering inside them (usually a small coil/MOV combination). Since they are switching power supplies rather than standard transformers, a surge at the input has no effect at the output as the first stage of these power supplies is to rectify and smooth the AC waveform to DC, which is then PWM'd at high frequency, stepped down and then smoothed. If a surge appears, it either gets rejected by the filter or the PWM duty cycle is momentarily changed.
 
What load (if any) was on the diode in that figure? With no load, the PD has to be dissipated across the Diode and potentially the test gear, leading to increased Diode heating and thus resistance shurely? Where did you get the figure? It looks to me like a standard Voltage vs maximum current graph for the diode when it is on a circuit with no additional loading... Obviously the context the figure is being showed in affects it's meanings a bit... Sorry, but loss of PD across Diodes was never covered in any detail in my GCSE or in real life experience, other than to be told time and again that they are low resistance in the forward direction and hence waste little if any detectable PD unless you are using the wrong one for the job... I came across the topic mostly while doing the Physics A-level, as the Diode acts basically as a resistor if no load is applied to the circuit it is being used in if I remember correctly?

All the best
Rabbut
 
The power supplies have all the required filtering inside them (usually a small coil/MOV combination). Since they are switching power supplies rather than standard transformers, a surge at the input has no effect at the output as the first stage of these power supplies is to rectify and smooth the AC waveform to DC, which is then PWM'd at high frequency, stepped down and then smoothed. If a surge appears, it either gets rejected by the filter or the PWM duty cycle is momentarily changed.

If the above is right and I am using the DC adaptors why did I need the drivers? I am confused now. I was told I shouldn't run series of 4 direct off the 12V adaptors because surges could then fry the LED. that is why once I added the driver I reduced each series to 3 to allow for the 1.5V that the driver requires.

These drivers will run between 7 and 24V apparently.

At the moment the series will light at 7.5V (6V after allowing for the driver) It will get brighter at 9V (7.5V after driver)
and at 12V is very bright (10.5V after driver)

They are running at 3.5V each therefore and lower than the 3.7V that they need for full power which I am happy to do as I would rather underpower them a little anyway. However the drop in brightness between running them at 12V and 9V is like the difference between a 100W bulb and 40W bulb.

When they 'light up' at 7.5V they are more like a bicycle lamp where the batteries are on their last legs. lol

I am happy not to use the diode if all it is doing is stopping my errors from burning the driver out. Thats for me to pay more attention :lol:

I don't think the wiring the wrong way round was the problem at all because I wired 2 the wrong way round of which only 1 driver burnt out virtually instantly. The other one that burnt out was the right way round. After checking thoroughly this morning it seems it wasn't the 'polarity' and just that the wires I had solder on the LED side from the driver were touching each other before their insulation and had shorted the driver.

Anyway I don't want to cause arguments. lol. I have no idea what you are all talking about anyway. Straight over my head. I shall try these new drivers when they come and get the board siliconed to stop things moving and insulate the wires.

Then I shall leave it on for an hour or so to test it with some fans blowing on it because when I retested the others after the burnout I left one on for an hour to see if it would short and the reflector underneath each LED was red red hot!!!

Then we can see if it holds up.

If not then out it comes and a rethink on the diodes etc.

Many thanks for your help on this though

AC
 
The test setup would be a programmable current source in series with the diode, and a voltage measurement device in parallel with the diode.

By controlling the current with a current source, a voltage develops across the diode purely based on the characteristics of the pn junction.

You see the same effect with SuperColey's LEDs and constant current driver - The driver maintains a constant 700mA across it's output terminals. If we put a voltmeter across the terminals but no load, you'd see the voltage would be approximately equal to the input voltage as the driver tries to get the 700mA drive current. If you short the outputs, you'd see close to 0V. If you put one luxeon LED across it, you'd see a voltage of about 3.5V - again based purely on the characteristics of the pn junction which is doped in such a way that the bandgap produces the colour you want. For a white LED this bandgap corresponds to about 3.5V at 700mA. This is the same as a 1N4001 diode, but in it's case you'd measure about 0.9V as that is what corresponds to the bandgap of a PN junction at 700mA.

Diode loss is a major consideration with switch-mode circuits - Secondary only to switching losses.
 
If the above is right and I am using the DC adaptors why did I need the drivers? I am confused now. I was told I shouldn't run series of 4 direct off the 12V adaptors because surges could then fry the LED. that is why once I added the driver I reduced each series to 3 to allow for the 1.5V that the driver requires.

Hi SuperColey,

The reason as I explained on the other forum (where I'm registered as aptsys), is that LEDs are current mode devices not voltage mode. With a light bulb, you can provide it with a voltage and it's resistance will limit the current through it. With an LED, if you provide it with a voltage it'll blow up, as it is a semiconductor not a resistive device. In simple terms you could say that a semiconductor like an LED works in exactly the opposite way to a resistance - the more voltage you provide to it, the less resistance it has, so hence draws more current. The problem being that there is a very fine line between the LED just starting to conduct and it destroying itself.

As an example, supplying your LED 3.4V might cause it to draw 20mA, 3.5V might cause it to draw 700mA and 3.6V might cause it to draw 2A. So you can see, if we relied purely on a DC voltage supply, a small variation in supply voltage would have a massive effect on the current through the LED. This is further exacerbated by the fact that this is all affected by temperature - if you managed to tune your power supply to 3.5V which passed exactly 700mA through the LED, if you left it like this the LED would heat up and the current would start to increase. Now the LED is dissipating more power, so gets even hotter. This causes the current to increase further and the LED gets hotter... until it gets destroyed.


Your constant current regulators vary the voltage for you to maintain exactly 700mA through the LEDs, so when the LEDs start to warm up it drops the voltage very slightly to prevent this thermal runaway.

I hope that helps :)
 
^^ Most of that just went over my head sorry :blush: Just wait while I muddle my way out of it... The Driver is a current limiter, so I can see why it does not burn out when it's output terminals are shorted, and also how you get the correct voltage across the diodes from the current supplied, as obviously current, PD and resistance are all linked closely, so the resistance of the diode and the feed current sets the number of volts supplied. This makes sence (I think, unless any of that is wrong).... The LED's will be low resistance also (I make 2.5 ohms), so the resistance of the diode will lead to quite high voltage loss due to the voltage lost across a component's resistance being proportional to the resistance of the total circuit...

AC makes an iteresting point. If the power supply units are all using a regulated voltage, could you not scrap the Drivers, as the voltage would be correct per LED with 3 in series, and hence the current should also be fine, if you put a small in-line resistor in to drop to 11V across the LED's instead of the 12V supplied... :unsure: I'm guessing no, as it's voltage that's controled, not current draw, so it may lead to the LED's being overdriven...

All the best
Rabbut

EDIT to add. Stevey replyed while I was typing and supplied an answer to the puzzle point about regulated voltage supplies
 
if you put a small in-line resistor in to drop to 11V across the LED's instead of the 12V supplied... :unsure: I'm guessing no, as it's voltage that's controled, not current draw, so it may lead to the LED's being overdriven...

You can do this - this is often done with standard LEDs. The issue with high power LEDs is that the resistor in most cases will end up wasting so much power that it negates any energy efficiency of the LED! If you tried to drive a 3W white LED from a 5V supply with a resistor, you'd need a 2.2 ohm resistor (approximately). This resistor would dissipate 1.05W. That's immediately decreased the efficiency by 25%!

The beauty of the switching constant current regulators is that most are 90% or more efficient. They don't waste power like a resistive device would, they maintain a constant average current through the LED by switching on and off at a particular duty cycle. The losses are only associated with the transistor, the diode and the current required by the device monitoring and controlling the PWM waveform.

The other reason to use these regulators is that there are manufacturing differences between LEDs, so one LED might draw 700mA at 3.5V, but another might draw 700mA at 3.3V. You'll then get differences between each string of LEDs, so one string of LEDs may draw current than another. With a resistor limiting the current, one string might appear brighter than another, or may draw more current than another.
 
Gotcha. I virtually understand all of the above. :blink:

Many Thanks

Just for interest the way I did these was first to wire the + and - on one LED and then connect it to the driver and test it starting at 3W and moving the slider up.

When tested I joined the second and tested again

When tested I joined the third and again tested.

Then knowing the series worked I screw the LEDs into position and started on the next string.

With 1 LED it doesn't turn light until 6V and it comes on full strength.

With 2 LEDs it again doesn't light until 6V but dimmer and takes 9W to get the brightness

With 3 LEDs it doesn't light until 7.5V and takes 12V to get the full brightness.

So I assume that the current controller has a minimum supply voltage of 6V (says 7 on the sheet) before it will do anything. This I can understand but then with 1 LED in situ and the driver using 1.5V then does the whole 4.5V then get pushed into the single LED? If so how did it not blow when it should be max 3.7V?

Not a problem because they worked. Just wondering

AC
 
So I assume that the current controller has a minimum supply voltage of 6V (says 7 on the sheet) before it will do anything. This I can understand but then with 1 LED in situ and the driver using 1.5V then does the whole 4.5V then get pushed into the single LED? If so how did it not blow when it should be max 3.7V?

Because 4.5V doesn't get 'pushed through' the LED. It drives the LED at 700mA and the voltage across the LED is whatever the LED needs at 700mA. If you supplied the driver with 24V and only had one LED connected, the driver would still only drive the LED at 700mA and the voltage across the LED would still be about 3.5V.

It may be easier to think of this as a tank of water with an outlet at the bottom and an inlet pipe controlled by a tap that can ONLY be turned on or off. To maintain a certain flow through the outlet, the tank has to be kept filled to a line near the top. Now since the inlet tap can only be turned on fully or off fully, you maintain the level by turning the tap on for a period and off for a period. Now say the inlet water pressure increases dramatically, you still do the same thing, but the amount of time you turn the tap on for decreases, but you still turn it on and off at regular intervals.

This is the same as the constant current driver. It switches the supply into the inductor on and off at regular intervals to maintain a constant output current. If the input voltage to the controller increases, it still switches the supply into the inductor on and off at regular intervals, but the amount of time it is turned on for is smaller. So the LED still sees the same current and voltage regardless of the supply to the controller, but the controller just switches the current on and off at varying rates to maintain a constant current at the output.
 
A very helpful description :nod: I assume you can use a PIC on some of these Drivers to control dimming can you? If so, can you give a pointer as to what signal input the Driver would need to dim under PIC control? Presumably, in a PIC controler-driver set-up, the PIC and Driver would need common to have a common nutal voltage rail?

Thanks
Rabbut
 
A very helpful description :nod: I assume you can use a PIC on some of these Drivers to control dimming can you? If so, can you give a pointer as to what signal input the Driver would need to dim under PIC control? Presumably, in a PIC controler-driver set-up, the PIC and Driver would need common to have a common nutal voltage rail?

Thanks
Rabbut

Yes you can, in fact this is what I am doing on my system. Unfortunately I've been really lazy over Christmas as it was my first break from work for almost a year so I didn't get much done, but I'm starting with the PCB design for the controller which will also control everything else on the aquarium.


It depends a little on the driver as to what signal you need, but for example with the Zetex drivers you apply a low frequency PWM waveform to the 'dim' pin from an open collector transistor. Zetex recommend between 100Hz and 500Hz for this PWM signal to prevent aliasing with the high frequency driver PWM (if your PWM waveform and the PWM waveform for the switching regulator were close you'd get a pulsating light output as the two waveforms fall in to/out of sync. Basically what you are doing is enabling/disabling the LED output with your 100Hz PWM signal, and during the time your signal is 'on' the regulator is regulating the LED at it's 100kHz or whatever frequency.

With regulators that don't have a dedicated pin, it is possible to hack the regulator to allow you to dim the LED. One method is to simply place a transistor in series with the LED and feed your dimming PWM waveform into that. This causes problems with some drivers that use a PID loop to control the regulator as it'll cause the terms to build up preventing proper dimming.

Another method I have used in the past involves interfering with the reference signal (if it is available)

A bit of background first:
To detect the current through the LED, the regulator has a small resistor in series with the return leg from the LED. This resistor may have a typical value of 0.2 ohms. Now say the driver is a 3W driver, so needs to detect 700mA through the LED, the voltage across the resistor would be compared to a 0.14V (0.2 x 0.7) reference signal. When the current rises above 700mA, the comparator turns the switch off, and when the current drops back below 700mA, the comparator turns the switch back on. This gives an average current of 700mA through the LED.

If you reduce the reference signal to 0V, the LED will legitimately turn off. So by inserting a current limiting resistor between the voltage reference and the reference input then put a transistor between the input and ground you can dim the LED.

Depending on the arrangement, it may also be possible to hack the circuit so you can artificially make the voltage at the feedback pin artificially high which will also turn off the LED.
 
Right, now for the killer question :shifty: ... How the heck would you approach planning a PWM dimming controller program, and what PIC's would be suited? My knowlage of PIC's is limited, so please take it simple. I can manage programming "on" and "off" at output pins acoording to input pins/set time internvals using basic if statements, but anything more complex needs to be easily understood for a relative beginner to PIC's... I think I have enough Info now to build a simple "on and off" light unit, but with the power of these, I'd like to dim them and and off to avoid photoshocking any livestock... :unsure: Due to my cabinets wireing, I cannot do as AC is doing and just wire different series to different plugs and then switch on one at a time, they all have to be fed via the same supply...

I was origionally going to use a capasitor-resistor series to create a moderate dimming effect. I was going to feed a (for arguments sake) 24V regulated supply to the circuit into a diode for protection, into the largest capasitor I could find, and then use a resistor to drop down to the required 3.5-3.7V. Each of my 10 LED's were then going to be wired in parallel to the resulting output. Would that work and be simpler than the PIC solution? I understand some efficiency would be lost, and I'd need to pull a fair bit of current to drive the LED's somehow and that may be out of proportion to what the resistor will allow through, but could that be made to work? Possibly wireing a few in series and then wiring the series into the capasitor-resistor series in parallel...

Sorry to start brain picking...
Rabbut
 
I wouldn't go down the big capacitor route. PWM is much simpler and smaller. If you don't go down the constant current regulator route and just use a simple resistor to limit current then you can simply use the PWM module built into the majority of PICs.

If you do use a constant current regulator you unfortunately can't use the PWM module since the minimum frequency for modules is 2.44kHz which is too high to get a decent dimming range and to prevent aliasing of the PWM signals. For low frequency PWM you can easily create a PWM waveform on any of the microcontroller pins.

First choose the resolution you want. For simplicities sake, say 255 dimming levels.
Then PWM frequency - Say 100Hz.
You then set an interrupt to occur at a frequency of 255x100Hz = 25.5kHz
In the interrupt you increment an 8 bit counter.
You have a variable which has your 0 - 255 target dimming value
In the interrupt you compare the counter with your dimming value.
If the counter is greater than your dimming value you turn off your output pin
If the counter is less than or equal to your dimming value you turn on your output pin (unless your dimming value = 0)
 
Right, OK, that sounds simple enough, thanks :good:

Is there a simple way of making the PIC fade up over say an hour, stay on for say 7-8 hours and fade down again over another hour and stay off untill 14 hours has passed? This realy is my goal for it, and I know I can do it with a large capasitor and then current+voltage control using a resistor allongside a timer switch on the voltage supply, but smaller but more fidely and sofisticated (because of the programming mainly) PIC's being used for dimming is a bit of a new concept for me :unsure:

Last question, for programming, would you recomend investing in, or borrowing if possible, a propper piece of hardware for programming the PIC, or could I find some way of hooking up to a computer using a sirial to LED cable, and then an LDR to transmit the program to the PIC? If I can use a computer and serial-LED connection, will the PIC be fussy about the programming language/programming program used, or can I use whatever I like if I convert it into the correct form for transfer?

Thanks once again SteveyG, you have been a great help

Sorry AC for the thread hy-jack :blush:

All the best
Rabbut
 

Most reactions

Back
Top