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

Feliciano and 10 Guests are viewing this topic.

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6875 on: April 23, 2021, 10:04:18 am »
Adding short test leads works fine. And don't forget to rerun the self-adjustment. If you go for a detachable solution you can make use of the two adjustment profiles of the m-firmware.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6876 on: April 23, 2021, 10:37:51 am »
So far I've received two reports of too high ESR values. One clone with an ATmega328 and another one modified with an ATmega644. The user with the ATmega644 has two of the exact same 644s and tried the second 644 in another tester resulting also in too high ESR values. A friend of that user has the same clone with the same modifications while the ESR values are reasonable. So we checked a few things and concluded that it's not some compiler optimization issue. The problem could be related to specific ATmega chips.
 

Offline Peeps

  • Contributor
  • Posts: 48
Re: $20 LCR ESR Transistor checker project
« Reply #6877 on: April 30, 2021, 03:46:18 am »
I noticed in 1.40m and also 1.43m that when testing p-channel mosfets, the text which shows 123=GDS is correct, but the numbers on the drain and source symbol are swapped:

 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6878 on: April 30, 2021, 11:50:39 am »
I noticed in 1.40m and also 1.43m that when testing p-channel mosfets, the text which shows 123=GDS is correct, but the numbers on the drain and source symbol are swapped:

Thanks for reporting! Actually, the symbols for p-channel MOSFETs are wrong in the 24x24 symbol bitmaps because the source is supposed to be at the top. I'll update the symbols.
« Last Edit: April 30, 2021, 11:52:37 am by madires »
 
The following users thanked this post: Peeps

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: $20 LCR ESR Transistor checker project
« Reply #6879 on: April 30, 2021, 01:15:37 pm »
I noticed in 1.40m and also 1.43m that when testing p-channel mosfets, the text which shows 123=GDS is correct, but the numbers on the drain and source symbol are swapped:

What firmware do you use for the MK328?

Alexander.
Become a realist, stay a dreamer.

 

Offline Peeps

  • Contributor
  • Posts: 48
Re: $20 LCR ESR Transistor checker project
« Reply #6880 on: May 02, 2021, 12:30:38 am »
I noticed in 1.40m and also 1.43m that when testing p-channel mosfets, the text which shows 123=GDS is correct, but the numbers on the drain and source symbol are swapped:

What firmware do you use for the MK328?

Alexander.

1.43m currently. It works with minimal changes to the config, but I did disable LCD_OFFSET_X and LCD_FLIP_Y in config_328.h (display is default ST7565R) to make the display work correctly.
 
The following users thanked this post: firewalker

Offline Obelix2007

  • Regular Contributor
  • *
  • Posts: 59
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #6881 on: May 04, 2021, 11:13:46 pm »
...Comments are welcome ...

Hello Yuriy,

... your Color-Testversion looks very nice, bat at my TTester GM328A I have to change some items in the Makefile befor I can test it.

For that I need the changed source-files from you so I can compile it again.

Many thanks and best regards

Horst
« Last Edit: May 04, 2021, 11:15:18 pm by Obelix2007 »
 

Offline horo

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
    • My GitHub Projects
Re: $20 LCR ESR Transistor checker project
« Reply #6882 on: May 07, 2021, 03:07:27 pm »
In addition to what I wrote, using this version of AVR-GNUToolchain 3.4.4.24 allows you to get the most compact size of the firmware, which is especially important for the small amount of memory in ATMega328.  ;)

I did a short test on my Debian system for the standard 1.43m source with two gcc versions 5.4.0 (standard Debian stable package 1:5.4.0+Atmel3.6.1-2) and 7.3.0 (provided by Arduino IDE 1.8.13) and the compiler setting "-flto", the winner is:

gcc 7.3.0 with option -flto

AVR Memory Usage
----------------
Device: atmega328
Program:   26254 bytes (80.1% Full)
(.text + .data + .bootloader)
Data:        224 bytes (10.9% Full)
(.data + .bss + .noinit)
EEPROM:      749 bytes (73.1% Full)
(.eeprom)


followed by:

gcc 5.4.0 with option -flto

AVR Memory Usage
----------------
Device: atmega328

