Binary DVM
Introduction: Binary DVM
Binary displays are very popular for clocks so it looked like there a gap waiting to be filled in the measurement area with an instrument that displayed its results in a Binary format. As result I decided that a DVM would be a suitable project to be given a Binary makeover.
The Microbit has the means via an ADC (Analogue to Digital Converter), to convert analogue inputs into digital values. 1003
These digital values can then be used to create a myriad of applications.
In this case I will describing how to make a Battery powered Digital Volt Meter (DVM), but in addition to this I will have the ability to display the voltage in Binary as well as the usual Decimal values.
** NOTE ** ENSURE THAT ANY VOLTAGE DIRECTLY APPLIED TO THE MICROBIT DOES NOT EXCEED THE SUPPLY RAIL (~3V), AS YOU WILL DAMAGE THE MICROBIT
If you were to apply a DC input to the ADC this being limited by the supply would mean that ~3V would be the maximum.
However, there is a way to overcome this limitation with a few additional components to measure voltages greater than the supply without causing damage to the MicroBit.
It must be noted that there is a limitation to what this simple DVM will measure and its only intended for low voltage positive DC applications in this case 0 to 20V.
Supplies
MicroBit - Qty 1
Battery Pack - Qty 1
9k resistor* - Qty 1
953R resistor* - Qty 1
200R multi turn potentiometer* - Qty 1
1K resistor* - Qty 4
*All resistors 0.1W or greater.
Veroboard - Qty 1
Veropins - Qty 3
Bread:bit Edge Connector Breakout Board - Qty 1 or similar to allow the Microbit to be connected to the potential divider.
LED red low current - Qty 2
16 pin DIL socket or SIL socket strip - Qty 1
DMM
PSU, fixed or variable voltage.
PP3, 9V non rechargeable battery.
In the absence of a PSU a battery as indicated may be substituted.
4 pin single in line (SIP), pin header - Qty 2
Step 1: Potential Divider
In order to enable a voltage greater than the supply to be applied to the ADC input we will be using a potential divider network.
This network will enable the application of a scaled voltage at the ADC input, this scaling will be accomplished using resistors.
The basic network is made up of two resistors which divides the applied voltage across each resistor.
If we adopt a scaling factor of 1/10th the input, at the ADC then for an applied voltage of 20V; the maximum voltage at the ADC input would be 2V which is well within the capability of the ADC with a safety margin of 1V.
If we create a resistor potential divider using 9K & 1K with 20V across the network the voltage across the 1K resistor will be 20 * (1k/10k) = 2V.
However, components have tolerance and even with 1% resistors the voltage could be between 1.96V and 2.04V
Therefore, in order to compensate for the +/-40 mV variance we can add some variable resistance into the network to adjust for component, voltage & temperature variation.
Using a 1% 9k resistor and a 1k trimming resistor best case typical of 10% [0k9 to 1k1], its resistance would be between 0R (0V) and 1k1 max (2.198V [8K91] or 2.159V [9K09]).
Values significantly less then the value to be compensated for in this case 2V are undesirable.
Therefore, if the 1k potentiometer is replaced with a 1% 931R (0k922 to 0k94), fixed resistor in series with a 10% 200R (180R to 220R) potentiometer. This gives a compensation range of 1.84V to 2.3V (-160mV to +300mV).
Therefore, to set an accurate maximum input at the ADC we set the maximum input to be measured and adjust the potentiometer to get an accurate output. Using a DMM in both cases to set the voltages.
In the absence of a DMM to measure the input voltage use a 9V primary non-rechargeable battery as the input to the potential divider and adjust the potentiometer for 1/10th the input voltage (900mV), once the assembly is complete. 134