Author Topic: $20 LCR ESR Transistor checker project  (Read 3452043 times)

jellytot and 13 Guests are viewing this topic.

Offline madires

  • Super Contributor
  • ***
  • Posts: 7769
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1825 on: February 28, 2016, 03:38:34 pm »
Karl-Heinz made a new build of the k firmware (656) that support 2 decimal places for the hFE!!!
I tested some optocouplers with great and consistent results.

The results look promising. Have you cross-checked some CTRs by a manual measurement, i.e. lab PSU (5V), series resistor for the LED (around 5mA, 750 Ohms) and a DMM? The hFE measument for the common emitter circuit is done using the 470k resistor as base (opto coupler:LED) resistor. Those few µA are too low for driving the LED. So the hFE measurement for the common collector circuit (emitter follower) using the 680 Ohms base resistor delivers the value. But the emitter resistor is also a 680 Ohms one, which brings the LED's drive current down to about 2.8mA (LED's cathods and BJT's emitter are connected). Hmm, the datasheets of opto couplers depict common emitter test circuits. Just trying to figure out the best way to measure the CTR.
 

Offline mauroh

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: it
    • Mauro Pintus
Re: $20 LCR ESR Transistor checker project
« Reply #1826 on: March 01, 2016, 11:46:15 am »
I'll try to make few tests an let you know.
For the moment I think it is great even though it under estimate the values of devices with large CTR.

I don't want change topic, but in this days I made several tests with supercapacitors (350F) and studied the documentation of the k-firmware:
As stated several times without external hardware we are out of luck to measure the capacitance of that beasts, but since the actual transistor tester identify the supercapacitors as a low resistance, the ESR measurement routine is used to get the measurement (that has a better resolution).
This means that for supercapacitors the actual transistor tester measure just the ESR (displaying -RR-LL-) without even considering to measure the capacitance.
This is great and already helped me out to test some leaking supercapacitors inside a complex electrical mechanical device (not easy to take apart and too much effort just to check the supercaps  :phew:)

Do you know which is the best way to report firmware bugs? I think i'll have to use my few German words  :scared:

Small bug:
In the "switch(temp1) {" inside the lcd-routines.c the following line were missing causing a corruption in the UART output.

    case LCD_CHAR_INDUCTOR1:
    case LCD_CHAR_INDUCTOR2:
       uart_putc('L');
       break;

Mauro

Offline madires

  • Super Contributor
  • ***
  • Posts: 7769
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1827 on: March 01, 2016, 12:50:19 pm »
Do you know which is the best way to report firmware bugs? I think i'll have to use my few German words  :scared:

I'll forward your bug report to Karl-Heinz.
 

Offline mauroh

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: it
    • Mauro Pintus
Re: $20 LCR ESR Transistor checker project
« Reply #1828 on: March 01, 2016, 01:41:24 pm »
Vielen dank  :-+
Mauro

Offline madires

  • Super Contributor
  • ***
  • Posts: 7769
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1829 on: March 02, 2016, 03:26:27 pm »
Some update on the opto coupler check for the m-firmware. It's going to be a tool in main menu because I think a dedicated measurement provides more accurate results. It also allows to tell a BJT or Triac type apart. And adding support for other types might be also possible. The CTR measurement using the I/O pin overloading seems to work fine. For several standard opto couplers with BJT output I get reasonable values matching manual measurements. For example the BJT's hFE measurement shows 1 while the CTR is 260% (PC817). I've also tested Darlington opto couplers (4N32) with success. The hFE is 9 while the CTR is 2070% (I/O pin current is 71mA!). The way the CTR is measured decreases the LED's I_f with an increasing I_e, which provides us with a larger headroom for the maximal possible CTR. For the Darlington type above I_f decreases from 5mA to about 3.5mA. Let's see what the outcome of Mauro's manual measurements is going to be. I'm curious about that. And I have to get some MOCs.
« Last Edit: March 02, 2016, 03:31:52 pm by madires »
 

Offline aknaydenov

  • Newbie
  • Posts: 5
  • Country: bg
Re: $20 LCR ESR Transistor checker project
« Reply #1830 on: March 03, 2016, 08:44:46 am »
Hello people,

I stupidly killed my MEGA 328P ESR meter I gout from ebay, by forgetting to discharge a capacitor before measuring it. Do you have any idea if I can get somewhere spare programmed ICs? Or the code? If I manage to get a colleague to program it for me?

