I have a signal generator circuit that generates 700 mV P-P. So I created a little amplifier board that raises it to 2V P-P. Common emitter followed by common collector stage. See below.
Works great, 10 Hz-1MHz. The question is: what should I use as a capacitor for the output?
Large cap will be needed for that frequency range at the low end. But that means electrolytic, ie polarized, right? In which Case because I don’t know what I am connecting it to, how can I know how I should connect that polarized capacitor? Any advice welcome.
Your best bet is to assume that your load will be ground referenced, and place the cap with the (+) side to the transistor output.
Look at C5, it's the same deal.
You have effectively limited the acceptable load resistance to the same range as the emitter load resistor. So the capacitor calculation should follow from that pattern - an RC high pass filter.
In other words, after you have chosen the right capacitor, you can only expect it to drive loads approximately equal or greater than the 330 ohms. A more accurate estimation depends on application dependant factors.
You say you "don't know what you are connecting it to", be aware that you have created limitations by the simple design. For example you can't run into a high voltage because it would reverse bias the electrolytic cap.
With a push-pull (symmetrical active device) output stage, usually a complimentary pair of NPN/PNP or N/P channel MOSFET. Usually class AB. Also a split (dual) supply or single supply bridge configuration.
The old TTL chips required about 1mA to pull-low (almost nothing to drive high) so that would be equivalent to about 5K. MOS inputs (like the Arduino) essentially have infinite input impedance/resistance but with capacitive coupling you'll need a pull-up or pull down resistor (or possibly a bias circuit into the ADC input).
The capacitor makes AC and the Arduino inputs (and most logic chips) should be protected form the negative AC swing.
So it's not the simple question I thought it was. I suggest now, work backwards from the logic and audio input requirements, and redesign the whole thing to work properly with each (both?).
For example, for the digital input a rail to rail output would be better, the CC configuration does not offer that. I think all you really need is a buffer and some voltage gain. Consider a rail to rail op amp circuit. That is what you would likely see in a commercial circuit.
Digital inputs connected to non-digital signals require input protection. Often you can use some series input resistance, and preferably also Schottky diode clamps to Vcc and ground on the input pin.
Good points. But of course there’s real life constraints. Like the need to use a single 5V USB power supply.
Also I just think using a couple of transistors is more fun than using an op-amp (and I have a gazillion transistors lying around. But no op amps).
And yes, sure, this isn’t by any means a commercial grade signal generator. But I am happy enough to remember enough from my study days 45 years ago to get a couple of transistors working.
One small change that would increase the output voltage range, would be to use a common emitter stage with collector-base feedback, as the final stage.