EveryCircuit
Contact
Reviews
Home
592azy2circuitdude
modified 2 years ago

Successive Approximation Type Digital Voltmeter - Hexadecimal

5
0
1113
10:26:55
Here is an example of a successive approximation type digital volt meter (DVM). It is displayed in hexadecimal. It can read a voltage up to around 12.8V with an accuracy of about 100mV. INSTRUCTIONS: The voltage source in the bottom right is unknown. The 7-segment displays in the top right show the result (in hex). If you want to measure a different voltage, stop the simulation, adjust the source in the bottom right, and restart the simulation. This example will read a voltage of 12.0V (displayed as 78 hex) For the updated decimal version, please check out https://everycircuit.com/circuit/5334865438048256 DVM Series: Ramp type https://everycircuit.com/circuit/4592385207304192 Dual slope integrating type https://everycircuit.com/circuit/6675184624599040 Integrating type (voltage to frequency) https://everycircuit.com/circuit/6172260362354688 Ramp Type (negative volts) https://everycircuit.com/circuit/5763215168110592 Ramp Type (auto ranging) https://everycircuit.com/circuit/6110164975091712 Counter Type ADC https://everycircuit.com/circuit/4509930926899200 Tracking Type ADC https://everycircuit.com/circuit/6418942605918208 Tracking Type ADC Full Version https://everycircuit.com/circuit/4688147021299712 Flash Type ADC https://everycircuit.com/circuit/4806466994962432 Pipeline Type ADC https://everycircuit.com/circuit/5739735974412288 Pipeline Type ADC 2 Bit Stages https://everycircuit.com/circuit/6081127019970560 GENERAL: The heart of the voltmeter is the 7 J-K flip-flops that form the successive approximation register (SAR). The SAR outputs a digital number that gets converted to a voltage level (green waveform). This gets compared to the unknown voltage (blue waveform). If it is too high, the SAR outputs a smaller number. If it is too low, it outputs a higher number. The clock is the orange waveform. Thus, the binary number in the SAR gets successively closer to the unknown voltage. This binary number is displayed in hex. DETAILS: The number of bits of the SAR set the max value and accuracy of the voltmeter. The highest binary value of the bits (all 1s) will be the max value the voltmeter can read. It will need 'N' J-K flip-flops. 2ᴺ = max In this case, N = 7 gives 2⁷ = 128 as a max value, which is 12.8V since each number is 0.1V. These flip-flops hold a binary number on their outputs. The logic sources on the left go through each flip-flop of the SAR, starting with the most significant bit (MSB) (bottom). This puts the output binary number halfway to the max value. This number is converted to a voltage using 2 digital to analog converters (DACs) and a summing amplifier. The opamp then compares this to the unknown voltage. If the value is too high, then a digital 1 is sent back to the SAR, causing it to reset the bit back to a 0. If it is still below, a 0 is sent back, and the bit remains a 1. The above process repeats until all the flip-flops are cycled through. In this particular case, the pattern described above goes like 1000000 set 1000000 keep 1100000 set 1100000 keep 1110000 set 1110000 keep 1111000 set 1111000 keep 1111100 set 1111000 reset 1111010 set 1111000 reset 1111001 set 1111000 reset done (12.0 decimal shown as 78). The time it takes for each step is controlled by the clock (0.5ms). So, each flip-flop must be active twice that time (1ms). For all to be cycled through will take N × 2 × Pclk (7 × 2 × 0.5 = 7ms). To reset the SAR outputs back to all 0s, two lower logic sources toggle to block the output of the comparator opamp and allow a reset signal through. Now, when the logic sources on the left go through each flip-flop, they are set to a 1, then reset to 0. It takes the same amount of time to reset as before (7ms). In this circuit, the sample rate is the time plus two 3ms delays 7ms + 7ms + 3ms + 3ms = 20ms CONVERSION TABLE: Hex Dec Bin Hex Dec Bin 0 0 0000000 40 64 1000000 1 1 0000001 41 65 1000001 2 2 0000010 42 66 1000010 3 3 0000011 43 67 1000011 4 4 0000100 44 68 1000100 5 5 0000101 45 69 1000101 6 6 0000110 46 70 1000110 7 7 0000111 47 71 1000111 8 8 0001000 48 72 1001000 9 9 0001001 49 73 1001001 A 10 0001010 4A 74 1001010 B 11 0001011 4B 75 1001011 C 12 0001100 4C 76 1001100 D 13 0001101 4D 77 1001101 E 14 0001110 4E 78 1001110 F 15 0001111 4F 79 1001111 10 16 0010000 50 80 1010000 11 17 0010001 51 81 1010001 12 18 0010010 52 82 1010010 13 19 0010011 53 83 1010011 14 20 0010100 54 84 1010100 15 21 0010101 55 85 1010101 16 22 0010110 56 86 1010110 17 23 0010111 57 87 1010111 18 24 0011000 58 88 1011000 19 25 0011001 59 89 1011001 1A 26 0011010 5A 90 1011010 1B 27 0011011 5B 91 1011011 1C 28 0011100 5C 92 1011100 1D 29 0011101 5D 93 1011101 1E 30 0011110 5E 94 1011110 1F 31 0011111 5F 95 1011111 20 32 0100000 60 96 1100000 21 33 0100001 61 97 1100001 22 34 0100010 62 98 1100010 23 35 0100011 63 99 1100011 24 36 0100100 64 10.0 1100100 25 37 0100101 65 10.1 1100101 26 38 0100110 66 10.2 1100110 27 39 0100111 67 10.3 1100111 28 40 0101000 68 10.4 1101000 29 41 0101001 69 10.5 1101001 2A 42 0101010 6A 10.6 1101010 2B 43 0101011 6B 10.7 1101011 2C 44 0101100 6C 10.8 1101100 2D 45 0101101 6D 10.9 1101101 2E 46 0101110 6E 11.0 1101110 2F 47 0101111 6F 11.1 1101111 30 48 0110000 70 11.2 1110000 31 49 0110001 71 11.3 1110001 32 50 0110010 72 11.4 1110010 33 51 0110011 73 11.5 1110011 34 52 0110100 74 11.6 1110100 35 53 0110101 75 11.7 1110101 36 54 0110110 76 11.8 1110110 37 55 0110111 77 11.9 1110111 38 56 0111000 78 12.0 1111000 39 57 0111001 79 12.1 1111001 3A 58 0111010 7A 12.2 1111010 3B 59 0111011 7B 12.3 1111011 3C 60 0111100 7C 12.4 1111100 3D 61 0111101 7D 12.5 1111101 3E 62 0111110 7E 12.6 1111110 3F 63 0111111 7F 12.7 1111111
published 2 years ago

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2025 by MuseMaze, Inc.     Terms of use     Privacy policy