Thanks and best regards,
Alexander
Single ended tube amplifier admirer & builder
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7769
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1831 on: March 03, 2016, 10:34:23 am »
I stupidly killed my MEGA 328P ESR meter I gout from ebay, by forgetting to discharge a capacitor before measuring it. Do you have any idea if I can get somewhere spare programmed ICs? Or the code? If I manage to get a colleague to program it for me?

For the ATmega 328P you could go to the next best electronics shop and for the firmware please see https://github.com/svn2github/transistortester/tree/master/Software and choose trunk (k-firmware) or Markus (m-firmware), whichever you prefer.
 

Offline aknaydenov

  • Newbie
  • Posts: 5
  • Country: bg
Re: $20 LCR ESR Transistor checker project
« Reply #1832 on: March 04, 2016, 05:57:30 pm »
Thank you for the quick reply! I will read a bit and learn how to do the programming.
Single ended tube amplifier admirer & builder
 

Offline micro88

  • Contributor
  • Posts: 16
Re: $20 LCR ESR Transistor checker project
« Reply #1833 on: March 05, 2016, 03:43:06 am »
@aknaydenov,

Here you will find an excellent video regarding editing and compiling of firmware. Look into the HELP folder.
Also a lot of precompiled firmware for many of the models available on ebay etc.

https://yadi.sk/d/yW8xa5NJgUo5z

You may put here the ebay link from where you purchased it so that people can help you identify the correct firmware.

These guys at eevblog are really helpful. I wish them all good.

Cheers.
« Last Edit: March 05, 2016, 03:57:34 am by micro88 »
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: $20 LCR ESR Transistor checker project
« Reply #1834 on: March 05, 2016, 02:14:00 pm »
micro88, thanks for the reference. However, I'm wary of downloading from miscellaneous locations, especially file sharing sites.

This repository is well organized and the inclusion of photos for model identification is a nice touch. Can anyone else vouch for this collection?
TEA is the way. | TEA Time channel
 

Offline micro88

  • Contributor
  • Posts: 16
Re: $20 LCR ESR Transistor checker project
« Reply #1835 on: March 05, 2016, 02:42:14 pm »
I had dropped and damaged my MK-328 tester . I used the firmware files from this repository to retrieve it successfully.
Have not tried the other models since I don't have those .
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #1836 on: March 05, 2016, 03:08:55 pm »
Can anyone else vouch for this collection?
This storage was created by me and am responsible for his contents. You have to me questions? :)
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: $20 LCR ESR Transistor checker project
« Reply #1837 on: March 05, 2016, 04:14:56 pm »
Thanks indman. No questions at this time. I hadn't seen this source before, so I was being cautious. As I mentioned, it's nicely organized and the photos are helpful for identifying the various models.
TEA is the way. | TEA Time channel
 

Offline luma

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1838 on: March 06, 2016, 07:30:41 pm »
@aknaydenov,

Here you will find an excellent video regarding editing and compiling of firmware. Look into the HELP folder.
Also a lot of precompiled firmware for many of the models available on ebay etc.

https://yadi.sk/d/yW8xa5NJgUo5z
What a great resource!  I'm waiting for the shipment of what appears to be the "M328Kit" variant and this should be helpful in getting the latest firmware setup.   I might have missed something (I often do), but I had to navigate through each of the model's folders to find photos in order to identify which board I'm using.  If I might make a suggestion - a main-page picture of the various boards might be helpful to visually identify which variant we're dealing with.

Thanks for putting this together and sharing it here.
« Last Edit: March 06, 2016, 08:43:41 pm by luma »
 

Offline luma

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1839 on: March 06, 2016, 08:47:00 pm »
Now that I'm re-reading things, I'm not 100% sure I've identified the correct variant.  I ordered this thing, which is sold as the M12864.  I've seen mention of it elsewhere in this thread.  Where would I find the firmware for this specific unit?
 

Offline i_cant_read

  • Newbie
  • Posts: 4
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #1840 on: March 06, 2016, 10:50:34 pm »
Hey folks,

