Arduino mosfet controll - Page 1
Forum section: electronics / beginners

author: Idzanagi
author_rank: Contributor
timestamp: April 25, 2020, 02:14:49 pm
content: Hi guys!I have made a PCB board for my fishtank led light. I want now to control it with Arduino the different color channels and also I will control two PWM pc fans from one output.the PSU is provide 9.6V the fan work 5-12V.I tested it on a breadboard and looks fine. Except for the fact that because of the MOSFETs the 3.2v lights will get less Voltage but that is fine because I am not going to turn the LEDs fully on as it's getting too hot (leds are not on heatsink) and super bright.Could you please have a look at the schematics and share your advice, opinion, remark.Also, would you bother yourself to make 12V for the fan or 9.5-10V is good enough? I feel it`s giving me good airflow.Thank Guys!

author: madires
author_rank: Super Contributor
timestamp: April 25, 2020, 03:11:10 pm
content: Powering the 12V fans with 9.6V should be fine. Bonus points for choosing logic-level MOSFETs.I'd replace the 1M\$\Omega\$ pull-down resistors with 100k and connect them directly to the gates. I assume you've put three LEDs in series (3 * 3.2V = 9.6V). LEDs are current driven components. So it's not the best idea to connect them directly to a constant voltage supply. The simple solution is to add a low value power resistor to each LED chain to limit the current. Don't worry too much about the voltage drop caused by the MOSFET, it's quite low (see R_DS_on). With current limiting resistors you could also use an ubiquitous 12V PSU.

author: Idzanagi
author_rank: Contributor
timestamp: April 25, 2020, 11:27:37 pm
content: Thank you for your time!I have changed the resistors to directly connected to the gate-source and added small resistors.I lied a little bit when I said it`s 9.6V (That was just my quick test setup). sorryMy power source is a 24V10A PSU and I have an adjustable Current, Voltage buck converter. Q: --> If I set up the buck converter to a current limit let say do not exceed 700 or 600mA or 250mA/led than I am still had to add the resistors? Or the good practice to add to every single one since every led has a slightly different forward voltage? Also, protect the led`s from spikes or if one of the LEDs fails. Not 100% clear to meI have 6X of those panels.Each panel has 5 channels and 2 LEDs / each. One LED F.V: 3.4-3.8V and F.C: 700mA ( when I bought them I did not know how hot they can be and way too bright ) My test show that on 3.7V already drow 700mA and on 3.8 it`s 740mA.because I don`t use a heatsink on the LEDs. I will just rely on the fans. I found 3.15V 250mA gives still really bright light and stays on manageable temperature so I am planning to use this as maximum.I have found the best way to connect those a 2x3 series. (attached my magnificent drawing).There is also a picture of my PSU, buck, and the new schematics.

author: madires
author_rank: Super Contributor
timestamp: April 26, 2020, 11:30:42 am
content: Quote from: Idzanagi on April 25, 2020, 11:27:37 pmA current limiting PSU would be fine for one string of LEDs because it will limit the maximum current through the LEDs. If an LED fails shorted the current limit makes sure that the remaining LEDs don't draw excessive current. When paralleling LED strings you run into the problem how the current is distributed across the strings. A shorted LED would lower the string's Vf and therefore cause higher current for that string (the other strings would get less current). So the best way is to add a current limit to each string, e.g. by resistors.Quote from: Idzanagi on April 25, 2020, 11:27:37 pmYou're right, reducing the current will lower the power loss (heat). But just fans and no heatsinks with a large surface area won't be very effective for cooling. Power LEDs love aluminium PCBs and heatsinks. Do your PCBs have at least large copper planes?

author: Idzanagi
author_rank: Contributor
timestamp: April 27, 2020, 11:18:50 am
content: QuoteThanks, that makes sense. I will add a small resistor to every string. What value of p_resistor would you use?QuoteI have a lot of heatsinks that I can use. Unfortunately, the best I can do is attach a large surface heatsink on the back of the PCB. I can keep my hand on the led so it`s not as crazy warm on this load. next time I will design it smarterThank you for your help, I really could not do it without the help that you are giving me. I will order the PCB s today and I will update this post with pictures once it's done.

author: madires
author_rank: Super Contributor
timestamp: April 27, 2020, 04:13:35 pm
content: Quote from: Idzanagi on April 27, 2020, 11:18:50 amYou can calculate that easily by applying Ohm's law. Add Vf of all LEDs in the string. Then subtract that from the supply voltage. The difference is the voltage the resistor has to drop. Now take the current limit you've chosen and with R = V / I you'll get the resistance value. The last step is to calculate the power rating for the resistor: P = V * I.

author: Idzanagi
author_rank: Contributor
timestamp: April 29, 2020, 03:40:07 pm
content: ^^I redesigned a little bit as you made me aware of the individual string vulnerability.Found a current mirroring can be an ideal solution for my problem here.What do you think?or?

author: madires
author_rank: Super Contributor
timestamp: April 29, 2020, 05:15:14 pm
content: No need for additional transistors. Simply keep the MOSFETs and add a resistor to each LED string.

author: Idzanagi
author_rank: Contributor
timestamp: April 29, 2020, 07:44:35 pm
content: If a LED fails then all of the LEDs are going to burn out on that string. And all LEDs have a slightly different forward V and with the temperature rise, it`s going to be even worse.Q1: Why a resistor will protect the string? If one of the diodes will sort then the rest will burn out on that string.Q2: Do the different forward V matters? same color the same brand but still have little differences. Is it not going to cause thermal runaway?Sorry I just don`t understand as I am lack experience in this.

author: madires
author_rank: Super Contributor
timestamp: April 30, 2020, 07:39:14 am
content: Quote from: Idzanagi on April 29, 2020, 07:44:35 pmThe resistor will counteract. If a LED fails shorted the current will rise. At the same time the higher current causes a higher voltage drop by the resistor. The higher voltage drop reduces the string's current.Quote from: Idzanagi on April 29, 2020, 07:44:35 pmThat's another reason to limit the current of the LED string. And the LEDs will have a slightly different brightness.

author: Idzanagi
author_rank: Contributor
timestamp: April 30, 2020, 08:52:48 am
content: Thank you, I will use than just a resistor/string.