Here is a little audio amplifier similar to what you might find in a small transistor radio. The input stage is biased so that the supply voltage is divided equally across the two complimentary output transistors which are slightly biased in conduction by the diodes between the bases. A 3.3 ohm resistor is used in series with the emitters of the output transistors to stabilize the bias current so it doesn't change much with temperature or with different transistors and diodes. As the bias current increases, the voltage between the emitter and base decreases, thus reducing the conduction. Input impedance is about 500 ohms and voltage gain is about 5 with an 8 ohm speaker attached. The voltage swing on the speaker is about 2 volts without distorting and power output is in the 50 milliwatt range. A higher supply voltage and the addition of heat sinks to the output transistors would provide more power. Circuit draws about 30 milliamps from a 9 volt supply.
3 Transistor Audio Amp (50 milliwatt)
Audio from a telephone line can be obtained using a transformer and capacitor to isolate the line from external equipment. A non-polarized capacitor is placed in series with the transformer line connection to prevent DC current from flowing in the transformer winding which may prevent the line from returning to the on-hook state. The capacitor should have a voltage rating above the peak ring voltage of 90 volts plus the on-hook voltage of 48 volts, or 138 volts total. This was measured locally and may vary with location, a 400 volt or more rating is recommended. Audio level from the transformer is about 100 millivolts which can be connected to a high impedance amplifier or tape recorder input. The 3 transistor amplifier shown above can also be used. For overvoltage protection, two diodes are connected across the transformer secondary to limit the audio signal to 700 millivolts peak during the ringing signal. The diodes can be most any silicon type (1N400X / 1N4148 / 1N914 or other). The 620 ohm resistor serves to reduce loading of the line if the output is connected to a very low impedance.
Telephone Audio Interface
Here's a circuit that takes advantage of the photo-voltaic voltage of an ordinary LED. The LED voltage is buffered by a junction FET transistor and then applied to the inverting input of an op-amp with a gain of about 20. This produces a change of about 5 volts at the output from darkness to bright light. The 100K potentiometer can be set so that the output is around 7 volts in darkness and falls to about 2 volts in bright light.
LED Photo Sensor.
Here is a simple triangle/squarewave generator using a common 1458 dual op-amp that can be used from very low frequencies to about 10 Khz. The time interval for one half cycle is about R*C and the outputs will supply about 10 milliamps of current. Triangle amplitude can be altered by adjusting the 47K resistor, and waveform offset can be removed by adding a capacitor in series with the output.
Triangle and Squarewave Generator
The two circuits below illustrate generating low frequency sinewaves by shifting the phase of the signal through an RC network so that oscillation occurs where the total phase shift is 360 degrees. The transistor circuit on the right produces a reasonable sinewave at the collector of the 3904 which is buffered by the JFET to yield a low impedance output. The circuit gain is critical for low distortion and you may need to adjust the 500 ohm resistor to achieve a stable waveform with minimum distortion. The transistor circuit is not recommended for practical applications due to the critical adjustments needed.
Low Frequency Sinewave Generators
The op-amp based phase shift oscillator is much more stable than the single transistor version since the gain can be set higher than needed to sustain oscillation and the output is taken from the RC network which filters out most of the harmonic distortion. The sinewave output from the RC network is buffered and the amplitude restored by the second (top) op-amp which has gain of around 28dB. Frequency is around 600 Hz for RC values shown (7.5K and 0.1uF) and can be reduced by proportionally increasing the network resistors (7.5K). The 7.5K value at pin 2 of the op-amp controls the oscillator circuit gain and is selected so that the output at pin 1 is slightly clipped at the positive and negative peaks. The sinewave output at pin 7 is about 5 volts p-p using a 12 volt supply and appears very clean on a scope since the RC network filters out most all distortion occurring at pin 1.
The circuits below light a 20 watt lamp when the contacts are touched and the skin resistance is about 2 Megs or less. The circuit on the left uses a power MOSFET which turns on when the voltage between the source and gate is around 6 volts. The gate of the MOSFET draws no current so the voltage on the gate will be half the supply voltage or 6 volts when the resistance across the touch contacts is equal to the fixed resistance (2 Megs) between the source and gate.
Touch Activated Light
The circuit on the right uses three bipolar transistors to accomplish the same result with the touch contact referenced to the negative or ground end of the supply. Since the base of a bipolar transistor draws current and the current gain is usually less than 200, three transistors are needed to raise the microamp current level through the touch contacts to a couple amps needed by the light. For additional current, the lamp could be replaced with a 12 volt relay and diode across the coil.
This circuit will detect AC line currents of about 250 mA or more without making any electrical connections to the line. Current is detected by passing one of the AC lines through an inductive pickup (L1) made with a 1 inch diameter U-bolt wound with 800 turns of #30 - #35 magnet wire. The pickup could be made from other iron type rings or transformer cores that allows enough space to pass one of the AC lines through the center. Only one of the current carrying lines, either the line or the neutral should be put through the center of the pickup to avoid the fields cancelling. I tested the circuit using a 2 wire extension cord which I had separated the twin wires a small distance with an exacto knife to allow the U-bolt to encircle only one wire.
AC Line Current Detector
The magnetic pickup (U-bolt) produces about 4 millivolts peak for a AC line current of 250 mA, or AC load of around 30 watts. The signal from the pickup is raised about 200 times at the output of the op-amp pin 7 which is then peak detected by the capacitor and diode connected to pin 7. The second op-amp is used as a comparator which detects a voltage rise greater than the diode drop. The minimum signal needed to cause the comparator stage output to switch positive is around 800 mV peak which corresponds to about a 30 watt load on the AC line. The output 1458 op-amp will only swing within a couple volts of ground so a voltage divider (1K/470) is used to reduce the no-signal voltage to about 0.7 volts. An additional diode is added in series with the transistor base to ensure it turns off when the op-amp voltage is 2 volts. You may get a little bit of relay chatter if the AC load is close to the switching point so a larger load of 50 watts or more is recommended. The sensitivity could be increased by adding more turns to the pickup.
The digital lock shown below uses 4 common logic ICs to allow controlling a relay by entering a 4 digit number on a keypad. The first 4 outputs from the CD4017 decade counter (pins 3,2,4,7) are gated together with 4 digits from a keypad so that as the keys are depressed in the correct order, the counter will advance. As each correct key is pressed, a low level appears at the output of the dual NAND gate producing a high level at the output of the 8 input NAND at pin 13. The momentary high level from pin 13 activates a one shot circuit which applies an approximate 80 millisecond positive going pulse to the clock line (pin 14) of the decade counter which advances it one count on the rising edge. A second monostable, one shot circuit is used to generate an approximate 40 millisecond positive going pulse which is applied to the common point of the keypad so that the appropriate NAND gate will see two logic high levels when the correct key is pressed (one from the counter and the other from the key). The inverted clock pulse (negative going) at pin 12 of the 74C14 and the positive going kepad pulse at pin 6 are gated together using two diodes as an AND gate (shown in lower right corner). The output at the junction of the diodes will be positive in the event a wrong key is pressed and will reset the counter. When a correct key is pressed, outputs will be present from both monostable circuits (clock and keypad) causing the reset line to remain low and allowing the counter to advance. However, since the keypad pulse begins slightly before the clock, a 0.1uF capacitor is connected to the reset line to delay the reset until the inverted clock arrives. The values are not critical and various other timing schemes could be used but the clock signal should be slightly longer than the keypad pulse so that the clock signal can mask out the keypad and avoid resetting the counter in the event the clock pulse ends before the keypad pulse. The fifth output of the counter is on pin 10, so that after four correct key entries have been made, pin 10 will move to a high level and can be used to activate a relay, illuminate an LED, ect. At this point, the lock can be reset simply by pressing any key. The circuit can be extended with additional gates (one more CD4011) to accept up to a 8 digit code. The 4017 counting order is 3 2 4 7 10 1 5 6 9 11 so that the first 8 outputs are connected to the NAND gates and pin 9 would be used to drive the relay or light. The 4 additional NAND gate outputs would connect to the 4 remaining inputs of the CD4068 (pins 9,10,11,12). The circuit will operate from 3 to 12 volts on 4000 series CMOS but only 6 volts or less if 74HC parts are used. The circuit draws very little current (about 165 microamps) so it could be powered for several months on 4 AA batteries assuming only intermittent use of the relay.
Digital Electronic Lock