Low Voltage Capacitor Leakage Tester+ Diode Zener Tester to 30v

by Yannick99 in Circuits > Electronics

779 Views, 7 Favorites, 0 Comments

Low Voltage Capacitor Leakage Tester+ Diode Zener Tester to 30v

LVCapLeakageTester+

Hello :)

I'm sharing with you my last project. It's a device to test if the capacitors are electrically leaking.

I did the first version of this about 5 years ago. Since I had many request to release the whole schematic.


I did a new schematic for the amplifier. I remove both of the potentiometer and use a different way. I passed hours to test and try other approach. It's not completely different because an amplifier is an amplifier. Meaning you must in a certain way have transistors right ? But transistors are different, resistors values I also found this base schematic all over the internet. See the picture below for exemple.


I also modify the original schematic to add some features such as the diode tester. I improved battery live. I replace the 3 9v battery by a boost converter. Now only one power source is needed and we have constantly 30v. I replace a relay by a on/off mosfet circuit to shut down the boost converter. At the end the tester is way more sensitive than the original. It's completely a new device. I did version 1.0, 1.1 and 1.2. 3 different PCB order until I reach the final product.


Those is the main features:


-Test Capacitors for leakage at low voltage <30V

-Can be set to be sensitive up to 50Gohm and maybe more

-Option to test at min, 10v, 16v, 25v and 30v saved in eeprom. (last state at power on)

-Test Diode Voltage Drop to 30V at 3mA, handy for zener and leds.

-Can operate on 4.7v to 12v

-To be use with 9v battery, 4AA or 4AAA (6v)

-Take 20mA with backlight 11mA without.

-Auto power off ~1min

-Software Calibration for the Diode voltmeter saved in eeprom

-Battery Indicator

-Soft on/off latch circuit with very nano amp battery leakage.

-Can be install in a box, in the 3d print plastic holder or as is.

-uC atmega48pb, cheaper than 328 running at 1Mhz to save battery life and support <5v

-Step up power supply to 30v from voltage in from 4.7v to 12v.

-Time counter 999 seconds at .1 resolution

-Backlight can be enabled or disabled (saved in eeprom)

-No more gain potentiometer.

Supplies

I did a BOM (Bill Of Material). Take note that this list can have unavailable/Expired/Discontinued part. Double check and use sub part number.

Here is the BOM link

IC2 is in the list twice. Choose the one available.

Micro switch are the short one. Replace it by the long one if you are using the metal box. See XLSL file for part number.

Relay1 have the built-in Diode. You could remove one diode of the BOM.

For short, double check the list and adjust part as you needed. In many cases is good to have more minimum part and the cost is cheaper. If you already have resistors and capacitors, your hardware will work just fine.


Here is the XLSX Excel file

This file is an addition to the BOM. It contains sub part number and very handy when we solder the whole project together.

You can use Excel to filter it by value. Like that you can follow all along the process very easily.

This Is and Exemple of a Base Leakage Tester Schematic

base.png

This Is And Exemple Of A Base Leakage Tester Schematic we can found on internet. Those transistors are in Darlington configuration to rise the gain. The led light up until the capacitor is full. If the led doesn't turn of completly, the capacitor is faulty. My device id doing the same with more option.

Here Is the Schematic

Schematic.png

To have the full resolution, click on the picture and download the original. (Left bottom corner)

This Is the Gerber File to Order PCB

IMG_1767.jpg

Program Your ATMEGA With Avrdude and a USBasp

Capture d&rsquo;&eacute;cran 2024-04-17 213320.png
Capture d&rsquo;&eacute;cran 2024-04-17 210816.png
Capture d&rsquo;&eacute;cran 2024-04-17 211238.png
Capture d&rsquo;&eacute;cran 2024-04-17 211317.png
Capture d&rsquo;&eacute;cran 2024-04-17 211414.png

This method is very simple and cheap. search on ebay or amazon for USBasp or USBTiny. It's between 2 and 5$.

Plug in your USBasp or USBtiny device in your computer and let Windows detect the device (it will report driver not found). If a window pops up asking to search for driver, just close it or click on Cancel.

At this point, download and run Zadig, it should detect the USBasp or USBtiny, or any libusb device that you have. Then in the selection box (see picture), choose libusb-win32 (v1.2.7.3), click on Install Driver, and wait for the installation to complete.

Check in device manager for atmel usb device = ok. No exclamation mark anymore

I create a batch file to program the chip with .hex and fuses bits in same time.

Download this file and unzip in a folder.

Connect the ISP header to the device and run the program usbasp.bat file to complete the programmation.

At the end, code and fuse bit are programmed

Jumper Config

6v.png

If you are using 4 AA ou AAA battery you need to install a jumper on the program header. In the middle, you will see 6v. This jumper is needed to tell uC we are running on 6v to track battery life.

If the jumper isn't installed. The device will run unaffected but, with a wrong battery empty logo.

Diode Calibration Voltage

calibration.png

To do a calibration of the ADC we will use a jumper to enter in config mode. In fact we do not config the ADC. We are changing the multiplication number in the software.

