Problem with PWM and 7135

rodex99

Newly Enlightened
Joined
Oct 30, 2010
Messages
45
I wonder if anyone can help here.
I have set myself up a test rig which has 4 amc 7135 circuit boards on it, one with one 7135, one with two, one with 3 and another with 4.
The Vdd to the 7135's is through a dip switch which allows me to select any number of 7135's from 1 to 10.
It has been quite instructive in comparing the Vf curve of actual XML leds with manufactures spec and for calculaing the internal resistance of batteries.
I have now started to learn about PICAXE chips, thinking to use pwm and my own interface.
To experiment I wrote a progamme which ramps the pwm up and down in response to two push buttons.
I connected the pwm input to the board, selected the single 7135 and everthing performed as I expected.
However if I select any of the multiple 7135 boards, I just get a very weak output, the led is blue and barely lit, which pulses at a clearly visible rate, just 3 or 4 times per second.
Can anyone tell me what is going on? - and how to fix it?
Rod
 

wquiles

Flashaholic
Joined
Jan 10, 2005
Messages
8,459
Location
Texas, USA, Earth
Solved it!
1000 uF capacitor across the battery.:twothumbs

It was not so much the cap across the battery that solved the problem, but that you had a cap that allows the power to the microprocessor to stay steady - you always need that, and the closer the cap to the power/ground pins of the microprocessor, the better. I typically use two caps, a 1uF and a 10uF in my own designs - that allows the microprocessor to basically never see the batter fluctuations as the battery voltage swings up and down with the current demands from the LED's being pulsed at the various PWM duty cycles.

Will
 

rodex99

Newly Enlightened
Joined
Oct 30, 2010
Messages
45
Thanks, I was thinking it was the7135 that did not like the variale supply but after reading your post I remembered that the pic data sheet showed an optional 100uF which have fitted next to the pic (and taken the 1000uF off). All is well.
I am curious about your use of two capacitors however, what is it that a small one can do that I bigger one cannot do better (within reason).
Rod
 

wquiles

Flashaholic
Joined
Jan 10, 2005
Messages
8,459
Location
Texas, USA, Earth
Good question. The small cap has a faster transient response, but stores a small amount of energy. The larger cap stores a lot more energy (10x), but it has a slower transient response - the combination of the two provide both fast transient and high energy storage :D
 

lucca brassi

Enlightened
Joined
Feb 1, 2008
Messages
889
Location
US
Capacitor lift up battery tension U= 1,4142 x Ub. Larger capacitor gives more energy storage
 

DeeperDeeper

Newly Enlightened
Joined
Jan 10, 2010
Messages
23
Location
Finland
Correct me if I'm wrong (you do!): We are not here speaking about the PWM, Pulse Width Modulation ?!
 

wquiles

Flashaholic
Joined
Jan 10, 2005
Messages
8,459
Location
Texas, USA, Earth
Correct me if I'm wrong (you do!): We are not here speaking about the PWM, Pulse Width Modulation ?!

We are talking about keeping a steady power/voltage level at the micro-processor. With no capacitor at the input of the voltage pin to the micro-processor, any/all swings in the battery will get sent to the micro-processor, which might cause it to fail over/reset/stay in brown-out mode/who knows ... each micro is different.

Once the micro-processor has steady power, then it can work reliably.

Will
 

georges80

Flashlight Enthusiast
Joined
Oct 23, 2002
Messages
1,262
Location
Sunnyvale, CA
Will has pretty well described the exact issue you are seeing.

To add a bit more detail....

You have leads/resistance etc between the battery and your 'driver'. With PWM you are applying short pulses at full current to the load and each of those pulses will cause I x R voltage losses across the resistance paths. Those are high energy pulses that will cause voltage drops that will cause reset/brownout/crash issues with the uC. The caps near the uC will provide some 'reserve' to keep the voltage stable.

Of course the caps will also feed power to the input of the driver core as well so the voltage will still drop. The key is to put the caps as close as possible to the uC pins so that they don't discharge too quickly back into the driver core.

The whole bypass capacitor part of a design can be very complex and non-trivial. You get into ground plane design and current path determinations etc. This can be a BIG issue for designs that have to be stable in various environments, battery voltage/chemistry, lead lengths etc. Sometimes with the wrong layout/ground plane connections, a larger value capacitor can actually make things worse.

Obviously when you are building just one (or a handful) of units, you can usually just tweak things till they work 'good enough'. In your case adding a cap or two right at the uC should make things happy. With a SOIC package you can just take a leaded capacitor and solder it right over the top of the chip between VCC and GND.

cheers,
george.
 

rodex99

Newly Enlightened
Joined
Oct 30, 2010
Messages
45
Good question. The small cap has a faster transient response, but stores a small amount of energy. The larger cap stores a lot more energy (10x), but it has a slower transient response - the combination of the two provide both fast transient and high energy storage :D
Sorry if I am moving off topic, but I also have a project in mind where I plan to use a capacitor to operate a solenoid over a short period, probably around 2 millisec.
Does this mean there would be a benifit to using a small(ish ) capacitor to give the initial kick and a larger one to maintain the thrust?
Rod
 

wquiles

Flashaholic
Joined
Jan 10, 2005
Messages
8,459
Location
Texas, USA, Earth
Sorry if I am moving off topic, but I also have a project in mind where I plan to use a capacitor to operate a solenoid over a short period, probably around 2 millisec.
Does this mean there would be a benifit to using a small(ish ) capacitor to give the initial kick and a larger one to maintain the thrust?
Rod

Rod,
That is way too little information to make any sort of recommendation. I would recommend starting a new thread, and giving us more information.

Will
 
Top