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

0 Members and 16 Guests are viewing this topic.

Offline hiei27

  • Contributor
  • Posts: 18
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #9875 on: January 03, 2025, 09:40:52 am »
so u suggest going with the mega2560 or there's something more complete?

EDIT: for more complete i mean something that has enough memory to support most of the functions and addons, like the zener diode tester
« Last Edit: January 03, 2025, 09:43:35 am by hiei27 »
 

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 211
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #9876 on: January 03, 2025, 10:00:04 am »
The top of the previous page shows my changes for checking zener diodes and quartz resonators and vacuum quartz. Read about the memory sizes of the Mega2560.
 

Offline hiei27

  • Contributor
  • Posts: 18
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #9877 on: January 03, 2025, 10:17:05 am »
that seems nice, do you have a complete building guide with the gerber or similar for the pcb design?
« Last Edit: January 03, 2025, 10:19:50 am by hiei27 »
 

Offline UltimateX

  • Contributor
  • Posts: 46
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #9878 on: January 03, 2025, 09:44:21 pm »
Thank you, Indman.  I will give the firmware you attached a try.    :-+  The original version is 1.07k.
« Last Edit: January 03, 2025, 09:46:06 pm by UltimateX »
 

Offline UltimateX

  • Contributor
  • Posts: 46
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #9879 on: January 03, 2025, 10:31:42 pm »
Hi Indman,

The firmware you attached seems to be compatible; however, my tester appears to be be having trouble completing the self test calibration mode.  The message "Not Calibrated" appears after attempting to calibrate the tester, plus it appears after measuring a component.  With test pin connections 1,2 and 3 shorted, the self test mode starts and then shows the sequence in the attached photos.  The display first shows an odd character then eventually gets stuck after the first stage, which is to measure the resistance between the pins.

I presume that I need to edit the Makefile that you included to fix these issues but would you have an suggestions for any of the changes I might make?

Thanks!


 

Offline hapless

  • Regular Contributor
  • *
  • Posts: 209
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9880 on: January 04, 2025, 12:16:31 am »
As silly as this question may sound, do you actually confirm "Selftest mode..?" by pressing the button or do you let it time out?
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1440
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9881 on: January 04, 2025, 06:30:02 am »
I presume that I need to edit the Makefile that you included to fix these issues but would you have an suggestions for any of the changes I might make?
You don't need to make any changes, I already wrote earlier that this firmware has been tested on clones just like yours!
First of all, you need to carefully read the documentation for this project in order to correctly calibrate and operate this device! So hapless is right when he asks you a simple question - do you quickly press the Test button when the question mark appears on the display?
 

Offline prashk20

  • Contributor
  • Posts: 11
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9882 on: January 05, 2025, 07:45:14 am »
Hello madires, indman, other members,

I am proposing addition of a Power Monitor hardware option that I have built to the main build. First of all thank you for maintaining the project and keeping such an active community around the project.

I had built a component tester and besides testing components, I also use it often to measure power consumption of devices running at different voltages. To do this, I had builtin a DCDC boost circuit on my tester. Recently, I added an INA226 module to my tester. INA226 is a popular and highly accurate shunt resistor based voltage (0-36V) and current measurement IC. It talks over I2C and, the option presented here, fully integrates with the Component Tester build on 328p. The Power Monitor menu item that I added displays 4 lines on the page - Battery Voltage, VOUT, IOUT and Power. The availability of this INA226 module seems good https://www.aliexpress.us/item/3256807703253714.html and it can easily be added to a tester using only 4 connections - SDA, SCL, 5V and GND. Power to Shunt and Load can be externally supplied.

Functionality of Power Monitor Menu Item -
  - Displays measured VOUT, IOUT and Power on lines 2, 3 and 4, respectively
  - Value units automatically switch between V/A/W and mV/mA/mW
  - Buzzer beeps if Power crosses a preset threshold. Single Test Button press
    will disable/enable the beeps
  - Displays Battery voltage on line 1
  - If TP_LOGIC ADC is defined and it measures a voltage then first line changes
    to Voltmeter until the voltage is present across Logic Probe resistors
  - Long press will zero out current IOUT value until device power-off
  - Displays negative current and power values as well. Voltage can only be positive