It's important to turn off the device before to install the jumper

On a turned off tester, install or jump the 2 wires on the picture. Power on the device.

A remove jumper message will appears. Remove the jumper.

In configuration mode only one button is working, the option button.

Only one function can be done with this button, rising the readout. We can't go back. If needed just remove battery and restart again.

With a Voltmeter, check the readout between + and D- and then, press the option button until you are reading the same thing. Button can be long pressed or short pressed.

When it's done, just remove power and it's done.

The AVR have a 10bits ADC for 1024 step. But with Oversampling 16x we can reach 12 bits. With 4096 step. 30v can have a step of 30v/4096 = .0073 volts. This is the resolution. The accuracy depend on the reference voltage stability and resistor divider network. Even temperature can affect this. In my final test, the result is more than enough. If I compare the reading with my rigol 3068 6 1/2 digit. I have - .04 volts of difference.

Details

On-Off section:

The power input circuit is from an another project I did before. I made a whole instructable on it. It's a on/off latch circuit requiring only one uC input pin. Long story short, the push button enable the uC, the uC put the pin in input with pull up resistor holding the mosfet on until it pressed again.

5 volts regulator section:

This is funny. At the beginning I received my pcb and the part (regulator). The package didn't fit on the pcb. It was my mistake. The part was available in 2 packages. So I reorder a new PCB except this time, both packages on it. That's why on my last version, still 2 both are available. But don't do mistake. Just one need to be installed. Sot 323-3 OR sot Sot 323-5

Nothing special here, just a linear regulator in gnd out as usual. The output current is very very low. No heatsink is needed.

30V enabling:

This part is enabling the 30 Volts on or off. Why I didn't use the step up enable pin 4 ? Because when the step up pin 4 is low, the switching stop. But the voltage doesn't go to 0. It's staying at the battery level input. Big difference. We need to have 0 volt when the capacitor is discharging.

30V step up (boost):

This is a switching power supply. By shorting the coil to gnd, the back emf is grab by the C14 capacitor through the diode. This is rising the voltage way way up the input. The AP3015 have a reference of 1.23v. It is constantly adjusting the duty cycle to have 1.23v at pin 3. With a resistor divider circuit we can calculate and have the desired output voltage. More is the load more the duty cycle is long. In our application, the load is very low, almost 0. It's very easy to regulate the output and have a very low noise. uC pin 10-11-12-13 is tie to gnd to select the voltage output. Only one pin at the time is grounded. At the lowest voltage, no pin is gnd. In that case, the input voltage is the output voltage.

In addition the purpose of gate resistor 100k R22-R23-R24-R25 and R8 is only to protect the uC. Nothing more. I was hesitating to just attach the gate directly on the uC. All would be fine. But we never know what's can go wrong and for a few cents by resistor it can't hurts.

R30 and R35 are used to fine tune the 30v voltage if you want to. R30 must be install. R35 no.

In my prototype, R29 43k was just fine. But it's always good to have some options to fine tune as needed.

Battery gauge:

This is a simple resistor divider entering in a ADC pin. uC is calculating the battery voltage by rule of thumbs. Like I can't enter in a ADC with 9v, we need a tension divider. If you are using 4xAA batteries instead. Install a jumper as shown earlier. The 6Volts option is handy if you want to test some 6.3v capacitors. This way, at minimum option, the voltage will be set to 6v.

Option Button:

This button trig an interrupt. This one rise the voltage from min, 10v, 16v, 25v, 30v, diode mode and return back to minimum.

This button is also used to disable the backlight. Just holding it at power up flip the configuration and saved in eeprom.

In Diode configuration mode this button is used to rise/config the voltage reading.

T4, T5, T7

What those transistor have in commun ? If you look carefully. The collector of those is connected to 9v and without a resistor.

Why is that so? It's for the efficiency. If for exemple it was on 5v. That's means if we have a 9v battery, we must lower the voltage of 4v in heat, by the regulator. This isn't a good thing. By this little attention, we improve battery life and save the power dissipation. Here, also, we didn't have any collector resistor. The current is limited by the base resistor. 5v-.7 = 4.3 volts. 4.3v/100k=43uA. 43uA x Hfe(200)= 8.6mA

8.6mA is the collector current no matter the voltage of the battery. The leds will always light-up at same intensity.

Relay1 (Discharging Relay):

This relay discharge the capacitor at power off through the led/resistor in parallel. In the same time uC disable the voltage input on the step up power supply. While the relay is closed, it is also normal to see the charge LED light up. C5 and C14 are discharging at the same time and the amplifier is activated.

I tried to bypass this relay. All attempts has failed. Because we must install this in parallel with DUT (device under test), anything else but a relay was too leaky, yes a mosfet too. I didn't have other choice.

The R21 1.8k resistor is calculated to discharged 16.66 mA on 30v. P= 16.66mA x 30v = 0.5 watt

Amplifier:

