What's new
  • ICMag with help from Landrace Warden and The Vault is running a NEW contest in November! You can check it here. Prizes are seeds & forum premium access. Come join in!

How to turn a laptop adapter into a LEDs driver

boomerang

New member
[FONT=Arial, sans-serif]I'm interested in LED growing and I'm going to upgrade my setup. By thinking about the driving issue I've found an interesting way to drive LEDs for those who a soldering iron doesn't afraid. It consists to turn a cheap laptop adapter into a current driver for your LEDs. [/FONT]


ledsupply.jpg




[FONT=Arial, sans-serif]How and why ?[/FONT]
[FONT=Arial, sans-serif]Using a switching power supply is the best way to step-down voltage from the main because of its energy efficiency, generally more than 80%. Unfortunately easy to find switching supplies are often voltage driver, typically those used for computers. But LEDs need to be driven with current, an 1W Led needs 350mA, a 3W needs 750mA, so what people often do is taking a computer supply and add a linear current regulation (with a LM317 for example) which needs an heatsink and obviously are not energy efficient.[/FONT]
[FONT=Arial, sans-serif]But current driving and voltage driving power supplies are not so differents, and it's often possible to tweak them to change their purpose.[/FONT]
[FONT=Arial, sans-serif]I succeeded with my MSI Wind adaptator which can now drive 9 of 3W Leds and cost only 15$ on Ebay. [/FONT]
[FONT=Arial, sans-serif]First time, I will try to give the knowledge to those who already have skills in electronics to allow them to turn any laptop adapter into a LED driver. Then in the next posts, I will describe step-by-step how to make the tweak for those who have the same adapter than me. That's easier than put a modchip into a Wii and less expensive if you fail ![/FONT]


[FONT=Arial, sans-serif]Inside you laptop adapter, the fly-back converter[/FONT]


schemaflyback.jpg




[FONT=Arial, sans-serif]Left the primary side, right the secondary side, between them the transformer. The switching controller commands when the primary current can flow trough the transformer. The switching frequency is in the range of 100 kHz, this allow switching supply to use a small transformer. When the switch is on, the primary of the transformer is directly connected to the rectified main AC. This results in an increase of magnetic flux in the transformer. The voltage across the secondary winding is negative, so the diode is blocked. The output capacitor supplies energy to the output load. [/FONT]
[FONT=Arial, sans-serif]When the switch is off, the energy stored in the transformer is transferred to the output of the converter. [/FONT]
[FONT=Arial, sans-serif]If you increase the switch-on time, you will increase the output voltage, so the switching controller adapts the duty-cycle in order to have the desired voltage at the output. For that It uses a feedback loop from the secondary side. If you replace the voltage sensing loop by a current sensing loop, you get a current driver. This is what we will do ! [/FONT]
[FONT=Arial, sans-serif]Take a look on the secondary side. This is the schematic of a typical application using TSM1014, a chip that you could find in your laptop adapter. [/FONT]


schemasecondaire.jpg




[FONT=Arial, sans-serif]This chip gives feedback to the primary side by switching ON or OFF an optocoupler. There is a voltage feedback, and surprise, also a current feedback. The TMS1014 provides a 2,5V reference voltage, the output voltage is lowered by R2 and R1 and is compared with the reference, if it's above then the CVout pin is activated. The reference voltage is lowered by R4 and R5, if the Vsense is above then the CCout pin is activated. [/FONT]
[FONT=Arial, sans-serif]So whenever the voltage threshold or the current threshold is reached, the optocoupler is activated. The supply is either a current driver either a voltage driver, as you can see on this graph: [/FONT]


graphcurrentvoltagejpg.jpg




[FONT=Arial, sans-serif]If we can change the current threshold, we are able to drive LEDs with the appropriate current, provided that the sum of their voltage drop doesn't reach the voltage threshold. That's not so difficult to do, we just have to change Rsense, R1 or R2. And even change R2 or R4 to increase the voltage threshold allowing us to use more LEDs in serie ![/FONT]


[FONT=Arial, sans-serif]Inside the MSI Wind power adapter[/FONT]


pcbprimsec.jpg




[FONT=Arial, sans-serif]It's easy to identify the secondary side from the primary side because of the isolation room between them. On the secondary side you will generally find only one chip, the one that give feedback to the primary side. Here we have a TSM103 which is a dual operational amplifier and voltage reference, pretty similar to the TSM1014. Now we are sure that this supply works as described above.[/FONT]


[FONT=Arial, sans-serif]Current setting[/FONT]
[FONT=Arial, sans-serif][FONT=Arial, sans-serif]Take a look at the TSM103 datasheet to get the pin description and identify the current sense circuit.[/FONT][/FONT]


pcbcurrent.jpg