I got that DIY M12864 kit from Banggood(http://www.banggood.com/DIY-M12864-Graphics-Version-Transistor-Tester-Kit-LCR-ESR-PWM-p-986954.html)
As pretty much all Testers came it with an old firmware. I am a completly beginner when it comes to µC so please dont expect me to know everything already^^
I am having difficulties with updating the firmware. I think i read somewhere that folder called mega328_st7565_kit is the right one. I am using a USBtiny as a programmer.
So i opend up cmd and gave it the direction where i saved the .hex and .eep then i typed in:
avrdude -c usbtiny -p atmega328p -U flash:w:TransistorTester.hex \ -U eeprom:w:TransistorTester.eep
it did everything without an error but when i put the µC back into the socket, give it power and pressing the encoder the display lights up but it only shows that big black square(every pixel lights up).
so what did i do wrong or forgot to do? hope you guys can help me^^

EDIT: I might have found what i forgot, when putting the µC on breadboard, it needs a external 8MHz crystal right?^^ dang it, totally forgot that, or isnt that the problem?
« Last Edit: March 06, 2016, 10:58:20 pm by i_cant_read »
 

Offline demetris

  • Newbie
  • Posts: 4
  • Country: cy
Re: $20 LCR ESR Transistor checker project
« Reply #1841 on: March 06, 2016, 10:56:33 pm »
Maybe you should check the fuses too
 

Offline mauroh

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: it
    • Mauro Pintus
Re: $20 LCR ESR Transistor checker project
« Reply #1842 on: March 06, 2016, 11:08:35 pm »
Let's see what the outcome of Mauro's manual measurements is going to be. I'm curious about that. And I have to get some MOCs.

Hi Markus, I think i'm missing something...
I made few measurement, but first of all I think I need to understand which is the setup that will give us the most useful results.

I verified with LTSpice which is the configuration to perform the manual measurements emulating the M12864 (see attachment) but even though for simple optocouplers like PC123, 4N35 or L817, as expected I manual measured a CTR really close to the one measured by my M12864 Kit, I don't know how the M12864 is measuring the darlington. Where are coming from the 71mA you are mentioning??

BTW this are the measurement so far:

Model     If                     Ic                     CTR                   hFE M12864
PC123   0.005702985   0.006419403   112.5621565   0.92
PC123   0.005704478   0.005997015   105.1282051   0.69
PC123   0.005702985   0.006285075   110.2067522   0.78
PC123   0.005702985   0.006316418   110.7563465   0.95
PC123   0.005704478   0.006316418   110.7273679   0.83
4N35    0.005704478   0.00571791     100.2354788   0.75
4N35    0.005698507   0.005491045   96.35935045   0.68
4N35    0.0057             0.005908955   103.6658811   0.83
4N35    0.005704478   0.00569403     99.81684982   0.75
4N35    0.005704478   0.005459701   95.70905285   0.65
L817B   0.005689552   0.006843284   120.2780693   1.33
L817B   0.005704478   0.006934328   121.559393     1.31
L817B   0.005685075   0.007050746   124.022053     1.25
L817B   0.005698507   0.006953731   122.0272394    1.25
L817B   0.00568806     0.007010448    123.2484912   1.11

Mauro

Offline mauroh

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: it
    • Mauro Pintus
Re: $20 LCR ESR Transistor checker project
« Reply #1843 on: March 06, 2016, 11:29:37 pm »
avrdude -c usbtiny -p atmega328p -U flash:w:TransistorTester.hex \ -U eeprom:w:TransistorTester.eep

You can choose one of the following firmware variants:

m-firmware (it need to be compiled but worth it)
https://www.mikrocontroller.net/svnbrowser/transistortester/Software/Markus/

k-firmware (already compiled even though to enable specific options you will have to rebuild it anyway)
https://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/


The complete string to program also the fuses should be:

avrdude -c usbtiny -p m328p -B 0.5 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

Mauro
« Last Edit: March 06, 2016, 11:32:22 pm by mauroh »
 

Offline i_cant_read

  • Newbie
  • Posts: 4
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #1844 on: March 06, 2016, 11:42:32 pm »
avrdude -c usbtiny -p atmega328p -U flash:w:TransistorTester.hex \ -U eeprom:w:TransistorTester.eep

avrdude -c usbtiny -p m328p -B 0.5 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

Mauro

Hi thank you for the string^^
When i try using it tho, this message shows up:
 initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

i didnt connected a external crystal so is that why this message pops up? dont have the capacitors on hand for it and its too late to desolder the 2 from the board, so going to do that tomorrow
just wanted to know if thats the error^^
 

Offline GBowes

  • Contributor
  • Posts: 33
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1845 on: March 07, 2016, 02:27:27 am »
Yes, if the fuses are set for an external crystal as they probably are if you have a crystal in your tester, you will also need a crystal and 22pF capacitors to program it on a bread board.
Graham


i didnt connected a external crystal so is that why this message pops up? dont have the capacitors on hand for it and its too late to desolder the 2 from the board, so going to do that tomorrow
just wanted to know if thats the error^^
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #1846 on: March 07, 2016, 09:51:43 am »
If I might make a suggestion - a main-page picture of the various boards might be helpful to visually identify which variant we're dealing with.
Hi! I have already realized your offer. You can look at result. Thanks! :)
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7769
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1847 on: March 07, 2016, 11:18:26 am »
Hi Markus, I think i'm missing something...
I made few measurement, but first of all I think I need to understand which is the setup that will give us the most useful results.

