• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM Noise on +5V

Status
Not open for further replies.

wuchy143

Member
Hi all,

I'm driving a bank of 100 LED's using a 1k resistor with PWM @ 60Hz. The device is a keyboard and has other circuitry on it but I don't think those are worth mentioning at least for this conversation.

I have a speaker in my circuit which has the 60 Hz hum on it and I cannot get rid of it without a 1000uF cap. Even with the 1000uF cap the noise is very much attenuated but looking at +5v on my scope the 5V is still disrupted with a nasty looking periodic signal which is @ 60 hz. Althugh you cannot hear it on the speaker.

Does anyone have any ideas on how to get my 5V rail to stay @ 5V without having that hum on it? I cannot use such a big cap in my design so I"m forced to think of other ways. (they don't like electrolytics)

Basically I'm asking if anyone has some tricks up their sleeve?

Thanks guys!!
 

Sceadwian

Banned
A LOT more information is needed. Could you explain the EXACT electrical setup, because if you're using 100 LED's on 60hz I'm assuming that means you're powering the LED's directly from mains, which means you have a defacto drop in voltage on only one half wave of the AC in cycle, no wonder you're getting noise.
Just guessing here.
What's your power supply, what's your LED setup exactly? What is the basic schematic of your setup? If this is related to another thread please repost all the information you find relevent.
 

wuchy143

Member
It appears that I did leave a lot out. I apologize for that and the fact it took me so long to get back on here. I'm on waaaay tooo many projects...actually a good thing though with the economy how it is :)

So details:

1. This is a 5v RS422 keyboard. The keyboard only sees the +5v as DC. There is no AC in this system.

2. I'm using Atmel's 89S52(8052) micro. It's an old dog...but it's only a keyboard so it works for us.

3. I drive the LED's using a PIC12F675 which accepts an input signal and outputs a PWM signal.(the output is a function of the input) This PWM signal drives a P-channel fet. So, the FET is connected to 10-Pin R-packs(1k ohm) which turns the LED's on and off with the PWM signal. Kathode of the LED's are connected to GND. In case you were wondering we use PWM on our LED's because we buy them very cheap and they don't have the same brightness for a given applied voltage from LED To LED.

4. I will try and explain how I have the sounducer connected up..bare with me. So a designate a pin on the micro where when you hit a key(downstroke). This pin toggles from +5 to 0V. This makes the first click. Then once the user release that key(upstroke) you will hear the second click which is that port pin going back up to 5V. The keybaord will do this forever. I use a 74HC04(inverter) in an interesting way which is connected to a 1uF cap and then the cap is connected to the +side of a sounducer. Basically everytime the port pin on the micro changes state current just charges and discharges on the cap making a quick little click. I didn't design this actual circuit but it's kind of cool. I can email it to anyone if you'd like to take a look. Simple...but cool.

I have found a way to correct the problem but don't understand why I need to do such a thing and it's really bothering me. To correct it I lifted the power(+5v) leg of the 74HC04 and connected up a .1uF cap and a 1N5817 diode. The diode allows power to get to the chip but when it's noisy it doesn't allow the energy to leave the cap making the sounducer nice and quite. Why is this happening? Is it due to V=IR and the fact that i'm switching all this current and no matter what the voltage will fluctuate due to this? I"m confused and my boss is too busy to really think about it becaue i'm not sure if her even knows.

Anyway. I feel like I just jabbered aimlessly. It's difficult to have technical discussions via the internet so I apologize. Thanks for the help guys/gals.

-mike
 

Sceadwian

Banned
Are you sure you need the diode? The cap itself alone may have been enough. Power supply bypassing is very important for digital applications. Nothing sounds excessively unusual about what you're doing, would need a full schematic to provide any more insight.
 

wuchy143

Member
I will test that out monday but i'm not really sure. I did add a .1uF and 1uF to that IC across it's PWR and GND with no real noticable effect.

-mike
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top