Also, I’m adding an SD card reader to the mix, so that will have a small 3.3V/150mA LDO to power that. Shouldn’t affect anything else, I don’t think.
Also, on your P-FET schematic above, the N-FET has the signal line coming from the MCU … does that mean that each strip will need to have their own separate signal line going to an N-FET, or can I still use one signal line going to all four N-FETs?
I prefer 4 separate N-FETs driving the 4 output P-FETs - better isolation if one channel fails etc.
If you can find a higher current P-FET then go for it. 5.1A is still better than 4.3A, and it is all amazing given the package size.
Ground currents. The important feature is the single-point-ground. This is sometimes a STAR connection as drawn, and is the elected ground reference point. No matter how much current you pull from the battery, the ground ref point stays as ground, although the battery voltage (plus cable losses) may indicate battery sag at the plus terminal star point. Basically you are keeping LED power noise out of the CPU ground. To read more, Google “single point earthing”, or “single point grounding”. Sorry if this is a poor explanation, I need some sleep
And, yes, short, fat traces will help with this.
-mark
markaren1:
I prefer 4 separate N-FETs driving the 4 output P-FETs - better isolation if one channel fails etc.
Oh, that’s not what I meant. I will have four separate N-FETs, what I’m trying to figure out is if I can use a single signal line from the MCU to trigger all four, or if I should trigger each one from a separate signal line.
markaren1:
Ground currents. The important feature is the single-point-ground. This is sometimes a STAR connection as drawn, and is the elected ground reference point. No matter how much current you pull from the battery, the ground ref point stays as ground, although the battery voltage (plus cable losses) may indicate battery sag at the plus terminal star point. Basically you are keeping LED power noise out of the CPU ground. To read more, Google “single point earthing”, or “single point grounding”. Sorry if this is a poor explanation, I need some sleepAnd, yes, short, fat traces will help with this.
Ok, I do get what you’re saying there. The way I’m planning on making the PCB is to have all of the MCU and related parts on one side, and the N/P-FETs on the edge opposite where everything else is. Keep it all very close together with either very short traces or just a big area pour. We’ll see how it works out though.
My apologies if I buggered this up, I’m still trying to understand FETs in general, but this is what I came up with for each string. Am I on the correct path here? The part numbers are actually Mouser’s part#'s.
Ok, this is what it looks like now after adding the SD reader, and moving things around/organizing the schematic (to keep my sanity). I did just realize something though, I need to cut VBUS power to the MCU when the main switch is turned off. I want to be able to still connect a USB cord to charge the battery when the unit is turned off, but I don’t need VBUS going to the MCU at that time. I think I can change the main switch out for a DPST and cut off both VIN as well as VUSB, but I’m also wondering if that’s the right way, or whether I should use a mosfet on the VBUS line to do the same. Seeing as I still don’t entirely understand how N/P-FETs work (I’m always getting it wrong), I’m not sure how it should be wired up …
Also, I’m wondering, if I beef up the MOSFETs to each handle a little over double what the strings would pull (at max), can I cut it down to just two pairs instead of four? I really need the PCB real estate, so if I can connect two strings together that will definitely help. Better if I can make it just one for all four, but that’s probably pushing my luck.
Wow, you have been busy.
A single line from the CPU should be fine to drive the N-chan FETs.
Have a look at TO-263 FETs, and yes, one to drive two chains. Maybe SUM110P06-07L - it’s rated at 110A (!) but you may still have some thermal issues with traces, use two if you can afford the space.
Never seen an activity LED like you have on the SD card - very clever.
R1 (pack) may be low at 200R (very bright status LEDs at 5V).
DATA and CLK possibly need buffers (HC050 spares gates), and 8 x 100R between the buffer and each DATA and CLK to the LED chains.
5V needs decoupling close to the ATmega on pins 14 and 34 (100nF).
This is all looking rather good - well done.
So can you explain what an LED POV thingy is please
Being an old-fart I was quite amazed at http://www.youtube.com/watch?v=TQbrSi4V5RQ
-mark
In the LED String-section, the grey text near the symbols and part ID numbers (Q# and N-FET) doesn’t match the symbols used. They should be switched. Top symbol of each branch is an P-FET, but N-fet according to the text above. The circuit itself looks ok though.
markaren1:
Have a look at TO-263 FETs, and yes, one to drive two chains. Maybe SUM110P06-07L - it’s rated at 110A (!) but you may still have some thermal issues with traces, use two if you can afford the space.
Unfortunately those are too big for this. I have to stick with small SOT23 (and cousins) to make this work. I don’t have the real estate for larger components.
markaren1:
Never seen an activity LED like you have on the SD card - very clever.
I can’t take credit for that part. It’s taken from Adafruit’s SD card reader design.
markaren1:
R1 (pack) may be low at 200R (very bright status LEDs at 5V).
Oh, those are just some random value I stuck in. I always calculate the final resistance based on the LED used, whether it’s 20mA or 5mA.
markaren1:
DATA and CLK possibly need buffers (HC050 spares gates), and 8 x 100R between the buffer and each DATA and CLK to the LED chains.
And the buffers are for … ? The reason I ask is because I’m running the test platform without buffers. In fact, I have a near 10 feet cable running from the controller to the actual LED strips in the tube so that I can go stand some distance away and spin the thing to see what it looks like. In the final design, the distance between the controller and the LED strips will be less than 2 inches; the PCBs will be butting up against each other with connecting wires between them.
markaren1:
5V needs decoupling close to the ATmega on pins 14 and 34 (100nF).
Huh … somehow those got lost. They were there at some point …
Can you tell me how I can cut off VBUS from the Atmel when I turn the unit off? Right now, I want to be able to turn the unit off, plug a USB cable in, and still able to charge the battery (which is why the on/off switch is between the charging circuit and the boost circuit.) But, with the current design, as soon as I plug a cable in, the Atmel will get power from VBUS, which is unnecessary. Should I just change the switch for a DPST, or use an N/P-FET (don’t know which one, nor how!) I think this is the last bit that I’m missing …
markaren1:
So can you explain what an LED POV thingy is please
POV: Persistence of Vision. What that video shows is a static green S-curve being played with. I’m making straight sticks, or batons that one spins around. The LED strips will flash rapidly and the motion will reveal the result. I have an album of static images that I took a few days ago: http://goo.gl/Tzyxan - those are taken with the camera set at 1/2.5th of a second so it captures a full rotation.
Valen:
In the LED String-section, the grey text near the symbols and part ID numbers (Q# and N-FET) doesn’t match the symbols used. They should be switched. Top symbol of each branch is an P-FET, but N-fet according to the text above. The circuit itself looks ok though.
Correct, top one is a P-FET, and bottom N-FET. One mistake compounded by copying the same symbol three more times. Thanks for catching that.
Blah, P-FETs in SOT23 only go up to 5.1A … Found a 6A in SOT26 but that’s too close for my liking. So either I use four of each, or I find a way to fit larger components. Urgh.
Shouldn’t UGND be tied to GND? If not (or if you have a bead in there), the AREF cap should tie to GND instead of UGND.
/mike
Buffer on DATA and CLK protects uP against ESD (which we haven’t done very much of so far), also the LED chains are likely to have quite high capacitance. Overall just being nice to the uP by adding the buffers. Having processor pins exposed to the real world is asking or trouble…
What quantity of boards are you planning to make (should have asked this earlier) ?? - this may affect how/if ESD needs to be dealt with at all.
Not sure that AREF should be decoupled to UGND - GND is more likley.
Look for OLIMEXINO-32U4.pdf to see how Olimex managed the various ADC and USB rails - they don’t bother with UGND, but just have DGND and AGND.
UVCC needs to go to somehwere - see the Ulimex design.
A DPDT with the second pole interrupting VBUS from the USB connector is possibly the ugliest and simplest way of removing USB power to the uP - which if you are only making a few units and are short of space may be the way to go.
-mark
markaren1:
Buffer on DATA and CLK protects uP against ESD (which we haven’t done very much of so far), also the LED chains are likely to have quite high capacitance. Overall just being nice to the uP by adding the buffers. Having processor pins exposed to the real world is asking or trouble…
I’ll tie UGND to GND. It seems that the Leonardo schematic/design has beads but they are unpopulated and the traces are just tied together. The Micro design doesn’t have beads at all, they’re all just tied together. However, what I do notice on both is that there is a trace that first connects all the components with UGND together before connecting to GND somewhere. Meaning, each individual component that has a UGND isn’t connecting to GND separately or at the first possible location. I have to assume that there’s a reason for that.
markaren1:
What quantity of boards are you planning to make (should have asked this earlier) ?? - this may affect how/if ESD needs to be dealt with at all.
First run, I highly doubt I’ll be making more than ten. As this is the first batch, I suspect there will be changes/improvements that will need to be made before doing a second run. I haven’t thought of ESD at all during this whole process but that may simply be because I haven’t notice anything go wrong yet, and that may be in part because I am working with stock Arduino boards and not a custom made one. Also, with the LEDs, controller, and battery all needing to go inside of a polycarbonate tube, and then swung around, I suspect that may easily generate some lovely static build up. So yeah, I’ll look up that Olimex design and see what I can wrangle in the tiny amount of space that I have.
markaren1:
Look for OLIMEXINO-32U4.pdf to see how Olimex managed the various ADC and USB rails - they don’t bother with UGND, but just have DGND and AGND.UVCC needs to go to somehwere - see the Ulimex design.
Will do! Thanks for the reference. And thanks to Mike also for bringing this up.
markaren1:
A DPDT with the second pole interrupting VBUS from the USB connector is possibly the ugliest and simplest way of removing USB power to the uP - which if you are only making a few units and are short of space may be the way to go.
Is there a better way? Or proper way?
Switching VBUS to uP. At first glance a P-FET between the USB connector and the uP, with an N-FET controlling it (same cct as you use to power the LED chain). Feed into N-FET is from uP 5V rail. So if the uP is powered up, then the P-FET allows VBUS to drive the uP.
However, there may be some issues with the parasitic diodes associated with the P-FET, some startup conditions, and some latch-up conditions that may cause you some grief.
I think it comes down to what the VBUS pin on the uP does. Is it a USB enable signal, or does it supply power to the USB PHY, or what.
Need to give this some thought.
-Mark
If I’m not mistaken, it supplies power only. I’ve seen designs where VBUS and GND are the only two pins connected to the uP and it’s only used as a power source. For signals one needs to connect the D-/D+ lines.
Then again, I could be wrong. I’ll have to study the uP’s datasheet to try and figure it out.
Ok, looking at the Olimex design, I see a separate AGND for the AVCC, again a single trace around the board with one single connecting point to GND (through a solder joint.) And AVCC connects to (D)VCC through a 22uH inductor.
However (and this is a product of me working with established schematics and modifying them for my own usage), seeing as how I’m not using the ADC at all, I plan on shutting it off completely, doesn’t that mean I can forgo the beads and caps and just tie AVCC to VCC and call it done. At that point I also wouldn’t need to worry with the AREF pin. I believe I can either leave it floating or just tie it to GND through a 0.1uF cap.
The only remaining piece then is how to route UGND, do I just tie the components to GND where they sit, or do I run a trace connecting all of them together first, and then tie that to GND in one spot.
Some more digging … VBUS supplies power to the USB Interface on the AVR. That’s all it does in this specific design, as the AVR itself is powered from a separate 5V rail (and yes, UVCC needs to get tied to that rail, I just forgot.) So while not critical, there’s really no need to power up the interface if the AVR itself is turned off.
If you can spare the space I would tend you implement the ADC if possible - they can be useful.
DGND and UGND - per Olimex, just tie them together and ground where convenient. If you are only ever building less than 10 units for your own amusement then I can’t see you having to comply with EMC regs.
So how do you use this 4 armed swinging LED array POV unit ? Rotate over head, attach to a wheel. I assume that the LED strings are quite long if they draw 3A
-Mark
markaren1:
If you can spare the space I would tend you implement the ADC if possible - they can be useful.
It’ll never get used. But I agree that they can be useful.
markaren1:
DGND and UGND - per Olimex, just tie them together and ground where convenient. If you are only ever building less than 10 units for your own amusement then I can’t see you having to comply with EMC regs.
Maybe, if for some reason, the world of poi spinners decide they want to buy a crap load, then I’ll have a bigger problem of supply and demand on my hand.
markaren1:
So how do you use this 4 armed swinging LED array POV unit ? Rotate over head, attach to a wheel. I assume that the LED strings are quite long if they draw 3A
Did you see the album I linked to in my earlier post? The unit is less than a foot long (I need to shrink it more!) So, basically take a 12" long ruler, attach a 3" long cord at one end and spin it. How you spin and dance is entirely up to you (or the amount of alcohol consumed.)
As for the draw, there are 48 pixels per side, and 4 sides form one stick. 48 RGB pixels at 60mA each = 2.88A - give some extra for the drivers and I round up to 3A per string. With four strings, that’s a total of up to 12A. But, as I mentioned earlier, in reality the LEDs are capped at 54mA each, and there won’t be any sustained full white, just short bursts (250-300usecs).