Confused about voltage drop with RGB LEDs and Vin

Hi there!

I have a chain of 9 Macetech Megabrite RGB LEDs that I am controlling with an Arduino Mega via SPI.

Because these guys are bright (300ma per unit, 100ma per channel), I am using an adjustable external power supply I purchased:

Since at full white that’s 2.7 amps of current, that guy can output 12A.

I have that supply adjusted to 7.5V.

I am also attempting to power my Arduino Mega off of the same power supply, but I also have the Mega hooked up to my laptop. So, I have Vin on the Mega connected to V+ on that supply, and the grounds tied.

I understand that there is a comparator controlling a MOSFET that will switch between USB power and voltage applied at VIN if Vin < 6.6V.

My question revolves around the fact that I don’t seem to understand voltage drop and where my circuit branches.

The way everything is wired up right now, if I put the ground probe of my multimeter on the shared ground, and then V+ at the spot that Vin is going into the Mega with the lights totally off, I get 7.5V as expected. When I turn the lights up to full white, that voltage drops considerably to 5.2Vish.

This is bothersome to me because as I’m changing what lights are on and off, the voltage at Arduino Vin is going above and below 6.6V, so I assume I’m switching between using USB 5+ and my external supply.

I am assuming the smaller voltage is due to the voltage drop of my LEDS, but because I’m a little fuzzy on the voltage drop business, I don’t understand if there is a way to power my LEDs off of this supply and also ensure a consistent 7.5V at Vin. I’m looking for recommendations on how to connect the LEDs / Vin to the V+ and Gnd of my power supply to avoid seeing the drop at Vin.

I heard about power supplies with “remote sensing” capabilities, which I assume means they notice drop and can adjust to make sure you’re getting a consistent 7.5V. I hope I’m not going to have to get something like that. I just assume with the current setup that I really don’t want to be having the voltage powering the Mega wildly fluctuating.

I’d be happy to provide any more info, but would love to be asked some questions or just hear general advice or see resources about what I’m describing.

Thank you!

Sounds like your supply is choking on the load presented by the LEDs.

Is there a datasheet for the LEDs as well?

This is what is available on the LEDs:

http://docs.macetech.com/doku.php/megabrite

They appear to be visually running fine. :/

I hope I don't just fundamentally have things wired up incorrectly, but I think I properly have the lights and power to the Mega in parallel. I'm super confused why the voltage is changing at the Mega Vin. I expected the voltage drop to happen at the LED loads, and I would expect obviously if I chained power serially from the end of that chain into the Mega that there'd be a drop. I didn't expect a drop in parallel.

I'm a little fuzzy on the voltage drop business,

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

However that LED has the current / voltage regulation built in. Changing the voltage you feed it should not change the brightness if you have it wired up right.

It says on that page:-

Each channel can also be adjusted with a separate current control register, for fine tuning of each LED if close brightness matching is necessary.

So what have you set that to?

Try just one of these, and you need a power supply that can provide more current.

On the face of it your power supply looks adequate, however it might be that there is too much ripple current being generated. Try putting a very large capacitor across the output of the power supply.

Could you give me an idea of what size cap to try? How would ripple current cause what I'm seeing?

As far as the current control registers, I am fairly certain I am setting those all to 127 (max value), so I would expect each LED is taking the full .3mA on full brightness.

As large a cap as you can get, at least 1,000 uF. Excessive ripple current causes instability in the voltage feed back circuit.

Try using only one LED cluster and see if it improves stability, and then try all nine with the current set quite low. Increase the current and se where the voltage instability kicks in. The problem is with your power supply whatever.

How is it wired, chained or star? You probably need star wiring.

OK, so the power supply voltage drops when you power the LEDS.

The "Power Supply" you cite should be capable of supplying much more than you need.

However - it turns out that it is not actually a power supply in the sense we think of, but a switchmode converter. What then becomes apparent is that what you are actually using to power your "power supply" is not capable of supplying the necessary current.

So, what is it that you are using as a power supply?

it turns out that it is not actually a power supply in the sense we think of, but a switchmode converter. What then becomes apparent is that what you are actually using to power your "power supply" is not capable of supplying the necessary current.

Good catch +1

Ok, maybe we're getting somewhere then? Have I purchased the entirely incorrect device for supplying power to the circuit I'm describing?

I can't quite work out from Paul__B's response when he says "what is it that you are using as a power supply": do you mean, because what I have installed (in your words, a "switchmode converter") is not a power supply that will provide constant voltage in the situation I'm describing?

