Led run thru/through/threw/thrue a cap

newplumber

Senior Member
Hi
I was wondering if any of you cool people ever used this way to light a led
and if it would save power... I haven't tested the usage yet but my horrible thinking
is that when the picaxe pin goes high it powers up the led and fills the capacitor then when the pin
goes low it uses the capacitor power (free power) ...or not...but maybe ?
If I use PWM then both leds are on which is cool .... I'll do more tests just a idea I'm trying

your friend
me
 

Attachments

premelec

Senior Member
I don't see it as a power saver - capacitor voltage charges and discharges exponentially losing power both ways as well as varying the current through the LED... could produce some interesting visual effects... ;-0
 

techElder

Well-known member
Now, if you hooked those two wires to your bicycle wheel where you have a generator of "free electricity", then you could pedal the bicycle with some of your "free energy" and power many more LEDs and capacitors.

Plus, you can say it is "all green" and produced with "free stuff" that everyone was going to throw away and save our planet!
 

AllyCat

Senior Member
Hi,

Yes, the capacitor could be considered as a "power-saving" method, but only if the supply rail is "higher than it needs to be". Let's simplify the situation:

Suppose the LEDs are the same colour (same forward voltage drop), are driven by a 50:50 duty cycle (square wave) of reasonable frequency and the voltage drops across the PICaxe's pin-driver FETs are similar. Then, the average voltage across the capacitor will be one half of the supply rail, which tells us that the supply rail needs to be at least twice the LEDs' forward voltage drop. It gets more complicated if we consider the ripple voltage across the capacitor, etc., but the principle is much the same.

If the power dissipated in the resistor (voltage drop) is considered as "wasted" and power in the LEDs is "useful", then reducing the effective supply voltage with a capacitor is indeed "power-saving". But it's also highly restrictive: The average current through the two LEDs must be the same (there can be no "dc" current through the capacitor), so your Red and Green LEDs become Yellow, where you can change the brightness (only) by changing the "PWM" frequency (or brief flashes of alternatively Red and Green if the capacitor is large enough).

A much more flexible method to control two LEDs on one pin is to choose a supply rail which is a little less than the sum of the (minimum) forward voltage drops of the two LEDs. Connect the LEDs in series across the supply rail (that's why the supply voltage must be less) and drive their junction from a PICaxe pin via a resistor. Now you can drive either LED to "full" brightness, produce all shades of Yellow inbetween Red and Green by using PWM, or reduce the brightness by tri-stating the output (making it periodically an input), but only under program control, not with the PWM hardware.

Cheers, Alan.
 

newplumber

Senior Member
I don't see it as a power saver
@ premelec ... well shoot...I thought was on to something :) was going to sell it in a kit ..called like the "PFLPS" or for short
"PICAXE FLASHING LED POWER SAVER" ...joking ...but it does show interesting effects

@texas sad thing is i don't own a bike ... but I do try to use alot of parts poeple throw away


btw could i call it recycling if I use peoples junk and then test it the wrong way and it ends up in the garbage anyway?
maybe i can call it "attemprecycling"


Wow thanks Alan didn't see your post till now ...I like the simplified explanation ..
 

newplumber

Senior Member
Allycat said:
A much more flexible method to control two LEDs on one pin is to choose a supply rail which is a little less than the sum of the (minimum) forward voltage drops of the two LEDs. Connect the LEDs in series across the supply rail (that's why the supply voltage must be less) and drive their junction from a PICaxe pin via a resistor. Now you can drive either LED to "full" brightness, produce all shades of Yellow inbetween Red and Green by using PWM, or reduce the brightness by tri-stating the output (making it periodically an input), but only under program control, not with the PWM hardware.
So the sum if both leds are 2.2 voltage drop would be 4.4
I guess I should draw up something to be on the same page
 

AllyCat

Senior Member
Hi,

Yes, but a better configuration would be to put a resistor in series with each LED and take the PICaxe output pin directly to the "mid point". That will give independent control of the maximum brightness/current for each LED, and reduce the "shoot through" current if the supply rail is too high.

Cheers, Alan.
 

newplumber

Senior Member
Hi

@allycat here is my drawing of controlling both leds with one pin
maybe there is a better way but since when you mentioned shoot through
I take as there is enough power to turn on both leds with out any power involved from the chip
which is true ...but as soon as one led is on from control of the picaxe high or low the other led will shut off
because power takes the easiest path ... <--- i think this is first grade stuff lol but cool for me :)
so on leds A and B ...I doubled them in series so AA-res ...BB-res...so now I can have only 2 leds on at any time
incase I don't want one led bright and another one dim
hopefully it makes sense
 

