Need a little advice, building a small audio oscillator

Thread Starter

reezekeys

Joined Sep 17, 2012
4
Hi, I just joined so please bear with me if this is too newbian. I did a search of this forum and found some good info but not exactly what I need. I am hoping to be able to build a very small audio oscillator circuit: one that will fit into a midi keyboard's sustain pedal. I plan to use this to inject an audio signal (when the pedal is pressed) into my computer where my software will turn it into a midi control change message.

I've come across a few transistor circuits that use a minimum # of components but require at least 10 volts or so. I also see some simple circuits that use a 555 timer chip but these all show V+ to be 5 volts. Since I'm not much on circuit theory, I'm wondering if this is just a suggested value and if a 555 chip-based circuit would work with one or two AAA batteries or a single 9 volt battery. The audio output level is not critical, but should be around consumer line level. The reason I'm asking about the appropriate voltage is that everything has to fit into the housing for the sustain pedal. One other point is that the audio quality does not matter; all my software needs to see is that any kind of continuous audio is either present or not present. It could be white or pink noise, or any kind of regular waveform. I'm a little concerned that there may be crosstalk or leakage to my laptop's audio output but that's a chance I'll take. Thanks in advance for any help!
 

wayneh

Joined Sep 9, 2010
17,498
The 555 probably can't use a single AAA but 2 will work, and a 9V battery may be the best idea. You can also use an op-amp or comparator to make a simple oscillator, but I think you'll enjoy greater power-supply flexibility with the 555.

I'd use a capacitor to couple the signal into your system, and a resistor (10K, for example) in series with the output. That way, there's no concern about injecting any DC. You can choose the resistor and capacitor size to give you the right level of signal, or "volume". Bigger cap = louder.
 

Thread Starter

reezekeys

Joined Sep 17, 2012
4
Thank you wayneh! Good to know a single 9V will work. I also appreciate the tip about the coupling cap, the circuits I've seen don't include this! I wouldn't want to kill my laptop's analog input.
 

wayneh

Joined Sep 9, 2010
17,498
I wouldn't want to kill my laptop's analog input.
Been there, done that.

In my case of painful learning, it was because my signal source and computer were both mains-connected. Damage occurred - current flowed - when the ground lines were connected. "Ground" for the PC was not the same "ground" as the signal source. Oops.

I was all concerned about the signal and had a resistor in line, but I never even thought about the ground currents.
 

Thread Starter

reezekeys

Joined Sep 17, 2012
4
Sorry to hear. I've dealt with this kind of thing on gigs but the worst thing that happened to me was some hum. If I may - around what value is good for the coupling cap? Not looking for hi-fi freq response here, just high enough to pass a 1K or so signal.
 

wayneh

Joined Sep 9, 2010
17,498
Sorry to hear. I've dealt with this kind of thing on gigs but the worst thing that happened to me was some hum. If I may - around what value is good for the coupling cap? Not looking for hi-fi freq response here, just high enough to pass a 1K or so signal.
A small 0.1µF ceramic cap will likely be fine. A factor of ten in either direction will still work, although you don't want to use an electrolytic cap (typical for 1 µF and up).

"Line level" input impedance is something like 50kΩ, so a resistor in the range of 10K-100K is relevant. And you'll still get a tone with 1M.
 
Top