[FONT=Arial, sans-serif]Follow the circuit from an inverting input and find the shunt, which should be a big resistor, like this:[/FONT]


rshunt.jpg




[FONT=Arial, sans-serif]You have to calculate the threshold voltage on the non-inverting input. This voltage is the reference voltage (2,5V) lowered by R4 and R5.[/FONT]
[FONT=Arial, sans-serif][FONT=Arial, sans-serif]Maybe you will need to know the AIE-96 marking, which is often used for small SMD resistors.[/FONT][/FONT]


[FONT=Arial, sans-serif]Vthreshold = 2,5*R5/(R4+R5) = 2,5*1000/(32400+1000) = 74,8mV[/FONT]


[FONT=Arial, sans-serif]To change the current limitation, replace the shunt to match the Vthreshold at your desired current:[/FONT]


[FONT=Arial, sans-serif]Rshunt = Vthreshold/Idesired [/FONT]


[FONT=Arial, sans-serif]For 0,350A you need 0,0748/0,350= 0,21 ohm → 0,22 ohm resistor.[/FONT]
[FONT=Arial, sans-serif]For 0,750mA you need 0,0748/0,750= 0,099 ohm → 0,1 ohm resistor.[/FONT]
[FONT=Arial, sans-serif]For 1A you need 0,0748/1= 0,075 ohm, this value doesn't exist or is hard to find, so if you want this current you have to change R4 and/or R5.[/FONT]
[FONT=Arial, sans-serif]Try to find 1218 1W SMD resistor which are widely used in these values and are easy to solder.[/FONT]


[FONT=Arial, sans-serif]Voltage limitation setting[/FONT]
[FONT=Arial, sans-serif]Since you have our desired current, it would be great to increase the maximum voltage output to use more LEDs in serie. [/FONT]


pcbvoltage.jpg




[FONT=Arial, sans-serif]The voltage limitation uses the other amplifier. The non-inverting input is internaly connected to the voltage reference, so the Vthreshold is 2,5V. The output voltage is lowered by R2 and R1 (here constituted by 2 resistors in serie) and brought to the inverting-input.[/FONT]


[FONT=Arial, sans-serif]Vthreshold = Vout *R1/(R1+R2)[/FONT]


[FONT=Arial, sans-serif]Vout = Vthreshold (R1+R2)/R1[/FONT]


[FONT=Arial, sans-serif]On this supply, you have: [/FONT]
[FONT=Arial, sans-serif]Vout = 2,5 (2136+15400)(2136) = 20,5V[/FONT]


[FONT=Arial, sans-serif]To change the output voltage, you just have to change the R1/R2 ratio.[/FONT]


[FONT=Arial, sans-serif]Not that the TSM103 is supplied by the output voltage and has a 3 to 32V power supply range. For the circuit safety, you should not set the voltage output above 30V. Maybe you will need to change the output capacitor by a higher voltage one.[/FONT]




[FONT=Arial, sans-serif]Current output check[/FONT]


[FONT=Arial, sans-serif]Before connecting expensive LEDs on your tweaked power supply, you should measure the output current with cheap diodes like 1N4004. Just use 3 diodes in serie where you use 1 LED.[/FONT]
 
N

noone4u

Wow

Nice one

You ever come the the states Ill give you a job !
 

knna

Member
Vey useful post, boomerang.

But from my personal experience, people skilled on electronics dont need such guidance, and very little people not electronically skilled may try to do any modification of a circuit board that they dont understand.

Anyway, with 1 person using this info, the post becomes very useful, so thanks for taking the time for posting it.

Just one suggestion: how about putting a variable resistor for R5, or add it between R4 and R5? That way you may adjust the current output to the needs, saving power when its not required.
 

boomerang

New member
Wow

Nice one

You ever come the the states Ill give you a job !

Thanks, I come immediately after Obama legalize it :D



Vey useful post, boomerang.

But from my personal experience, people skilled on electronics dont need such guidance, and very little people not electronically skilled may try to do any modification of a circuit board that they dont understand.

I can't agree because it's not obvious that a such modification is possible and even strongly skilled people could save some work hours by reading this post.
I will post a more detailled description of the modification later, I hope that more people could do the modification if they get the same adapter than me.
People don't need to understand the circuit when they just change some components. So if skilled people succeed to tweak others adapter models and post their work, that could allow any people to get a free adapter from a broken laptop, buy some components for almost nothing and try to modify it, there is nothing to loose. But maybe I'm wrong, in France you learn component soldering at the middle school, I don't know for the others countries.

Just one suggestion: how about putting a variable resistor for R5, or add it between R4 and R5? That way you may adjust the current output to the needs, saving power when its not required.

Good idea, that will work.
 
Top