Attachments

newplumber

Senior Member
After thinking way out of this world .....has anyone came up with a way to run RGB leds on one picaxe pin?
maybe its not possible
first thought is the voltage drops on red-green-blue are different so I might have something here ...:confused:....or NOT ;)
but I'm going to give it a try ....
 

premelec

Senior Member
How about hundreds through 2 pins? APA102... or an external port expander - where are you trying to go with this?
 

newplumber

Senior Member
where are you trying to go with this?
lol...nowhere i guess...after all it wouldn't be very useful even if i did get it to work...but was thinking with caps/transistors/resistors and stuff maybe
it could work (for just a challenge) ...but after many tests ... and no future point ...I'm on to the next horrible project :)

About APA102... on my stair case seems I have a few bad apa102 chips in the string ...I replaced 8 or more and I must of ordered some poor quality ones
the apa102's work great for about a month then one goes wierd causing the rest after it to not to work
but I am getting good at replacing the bad ones :)
The cause of the problem are unknown ....could be the vibration from using the stairs.
and everytime I replace the bad apa102 it always seem that its the chip it self behind the led
I am going to try ordering some good quality apa102 and replace the ones i have
 

premelec

Senior Member
that's not good... perhaps static electric discharges from carpeted stairs? [low humidity in winter...] - Did you put bypass capacitors on the power lines every few feet? [.1uf type...] and last - is your current / voltage well regulated. these small IC & LED units are a bit delicate... If you are having vibration effects it would often show in mechanical de-soldering or breaking of chip pin and such...
 

jims

Senior Member
The approach in post #8 also works well if you use a two lead RG led instead of two individual LEDs. Will control R or G with only 1 Picaxe output. Output pin high gives one color and output pin low gives the other color. JimS
 

newplumber

Senior Member
Did you put bypass capacitors on the power lines every few feet? [.1uf type...] and last - is your current / voltage well regulated
@ premelec.... no I didn't add no caps ...good idea tho...when i replace both strings I will ...its run from a PC desktop power supply should be perfect power.
I don't think its static ...but could be ....I keep my house well humidified...with a big cool mist one (one of the few things in the house I didn't LED it).
never is there a bad solder joint that i found ...its all internal in the chip its self ...and its never the ones I replaced that goes bad....well so far anyway


@ jims yes thanks ...makes colors closer ....but after all my tests trying different things ...I graduated myself from learning unuseful uses with it all
 

premelec

Senior Member
PC power supplies are meant to feed large currents and may not regulate well at very low current draw... You might run you lights at less than full intensity - up to 50% - or run them on 4 volts...
 

inglewoodpete

Senior Member
APA102 LEDs are on a SPI bus. If there is a dodgy soldered joint somewhere, all of the downstream LED may stop working due to lack of data.
 

newplumber

Senior Member
@ premelec ...I do have the brightness turned down ....i think brightness is 0 - 255 ...and with out sensor being activated I think its running 20 and with activated I think its 180
so when I get back home I will try to go full brightness (255) and see if that helps once activated...but I believe adding the caps would help the best

@ inglewoodpete ..I understand on a dodgy solder joint ... i seen many solder joints look perfect and still fail ...but it doesn't seem to be any
on the chip connectors from all the tests I did ...the reason I believe its the apa102 chip its self is after i replaced the bad chip then the strip works like brand new
and after many tests with the bad apa102 chips on my bench I could not get them to turn on with a different picaxe and make sure its connected right and continuity etc
 
Top