Program:   26652 bytes (81.3% Full)
(.text + .data + .bootloader)

Data:        224 bytes (10.9% Full)
(.data + .bss + .noinit)
EEPROM:      749 bytes (73.1% Full)
(.eeprom)


gcc 7.3.0

AVR Memory Usage
----------------
Device: atmega328
Program:   26830 bytes (81.9% Full)
(.text + .data + .bootloader)
Data:        226 bytes (11.0% Full)
(.data + .bss + .noinit)
EEPROM:      749 bytes (73.1% Full)
(.eeprom)


gcc 5.4.0

AVR Memory Usage
----------------
Device: atmega328
Program:   27068 bytes (82.6% Full)
(.text + .data + .bootloader)
Data:        226 bytes (11.0% Full)
(.data + .bss + .noinit)
EEPROM:      749 bytes (73.1% Full)
(.eeprom)


All other CFLAGS (except -flto) are unchanged from the source of 1.43m:

Code: [Select]
CFLAGS = -mmcu=${MCU} -Wall -I. -Ibitmaps
CFLAGS += -DF_CPU=${FREQ}000000UL
CFLAGS += -DOSC_STARTUP=${OSC_STARTUP}
CFLAGS += -gdwarf-2 -std=gnu99 -Os -mcall-prologues
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -flto
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

Earlier versions than atmel 3.6.1 of the toolchain (from Atmel website) did not work under Debian stable, but at least the newer version gives smaller code, so let's hope for the future.

Nevertheless it would be interesting to see the corresponding Windows build sizes.
« Last Edit: May 07, 2021, 03:12:35 pm by horo »
 

Offline horo

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
    • My GitHub Projects
Re: $20 LCR ESR Transistor checker project
« Reply #6883 on: May 07, 2021, 04:00:03 pm »
I have one finding with version 1.43m: when I measure two antiparallel diodes, e.g.:

1 --->|--- 2 (red)
1 ---|<--- 2 (infrared)

the component tester (AY-AT) shows:
2  ---|<--- 1 --->|--- 2
vf 1900mV 1100 mV


so the left diode is the red one and the right diode is the IR one, but the picture shows parallel diodes.

Shouldn't the picture look like below?
2  ---|<--- 1 ---|<--- 2
 

Offline Obelix2007

  • Regular Contributor
  • *
  • Posts: 59
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #6884 on: May 07, 2021, 04:21:44 pm »
Nevertheless it would be interesting to see the corresponding Windows build sizes.

... this are the result in WIN7:

C:\WinAVR-20100110\bin>avr-gcc --version
avr-gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

----------------
Device: atmega328 with option -flto

Program:   26254 bytes (80.1% Full)
(.text + .data + .bootloader)

Data:        224 bytes (10.9% Full)
(.data + .bss + .noinit)

EEPROM:      749 bytes (73.1% Full)
(.eeprom)



> Prozess beendet. Code:0
> Dauer:00:05

----------------
Device: atmega328 without option -flto

Program:   26830 bytes (81.9% Full)
(.text + .data + .bootloader)

Data:        226 bytes (11.0% Full)
(.data + .bss + .noinit)

EEPROM:      749 bytes (73.1% Full)
(.eeprom)



> Prozess beendet. Code:0
> Dauer:00:04

Best Regards
Horst
 

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 136
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #6885 on: May 07, 2021, 05:11:15 pm »
I have one finding with version 1.43m: when I measure two antiparallel diodes, e.g.:

1 --->|--- 2 (red)
1 ---|<--- 2 (infrared)

Shouldn't the picture look like below?
2  ---|<--- 1 ---|<--- 2

You are right, an analogous error on the zener diode ...
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6886 on: May 07, 2021, 05:18:25 pm »
Shouldn't the picture look like below?
2  ---|<--- 1 ---|<--- 2

Yep! I'll look into that issue. Thanks for reporting!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6887 on: May 07, 2021, 06:05:24 pm »
Shouldn't the picture look like below?
2  ---|<--- 1 ---|<--- 2