I verified with LTSpice which is the configuration to perform the manual measurements emulating the M12864 (see attachment) but even though for simple optocouplers like PC123, 4N35 or L817, as expected I manual measured a CTR really close to the one measured by my M12864 Kit, I don't know how the M12864 is measuring the darlington. Where are coming from the 71mA you are mentioning??

Thanks for the measurements, Mauro! The common collector based hFE measurement is your circuit diagram with R1 = 680,  R2 = 0 and R3 = 680. If I_b is very low (assuming a Darlington) R1 is changed to 470k, which won't light the LED obviously. The issue with that test circuit is that the LED's current is limited by two times 680 Ohms and I_e causes a voltage drop across R3 too. So the LED's current will decrease even more, resulting in a quite low current. Most opto couplers got their optimal CTR around 5mA I_f. That explains why the hFE values are mostly lower than your measured CTR values. But they give a usable indication.

A Darlington output stage makes the mismatch worse, because the output current is limited by R3 (I = 5V / 680 Ohms =  7mA). For a high CTR the tester can't get proper values. When removing R3 and just using the MCU's internal pin driver resistance (20 Ohms) things become better but the pin will be overloaded. The example with 71mA is an opto coupler with a CTR of around 2000% at an I_f of about 3.5mA (3.5mA * 20 = 70mA).
 

Offline mauroh

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: it
    • Mauro Pintus
Re: $20 LCR ESR Transistor checker project
« Reply #1848 on: March 07, 2016, 04:02:47 pm »
The common collector based hFE measurement is your circuit diagram with R1 = 680,  R2 = 0 and R3 = 680.

Do you mean that the firmware is using PC2 as output for the collector current?
PB0 for the Led current trough R1 680 and you are reading the voltage on PC1 to calculate the current on the emitter?
The difference between If and Ie will give us Ic to calculate the CTR...

As you can see on my LTSpice diagram I was considering only the PBx as possible outputs...

If I_b is very low (assuming a Darlington) R1 is changed to 470k, which won't light the LED obviously. The issue with that test circuit is that the LED's current is limited by two times 680 Ohms and I_e causes a voltage drop across R3 too. So the LED's current will decrease even more, resulting in a quite low current. Most opto couplers got their optimal CTR around 5mA I_f. That explains why the hFE values are mostly lower than your measured CTR values. But they give a usable indication.

Yes, this is also my assumption on the measurements.

A Darlington output stage makes the mismatch worse, because the output current is limited by R3 (I = 5V / 680 Ohms =  7mA). For a high CTR the tester can't get proper values. When removing R3 and just using the MCU's internal pin driver resistance (20 Ohms) things become better but the pin will be overloaded. The example with 71mA is an opto coupler with a CTR of around 2000% at an I_f of about 3.5mA (3.5mA * 20 = 70mA).

Again I think this is what I'm missing:
Do you mean that the firmware is using PC2 as output for the collector current or we need to remove R3 on my diagram that means R5 on the M12864 schematic??

Mauro
« Last Edit: March 07, 2016, 04:32:41 pm by mauroh »
 

Offline i_cant_read

  • Newbie
  • Posts: 4
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #1849 on: March 07, 2016, 05:12:53 pm »
avrdude -c usbtiny -p atmega328p -U flash:w:TransistorTester.hex \ -U eeprom:w:TransistorTester.eep

avrdude -c usbtiny -p m328p -B 0.5 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

Mauro

hi its me again, i now installed a 8MHz crystal+22pF capacitors when programming, but it still shows the same error message as before when i try your code :/

EDIT: alright its working now :) was probably a loose connection or something because after i rewired everything it worked. the ttester is working now~ thank you very much for your help :D
« Last Edit: March 07, 2016, 06:05:39 pm by i_cant_read »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf