PDA

View Full Version : LED Popping



HankMcSpank
- 16th August 2010, 11:21
I'm after some ideas/tip/tricks to help reduce an audible click when an LED is turned on. The LED is in a circuit that's applying high gain to a guitar signal - the clicking from the LED is somehow finding it's way into the signal path. (Even though it is nowhere near the signal path! Probably getting in via the VCC rail, into the preamp, then amplified)

The LED is turned as follows....

PIC output pin->current limiting resistor-> LED-> to ground.

I actually have two LEDs....an one of the modes has both LEDs flashing alternately - but the clicking is quite bad, so I'm having to rethink!

rsocor01
- 16th August 2010, 12:21
The LED is in a circuit that's applying high gain to a guitar signal - the clicking from the LED is somehow finding it's way into the signal path.

If you keep the LEDs in the same circuit, all you can do is try to minimize the noise. Try placing a capacitor (1 uF) close to the VCC pins in the pic. Also, for a high gain signal circuits a good ground plane would help. Finally, try reducing the current through the LEDs by increasing the value of the current limiting resistors.

I hope that this helps,

Robert

Jumper
- 16th August 2010, 12:39
Perhaps you can fade in and out the LED using a PWM signal. i.e 30 000 Hz . Then you can make a soft on - soft off function that might work. At some frequency you have passed what the ear can hear and the amplifier can amplify.

Mike, K8LH
- 16th August 2010, 12:46
How about muting the amp' for a few milliseconds after detecting a new switch press and during the time you're lighting the LED?

HankMcSpank
- 16th August 2010, 13:08
Thanks guys....keep 'em coming.

Robert - tried all of those!

Jumper - my PWM pin is in use for other things! (& I want to stay with the PIC I'm using - a 16F690)

Mike - the amp on my circuit is already muted (I didn't explain very well - it's the gain in the guitar amp that is high. The guitar signal feeds into my circuit....which I mute when switching - but this source guitar signal is simply 'Y'ed into my circuit.....the original guitar signal proceeds to the guitar amp as normal - it's this signal that's picking up the LED switching lcick from my circuit.

So the path is like thus....


Guitar pickup 'Y'ed off into two .....
1 ----> into my circuit
2 ----> onwards to the amp as normal (clicking heard on high gain settings from switching in my circuit above)

I need a way of ramping up the led slower so there's no sharp current surge (which is what reckon was causing the pop) - PWM would have been perfect, but like I say, I really want to stick with the 16F690. I have some spare pins left, so it's plausible to do some kind of pseudo PWM.

Toying with the idea of an inductor in series with the led (or possibly bringing a cap into play), just to delay the sharp switch on.

I found this site, but the jury is still out that they've got it wired correctly (I'm pretty sure it's wrong!)...

http://www.muzique.com/lab/led.htm

rsocor01
- 16th August 2010, 14:51
Toying with the idea of an inductor in series with the led (or possibly bringing a cap into play), just to delay the sharp switch on.

A cap in parallel with the LED won't work as the current will rush in to the cap trying to charge it, making matters worse. Now, a resistor in series with an inductor would do just fine. Keep in mind the time constant L/R. One L/R time constant is the time required for the current in an inductor to increase to 63.2 percent of the maximum current. This is similar to the RC time constant in a capacitor+resistor circuit.

By playing with the R and L values, you can adjust the delay that you want for the incomming current. I found this very nice picture on the web that ilustrates this point.

4705

http://www.tpub.com/neets/book2/2d.htm

Robert

Acetronics2
- 16th August 2010, 15:06
I'm after some ideas/tip/tricks to help reduce an audible click when an LED is turned on. .

I actually have two LEDs....an one of the modes has both LEDs flashing alternately - but the clicking is quite bad, so I'm having to rethink!

Hi, Hank

While I was browsing some 18F series Datasheet ( 45K20 abord the PicKit3 demo board ) I found there was some possibility to reduce by soft the slow-rate by a 1:10 ratio when switching the outputs ... see the LATx command chapter.

isn't life marvellous, sometimes ??? ;)

Alain

HankMcSpank
- 16th August 2010, 15:37
Hi, Hank

While I was browsing some 18F series Datasheet ( 45K20 abord the PicKit3 demo board ) I found there was some possibility to reduce by soft the slow-rate by a 1:10 ratio when switching the outputs ... see the LATx command chapter.

isn't life marvellous, sometimes ??? ;)

Alain


Seems perfect, extract...

10.8 Port Slew Rate Control
The output slew rate of each port is programmable to
select either the standard transition rate or a reduced
transition rate of 0.1 times the standard to minimize
EMI. The reduced transition time is the default slew
rate for all ports.
REGISTER 10-4: SLRCON: SLEW RATE CONTROL REGISTER

Slew rate control register - yippee!! Except I'm using the wrong PIC!

[wanders off cursing. EMI, SHMEEE 'EM I, PICs, Schmics etc]

Jumper
- 16th August 2010, 17:30
Maybe you can use a timer and make a soft pwm (depending of course of the FQ of the pic and if it is busy doing other stuff). Darrel has a SOFTPWM code that might work.

HenrikOlsson
- 16th August 2010, 18:13
Hi,

Slew rate control register - yippee!! Except I'm using the wrong PIC!
And the reduced slew rate would have been selected already since it's the default.... :-(

Have you tried reversing the LED, sinking current into the PIC instead of sourcing it from the PIC, place a capacitor on the 5V rail right next to the LED as well. Not saying it WILL help but it might be worth a shot.

Or if you have more pins free, connect several to the LED, each one with its own series resistor, then turn them from inputs to outputs one after another to "step up" the current - just another thought.

/Henrik.

HankMcSpank
- 16th August 2010, 22:28
Hi,


Have you tried reversing the LED, sinking current into the PIC instead of sourcing it from the PIC, place a capacitor on the 5V rail right next to the LED as well. Not saying it WILL help but it might be worth a shot.



Hi Henrik,

Your suggestion was already going to be on my 'to do' list and do you know what - that sorted it! :) The switching is in essence completely silent now - even on the guitar amp's highest gain settings.

Actually, in addition to reversing the diodes (to source vs sink current wrt the PIC), I took the anodes of some 'test' LEDs up to my main 8V rail (vs the PIC 4V rail where the LEDs were connected to previously ...ie via the pic internally). The bummer here is I bought 100 x common cathode tri colour LEDS ...now of course, I need common anode tri colour LEDs (which seem very hard to source - one headache solved....another one brewing!). I also boosted the capacitance on the PIC's 4V rail somewhat (wrt this last manoevure - I was just being a tightwad....as tantalums start getting costly once you get above a certain level of capacitance)


Many thanks for all your help - this forum is a great resource.

Hank.