This is a 3 stages amplifier. The first stage is only a regular MMBT3904. It's the surface mount version of a 2N3904. Good, low noise, cheap and widely available. The transistor begin to works when the voltage base is around 0.7 volts. To be able to have more than .7 volts on a leaky capacitor the load resistor need to be very low. More detail later.

The next stage is a Darlington transistor of hfe 20000 and the last stage is a 2n3906 of hfe 200. Those 3 stages in series can detect a nanovolt.

R13-R14:

Those resistors are the sensitivity level of the device. To me 1Gohm is a good compromise. Not too sensitive but enough to find defective capacitor. But, if r13-r14=10Gohm instead. It can detect a leakage 85Gohm meaning 353pA. And probably more I didn't have a larger value of resistance to test with.

I did this test with a 50Gohm, 25Gohm and a 10GOhm in series. bar graph was at 0% and led was on!!!

On the pcb I put 2 1206 package instead 0805. This way we have more option to find high value resistor. 0805 can be solder on 1206 package. And 2 in series give the possibility to install 2x 500Meg, or 0Ohm with 1Gohm. Choose what is available and cheaper. In other word best for you.

You can also try different values to test and play with it. It's up to you.

To be able to detect a voltage drop between the base of T1 and GND we must have resistor to GND as a load.

Follow me here this is important to understand how this works. If the load is large, high or big , for exemple 100 ohm (for R13-R14).

The capacitor under test will charge very quickly but if the capacitor is leaky, let say 1nA. The voltage at the 100 ohm will be 1nA x 100 ohm = 100nv

We know that a transistor is working when vbe is higher than 0.7v

If I we have 1 GOhm instead. The capacitor will take a very long time to charge. But if this one is leaky at 1nA, 1nA x 1GOhm = 1v

1v is higher than .7, the transistor enter in conduction and can be detected by the uC.

Here 1nA is equal at a leakage resistor of 30GOhm

Charging LED:

This LED light-up when T1 base is detecting leakage. But pay attention, if you are using the device at sunlight or in a huge lightning area. It can happen that the LED grab the light and induce an electric current in the T3 transistor base. In this case the device display will go down at 99% without any capacitor under test connected. To know if you are using it with too much light, just cover the LED with your finger and watch if display return back to GOOD.

I tried to install Red diffuser LED instead of clear. This is help but issue could be still there. Just know it.

Another solution is to completely remove the LED and install a 1M resistor instead.

Fun fact, at the beginning I thought it was a noise problem because as soon I did turn off my magnifier lamp problem was disappearing. It was obvious that the ballast lamp was the problem isn't it ? Somehow the noise was entering in T1 base and with the huge gain, it was affecting the result. So I grab a piece of paper foil and warp the device. Problem was fixed. Until it wasn't anymore as soon the paper foil was too much open. It was weird, I could stop the noise with my hand. I was scratching my like crazy lol Only to realize that the issue was in fact the light itself entering in the LED.

ISP header:

The In Circuit Program connector is used to program the uC as well. But like I said before it is used to setup the battery voltage and to enter in configuration mode. The pin of this connector could be too long dependently if you are using the device as is or in the plastic or metal box.

IC1 Atmega48pb:

This uC is exactly the same as a 328pb. Less memory, cheaper. For now the code take 94% of all memory. It's begin to be a bit short. But the code is done and working well, all feature I wanted is implemented. I could always improve some part of it for more efficiency, if, in the future, we need some space. But for now I'm confident with my choice.


holder.png

This is the optional holder an cable holder.

How to Use It

-Turn on the device and adjust the voltage to match the tested capacitor.

Remember, at minimum voltage value. it's the battery voltage. If you are testing many 6.3v capacitor. It maybe a good idea to install 4xAA battery instead and put a jumper on the appropriate program header. (6v)

-Adjust the switch to set the charging value. 100k for the electrolytic capacitor, 100M for the ceramic and lower value. The 1Gohm can be use to charge at very very low value.

-Power on the device and look the charging LED. The capacitor is charging and the LED will turn off slowly as the capacitor is filling up (second stage of the amplifier). When the LED is off, it's not completely done. The capacitor is still charging. The last third stage is tracked by the uC. The bar graph on the LCD display will rise until the capacitor is fully charged. This is the last step.

0% bar graph mean 5v on the uC ADC input

50% is 2.5v

100% is 0v

In others words, It's 5v to 0v just at the end of the capacitor charging.

-Change the switch position to 1G to test if the capacitor is holding his charge. The graph bar will begin to re appears if the leakage is more than the charging current. Remember, charging current goes through R13-R14.

The exact value of the leakage is depending of the T1 resistor base to gnd (R13-R14.)

On test, 1GOhm resistor base: 35Gohm load = 98% on bar graph (25Gohm in series with 10Gohm)

with 10GOhm: 85Gohm load = 0% on graph bar and charging LED on.


I hope with this number and explanation you will understand more how this work and how sensitive it can be.


-For the diode, just choose the diode option. The DUT must be installed between the + and the GND. The testing current is 3mA. (30v/10k) Safe for most of the diode.


Feel free to comment and ask question.


Yannick