Memory consumption of Power Monitor Menu Item = 1936B Program + 4B Data

I have fast-forwarded my build over to 1.54m firmware. Attached are pictures of how the Power Monitor Menu looks at end of this post.

My build is here: https://github.com/pk17r/Ultimate_Tester/tree/prash/ComponentTester-1.54m/Files
I have added writeup to readme "INA226 Power Monitor (hardware option)" here https://github.com/pk17r/Ultimate_Tester/blob/bcab0b34073d7272fe1bae77c265b6b5dcac8bf3/ComponentTester-1.54m/Files/README#L2188
I am also showing a comparison of which files have been modified.

Differences of my build with 1.54m for Power Monitor Option are:
 - config.h: #define INA226_POWER_MONITOR   // to enable or disable the Power Monitor option
    - functions.h:  added 3 functions for INA226 and function for Power Monitor menu item
    - INA226.c:   the C file for INA226, a modified form of open source Arduino Library created by Rob Tillaart with license attached
    - Makefile:    add INA226.c to build objects
    - README:      add INA226 Power Monitor (hardware option) description
    - tools_misc.c:    add Power Monitor Menu Item Function
    - user.c:      add Power Monitor Menu Item
    - var_english.h:   add strings used by Power Monitor option
    - variables.h:     add strings used by Power Monitor option


Other differences v/s 1.54m on my build, not relating to Power Monitor option:

 - config.h: #define MAINMENU_AT_POWER_ON   // to go to Main menu at startup
    - main.c: skip to main menu at startup when MAINMENU_AT_POWER_ON option is enabled

 - config.h: #define SW_MENUITEM_TEST_COMPONENT     // to display a menu item "Test Component" at top of main menu, replaces "Exit" menu item at bottom of main menu
    - user.c: add SW_MENUITEM_TEST_COMPONENT menu item
    - main.c: add SW_MENUITEM_TEST_COMPONENT test component re-direct

- font_8x8_vf.h: add example of how to make number 2 and add external power symbol
- font_8x12t_win1251_vfp_h: correct example of how to make number 2 and add external power symbol
- font_8x16_vfp.h: add external power symbol

What do you think?

Thanks,
Prashant
« Last Edit: January 09, 2025, 06:37:23 pm by prashk20 »
 
The following users thanked this post: madires, indman

Offline indman

  • Super Contributor
  • ***
  • Posts: 1440
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9883 on: January 05, 2025, 08:28:21 am »
What do you think?
I think this will be a good and useful addition for version 1.55m madires! :)
 
The following users thanked this post: prashk20

Offline madires

  • Super Contributor
  • ***
  • Posts: 9113
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9884 on: January 05, 2025, 12:44:46 pm »
Nice! :-+ Looks like I have to get an INA226 module.
 
The following users thanked this post: prashk20

Offline prashk20

  • Contributor
  • Posts: 11
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9885 on: January 05, 2025, 07:10:00 pm »
Great!  :)

Thank you madires and indman!

I would love to see the Power Monitor function working at your end when you guys get yourself an INA226 module. I would love to see your suggestions or recommendations on the Power Monitor Menu as well. If you need anything from me, please feel free to let me know.

Thank you!

cheers!  :-+
Prashant
« Last Edit: January 06, 2025, 12:46:37 am by prashk20 »
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1440
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9886 on: January 06, 2025, 06:20:29 am »
Other differences v/s 1.54m on my build, not relating to Power Monitor option:
 - config.h: #define MAINMENU_AT_POWER_ON   // to go to Main menu at startup
 - main.c: skip to main menu at startup when MAINMENU_AT_POWER_ON option is enabled
Madires, is it possible to enter the main menu immediately when you first turn on the tester if you quickly press the Test button 2 times? Or will this disrupt the tester's operating mode? If this is possible, then the MAINMENU_AT_POWER_ON option will not be necessary.
« Last Edit: January 06, 2025, 06:23:13 am by indman »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 9113
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9887 on: January 06, 2025, 12:29:50 pm »
Should be possible with some addtional code. It would make sense to add that as an option.
 
The following users thanked this post: indman, prashk20

Offline prashk20

  • Contributor
  • Posts: 11
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9888 on: January 07, 2025, 02:22:04 am »
Hello Madires, Indman,