In main.c in function Show_Diode() look for:
Code: [Select]
    if (A <= 3)          /* common anode or in-series */
    {
      Display_EEString(Diode_AC_str);   /* show ->|- */
    }
    else                 /* common cathode */
    {
      Display_EEString(Diode_CA_str);   /* show -|<- */
    }

Remove the lines above and change the next few to:
Code: [Select]
  if (D2)           /* second diode */
  {
    if (A == C)          /* anti-parallel */
    {
      n = D2->A;                        /* get anode */
      Display_EEString(Diode_CA_str);   /* show -|<- */
    }
    else if (A <= 3)     /* common anode or in-series */
    {
      n = D2->C;                        /* get cathode */
      Display_EEString(Diode_AC_str);   /* show ->|- */
    }
    else                 /* common cathode */
    {
      n = D2->A;                        /* get anode */
      Display_EEString(Diode_CA_str);   /* show -|<- */
    }

    ...
 
The following users thanked this post: indman, Obelix2007, horo, Fuzzy Star, Yuriy_K

Offline horo

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
    • My GitHub Projects
Re: $20 LCR ESR Transistor checker project
« Reply #6888 on: May 08, 2021, 09:49:11 am »
thx Markus, it works.
You can also remove the following redundant section where you set only n=... without Display_EE...

so the final diff to the orig 1.43m is:

Code: [Select]
--- main.c.orig 2021-03-08 19:54:05.000000000 +0100
+++ main.c 2021-05-08 11:02:36.838944180 +0200
@@ -910,26 +910,20 @@
 
   if (D2)           /* second diode */
   {
-    if (A <= 3)          /* common anode or in-series */
-    {
-      Display_EEString(Diode_AC_str);   /* show ->|- */
-    }
-    else                 /* common cathode */
-    {
-      Display_EEString(Diode_CA_str);   /* show -|<- */
-    }
-
     if (A == C)          /* anti parallel */
     {
       n = D2->A;              /* get anode */
+      Display_EEString(Diode_CA_str);   /* show -|<- */
     }
     else if (A <= 3)     /* common anode or in-series */
     {
       n = D2->C;              /* get cathode */
+      Display_EEString(Diode_AC_str);   /* show ->|- */
     }
     else                 /* common cathode */
     {
       n = D2->A;              /* get anode */
+      Display_EEString(Diode_CA_str);   /* show -|<- */
     }
 
     Display_ProbeNumber(n);             /* display pin */

@Markus: did you consider to move also your source code development into github - beside your Warehouse? This would it make easier for contributors to follow the development between version releases?
I made good experience - I develop most of my bigger personal projects in a local git repo and push it occasionally into github - either private or public.
« Last Edit: May 08, 2021, 11:55:08 am by horo »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6889 on: May 08, 2021, 11:08:42 am »
@Markus: did you consider to move also your source code development into github - beside your Warehouse? This would it make easier for contributors to follow the development between version releases?

Maybe some day in the future, but not at the moment.
 

Offline horo

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
    • My GitHub Projects
Re: $20 LCR ESR Transistor checker project
« Reply #6890 on: May 09, 2021, 06:33:14 pm »
@Markus: did you consider to move also your source code development into github - beside your Warehouse? This would it make easier for contributors to follow the development between version releases?

Maybe some day in the future, but not at the moment.

I hacked a github repo that mirrors all your releases from 0.99m up to 1.43m (+ your double diode fix) stacked as tagged commits.
No, i did not do it all by hand, bash was my friend :)

https://github.com/Ho-Ro/ComponentTester
 
The following users thanked this post: madires, de_light

Offline Szybkijanek

  • Contributor
  • Posts: 41
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #6891 on: May 14, 2021, 05:09:50 pm »
My today fast modification: M644 Hiland and color LCD ST7735 1.8" with firmware 1.43m
1219212-0" alt="" class="bbc_img" />
But when want going to menu via rotary encoder i have white LCD. Any sugestions?
« Last Edit: May 14, 2021, 05:26:41 pm by Szybkijanek »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6892 on: May 14, 2021, 07:24:42 pm »
Possibly one of the rotary encoder's switches is in parallel with SDA (LCD's serial data input) and when open (pulled up) the LCD sees only 1s for whatever reason. Usually the rotary encoder has in-series resistors and the ATmega prevails when driving the LCD. How did you wire the ST7735 display?
 

