## News:

SMF for DIYStompboxes.com!

Started by grolschie, August 08, 2007, 05:40:03 AM

#### grolschie

Hi gaussmarkov,

Thanks for the great project/tutorial. I have enjoyed reading it. Much more logically laid out than the first project. I prefer this approach instead of following lengthy threads.

Some things that aren't perhaps immediately obvious to the newbie reader of this project are... perhaps:

• The reason for R7? What effect does a lower or higher current have on the circuit?
• The purpose of capacitors in the power section is mentioned, but how exactly these work is not clear... as in why are these connected to ground, rather than in series with the circuit? How exactly do they filter AC? Where does AC come from when using a 9vDC supply?
• How does the feedback loop work exactly? And what do the capactors and resistors do? How is the feedback loop used to set the gain?
• The flow of current through the circuit. The audio signal might seem obvious, but newbies learning about electrical currents might not get this even though it's project #2. Quite often concepts are skipped over earlier on, and people can come unstuck when things get a little complicated later on. I am guilty of learning to build/mod things and not quite understand why something works.

Perhaps these clarifications might prove useful to newbie readers? Just a suggestion, not a criticism.

smoguzbenjamin gave a good explanation of the feedback loop that could be useful for the project:

Quote from: smoguzbenjamin on July 06, 2005, 11:59:20 AM
What an opamp is is a most useful piece of circuitry. It allows you to change its gain by using a process called negative feedback, by feeding an inverted signal back into its input. And that's only using it as an inverting amp.

Consider this: you have a signal generator that is generating a 50Hz sinewave. One period of these waves (IE the time it takes for the wave to go from 0, to the top, past zero, to the bottom, and back to zero again) is 2ms. At 0ms the wave is at 0. At 0.5ms the wave is at its top. At 1.5 ms it's at its bottom value and at 2ms it is at 0 again. If you invert this it is the other way round, at 0.5ms the waveform will be low and at 1.5ms it is high.

Now feed the two signals together: what you get is that the waves subtract and cancel each other out, which means you can turn down the gain of an opamp by feeding it its own output. If you leave out a resistor you're cancelling the output entirely, but by adding two resistors you can easily calculate the gain. Now let's filter out low frequencies in the bit we're sending back (the feedback loop). You're negating and cancelling the low frequencies the amp is putting out, which leaves you with all frequencies higher than what you filtered out, meaning that an opamp can also be used as an active tone control. There are endless possibilities of what you can do with these little ICs. You can also just amplify a signal, ghehe  :lol: If you ever kill your portable CD/MP3/minidisk/cassette player, and pop it open, don't be surprised to see an opamp in there

Thanks again.
grol

#### gaussmarkov

#1
Quote from: grolschie on August 08, 2007, 05:40:03 AM
Thanks for the great project/tutorial. I have enjoyed reading it. Much more logically laid out than the first project. I prefer this approach instead of following lengthy threads.

You are most welcome.  Different approaches work for different people.  When I read the  first project, it seems very interactive.  Everyone was working together and enjoying the fun as the project evolved.  Actually, I was hoping to start the same kind of free for all. ;-)  So it's not working out the way that I planned, but it seems to be working out all the same.

Quote from: grolschie on August 08, 2007, 05:40:03 AM
Some things that aren't perhaps immediately obvious to the newbie reader of this project are... perhaps:

• The reason for R7? What effect does a lower or higher current have on the circuit?
• The purpose of capacitors in the power section is mentioned, but how exactly these work is not clear... as in why are these connected to ground, rather than in series with the circuit? How exactly do they filter AC? Where does AC come from when using a 9vDC supply?
• How does the feedback loop work exactly? And what do the capactors and resistors do? How is the feedback loop used to set the gain?
• The flow of current through the circuit. The audio signal might seem obvious, but newbies learning about electrical currents might not get this even though it's project #2. Quite often concepts are skipped over earlier on, and people can come unstuck when things get a little complicated later on. I am guilty of learning to build/mod things and not quite understand why something works.
Perhaps these clarifications might prove useful to newbie readers? Just a suggestion, not a criticism.