I had not posted about accuracy of the INA226 sensor. Let me share that here. I have 2 DMMs, as shown in pictures below. I used left one for current and right one for voltage. I had calibrated them once with a dependable source, left one's error is -0.6%, right one's is -0.1%. Let me treat the DMMs + known error as ground truth.

Test 1: Low Current: 2.4mA
            Measured        Ground Truth                       Error
Current     2.4mA          2.39+0.6%=2.40mA           0%
Voltage     5.17V           5.164+0.1%=5.17V            0%

Test 2: Medium Current: 209.3mA
            Measured        Ground Truth                       Error
Current     209.3mA     207.3+0.6%=208.5mA        +0.4%
Voltage     5.14V          5.135+0.1%=5.14V             0%

Test 3: High Current: 1.07A
            Measured        Ground Truth                       Error
Current     1.07mA        1.056+0.6%=1.06A            +0.9%
Voltage     4.95V           4.928+0.1%=4.93V            +0.4%

Test 4: Different Voltages
Measured        Ground Truth                       Error
3.93V            3.930+0.1%=3.93V              0%
9.05V            9.051+0.1%=9.02V             +0.3%
12.04V          12.022+0.1%=12.03V          +0.1%
15.15V          15.136+0.1%=15.15V          0%


So, yes it is highly accurate with less than 1% error in measurements.


I did modify my INA226 module, reducing it's default shunt from 100mOhm to 20mOhm. Thereafter used 4-point Kelvin Measurement and some empirical tests to find out a more accurate shunt resistance value that my board has. Even more after that I introduced another voltage scaling parameter - INA_226_BUS_V_MULTIPLIER_e4 and found out it's value. Let me see if I can reduce the calibration parameters and make the settings more user friendly. Since the default shunt on these modules is 100mOhm (which is not great!), it would make sense to have default values for 100mOhm shunt rather than 21mOhm, that I have put. It would also make sense to add more information on how to calibrate one's module, if one wants to make it more accurate. Let me work a bit on it.

Thanks,
Prashant
 
The following users thanked this post: indman

Offline prashk20

  • Contributor
  • Posts: 11
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9889 on: January 08, 2025, 06:42:51 am »
Hello Madires, Indman,

I have updated the above mentioned files and repository. A new much simpler and more accurate calibration process for INA226 is provided now. Default shunt is 100mOhm. config and calibration process:

#define INA226_POWER_MONITOR