Offline Szybkijanek

  • Contributor
  • Posts: 41
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #6893 on: May 15, 2021, 07:32:19 pm »
ST7735 is wired like ST7565R with bitbang SPI and same CS is connected to GND (naturally i defined pins) and then i have photo from previous post with firmware versions and white LCD when want going to menu and when i plug it in CS to defined pin and physically to AtMega i have only white LCD.
My config:
Code: [Select]
/*
 *  ST7565R
 *  - SPI interface using hardware SPI
 *  - settings for Electronic Assembly EA DOGM/DOGL128-6
 */

#if 0
#define LCD_ST7565R                     /* display controller ST7565R */
#define LCD_GRAPHIC                     /* graphic display */
#define LCD_SPI                         /* SPI interface */
/* control and data lines */
#define LCD_PORT         PORTB          /* port data register */
#define LCD_DDR          DDRB           /* port data direction register */
#define LCD_RESET        PB4            /* port pin used for /RES (optional) */
//#define LCD_CS           PB2            /* port pin used for /CS1 (optional) */
#define LCD_A0           PB5            /* port pin used for A0 */
#define LCD_SCL          PB6            /* port pin used for SCL */
#define LCD_SI           PB7            /* port pin used for SI (data input) */
/* display settings */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_OFFSET_X                    /* enable x offset of 4 dots */
//#define LCD_FLIP_X                      /* enable horizontal flip */
#define LCD_FLIP_Y                      /* enable vertical flip */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     3             /* default contrast (0-63) */
/* font and symbols: vertically aligned & flipped, bank-wise grouping */
//#define FONT_6X8_VF                      /* 6x8 font */
//#define FONT_8X8_VF                     /* 8x8 font */
//#define FONT_8X16_VFP                   /* 8x16 font */
//#define FONT_6X8_ISO8859_2_VF           /* 6x8 Central European font */
#define FONT_8X8_ISO8859_2_VF           /* 8x8 Central European font */
//#define FONT_8X12T_ISO8859_2_VFP        /* thin 8x12 Central European font */
//#define FONT_8X16_ISO8859_2_VFP         /* 8x16 Central European font */
//#define FONT_8X8_WIN1251_VF             /* 8x8 cyrillic font */
//#define FONT_8X8ALT_WIN1251_VF          /* 8x8 alternative cyrillic font */
//#define FONT_8X8T_WIN1251_VF            /* thin 8x8 cyrillic font */
//#define FONT_8X12T_WIN1251_VFP          /* thin 9x12 cyrillic font */
//#define FONT_8X16_WIN1251_VFP           /* 8x16 cyrillic font */
#define SYMBOLS_24X24_VFP               /* 24x24 symbols */
/* SPI bus */
//#define SPI_HARDWARE                    /* hardware SPI */
#define SPI_BITBANG                     /* bit-bang SPI */
#define SPI_PORT         LCD_PORT       /* SPI port data register */
#define SPI_DDR          LCD_DDR        /* SPI port data direction register */
#define SPI_SCK          LCD_SCL        /* port pin used for SCK */
#define SPI_MOSI         LCD_SI         /* port pin used for MOSI */
#endif



/*
 *  ST7735
 *  - 4 wire SPI interface using hardware SPI
 */

