Showing posts with label Oscillator. Show all posts
Showing posts with label Oscillator. Show all posts

Wednesday, July 12, 2023

Triangle and Trapezoid Wave Generator

 I was searching the web for schematic which can generate a trapezoidal waveform. None of the results was suitable for my needs, so i started to experiment in LTspice (still learning it), and I designed an interesting circuit, that has great flexibility and it's not very complex.

The left side of the circuit is standard square wave oscillator made with U1 opamp. It can be replaced with 555 oscillator.

The next stage consist of two identical constant current sources (CCS), one with PNP transistor and the other with NPN transistor which alternatively charge  and discharge a capacitor. The upper CCS starts to charge the capacitor C1 when the square wave goes down and the lower CCS starts to discharge the capacitor when the square wave goes up. The up slope angle is determined by the R2 and C1 and the down slope angle - by R4 and C1. The two slopes can have different angles (here the duty cycle is also adjusted):

 If we increase the two slopes enough or increase the frequency, the output signal will become triangle wave:

The third stage is just a buffer.


Friday, June 2, 2023

Mini sine wave oscillator

This project is a variant of the 'Miniature Audio Oscillator' by the great Rod Elliott.

I have made very few changes to the core schematic. I removed the potentiometer used for adjusting the frequency and replaced it with a DIP switch, allowing for easy switching between three different frequencies: 20 Hz, 1 kHz, and 20 kHz. These options should be sufficient for quickly testing various audio equipment.

Additionally, I added a third dual opamp. One half of the opamp is used as an output buffer, while the other half serves as a voltage rail splitter and virtual ground. The schematic is designed for a single rail voltage: a 9V battery should be sufficient, but it can also work with higher voltages up to 30V (depending on the opamps used). If Li-ion batteries need to be used, then it is recommended to connect 3 or 4 batteries in series.

The output signal, as stated in the original article, has very low Total Harmonic Distortion (THD) at approximately 0.12%. While I do not have the necessary measurement equipment to gauge the distortion of my variant, I estimate it to be below 0.5%.

I created this project using the EasyEDA software, with the aim of making it relatively easy to replicate at home. The design employs a single-sided PCB and through-hole components.

This is the schematic:

And this is 3D view of the PCB:

For this project, I used a photosensitive dry film for the first time. It wasn't easy, but after a number of trials and errors, I finally managed to produce a fairly good PCB. Here's how it turned out:


The oscillator utilizes a 4-channel DIP switch to control the activation of different value capacitors, thereby altering the output frequency.

The formula for calculating the frequency is F = 1 / (2π × R × C),

where R = R6 = R7 = 10k and

C = C1_A = C2_A = 680 pF when all switches are OFF. These two capacitors can also be 820 pF. To achieve a frequency close to 20 kHz, I handpicked two 680 pF capacitors with higher actual values.

When the left two switches are ON, C = C1_A + C1_B = C2_A + C2_B = 680 pF + 15 nF ≈ 15.7 pF.

When all switches are ON, C = C1_A + C1_B + C1_C + C1_D = C2_A + C2_B + C2_C + C2_D = 680 pF + 15 nF + 680 nF + 100 nF ≈ 795 nF. Note that C1_D and C2_D are included for fine-tuning the lowest frequency of 20 Hz. While not strictly necessary, omitting these capacitors will result in a slightly higher lowest frequency, around 23-24 Hz.

The output voltage measures approximately 3.5 Vpp or 1.24 Vrms and can be adjusted with the potentiometer.

The schematic is compatible with various types of opamps. I tested it with TL072 and NE5532. The current consumption with the TL072 is approximately 10-11 mA, whereas with the NE5532, it is around 34 mA. For extended battery life, the TL062 is the optimal choice; however, I do not have any available at the moment. With the TL072, the output signal begins to visibly distort when the supply voltage drops below 8V.

Here some screenshots from the oscilloscope:



And here is a video of the oscillator at work:

Project files can be downloaded from here: MiniOsc. Use them on your own responsibility!


Monday, July 6, 2020

100 MHz third overtone crystal oscillator

Couple of years ago I purchased from a local store 100 MHz crystal resonator and tried several times to make a working schematic on breadboard using standard circuits I found on the internet. It never worked good enough, usually oscillating at 33.3 MHz instead of 100 MHz. Finally, I found that the crystal is third overtone type. Here some documents, that were useful for this project:

I used as a base the schematic from first document and here what I design:


Thursday, April 16, 2015

Audio oscillator with frequency counter 2

My last project is not completely new. In fact, the oscillator is made from the same schematic as in one of my previous projects and only the frequency counter is made with different schematic.