The original circuit had some drawbacks,
- It did not work well with 8Ω speakers
- It used a 9V battery (minor drawback, but I never really liked 9V batteries due to value)
- It used a now obsolete part
- I no longer have the complete schematic
Many modern op amps are designed for 5.5V maximum, so three alkaline batteries AA or AAA will be great. The op amp needs the following characteristics:
- Low IB, as one amplifier uses 1MΩ/22MΩ source and feedback resistance
- High output drive current, as the op amp directly drives the 8Ω speaker
- Bandwidth > 50kHz or so. I think it would be hard to fins one which meets criteria 1 and 2 but does not have this much bandwidth.
Thus, a great fit for this application is an AD8534. This is a quad op amp, so all 4 amplifiers shown in the schematic are a single package.
One of the last elements added to the design is the LDO, an ADP122. This is a 300mA LDO, but why is an LDO needed? In this case, it does two things which quite different than expected. The first is that the LDO's EN input is connected to the input probes. When the probes are open, resistor R2 pulls EN low, and the circuit is shut down. When connected to less than about 47kΩ impedance or less, the EN pin is pulled up to 1/3 of VBATT, or about 1.5V. The guaranteed logic high voltage for the ADP122 is 1.2V, so the circuit is turned on.
The second thing which the ADP122 does in the circuit is provide a regulated voltage. This is only important for one element: the output volume level. The way the amplifier works the output volume is ratiometric to the supply voltage. Thus, when the batteries are new, the output could be adjusted to the desirable volume, but this would have to change as the battery voltage dropped over time. Volume is intended to be adjusted once with a trim pot, not frequently to accommodate the decaying battery voltage.
Now back to the op amp part!
Note the amplifiers are not U2A to U2D left to right. This is not how they started, but when the PCB was in floor planning stage U2B was closest to the inputs, so A and B were swapped. Then because A output feeds easiest to the top of the IC, amplifiers C and D were swapped as well. Subtle, but worth mentioning to anyone just learning this stuff. The takeaway here is feel free to modify the schematic to make the layout easier. If you are the person who did the schematic and are doing the layout this is easy. If someone else is doing the layout you may want to buy them a coffee or something due to the increase back and forth needed to do this. But a great layout engineer knows this already, and should ask you if it is OK if they do the swap.
So, U2B is a simple difference amplifier. It measures the difference at the input probes and multiplies this by 22, and level shifts this to GND reference. This is a classic op amp circuit we all should know! Resistors R1 and R2, 47kΩ, inject current into the probes. Note that R1 goes directly to the battery voltage, not the LDO output. Otherwise, the circuit would never turn on. I don't think I have ever made that particular mistake, but I am sure it has been done! The other thing to note here is the 1MΩ source impedance. I recall this as originally 100kΩ but it was increased. Resistors R1, R3, R7 and R8 form a path from battery to GND. Keeping these as high as possible reduces the standby current of the beeper box.
Amplifier U2A is an integrator, another classic op amp circuit. Combined with U2D, a comparator with hysteresis, this becomes a classic VCO (Voltage Controlled Oscillator). This is explained as follows. Assume the difference amplifier is outputting 1V, the integrator output is at some high voltage, and FET Q1 is not on. U2A is an op amp just trying to do whatever it can to keep its inputs at the same voltage. In this case, IN+ is at 0.5V (1V divided by 2 due to R7 and R8). So the integrator needs to pull 0.5V / 100kΩ current through the feedback element, in this case capacitor C3. This is the basic equation i = C dV/dt . Thus the the output is a linear ramp negative, proportional to amplitude out of the difference amplifier. Eventually all integrators left unchecked got to ±∞ or their supply rails, whatever comes first. But in this case, amplifier U2D compares the integrator output to an upper and lower threshold voltage, and changes the polarity of the integration, creating a beautiful triangle wave at the output of U2A. The comparator has a DC bias at IN+ generated by a resistor divider R14 and R15. However, the feedback resistor R13 modifies this voltage slightly, creating an upper threshold of 2.1V, and a lower threshold of 1.25V. MOSFET Q1 is used to invert the integration polarity.
next is the output amplifier. In addition to serving as the comparator, op amp U2D is also uses as 1/2 the output amplifier. U2C forms the other half of the output amplifier. U2C is a simple inverter, with a potentiometer adjusted gain from 0 to -1, corresponding to a 6dB difference in output amplitude. If the 6dB is not enough variance, gain can be increased by 6dB by changing R16 to 470Ω , or can decreased by about 6dB by changing R17 to 10Ω. The output of the amplifier is a square wave, so a passive low pass filter is included (L1, L2, C4-C6). This is an 18kHz 2nd order Butterworth topology, with values derived from speaker crossover design software found all over the interwebs. Note these inductors each have about 6Ω DCR, which may be a bit high, this will need verification. But the insertion loss due to this DCR likely is desirable, we will see when the boards are back.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.