//#if 0
#define LCD_ST7735                      /* display controller ST7735 */
#define LCD_GRAPHIC                     /* graphic display */
#define LCD_COLOR                       /* color display */
#define LCD_SPI                         /* SPI interface */
/* control and data lines */
#define LCD_PORT         PORTB          /* port data register */
#define LCD_DDR          DDRB           /* port data direction register */
#define LCD_RES          PB5            /* port pin used for /RESX (optional) */
//#define LCD_CS           PB3            /* port pin used for /CSX (optional) */
#define LCD_DC           PB4            /* port pin used for D/CX */
#define LCD_SCL          PB7            /* port pin used for SCL */
#define LCD_SDA          PB6            /* port pin used for SDA */
/* display settings */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       160            /* number of vertical dots */
//#define LCD_OFFSET_X     4               /* enable x offset of 2 or 4 dots */
//#define LCD_OFFSET_Y     2               /* enable y offset of 1 or 2 dots */
//#define LCD_FLIP_X                      /* enable horizontal flip */
//#define LCD_FLIP_Y                      /* enable vertical flip */
//#define LCD_ROTATE                      /* switch X and Y (rotate by 90°) */
//#define LCD_BGR                         /* reverse red and blue color channels */
//#define LCD_LATE_ON                     /* turn on LCD after clearing it */
/* font and symbols: horizontally aligned & flipped */
//#define FONT_10X16_HF                   /* 10x16 font */
//#define FONT_6X8_ISO8859_2_HF           /* 6x8 Central European font */
#define FONT_8X8_ISO8859_2_HF           /* 8x8 Central European font */
//#define FONT_10X16_ISO8859_2_HF         /* 10x16 Central European font */
//#define FONT_8X16_WIN1251_HF            /* 8x16 cyrillic font */
//#define FONT_8X16ALT_WIN1251_HF         /* 8x16 alternative cyrillic font */
#define SYMBOLS_30X32_HF                /* 30x32 symbols */
/* SPI bus */
//#define SPI_HARDWARE                    /* hardware SPI */
#define SPI_BITBANG                     /* bit-bang SPI */
#define SPI_PORT         LCD_PORT       /* SPI port data register */
#define SPI_DDR          LCD_DDR        /* SPI port data direction register */
#define SPI_SCK          LCD_SCL        /* port pin used for SCK */
#define SPI_MOSI         LCD_SDA         /* port pin used for MOSI */
//#endif
« Last Edit: May 15, 2021, 07:33:55 pm by Szybkijanek »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6894 on: May 15, 2021, 09:39:01 pm »
Code: [Select]
#define LCD_RES          PB5            /* port pin used for /RESX (optional) */
#define LCD_DC           PB4            /* port pin used for D/CX */
#define LCD_SCL          PB7            /* port pin used for SCL */
#define LCD_SDA          PB6            /* port pin used for SDA */

PB5 and PB7 are also used for the rotary encoder. Since PB5 and 7 are switched to input mode (HiZ) to read the rotary encoder the display will see the output of the rotary encoder during that time (the display is /CS-ed all the time!). With your wiring the rotary encoder will reset the LCD controller and create clock pulses. Better use & wire PB5 for LCD_DC and PB7 for LCD_SDA. Another solution would be to wire /CS to an unused pin of the ATmega (PB2 or 3) and enable LCD_CS.

Edit: /CS wouldn't help because the rotary encoder at PB5 would still trigger the reset. But /CS plus wiring /RES to 3.3V should work.
« Last Edit: May 18, 2021, 09:47:48 am by madires »
 
The following users thanked this post: Szybkijanek

Offline Szybkijanek

  • Contributor
  • Posts: 41
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #6895 on: May 17, 2021, 04:28:30 pm »
I already connected the LCD_CS to the PB3 and I had a white screen all the time without even showing the firmware version.
I try PB5 for LCD_DC and PB7 for LCD_SDA.
« Last Edit: May 17, 2021, 04:30:49 pm by Szybkijanek »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6896 on: May 17, 2021, 05:27:35 pm »
When you wired /CS to PB3 have you also configured the firmware with "LCD_CS  PB3"?
 

Offline Szybkijanek

  • Contributor
  • Posts: 41
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #6897 on: May 17, 2021, 08:10:01 pm »
Of course!!
 

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 136
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #6898 on: May 18, 2021, 01:46:14 am »
I already connected the LCD_CS to the PB3 and I had a white screen all the time without even showing the firmware version.
I try PB5 for LCD_DC and PB7 for LCD_SDA.

See how ILI9341 is connected...
 

Offline el_ectron

  • Newbie
  • Posts: 1
  • Country: sk
Re: $20 LCR ESR Transistor checker project
« Reply #6899 on: May 18, 2021, 08:03:34 am »
Hello :)

Anyone got any info regarding the more recent LCR-TC2 ?

what's inside?
just new firmware running on old hardware?
or is there more to all the extra cost? ???

any info welcome ^-^
 
The following users thanked this post: elecdonia


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf