Technical Trivia by Dr. FB
Generating “Sawtooth Waves” using
a D/A conversion circuit and a counter IC
Dr. FB
In the previous issue, I manually input a 4-bit digital signal to the R-2R type resistor ladder and measured the output voltage in response to that input signal with a multimeter. (Figure 1). As a result, the 4-bit digital signal starting at 0000 and ending at 1111 and was replaced by an amplitude signal by passing it through a resistor ladder, confirming that a digital-to-analog (D/A) conversion was performed.
This time, I will use ICs to continuously input the input signal to the D/A conversion circuit instead of manually inputting it. The input signal is a 4-bit digital signal starting with 0000 and ending with 1111, the same as the before. I connected an oscilloscope instead of a voltmeter to the output terminal of the D/A conversion circuit and observed the output waveform. I verified that the step-like signal shown in Figure 1 (right) appeared continuously on the screen.
The graph in Figure 1 shows that as the input signal increases from (0000)2 → (0001)2 → (0010)2...→ (1110)2 → (1111)2 and the output voltage also increases from 0 V to 4.68 V by 0.31 V steps. The output voltage is partially stair-stepped, but approximately speaking, it is increasing linearly.
Figure 1. 4-bit Input vs. Output voltage of an resistor ladder
This continuously repeating output voltage is called a "sawtooth wave" because it looks like the teeth of a saw, as shown in Figure 2.
Figure 2. Sawtooth waveform
4-bit binary up-counter IC
In the 4-bit binary counter used in this project, when a clock signal is applied to the input terminal (CK) of the IC, four output terminals QA to QD output binary number from 0000 to 1111 according to the number of clock signals input.
For example, when the first clock signal is input, QA=1, QB=0, QC=0, QD=0, when the second signal is input QA=0, QB=1, QC=0, QD=0, and when the 15th signal is input QA=1, QB=1, QC=1, QD=1. (Here, 1="H" level and 0="L" level.)
The 74HC161 shown in Figure 3 is a 4-bit counter IC. This 74HC161 has four D-FFs (D flip-flops) built into it. The minimum digit of the output terminal is QA and the maximum digit is QD. Each time a clock signal is input, a carry is performed sequentially from QA to QD, changing from 0000 to 1111. The operation of the D-FF is explained in the previous issue of this corner.
Figure 3. Overview of 74HC161
Sawtooth wave generation circuit using 74HC161 and R-2R type resistor ladder
Figure 4 shows the circuit diagram for generating sawtooth waves. IC1 is a 4-bit binary up-counter. IC2a and IC2b are inverters and are composed of the circuit that generate clock signals. In my experiment, I used a 74HC04 inverter. A potentiometer (VR1) is installed to the circuit to vary the oscillation frequency. When a clock signal is input to the CK pin of IC1, a 4-bit signal (0000 to 1111) is output from the QA to QD pins.
By inputting these 4-bit signals from QA to QD into the R-2R type D/A conversion circuit composed of R1 to R8, sawtooth waves appear at this output terminals in accordance with the input-output characteristics of the R-2R type resistor ladder shown in Figure 1 shown above.
Experiment circuit
Figure 5 (left) shows the circuit shown in Figure 4 built onto a universal PC board, and Figure 5 (right) shows the waveform observed by connecting an oscilloscope to the output terminals of the D/A conversion circuit. You can see that a sawtooth wave is output on the oscilloscope screen.
Consideration of the output waveform
The image in Figure 6 (right) is an enlarged version of the image in Figure 5 (right) in the horizontal axis (time axis) direction. Figure 6 (left) shows the result of manually inputting a 4-bit signal and measuring the output voltage with a multimeter. When comparing both (left) and (right) of Figure 6, the results are exactly the same.
Figure 6. Comparison of manual and IC output of resistor ladder.
Summary
This time, I conducted an experiment to generate a sawtooth wave using a 4-bit up-counter IC. Many electronic devices that process digital signals also incorporate such D/A conversion circuits. In order to understand the principles of D/A conversion circuits, I think this experiment will be easy to perform since there are not that many parts involved.
FBDX
Technical Trivia by Dr. FB backnumber
- Generating “Sawtooth Waves” using a D/A conversion circuit and a counter IC
- Examining a D/A converter using a Resistor Ladder
- Electronic firefly and its circuit description
- Controlling the rotation speed of a DC motor
- Description of up-down counter using 74HC192 and 74HC4511 ICs
- Considerations when making a dual voltage power supply for operational amplifiers
- Observing filter characteristics with a white noise generator
- Is noise actually reduced in twisted pair cables?
- Experiments on divider circuits using a 74HC74
- Consideration of using a photocoupler as a voltage-variable resistor
- Distorted waveform spectrum as observed on a tinySA
- Trial making of a QFH antenna
- About the inductance of coils
- Operation of analog switches
- Small digital voltmeter, 2-wire type / 3-wire type. What is the difference?
- Constant current circuit using an Op-Amp
- Coaxial cable loss to UHF and SHF
- 2.4 GHz Wireless LAN Antenna
- Let’s use MOSFETS
- 25th Comparator
- The principle of PLL
- Examination of the MLA performance
- About the Fresnel zone of the SHF band
- Level difference under open and load ends of an SSG
- Is “Made in Japan” alive? (UHF adapter again)
- Possibility experiment of passive repeater with the Back-to-Back antenna
- Why you should make SWR measurements just below the antenna!
- How reliable is the L-type BNC?
- Is the Bird 43 accurate enough?
- Does a wire dipole antenna need a balun?
- Why we don’t use a silicon diode in a crystal radio?
- How to light the 7-segment LED
- Measurement of Antenna Performance on Handheld Transceivers (Part 3)
- Measurement of Antenna SWR on Handheld transceivers (Part 2)
- Measurement of Antenna SWR on Handheld transceivers(Part 1)
- An SWR meter
- V/UHF 3-Band Antenna Dismantling Note