digitally controlled oscillator dco design

8,170

Circuit Image

A design for a digitally controlled analog oscillator is being developed. The control voltage is generated by a microcontroller (Arduino) and is utilized through two operational amplifiers, along with a resistor and capacitor network that forms an integrator circuit. The microcontroller also outputs a square wave at the desired frequency, which is converted via a transistor to short the ramp voltage to ground, creating a sawtooth generator. While this design does not constitute a true oscillator, it aims to produce a digital oscillator for a music synthesizer with outputs of ramp (sawtooth) and square wave. The designer prefers not to use a standard voltage-controlled oscillator due to frequency drift caused by temperature changes. A PWM signal will be generated by the microcontroller and filtered to create the control voltage. The design includes considerations for AC-coupling the sawtooth generator output, factoring in the limitations of single-supply op-amps. The designer is also exploring the use of a JFET op-amp, such as the TL081, and is considering a dual power supply of ±15V for improved circuit performance.

The circuit described involves an integrator configuration using two operational amplifiers (op-amps) to create a control voltage from a PWM signal generated by an Arduino microcontroller. The PWM signal is filtered to produce a smooth control voltage that drives the integrator circuit. The output of the integrator is a ramp voltage, which is then converted into a sawtooth waveform by using a transistor to short the ramp voltage to ground at the desired frequency. This method effectively generates a sawtooth waveform, which is a common waveform used in synthesizers.

The design acknowledges that this configuration does not qualify as a true oscillator since it relies on external control from the microcontroller. The goal is to achieve a stable output without the frequency drift associated with traditional voltage-controlled oscillators, which can be affected by temperature variations. By utilizing PWM to charge a capacitor through a resistor, the circuit can maintain a consistent ramp peak, although the ramp's linearity may vary with frequency.

In terms of component selection, the choice of op-amps is critical. The designer considers using a JFET op-amp like the TL081, which offers better performance characteristics, including lower noise and improved slew rates compared to the LM324N. The op-amp's specifications must be evaluated to ensure compatibility with the circuit's requirements, particularly regarding the PWM frequency and the acceptable level of ripple on the control voltage.

Additionally, the circuit may employ AC coupling techniques to mitigate the limitations of single-supply op-amps, which typically cannot output voltages close to ground. By AC coupling the output, the designer can avoid issues related to the op-amp's inability to reach 0V, thus improving the overall performance of the sawtooth generator.

Considering a dual power supply of ±15V simplifies the design by allowing the op-amps to operate within a wider voltage range, thereby enhancing their linearity and performance. This choice also provides more headroom for the output signals, reducing distortion and improving the quality of the generated waveforms. Overall, the proposed circuit aims to achieve a reliable and high-quality sawtooth waveform suitable for use in a music synthesizer application.I am trying to design a digitally controlled analogue oscillator. The idea is that a control voltage is generated by the a microcontroller (Arduino) which is used via the 2 op amps, resistor and capacitor network which forms a integrator circuit. The microcontroller will also send out a squarewave (top left) at the desired frequency which gets con

verted eventually via the transistor and shorts the ramp voltage to ground. This forms the sawtooth circuit. That`s technically not an oscillator, it`s a sawtooth generator. An oscillator is autonomous (no external input), and free-runs by virtue of positive feedback. You don`t need the 1Meg resistor. It just makes your ramp slightly nonlinear. You will have to adjust your values slightly if you want to omit it and still get exactly 9. 5V peak. Yes, it`s not a true oscillator. I`m trying to design a digital oscillator for a music synthesizer. The outputs will eventually be ramp (sawtooth) and squarewave. I did not want to go down the stand voltage controlled oscillator because of frequency drifting due to temperature changes etc. I`m going to get the microprocessor to send out a PWM and then filter it to create a control voltage.

I`ve simulated that by the battery you see in the bottom left (0. 6v). You can see the output control values i`ve calculated in the spreadsheet. Are you going to AC-couple the output of your sawtooth generator The reason I ask is that a single-supply op amp, even with rail-to-rail output, can only get within ‰ 100mV of zero volts. If you AC-couple, I suppose that won`t matter. I can show you how to do it with a single supply, but if I post the schematic, On1aag will come up with something with half as many parts, and compare me to Rube Goldberg again.

I can show you how to do it with a single supply, but if I post the schematic, On1aag will come up with something with half as many parts, and compare me to Rube Goldberg again. What kind of single-supply, rail-to-rail I/O op amps do you have I would like to look at the specs, and maybe run some simulations before I post a circuit that will disappoint you if your op amp is not up to the task.

Are you going to AC-couple the output of your sawtooth generator The reason I ask is that a single-supply op amp, even with rail-to-rail output, can only get within ‰ 100mV of zero volts. If you AC-couple, I suppose that won`t matter. I can show you how to do it with a single supply, but if I post the schematic, On1aag will come up with something with half as many parts, and compare me to Rube Goldberg again.

What kind of single-supply, rail-to-rail I/O op amps do you have I would like to look at the specs, and maybe run some simulations before I post a circuit that will disappoint you if your op amp is not up to the task. what you can do is to use the pwm to charge a cap through a resistor and discharge once it gets to a particular voltage.

the ramp would not be perfect and the frequency would be value dependent but the ramp peak (volume) would be fixed instead of varying with frequency. Well, It`s not a very good op amp, but the attached circuit works in simulation. Due to the finite slew time when the ramp resets, doubling the amplitude control voltage with each doubling of frequency will not quite keep the amplitude constant.

You may have to use a lookup table for the PWM duty cycle. A faster slewing op amp would allow you to use a shorter reset pulse (lower value for C2), which would reduce but not eliminate the slewing problem. U1a can double as the op amp in a 2 or 3 pole lowpass filter for your PWM if you need it. Let us know if you want to do that. We will need to know the PWM frequency, and how much residual ripple you can tolerate on the control voltage.

what you can do is to use the pwm to charge a cap through a resistor and discharge once it gets to a particular voltage. the ramp would not be perfect and the frequency would be value dependent but the ramp peak (volume) would be fixed instead of varying with frequency.

Well, It`s not a very good op amp, but the attached circuit works in simulation. Due to the finite slew time when the ramp resets, doubling the amplitude control voltage with each doubling of frequency will not quite keep the amplitude constant. You may have to use a lookup table for the PWM duty cycle. A faster slewing op amp would allow you to use a shorter reset pulse (lower value for C2), which would reduce but not eliminate the slewing problem.

U1a can double as the op amp in a 2 or 3 pole lowpass filter for your PWM if you need it. Let us know if you want to do that. We will need to know the PWM frequency, and how much residual ripple you can tolerate on the control voltage. Roff. Thank you very much for taking the time to look at this. I`ve took your feedback about the slew issues on the LM324N. So would a jfet opamp like the TL081 be a better choice. Also. I`ve decided that I`m going to have to go down the positive and negative supply route. Probably will supply with +/- 15v. Is that a better choice. Does that simplify the circuit. 🔗 External reference