No worries!  I appreciate the feedback.  It makes another opportunity for someone to learn something.  I never know when I am going to come across new information that I am ready to absorb.  So, when I think I know an answer, I like to offer it when the opportunity comes along.  Because you made the suggestions and many newbies will have these questions, here are some answers.  And here's the schem from "1. Introduction" for easy reference:

R7 is the resistor in series between the 9V power supply and the circuit.  It is followed by C6, a 100uF capacitor that has its other lead connected to ground.  This pattern of components appears in lots of places and it is helpful to be able to recognize it.  For example, R6 and C5 (right after the op amp) are in the same configuration.  Both combinations are low pass filters.  That is, they filter out high frequency AC.  The low pass filters in this circuit have different component values and "roll off" the frequencies differently.  The R7/C6 combination filters out a lot more than the R6/C5.  It is set up this way because the R7/C6 low pass filter is there to clean up the power supply.  The R6/C5 combination filters the audio signal and is part of the character of the sound that the circuit produces.

A lot has been written on the forum explaining these filters, so I won't repeat it all here.  If you happen to like my writing style, then you might find what I have written on my own site helpful:   gaussmarkov.net:  low pass filters.

The short answer on how the capacitors work in these low pass filters is that they act like fast rechargeable batteries.  Whenever the voltage changes in the power supply or audio signal, the capacitor gives or takes electrons that smooth out the changes.  So in the power supply application, you might think of the capacitor as an additional power supply.  Your 9V battery has one end connected to the circuit and the other connected to ground and that's the way the capacitor is hooked up also.  I have also written more about this on my site:  gaussmarkov.net: ac and dc.  This stuff helps to explain the low pass filter stuff that I just mentioned above.

as far as the feeback loop, let's start with the reply i gave here:  I am digging it and see if there are more questions.

i hope this helps.

#### grolschie

Brilliant! Thanks man! Would you please consider updating the tutorials with this info, or specific links to your explanations? Very handy info you have on your site. Thanks also for the link to the All About Circuits page. I really dig how you can download their volumes in big PDFs. I have alot of reading to do now!

#### gaussmarkov

thanks for the suggestion.  i'll give it some thought.  i probably won't put all of that info into the tutorial because i suspect it would overwhelm some newbies.  but i might end up flagging the information in some side comments or something.

#### grolschie

Quote from: gaussmarkov on August 09, 2007, 02:31:08 AM
thanks for the suggestion.  i'll give it some thought.  i probably won't put all of that info into the tutorial because i suspect it would overwhelm some newbies.  but i might end up flagging the information in some side comments or something.
Flags / links would be a help for many. Thanks gaussmarkov. I like your webpage alot BTW.

#### gaussmarkov

Quote from: grolschie on August 09, 2007, 07:30:26 PM
Quote from: gaussmarkov on August 09, 2007, 02:31:08 AM
thanks for the suggestion.  i'll give it some thought.  i probably won't put all of that info into the tutorial because i suspect it would overwhelm some newbies.  but i might end up flagging the information in some side comments or something.
Flags / links would be a help for many. Thanks gaussmarkov. I like your webpage alot BTW.

did you see the change over to wordpress?

#### grolschie

Did you mean the resistor sections on your website? I only had a chance to read through the capacitor sections yesterday. But I think I recall that the resistor info was tagged as coming soon or something? Nice work.

Looking at your cap math PDF, I see that you are familiar with LaTeX?

#### gaussmarkov

Quote from: grolschie on August 10, 2007, 02:10:49 AM
Did you mean the resistor sections on your website? I only had a chance to read through the capacitor sections yesterday. But I think I recall that the resistor info was tagged as coming soon or something? Nice work.

no.  i just meant that i switched my whole site just when you started reading it.  i started using wordpress so that folks could leave comments.

Quote from: grolschie on August 10, 2007, 02:10:49 AM
Looking at your cap math PDF, I see that you are familiar with LaTeX?

yep!  very familiar.