#ifdef INA226_POWER_MONITOR
  #define INA226_I2C_ADDR                          0x40      /* 0x40 is address when A0=GND, A1=GND. For other address options, lookup "Table 6-2. Address Pins and Slave Addresses" in INA226 Datasheet  */
  #define INA226_R_SHUNT_MILLI_OHM                 100       /* Shunt Resistance in Milli Ohms, can be a float. Recommended shunt resistor resistance is of 20mOhms for 0-3A range, 10mOhms for 0-6A range, 2mOhms for 0-10A range  */
  #define INA226_CURRENT_LEAST_COUNT_MICRO_AMP     100       /* Least count is minimum resolution in measurement. Also decides Max_Measurable_Current = (32768 * INA226_CURRENT_LEAST_COUNT_MICRO_AMP / 1000000) Amps. Recommended value is 100, but increase this to get bigger range.  */
  #define INA226_I_OFFSET_MICRO_AMP                0         /* Offset current in microamps on shunt at no load that is added to measurement to make it zero. Can be negative */
  #define INA226_BUS_V_MULTIPLIER_e4               10000     /* Bus Voltage Manual Calibration Multiplier to increase accuracy in measurements. Only whole numbers accepted */
  #define INA226_P_THRESHOLD_mW_BUZZER             2500      /* Over-Power Alert Beeps: Sound buzzer if power goes over this threshold. HW_BUZZER needs to be enabled for this feature. Single Tap to disable/enable beeps. */
  #define I2C_RW                                             /* Requires I2C Read Support  */
  /* STEPS TO CALIBRATE INA226
   * 1. Set INA226_R_SHUNT_MILLI_OHM equal to shunt resistance in milli ohms. This is the shunt resistance between IN+ and IN- pins of INA226 in your setup.
   * 2. Set INA226_CURRENT_LEAST_COUNT_MICRO_AMP equal to your desired least count resolution for IOUT in micro amps. Expected values: 50, 100, 250, 500, 1000.
   * 3. Set INA226_I_OFFSET_MICRO_AMP = 0, INA226_BUS_V_MULTIPLIER_e4 = 10000.
   * 4. Build firmware and flash microcontroller (Your Component Tester).
   * 5. Attach a power supply with voltage 5-10V to INA226 on VBUS/IN+ and GND pins, without any load.
   * 6. Start Power Monitor. Long press Test Button and note ZERO IOUT value. Set INA226_I_OFFSET_MICRO_AMP = displayed ZERO IOUT value * 1000 (in micro amps). "ZERO IOUT -" means 0.
   * NOTE: Following adjustments shouldn't change values by more than 15-20%.
   * 7. Now measure VOUT using a reliable DMM. Set INA226_BUS_V_MULTIPLIER_e4 = 10000 / (Displayed VOUT on Power Monitor) * (DMM Measured VOUT). Can only be whole numbers.
   * 8. Now set DMM in current measurement mode. Use a resistor that will generate around 50-100mA IOUT measurement between IN- and GND pins with DMM in series with load. Note current measured on DMM.
   * 9. Update INA226_R_SHUNT_MILLI_OHM = INA226_R_SHUNT_MILLI_OHM * (Displayed IOUT on Power Monitor) / (DMM Measured IOUT), upto 2 decimal places.
   * 9. Set INA226_P_THRESHOLD_mW_BUZZER = Power threshold in milli Watt at which you want your Tester to sound Over-Power Alert Beeps.
   * 10. Build firmware and flash microcontroller. Your INA 226 is now calibrated. It should have less than 1% error in Current and Voltage measurements over a wide range like [5mA, 1A] and [5V, 20V].
   */
#endif

Process requires 2 times building and flashing the tester but this process is much more simpler and accurate. It is able to determine the mounted shunt resistance very accurately, leading to better accuracy. I have tested with 20mOhm and 100mOhm shunt resistances along with different current least count inputs. I look forward to when you get your INA226 and run the process.  :)
If you face any issues, please let me know.

Thanks,
Prashant
 

Offline UltimateX

  • Contributor
  • Posts: 46
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #9890 on: January 09, 2025, 03:29:04 am »
Okay, don't get excited!  I made a mistake as the 1.07k version automatically runs the self test with calibration and it states this neatly on one line, not across two lines.   I assumed the "_?" characters on the second line were spurious characters.  I did not know this was optional.  It is better to have the tester ask if the self test and calibration should be run as MOSFETs can be short across their three legs, which initiates the self test.  I would like to get this version of the firmware working and display formatted more like how it is shown on the 1.07k versio as it suits my purposes, plus I would like to have the self test question on one line.  I will see how I get on with this.  Thanks for you assistance. 
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 8396
  • Country: ro
Re: $20 LCR ESR Transistor checker project
« Reply #9891 on: January 19, 2025, 09:17:32 am »
Wanted to pick two BJT from a handful of jellybean PNPs, and noticed the values are inconsistent.
The version I have is this (probably LCR-T4):


Click to enlarge


Click to enlarge

Example of consecutive measurements (without removing the BJT form ZIF):
Code: [Select]
Beta  mV
436  630
433  632
432  631
434  630

another BJT
176  683
176  684
176  679
176  680

another BJT
480  626
478  626
476  626
474  631
and so on.  The battery is a rechargeable "9V" NiMH, the instrument itself sees it as 8.52-8.54V at each new measurement.

The contacts of the BJT inside the ZIF socket seem firm enough.  The inconsistent measured values happens even when the BJT is left inside the ZIF and measured repeatedly.  What bother me the most is the inconsistency of Vbe.

Is this "normal" for the version I have?
What to do to get better repeatability?

Offline Messtechniker

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: de
  • Old analog audio hand - No voodoo.
