COMPACT LEAKAGE METER
MEGAOMMETER AT Atmega328R
MEGAOMMETER AT Atmega328R
The industrial version of the megohmmeter is quite large and has considerable weight. The only advantage of this monster is that it is trusted, but if you need to urgently measure the leakage resistance in the repair, then electronic option is more preferable.
Searching on the Internet, I did not find a simple device, the only megohmmeter that radio amateurs repeated was from Silicon Chip magazine in October 2009, but with improved firmware. The device offered to your attention has dimensions 100x60x25 (were purchased on AliExpress) and has a weight of not more than 100 grams. The device is assembled on an Atmega328P microcontroller. The power is supplied by a lithium battery and the current consumption is about 5 mA. The lower the resistance of the measured circuit, the greater the current consumption and reaches 700-800 mA, but it must be taken into account that circuits with resistance less than 10 kOhm are rare and the measurement is carried out in a few seconds. The device uses two DC-DC converters on MT3608 and MC34063. The first is used to power the controller, the battery voltage rises and stabilizes at 5 volts, the second is a 100V converter, this is determined by the fact that it is mainly used to measure leakage in electronic devices, and making a 500 or 1000V economical converter is very problematic. At first there was an idea to assemble both converters on MT3608, but after I burned 8 microcircuits, it was decided to do on the MC34063. And at 500, 1000V, a higher impedance divider had to be used, and as a result, the use of Rail-To-Rail operational amplifiers.
Indication is carried out on the liquid crystal display. To charge the battery, the charge controller on TP4056 is used (a separate scarf 17x20 mm).
The device is assembled on a double-sided printed circuit board made of foil fiberglass made using LUT technology. Do not be afraid of the word “double-sided.” Two PP bottom and top images are printed (mirrored). Combined into the gap and fastened with a stapler in the form of an envelope. The workpiece is inserted and first heated with an iron on both sides, then it is carefully ironed on both sides through two standing writing papers. Throw the printed blank into a container of warm water for about half an hour, then use your finger to remove the remaining paper under a stream of warm water. After etching, we tin in the Rose alloy. The through holes for the conductors are made of tinned copper wire with a diameter of 0.7 mm. The inputs of the device are made of brass tubes from an old multimeter, so you can use standard probes from multimeters, but it is advisable to make home-made ones with crocodile clips.
Applied SMD parts, resistors 5%, capacitors 10%. It should be noted that this is not an ohmmeter and does not serve to accurately measure resistance, although the accuracy in the range of 1K - 1M is quite large. To increase the reliability of the readings, the entire range of resistance measurements is divided into three. The firmware used oversampling. Three voltage dividers 1; 10, 1: 100 and 1: 1000 are used. The last range is very stretched, from 10 mOhm to 100 mOhm and with a 10-bit microcontroller ADC resolution, it has a very large step, about 90 kOhm. In addition, it was necessary to apply the protection circuit with the input of the microcontroller and they introduce an error on the upper two ranges. Below you see pictures with the results of measurements.
Maybe someone wants to improve the device or more accurately calibrate, so I apply the source. When calibrating, we connect an accurate resistor no worse than 1%, for example 47 kOhm and select a coefficient for the range of 10-100 kOhm in the line:
if ((volt1 <1000) && (volt1> volt0))
{
amper = volt1 / 1800.0; // uA
volt = 100000.0 - volt1;
if (amper! = 0) om = (volt / amper - 1800.0) * 1.1235; // a multiplier is selected.
} else
The scale from 10 to 100 mOhm is very non-linear, at the beginning the readings are underestimated by kx2, and at the end of the range they are overestimated by kx1, so two factors are selected similarly, but we put the resistor at 20 mOhm, then 47 mOhm and then 91 mOhm:
#define kx1 -0.145
#define kx2 0.8
............
if ((volt2 <1000) && (volt2> volt1))
{
volt = 100000.0 - volt2; // on Rx
amper = volt2 / 18000.0;
if (amper! = 0) om = volt / amper;
om = (om + om * (((1000.0 - volt2) /1000.0) * kx1 + volt2 / 1000.0 * kx2));