This is the AC/DC wall wart I'm using to go into my current "power supply":

|375x500 (Input 120V AC mains, Output 12V up to 6A DC)

I'm still a bit confused because I started comparing linear power supplies to switched-mode regulators on wikipedia: http://en.wikipedia.org/wiki/Switched-mode_power_supply

And under voltage, switched-mode says "voltage varies little with load"

Maybe the distinction is that you're saying I have a "converter" rather than a regulator. I find this pretty confusing since the product page for what I have calls it a "power supply".

Either way, if you could provide a brief explanation as to what I have and why I'm not getting what I expect, that'd be amazing.

Most helpful would be if there are components I could add to this to make it behave as expected, or if you could point me to some power supplies that might work the way I expect, that'd be super helpful! The only requirement is it be roughly a similar size to the one I have in there now, but I have a bit of flexibility (just can't use, say, an ATX power supply)

OK that power supply is in itself a switch mode converter. You are then adding a switch mode converter on the end. Simplistically that should work. Have you measured the voltage into and out of your converter? If so which is changing?

Most helpful would be if there are components I could add to this to make it behave as expected,

Have you tried the capacitors I told you about, you will need a set between the power supply and your converter and on the output of your converter.

Thanks for the continued help, Mike.

I'll try this when I get home tonight. Let me make sure I've got a plan and am understanding what I should test correctly:

I found two 2200 uF electrolytic caps.

1) I am going to try putting one across the input of my power supply, and one across the output of my power supply. I'm going to try driving my lights at full current and see if the voltage at Vin still drops. That might tell me if the caps have reduced ripple current that was affecting the voltage feedback circuit. (I was a bit confused as to whether or not this is what you were asking when you said I'd need a "set" between power supply and converter and output convert -- did you just mean a set because I'll have one before and one after?)

2) To answer your question about where the voltage is changing, I am going to measure voltage with the lights entirely on and entirely off both before and after my converter.

3) I am going to try a single LED at full brightness and check the voltage at Vin. Then, I am going to add the rest to the chain and slowly increase the current in the dot correction registers and watch the voltage at Vin as I go.

Sound like a reasonable plan?

Sound like a reasonable plan?

Yes.

(I was a bit confused as to whether or not this is what you were asking when you said I'd need a "set" between power supply and converter and output convert

By a set I mean a large capacitor and a small 0.1uF ceramic is the ideal. The ceramic takes out all the high frequencies.

If your power supply is working correctly, and your DC-DC converter is working correctly, the problem you're seeing should not happen. The only way I could imagine this happening is if all the supply current is somehow going through the Arduino's protection circuitry, but that should have popped the polyswitch.

The LEDs should have a clear and obvious wiring path directly to the 7.5V supply. What happens if you try to run the system with the Arduino powered by USB instead of through VIN?

Another common culprit for DC voltage drop is really long wires, if you have any.

Will look into that tonight too, macegr.

I have no real long wires. When I run the Arduino off of USB, I get a tiny bit of flicker in the lights, but that's it.

I am assuming I'm not making a rookie mistake thinking I can measure the voltage at Vin in circuit with no modifications right? I'm just connecting my multimeter ground to groud anywhere in the circuit, then probing the Vin pin.

I meant that you would power the lights with 7.5V, but don't connect 7.5V to the Arduino...just USB. If everything is wired correctly then it should work fine that way (just not self powered the way you want).

OK, so what we have is a mains-to-12V power supply rated at 6A, followed by a switchmode regulator supposedly rated at 12A and only requiring a fraction of that current for the LEDs.

We know that the output of the second device - the regulator - is failing under load. We need to know whether the output of the first device is sagging to cause this or not. We need the current measured at each stage.

Both devices are designed to supply a regulate output - neither should need additional capacitors on its output - but no harm in trying.

Yes, something is clearly wrong here - something is not behaving according to its specification.

To make sure you are not making a rookey mistake can you post a schematic of how you have wired things up.

Hi Mike (and all you other helpful folks),

OK! I did a lot of work on this last night and have everything typed up to report.

I got this message about a schematic now that I'm back at work. I don't have one, but I've notated this image of the breadboard I'm using to describe every connection on it:

|500x500

I did all the tests we all talked about last night. To me, the results were inconclusive. I'll share them here to see if they make anything stand out to anyone.

In all tests below, when I say I'm measuring voltage before the regulator, I'm putting the positive and negative probes of my multimeter on the breadboard rows connected to the biggest cap on the left. For "after the regulator" it's the one on the top right. At Vin means I put the ground of the meter on the ground rail at the top of the board, and the positive on the row with those blue and green wires at the top left which are connected to Vin of the Mega.

Before I added the caps Grumpy_Mike suggested:

Voltage coming into my DC/DC regulator (from wall wart) with circuit completely off: +12.44V DC Turn on all 9 lights at full brightness / full current: 12.07 V Once I disconnect the wall wart, the voltage before the regulator takes a very long time (30 seconds a volt) to dissipate. I'm assuming this is because of the caps in the regulator.

If I measure directly after the regulator with lights off, I get the expected voltage, 7.5V Lights all on full I get 7.05V @Vin to Arduino Mega: 7.5 off, 6.74V lights on

=======

With just the 2200uF electrolytic cap across the input side of my regulator:

Input to regulator: 12.45V off, 12.02 lights on Output from regulator: 7.53V off, 7.1V lights on @Vin, 7.5 off, 6.74 on

=======

With 2200 uF on output side as well:

Input to regulator: 12.44 off, 12.09 on Output: 7.5V with nothing on, 6.43 lights on @Vin, 7.5off, 6.08 on

=======

Adding the .1uF ceramic caps on input and output to regulator:

Input to regulator: 12.44 off, 12.1 on Output: 7.53 off, 7.26 on

=======

Measurents of current:

I put my meter in line with the power going off to the LEDS. In the “lights off” state, it pulls .028 amps. 1.94 with lights on.

I then set the "dot correction" registers on the LEDs to a value of 10. (Max is 127) The lights then pulled 1.19 amps.

At "0" dot correction, they pulled 1.058

If I set the dot correction to 1, and measure current at the input to the regulator, I get: .085A off, .784A on At the output of the regulator, I get .110A off with Arduino on (.026 if I unplug Vin from Arduino) and 1.131A with lights on At dot correction 127, I get 1.89A at the output of the regulator

(The data sheet for the Alegro PWM drive on the lights made me think settign dot correction to 0 would result in 36.5% of my current at dot correct 127. So I was suprised I was seeing 1.131 at 0 and 1.89 at 127, since that is only 60% of max current. Makes me think something is fishy or I'm measuring current at the wrong spot or somehow incorrectly, or reading the data sheet wrong)

=======

One more voltage test, with all the caps and the dot corretion set to lower current (value of 1)

Input to regular: 12.45V off, 12.28 lights on Output to regulator: 7.53V off, 7.4V on

(***I'm probing at the two breadboard rows that big cap in the top right is plugged into. I don't understand why if I leave the positive probe in that location and move the ground probe to the groudn on the breadboard rail, I see a voltage of 7.21V with the lights on [rather than the 7.4V I see with the probe right at the cap. That confuses me a lot.)

@Vin: 7.47V off, 6.99 lights on

=======

I'm looking to hear if anything stands out as unusual, and to come up with some next steps to try.

The only things left I can think to try are:

-- Using the other DC/DC regulator I have sitting around -- Replacing all the wires that are carrying the high current 7.5. They are currently a combination of the breadboard, some 26AWG male/male prototyping wires, and some 24AWG stranded hook up wire that is technically probably all too little for this current. [Though I don't know how to easily avoid using the breadboard to carry this current)

One thing I have noticed is that the first light in the chain blinks a fair amount unless I connect the 7.5V volts to Vin on the Mega. That's why I started going down this route of trying to power the Mega off the same voltage as the lights in the first place, and why I've been caring about making sure the Vin voltage stays over 6.6 on Vin so the Mega doesn't switch to USB power. I'm not exactly sure why that light flickers when the Arduino isn't being powered by the same 7.5V as the lights, I had initially planned to do something like macegr's plan to power the Arduino on USB and the lights on the 7.5VDC. But, maybe all these problems are related. One way or another, I just don't understand why I'm seeing the voltage drops I'm seeing where I'm seeing them.

Grumpy_Mike: Just a note to you - you mentioned earlier about me wanting star wiring. Usually, I have direct runs of power / ground pairs every three lights in the chain coming back to the power rail on the breadboard. To simplify this test, I removed all those and just have the first light hooked to the power (where indicated in the image above on the left). That power is then chained through the leds. I still feel like my Vin and other stuff is properly hooked up in parallel...

One other random thought - I've read about a "prebias" condition for other power supplies. I noticed that when the Mega is powered off of USB power, I see +5V DC at Vin (which I found strange). That means the output V+ of my power supply is seeing 5V before I turn it on. Not sure if that matters.