Re: $20 LCR ESR Transistor checker project
« Reply #9892 on: January 19, 2025, 09:43:42 am »
Note that you are using a tester and not a precision instrument. What you are seeing is probably a temperature dependence.
Agilent 34465A, Siglent SDG 2042X, Hameg HMO1022, R&S HMC 8043, Peaktech 2025A, Voltcraft VC 940, M-Audio Audiophile 192, R&S Psophometer UPGR, 3 Transistor Testers, DL4JAL Transistor Curve Tracer, UT622E LCR meter, UT216C AC/DC Clamp Meter
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 8396
  • Country: ro
Re: $20 LCR ESR Transistor checker project
« Reply #9893 on: January 19, 2025, 10:35:08 am »
The inconsistency is much larger if I wait for it to shut down, then measure again.
If I make many measurement without letting it to auto-off, the repeatability is OK.

It looks like it would do some sort of self-calibration at each power on, probably when it also measures its own battery.  :-//

Is that expected, to self-calibrate itself at each power-on?

Offline indman

  • Super Contributor
  • ***
  • Posts: 1440
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9894 on: January 19, 2025, 10:41:56 am »
Is that expected, to self-calibrate itself at each power-on?
No,that's not entirely true! As has been said many times in this topic, the stability of measurement results primarily depends on the stability of the +5V voltage that powers the microcontroller! The quality of Chinese components also plays a big role. So for now, don't expect much measurement stability from your tester.
« Last Edit: January 19, 2025, 11:39:34 am by indman »
 
The following users thanked this post: RoGeorge

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: mu
Re: $20 LCR ESR Transistor checker project
« Reply #9895 on: January 19, 2025, 10:58:37 am »
..Is this "normal" for the version I have?
What to do to get better repeatability?

The transistors have -2mV/C TC of Vbe, they heat up when in the socket (they are powered), or cool down with an air draft..
The voltage regulator there might have 300ppm/C (or more) easily..
The voltage of your battery fluctuates (thus the temperature and Vout of the 5V regulator)..
It also picks up EMI from the outside, as well us the mcus's ADC is 10bit only and usually noisy (like +/-2 LSB easily)..
Etc..
So taking that into account your measurements above are almost perfect..  :D

PS: for example at say 22C ambient the Vbe of a transistor could be say 550mV, when you keep the transistor in your fingers for couple of seconds (your fingertips are around 31C) you may get 532mV..
And in still air after insertion into the socket it will slowly rise (as its temperature goes down), and while in socket powered the Vbe wants to go down again as its junction heats up..
« Last Edit: January 19, 2025, 11:15:39 am by iMo »
Readers discretion is advised..
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 9113
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9896 on: January 19, 2025, 11:16:29 am »
It looks like it would do some sort of self-calibration at each power on, probably when it also measures its own battery.  :-//

Your T4 has a TL431 which is used to figure out the voltage of the 5V rail. This also impacts the voltage measurement of the internal bandgap reference. Both self-adjustments are repeated for each probing cycle. With a cheap 5V regulator and a TL431 as 2.5V reference you can't expect much. BTW, all this is explained in the OSHW documentation.
 
The following users thanked this post: RoGeorge

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 8396
  • Country: ro
Re: $20 LCR ESR Transistor checker project
« Reply #9897 on: January 19, 2025, 11:25:08 am »
Mine seems identical with this one here:
https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/msg709934/#msg709934

I've just looked on the PCB, it has a TL431, but never dug the details before.  To my surprise, I see now that the TL431 is not used as a Vref, but tied to another pin.  ???



Looks like a strange design choice.  Why using the 78L05 Vcc as Vref, then comparing the ADC count against a TL431?  Why not using TL431 directly, to generate a 5V ADC Vref?  What am I missing?
« Last Edit: January 19, 2025, 11:28:14 am by RoGeorge »
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1440
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9898 on: January 19, 2025, 11:36:11 am »
Why using the 78L05 Vcc as Vref, then comparing the ADC count against a TL431?
Because 78L05 is usually a low quality stabilizer. Install a high quality stabilizer instead and the need to use an external Vref will disappear completely! ;)
 
The following users thanked this post: RoGeorge

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 8396
  • Country: ro
Re: $20 LCR ESR Transistor checker project
« Reply #9899 on: January 19, 2025, 11:44:15 am »
BTW, all this is explained in the OSHW documentation.

Searched for 10 minutes and couldn't figure out which one do you refer to.  In which place are the docs please, or what term to search for?


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf