Continue to Site

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.

  • 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.

Is this DC offset? How do I fix it?

Status
Not open for further replies.

dentaku

New Member
Here's are some images and sound files of a simple PWM LED dimmer I built with a 555 timer.
https://sdrv.ms/WuYgiN

When the pulsewidth is nice and even (most synths I've used call that 50%) the waveform is centered along the center line just fine but when I adjust the pulsewidth up and down it either goes way above or below the line.

Questions?
Is this what DC Offset is?
Is there an easy way to fix this?


It works very well for dimming LEDs smoothly but for use as a sound generator it's not what I would like.
The circuit design comes from Dave Jones as you can see from the image of the yellow sticky note.
also... the .wav named PWM 104cap with FX was run through all kinds of effects so it's not a good example of what I'm talking about. I put it there just for fun
 
It looks to me like you just have your scope input AC coupled. Switch it to DC coupled and then see what you get.
 
It looks to me like you just have your scope input AC coupled. Switch it to DC coupled and then see what you get.

Aren't most audio systems ac coupled, any way. Even if they were dc coupled, it wouldn't matter, because the loudspeaker is ac coupled to your ear drum :D
 
Last edited:
Aren't most audio systems ac coupled, any way. Even if they were dc coupled, it wouldn't matter, because the loudspeaker is ac coupled to your ear drum :D

Yes but, as I read it, the OP is wondering why there is an apparent DC level shift on the scope image that changes with the duty cycle.

But as I look at the 'scope' that he is using, it appears to be software using a PC soundcard, so there is no way to see the true DC characteristics of the waveform, as the soundcard is always AC coupled.

In other words, the changing DC offset shown on the scope, is an anomaly created by the scope.
 
Hmmm... So you're saying that it's probably just s(M)exscope showing it to me that way even though it's probably not going into Line-In of the computer like that?
If you look at an image of the actual audio recorded when I turn the pot that modifies the pulsewidth it also looks like that.
https://sdrv.ms/146yF34

I'm just using an old computer to experiment with. I wouldn't want to plug in into my real Echo soundcard so maybe it's just something strange with the onboard audio on that machine.
Maybe I'll install an actual soundcard in that old machine and see if it looks different.

Yes but, as I read it, the OP is wondering why there is an apparent DC level shift on the scope image that changes with the duty cycle.

But as I look at the 'scope' that he is using, it appears to be software using a PC soundcard, so there is no way to see the true DC characteristics of the waveform, as the soundcard is always AC coupled.

In other words, the changing DC offset shown on the scope, is an anomaly created by the scope.
 
The average DC level of a 555 output does change with pulse duty cycle. It's possible your 'old computer' has a DC-coupled input to its audio processor? If so, you could see the DC shift.
 
Maybe the power supply voltage drops when the load current is high.
 
Hmmm... So you're saying that it's probably just s(M)exscope showing it to me that way even though it's probably not going into Line-In of the computer like that?
If you look at an image of the actual audio recorded when I turn the pot that modifies the pulsewidth it also looks like that.
https://sdrv.ms/146yF34

I'm just using an old computer to experiment with. I wouldn't want to plug in into my real Echo soundcard so maybe it's just something strange with the onboard audio on that machine.
Maybe I'll install an actual soundcard in that old machine and see if it looks different.

I've never used one so I don't know for sure, but I doubt that any soundcard based scope will be able to show the true DC value of a waveform.

If knowing the DC characteristics of the signal are important, you probably need to get an instrumentation grade scope. There are many out there that are USB connected computer products.
 
I was doing it more out of curiosity and for fun and I've never owned a scope although I'd love to find an old one somewhere. I'm doing audio experiments, not serious electrical engineering :)

Before I built Dave Jone's PWM dimmer circuit I set up another 555 as a regular astable multivibrator circuit you see everywhere (I was reading the old Forrest Mims Radio Shack workbook #1) and sweeping through a much larger range of frequencies with a pot across 6 and 7 also has the effect of changing the pulsewidth at high frequencies where I noticed the same offset. I guess it's just the nature of this type of ancient technology OR it's the line-in on that old computer. I guess I won't know unless I install a different soundcard in it.

I've never used one so I don't know for sure, but I doubt that any soundcard based scope will be able to show the true DC value of a waveform.

If knowing the DC characteristics of the signal are important, you probably need to get an instrumentation grade scope. There are many out there that are USB connected computer products.
 
Status
Not open for further replies.

Latest threads

Back
Top