Introduction

For this challenge, I've designed a simple two tone alarm. Both tones are tunable through potentiometers.

Circuit Theory of Operation

The circuit consists of two oscillators: the slower set frequency oscillator, which switches between the two tones, and the higher frequency oscillator, whose frequency is tunable through a voltage signal.

The slower oscillator is a relaxation oscillator (shown below).

The relaxation oscillator is a comparator circuit, but we prevent it from comparing to the output instantly by adding a capacitor to slow the change in voltage. This allows us to have an oscillating square wave.

The higher frequency oscillator voltage controlled oscillator (shown below)

The second op amp in the diagram is a comparator to a set voltage, made by the voltage divider. This op amp will change its voltage based upon if the voltage from the relaxation oscillator is above 3V or below 3V. When above 3V, the op amp turns on, allowing current to flow through the BJT Transistor. This drains the capacitor, until it is below 3V. Having more voltage at the input of the first stage allows the capacitor to charge faster, and therefore allows a higher frequency wave to be output. Having less voltage has the opposite effect.

To connect these two stages together, we modify a CMOS NOT gate:

This NOT gate allows us to choose the voltage that goes to the high frequency stage. It's input is the low frequency relaxation oscillator. Because of this gate, whenever the relaxation oscillator's output is low, we output one tone, and whenever it is high, we output another tone. This goes on for infinity.


Circuit Design and Construction

For the final circuit, the following diagram was used:

Just as a note, the only op amp that required negative voltage was the first one for the relaxation amplifier. This allowed the capacitor to drain faster and allowed a duty cycle closer to 50%. The circuit was designed in CircuitJS1, and the final file can be found in the "Files" section. The simulation also records the tone, so let it run for a bit (or crank up the simulation speed on a beefier computer) and play the audio tone to hear what tones we should expect.

A list of components used is provided below, quantities in parenthesis:

A list of the tools used to power and help with circuit construction is shown below:

I followed along with the circuit diagram, highlighting components as I placed them, and came out with this circuit:

The red, black, and white wires going out of the board are VCC+, GND, and VCC-, respectively.

Testing the Circuit

After the circuit was built, it was time for the moment of truth. I connected the wires to their appropriate terminals, and after some fiddling and waiting, it started to work... [Video]

Until it didn't...

To be honest, I don't know exactly why the pitch goes down then goes silent near the end of the video. I've measured the voltage with just the oscilloscope and no piezoelectric buzzer, I added a load, moved the location of the speaker to a different breadboard, checked all my connections for short circuits, but I haven't been able to find any physical solution. So, my theory as to why it only works temporarily is a much more fundamental feature of the components.

Diagnosing the problems

Due to me working in a hot garage in late May (I think the outside temperature was around 85°F) I think the issue was with the value of V_TH, the voltage threshold, of the BJT and MOSFET transistors. If you want to read more on voltage threshold, you can read this Wikipedia article. If I had to take a guess, I think that this is the most likely culprit, because the only times it worked was when I took my circuit indoors for a while and then tested it in the garage, where it would work for a while and eventually stop working properly.

Another likely culprit is the voltage that the NOT gate takes eventually dies out. Although I'm not sure why the voltage would fade, it would make sense as well since the last stage of the circuit is a voltage dependent frequency generator, and if the voltage reduces, the frequency gets lower. I attempted to run the circuit again using two 6V batteries in series, tapped in the center to get the -6V needed for the relaxation oscillator. However, I was not able to get the circuit to sound the buzzer, but I did notice that the NOT gate was partially working on my oscilloscope.

My final guess is that the power going to the circuit is insufficient. My power supply is current limited (to what exact amount I'm unsure), but measuring the current gave about 11mA when the circuit wasn't functioning. The voltage was 0 to 6V on the output, meaning we only had about 66mW. It's possible that this is too low for the circuit to function, but until I can get a lab bench power supply, I cannot be sure if this is the problem or not.

Conclusion

I'm sure with more diagnosing and experimentation that the problem could eventually be pinned down. Regardless of the results, I enjoyed building and testing the circuit, and I hope that my circuit is considered in this competition. Thank you for taking the time to read this article. If you are participating in this event, I hope that your circuit does well!

Also, just a note, messaging is allowed on this project, but I don't log in frequently, so apologies in advance if I don't reply for a while to your comment.