Hi folks. I wonder if someone can verify the attached schematic and tell me if I did it right. Basically I want to use a mosfet to turn on/off an LED strip. For simplicity, let’s say the +5V signal is coming from an ON/OFF switch. (In reality, it’s coming from a switch that’s connected the same Li+ battery going through a boost circuitry to bring it up to +5V which then supplies the rest of the circuit as well.) I just want to know if I did the connections right, and whether I have the proper components for that specific mosfet.
Look good and that MOSFET will switch on with a 5V G-S signal.
Now just wire it up on a protoboard to test it out.
Hey thanks for confirming it. I’m still doing the schematic and will eventually get to a besides before I build it as a final piece with SMD parts.
Are you carrying GND on another connector ?
-mark
markaren1:
Are you carrying GND on another connector ?
All grounds are common.
Mark did catch something I missed.
On the four pin connector you have DIN and CLK. These will need a ground reference on the other end of that connection. So, Mark is asking if you have another connector that has this ground.
Why are these signals on the LED power connector? What are they going to be used for?
It’s an addressable LED strip, so the other end of that is an AVR which gets its power from a boost circuitry coming from that same battery. This is but a small portion of the full schematic.
Pin 4 of the connector will effectively be the ground of the led strip. But if there are large current fluctuations on that wire then resistance of the mosfet would cause a fluctuating voltage reference for the data and clock line. And that might be bad for getting those signals propperly detected. How much current are you expecting to run through it?
Might be better to go for a P-channel Mosfet, using a high-side switch circuit, to avoid having that ledstrip ground from bouncing up and down.
[edit]
This is but a small portion of the full schematic.
Leaving stuff out is risky, especially when you are asking for confirmation if you did things right, … and when it afterwards ends up being important.
The custom strips I’m using can pull, at a max, 3A. That mosfet, if I’m not mistaken, is rated for 6.3A. I’m trying to figure out if I should stick with one mosfet per strip, or if I can get away with two strips per mosfet, as there are four strips total (they all flash the same thing, same two signal lines go to all four strips in a spider configuration.) The strips will be flashing rather fast as it’s for a persistence of vision design. I’ve toyed with the idea of adding a large capacitor across each strip’s power lines but the design enclosure prohibits the space needed for such a large cap (I’m thinking 1000uF.) So I’m stuck with what I have to work with, which is a tube diameter of 7/8" (inside). Now I’m wondering if I should just get through hole equivalent parts and testing them out, see what happens before I finalize the SMD design.
This is the full circuit as it stands right now … there may be some changes made, such as possibly adding an SD card reader, possibly an RF radio, but those aren’t for sure just yet … In it’s simplest form, the battery feeds power to the boost circuit which brings it up to 5V and then feeds the 32U4. The strips are getting power straight from the battery, this is a must and can not be changed. They will run at the nominal 3.7V battery voltage, and are able to tolerate the 5V signals from the AVR. Then there’s the charging circuit for the battery. The switch cuts off power to the boost circuit and thus everything after that.
Is there a way to flip what gets cut off from the LED strips? Right now the GND line is getting cut, I prefer it to be the VBAT line that gets cut. How do I do that?
Anyone?
My point, which waltr picked up on is that the LED strips must have a GND ref each - you are going to cause some interesting issues if you switch GND to each strip.
Why can’t you just program them off. If you must remove power a P-FET sound more like it - but check reverse conduction of the gate since switched power will be ~3.7V, and control signal 5V. Or use open drain + pullup.
Also, if your remove power to the strips, each LED driver will need to be re-programmed when you re-apply power.
========
Are you sure AVCC and VCAP should be in parallel on the Mega32U4 - maybe one cap is required on each net ?
Why SW2 ? could you use a P-FET ?
I don’t think you can load Vbus with 26.7uF (C1+C20) reasonably sure the USB spec indicates something much lower. 4.7uF seems more like it.
LM2621 appears to be missing boost diode.
HTH
mark
Thanks for taking a look at it. Some of what you said I understand, others I will try to explain my rational, hoping it will explain things a bit better.
I need to be able to cut off power to the strips while keeping the MCU running. While I can program them to "black", they still pull several mAmps per strip. It's just the way they work, the drivers still consume power even if the LEDs are off. I don't understand your statement of needing to reprogram them if I cut off power. That's the same as shutting the whole unit off, or removing the battery. So how is it any different?markaren1:
My point, which waltr picked up on is that the LED strips must have a GND ref each - you are going to cause some interesting issues if you switch GND to each strip.Why can’t you just program them off. If you must remove power a P-FET sound more like it - but check reverse conduction of the gate since switched power will be ~3.7V, and control signal 5V. Or use open drain + pullup.
Also, if your remove power to the strips, each LED driver will need to be re-programmed when you re-apply power.
Can you give me an example schematic on how to do it with a P-FET instead?
That may be an error on my part. I'll check it when I get home this evening. Thanks for catching it.markaren1:
Are you sure AVCC and VCAP should be in parallel on the Mega32U4 - maybe one cap is required on each net ?
That's the main on/off switch to the whole unit, except the charging circuit, which is why it's between that and the boost circuit. I need to be able to plug in a USB cable and charge the battery without the whole unit being on.markaren1:
Why SW2 ? could you use a P-FET ?
That came from the design schematic of the Arduino Micro actually.markaren1:
I don’t think you can load Vbus with 26.7uF (C1+C20) reasonably sure the USB spec indicates something much lower. 4.7uF seems more like it.
Huh, and I thought I was diligent in following the datasheet to the letter. You're right, I did miss a diode there.markaren1:
LM2621 appears to be missing boost diode.
Thanks!
Yes, by removing battery-power from the LEDs you are switching them off / unplugging them. When you apply power you need to re-load the LED drivers.
Before removing power, you must either set the data and clock to a logic ‘0’, or set the pins as inputs otherwise the Arduino will try and power (back-power) the LEDs from the data lines.
How much current (max) does each LED chain require ? It should be possible to use a single P-FET to control power to all four strings.
I will try and get you an example later
-mark
Each string can pull a max of 3A. There are four strings.
Here is a basic P-channel FET switch, the NPN device can be replaced with an N-channel FET with logic level switching.
So 12A max - that is big-current. Make sure your 4 pin connectors - and associated PCB tracks can carry the required current. Probably worth reading up on circulating currents so you don’t have the CPU reboot every time you change LED brightness.
Take a look at http://circuitcalculator.com/wordpress/ … calculator
The PCB physical layout suddenly becomes a critical part of the project if this is to work reliably…
-Mark
Thanks for that. I will see what I can come up with as far as components go and adjust the schematic accordingly. I'll likely post it again once changed.markaren1:
Here is a basic P-channel FET switch, the NPN device can be replaced with an N-channel FET with logic level switching.
The plan is to not have more than 2mm of tracks between solder joints. One hefty wire coming from the battery to the edge of the PCB, split into 4 (or maybe just one large solder area) with the FETs soldered to that and back out to the individual solder holes for each string, and heft wires back to the strings. With each string pulling at the most 3A, I'm hoping that will work.markaren1:
So 12A max - that is big-current. Make sure your 4 pin connectors - and associated PCB tracks can carry the required current. Probably worth reading up on circulating currents so you don’t have the CPU reboot every time you change LED brightness.
The test “strings” I have right now have a VCC and GND plane, the entire PCB is covered. So really the controller’s PCB is what I need to be aware of how I design that.
This being a POV system, the LEDs will be flashing every 250-300usecs or so, and the drivers are also PWM drivers, so there won’t be any sustained 3A pull. But I also always calculate the absolute worst possible case, so with 48 RGB pixels at 60mA each, that’s 2.88A. Give a little for the drivers themselves and I round it up to 3A. In reality, the LEDs are being driven at 0.54mA so that brings it down just a tad, to 2.592A, Still, I’ll be looking for an FET that can handle at least 3A. I believe the IRLML6244 in the original circuit was able to withstand 6A+ …
Ok, so for the P-FET, would something like a PMV65XP work? And how do I figure out what I need for the N-FET?
Circulating current isn’t just about thick wires, it’s about knowing and steering where the current flows, let me see what I can dig up.
PMV65XP is a bit close in terms of margin rated at 4.3A max, and on resistance (RDSon) is a bit high at 58m ohms. Have a look at Si2333CDS 7A, 40m ohms at roughly 4V gate voltage.
The N-FETs you were using before IRLML6244) should be OK as the Open Drain driver. A bit overkill, but you can use them for other things.
What is the voltage rating of the LED string ? LiPo cells are roughly 3.3 to 4.2V between discharged and charged. Have you run a string on a variable PSU between these limits and checked that they work OK and there is acceptable brightness variation between 3.3 and 4.2V ? ** this is an important issue **
-mark
markaren1:
Circulating current isn’t just about thick wires, it’s about knowing and steering where the current flows, let me see what I can dig up.
Ok, I will need some schooling on that as I don’t understand what you’re referring to. If you don’t mind …
markaren1:
PMV65XP is a bit close in terms of margin rated at 4.3A max, and on resistance (RDSon) is a bit high at 58m ohms. Have a look at Si2333CDS 7A, 40m ohms at roughly 4V gate voltage.
Hrm, what I’m finding on Mouser’s site is a 5.1A 35m Ohms, 12V drain, +/- 8V gate … same part number.
markaren1:
The N-FETs you were using before IRLML6244) should be OK as the Open Drain driver. A bit overkill, but you can use them for other things.
Is there something smaller I should look at, or should I stick with the overhead?
markaren1:
What is the voltage rating of the LED string ? LiPo cells are roughly 3.3 to 4.2V between discharged and charged. Have you run a string on a variable PSU between these limits and checked that they work OK and there is acceptable brightness variation between 3.3 and 4.2V ? ** this is an important issue **
Voltage rating on the drivers is 2.7~5.5V. My developing setup right now is a Micro running off of USB power, and the four strings connected to a single Li-Ion battery, and common ground between the Micro and the battery. Fully charged the battery measures 4.2V and it cuts off at 2.8V. I’ve actually driven it down to that 2.8V without any problem. The drivers are 5V tolerant as far as their signals go. I have also driven the entire setup from the battery (without the boost circuit) and that does work, however the AVR’s clock speed suffers because it’s not the necessary voltage for 16MHz.
I can’t (easily) boost the battery voltage to 5V AND with the needed Amps to also drive the LED strips, at least not while also keeping a very small footprint. So I’m only boosting it to drive the MCU, less than 1A needed …