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

NikolaSoft and 30 Guests are viewing this topic.

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6675 on: December 29, 2020, 11:24:55 am »
Following might work for the display:
Code: [Select]
#define LCD_ST7565R
#define LCD_GRAPHIC                     /* graphic display */
#define LCD_SPI                         /* SPI interface */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
#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_Y                      /* enable vertical flip */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_VF                     /* 8x8 font */
#define SYMBOLS_24X24_VFP               /* 24x24 symbols */
#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 */

And for the TL431 enable HW_REF25. If you have a working config please send me the required settings and I'll add them to the Clones list.
 
The following users thanked this post: avr

Offline brunosso

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #6676 on: December 29, 2020, 12:00:57 pm »
This config works at least for the LCD:

Code: [Select]
#define LCD_ST7565R                     /* display controller ST7565R */
#define LCD_GRAPHIC                     /* graphic display */
#define LCD_SPI                         /* SPI interface */
/* control and data lines */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD0            /* port pin used for /RES (optional) */
#define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* 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     11             /* 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 8x12 cyrillic font */
//#define FONT_8X16_WIN1251_VFP           /* 8x16 cyrillic font */
#define SYMBOLS_24X24_VFP               /* 24x24 symbols */
/* SPI bus */
#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 */

For the TEST button how can i enter in the submenu with options and AutoTest?!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6677 on: December 29, 2020, 12:09:06 pm »
Two short key presses after the display of the last component found (it's explained in the README file).
 

Offline brunosso

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #6678 on: December 29, 2020, 04:19:21 pm »
Thank you madires!
After a few try i'm happy with this config!

config.h
https://pastebin.com/kha1USWv

config_328.h
https://pastebin.com/GPFL1GYy

 
The following users thanked this post: madires

Offline Dumidan

  • Contributor
  • Posts: 37
  • Country: ro
 
The following users thanked this post: Jacon

Offline Dumidan

  • Contributor
  • Posts: 37
  • Country: ro
Re: $20 LCR ESR Transistor checker project
« Reply #6680 on: December 30, 2020, 12:40:18 pm »
Hello madires! I have attached the updated file for the Romanian language according to the new version.
These days I have time to see how the new version runs on my AY-AT 328 tester. I come back with the results.

A new year better and more abundant to you!
 
The following users thanked this post: madires

Offline indman

  • Super Contributor
  • ***
  • Posts: 1015
  • Country: by
 
The following users thanked this post: Dumidan

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6682 on: January 02, 2021, 03:00:13 pm »
Film cap ESR now reading 0.38
Big old salvaged caps still reading 0.00 Ohms  :-//

Another user had a similar issue with some larger electrolytics and missing ESR readings. It turned out to be a lack of 100nF bypass caps for VCC and AVCC.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6683 on: January 04, 2021, 05:27:32 pm »
Update on the L/C meter's LC oscillator: I tried several modifications for a cleaner output signal but they didn't help much and had an impact on the frequency. The best way to clean up the output signal is to add a Schmitt trigger logic gate (for example 4093) or a second comparator. This way I was able to measure caps up to 120nF. Beyond that the oscillator became unstable. So I'm wondering how the PIC based L/C meters can achieve 900nF using the same circuit. When the oscillator would run stable the theoretical maximum values supported by the m-firmware would be 250mH or 3.5µF (low frequency limit of 10kHz).
 

Offline Jerby

  • Newbie
  • Posts: 6
Re: $20 LCR ESR Transistor checker project
« Reply #6684 on: January 04, 2021, 08:16:16 pm »
I have the DIY Kit "AY-AT" / GM328A (or Color kit) and upgraded from v1.13 to 1.42. V1.13 is working ok, but  v1.42 (after calibration) gives too high capacitor values (50%) and does not recognize resistor of 22K and more 10k and lower seems ok. And it measures capacitor (8pF) between probes 1 and 2 when nothing is connected. What parameters could be set wrong?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6685 on: January 04, 2021, 09:11:52 pm »
Could be a clock mismatch. Which value have you set for FREQ in the Makefile? Does it match the quartz crystal?
 

Offline Jerby

  • Newbie
  • Posts: 6
Re: $20 LCR ESR Transistor checker project
« Reply #6686 on: January 05, 2021, 09:39:45 am »
Thanks Madires, but both are 8Mhz.
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1015
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #6687 on: January 05, 2021, 10:00:12 am »
I have the DIY Kit "AY-AT" / GM328A (or Color kit) and upgraded from v1.13 to 1.42. V1.13 is working ok, but  v1.42 (after calibration) gives too high capacitor values (50%) and does not recognize resistor of 22K and more 10k and lower seems ok. And it measures capacitor (8pF) between probes 1 and 2 when nothing is connected. What parameters could be set wrong?
Do hardware tests T1-T6 and show us the results. :)
 

Offline mrmox

  • Contributor
  • Posts: 12
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #6688 on: January 06, 2021, 11:03:11 pm »
I bought 2 of the Chinese clones in December 2020 from 2 different Amazon vendors.  Both are NO-NAME on PCB and No version on screen (just Mtester).

Also they BOTH have one obvious difference from the various easy to find schematics and PCB pictures: in place of the diodes D1 and D2, there are resistors that occupy that space but are oriented 90 degrees vs. the diodes (220 ohm and 330 ohm listed on the silkscreen).

Anyone know about this?  Is this a different display?

I've tried 3 different candidate firmwares, but nothing comes up on the display.

Back light does come on, and (once I think) it went off after about 95 seconds if I do nothing with 1,2,3 shorted.  Or maybe not.

I tried thomas from here
https://www.mikrocontroller.net/topic/248078?goto=4120737#4105488

I tried
transistortester-trunk.tar.gz\trunk\mega328_T3_T4_st7565 - TAR+GZIP archive, unpacked size 6,013,626 bytes

And I tried
TT_Gelb_german.zip

Perhaps my mistakes are obvious to someone more versed than myself?
I stumbled through programming with a JATGICE3 and got the hex and eep to verify. 
I used thomas for fuses (
efuse:0x04
hfuse:0xd9
lfuse:0xf7
)

Anything I should look for with a 'scope to detect progress through the code execution?

Thanks!

 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1015
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #6689 on: January 07, 2021, 08:00:37 am »
Hi mrmox!
You have a really small variation on one of the most popular T4NoStripGrid clones!
For this clone, you must use the firmware from the trunk \ mega328_T4_v2_st7565 folder
But there is one important note!
The tester has started, but the contrast is very low, the text is barely visible. The voltage across the 330/220 Ohm divider is 2.04 V. In order to comfortably read the screen, the contrast value had to be raised to the limit, i.e. 63.
Therefore, when the contrast value in the firmware is equal to 40, almost no symbols are visible and you have to peer very closely at the screen, trying to see the menu items. The decision how to raise the contrast when first turned on after the firmware was simple. You just need to swap the resistance of the divider. Then the voltage at its point is 3.04 V. Now, with a contrast value of 40, you do not need to twist anything, everything is perfectly visible (which pleases with repeated flashing). Those who purchase the same tester with the same divider can immediately throw over these resistances, and not be tormented trying to read the menu. With native Chinese firmware, everything read perfectly. Those with contrast issues with the same screen should check the screen voltage. It should be 3-3.3 V.
If desired, the XC6206 30-33 stabilizer fits well (diagonally) in place of these resistances.  ;)
 

Offline Jerby

  • Newbie
  • Posts: 6
Re: $20 LCR ESR Transistor checker project
« Reply #6690 on: January 07, 2021, 01:38:56 pm »
I have the DIY Kit "AY-AT" / GM328A (or Color kit) and upgraded from v1.13 to 1.42. V1.13 is working ok, but  v1.42 (after calibration) gives too high capacitor values (50%) and does not recognize resistor of 22K and more 10k and lower seems ok. And it measures capacitor (8pF) between probes 1 and 2 when nothing is connected. What parameters could be set wrong?
Found out that issue is caused by changing the "#define UREF_VCC" to the actual Li-ion voltage of 4150mV. When I set to 5000 resistor and capacitor measurements are ok but battery voltage is way to high.
Question: what changes are required to use Li-ion battery and 5V regulator removed?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6691 on: January 07, 2021, 02:28:14 pm »
The 5V regulator is required for proper operation. If you want to modify the tester for a Li-Ion cell you need a boost converter to feed the 5V regulator. The battery monitoring is a different story. The AY-AT/GM328A uses a voltage divider at PC5 to be able to deal with 9V batteries. You can keep it that way and change BAT_WEAK and BAT_LOW to match your Li-Ion battery. Or you could remove the divider since the battery's voltage is lower than 5V, and change the monitoring mode to BAT_DIRECT. However, you need to modify the battery monitoring circuitry to monitor the Li-Ion cell instead of the 9V input (after T3). And there are two obstacles more, power management circuitry and preventing the Li-Ion cell being drained when the tester is powered off.

@All: If you have modified your tester please tell us what you've changed (schematics are great for that) when asking for support.
 

Offline Jerby

  • Newbie
  • Posts: 6
Re: $20 LCR ESR Transistor checker project
« Reply #6692 on: January 07, 2021, 02:52:59 pm »
Hi Madires, thanks again for your very quick reply. I will take the route of the step-up convertor and install the 5V regulator back. I already changed BAT_WEAK and BAT_LOW to match my Li-Ion battery. I didn't modify the tester, only removed the 5V regulator.
 

Offline mrmox

  • Contributor
  • Posts: 12
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #6693 on: January 08, 2021, 04:24:21 am »
Thanks so much indman!
I had gotten so close, I could have smelled success, but I needed you to push me over the finish line!
I had looked in transistortester-trunk\trunk\mega328_T4_v2_st7565\
But there was (and is) NO ReadMe.txt!  So I scratched my head and moved to the next one.

Who can I lobby to put in a ReadMe.txt for the next novice to come along? 
I volunteer to write it (by using YOUR words, ha ha!).

I did swap the resistors, and got the .hex and .eep files.
I have to JUMPER THE BUTTON CLOSED to keep the power on so I can program with my JTAGICE3.
Then I programmed mega328_T4_v2_st7565.hex
Then I programmed mega328_T4_v2_st7565.eep
Then I checked the Fuses and they were still:
EXTENDED = 0xFC (valid)
HIGH = 0xD9 (valid)
LOW = 0xF7 (valid)
(although thomas suggests efuse:0x04.  I will look at that tomorrow!)

I pulled off the programming connector and button jumper, then I fired it up (with a long push opf the button?  Or maybe just a push..)
And I got  words on the screen!  Now I will practice:
The Art of Engineering: Making something you want out of things you can get!


 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1015
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #6694 on: January 08, 2021, 07:58:07 am »
Who can I lobby to put in a ReadMe.txt for the next novice to come I volunteer to write it (by using YOUR words, ha ha!).

You can assume that I wrote to you in my message the contents of the ReadMe.txt file. :D
You can pass it on to other inheritance newbies.  :D
Most importantly, the device is now working as intended! Fuses no longer need to be changed - they are correctly programmed with you!
« Last Edit: January 08, 2021, 08:00:28 am by indman »
 

Offline mrmox

  • Contributor
  • Posts: 12
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #6695 on: January 09, 2021, 05:21:13 pm »
BUILDING FROM SOURCE  (ELI5)

I will share my stumbles before getting COMPILE FROM SOURCE working.

I had WinAVR-20100110 from some distant past installed on my PC, and I *hoped* it would generate identical code to the .hex and .eep in trunk

I was stumped when there was NO SOURCE that I could associate with my particular variant although I could find the .hex and .eep and a Make file within \trunk\mega328_T4_v2_st7565.
And I KEPT READING "just run the Makefile in Programmers Notepad" (=PN) that I finally realized COMES WITH WINAVR.
Even though I could see NO SOURCE CODE, I decided to try to RUN THE MAKEFILE to see if an error would enlighten me.

I launched PN.  I opened the Makefile from \trunk\mega328_T4_v2_st7565 in PN.  I clicked Tools/Make All.

Well it DID give me an error that was a clue.  The error said there was NO ../setup.mk
So.... the Makefile wanted to FIND A FILE in a directory ABOVE where the Makefile lived!  How would THAT HAPPEN?
And so it came to me that I NEEDED TO EXPAND THE WHOLE TRUNK on my disk instead of just fumbling around in the tarball looking for pieces that I thought were applicable.  Now I think I understand how the whole system for variants is made to work.  Simple really; silly of me to be looking for complexity!  All sources are in \trunk directly, all Makefiles are in subdirectories.

I decided to expand it to a memory stick to avoid cluttering my main PC even more.  After the WHOLE trunk tree was resident on the stick, I THEN opened (in PN) the Makefile that was within the directory for my variant:
I:\jays_lcr_t4\trunk\mega328_T4_v2_st7565\Makefile
Next (in PN) I ran Make All and got this familiar error:
0 [main] sh 9104 sync_with_child: child 15176(0x1E4) died before initialization with status code 0xC0000142
I say familiar since apparently many many people have had to find this  msys-1.0.dll file and place it as directed:

I found solution.
Copy this file:
http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip
to utils\bin directory (WinAVR)

I BALKED at taking this random file, and pondered what to do....then I SEARCHED my C:\ drive and found LOTS of them already on my PC.  So I chose what looked like a more recent one (2014!)

And I was about to copy THAT into the location When I saw there was one ALREADY THERE!

Drat! It was going to be so easy!

Now what?  I fretted for a while…..then read so many people saying that it worked for them that I threw caution to the wind and RENAMED the existing file and went ahead and copied the rando different version in.  And it helped, darn it!

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         5/18/2007   7:09 PM         724784 msys-1.0.dll      <---- downloaded from madwizard
-a----         1/19/2010  10:08 AM         781616 msys-1.0.dll.old
-a----         1/19/2010  10:08 AM         781616 msys-1.0HIDING.dll

The Make All succeeded.  I got 2 warnings:

../main.c:480:4: warning: #warning Capacity measurement from high to low not possible for diodes without PULLUP_DISABLE option!
../make_frequency.c:11: warning: 'wish_freq' may be used uninitialized in this function

Did I get IDENTICAL .hex and .eep to the ones in \trunk\mega328_T4_v2_st7565?  WinMerge compare = NO darn it..

There IS a block of identical bytes, starting here

:100070009395E5B8C4B8B6EFB0937A00A5E0A09325

But before & after this block of 19 identical lines, all lines differ.

What about those warnings…..
…OR should I try to update WinAvr?

Lemme look!  Well no info on warnings I could see.  And a mass of entanglement trying to research if I was using exactly the same version of WinAVR/gcc/??? as was used in \trunk.

I decided to change the word "Bat." to "Jay." to prove my compile was taking effect.
Searched for "Bat_str" and found it here:
"I:\jays_lcr_t4\trunk\Battery_check.c"
"I:\jays_lcr_t4\trunk\Transistortester.h"

I went ahead and flashed the code, AND IT RAN!  And it said my name!

I would like to know why my .hex is so different.  It has to be my avr-gcc version, right? 
I need to learn how to update.  Should I uninstall-reinstall WinAVR?

 Directory: I:\jays_lcr_t4\trunk\mega328_T4_v2_st7565

01/8/2021  11:02 PM          86450 mega328_T4_v2_st7565.hex

 Directory of H:\My Equipment\LCR-T4_T3_.....\github\transistortester-trunk\trunk\mega328_T4_v2_st7565

05/13/2020  03:37 AM         83468 mega328_T4_v2_st7565.hex


Thanks again!

« Last Edit: January 09, 2021, 07:26:41 pm by mrmox »
 

Offline mrmox

  • Contributor
  • Posts: 12
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #6696 on: January 10, 2021, 07:30:24 pm »
Does anyone know if there is a simple mod for finish.mk that will generate an .elf usable for debugging in AS7?

Or another way to get to use ISP debugging?  (I have a JTAGICE3).

Thanks.

 

Offline dma_k

  • Newbie
  • Posts: 2
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #6697 on: January 12, 2021, 06:56:21 pm »
Maniaxx
Chinese clones GM328A (B) may have several configuration hardware. In the photo that I attached, you can see the SMD MCU.
If this is important for you, then check with the seller which option will be sent to you after purchase. ;)
I have the same board / tester (purchased from here). The tester reports firmware v1.12. It has colored display, but does not benefit from that (all information is in one color). I wonder if there is a firmware that takes advantage from colored display? If yes, is there any chance to flash it using the pins PC6/PB5/PB4/... wired on board?

Thanks in advance!
 

Offline mrmox

  • Contributor
  • Posts: 12
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #6698 on: January 12, 2021, 08:30:02 pm »
ERROR IN WIDELY DISTRIBUTED SCHEMATIC OF CHINESE CLONE [SOLVED]
[LOOK A FEW POSTS AHEAD for revised corrected schematic from Roland]

Years after Roland Elmiger provided a reverse-engineered schematic of a 91make Chinese clone of LCR_T4, I think I have found some missing connections in it!
These would lead the naive (like me) to think there are some unused pins still available!

Does anyone know of a CORRECTED Roland.png somewhere?

PS I have gotten Breakpoint Debugging to work in my no-name chinese clone using debugWIRE with FREE Atmel Studio 7 AS7 (actually called Microchip Studio now).
You will need a device that supports debugging, like the JTAGICE3 I use (some devices are program only).
And now I am not so afraid of bricking the AVR by using debugWIRE (since I do not mess with LOCKBITS).
Unfortunately, it requires DISCONNECTING 3 pins important to the LCR_T4 function, rendering it inoperative as a tester. 
But still useful for those trying to re-purpose this cheap board with display and backlight.

So please check my work, thanks.


« Last Edit: January 14, 2021, 05:14:26 pm by mrmox »
 
The following users thanked this post: cdev

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #6699 on: January 12, 2021, 09:09:18 pm »
I have the same board / tester (purchased from here). The tester reports firmware v1.12. It has colored display, but does not benefit from that (all information is in one color). I wonder if there is a firmware that takes advantage from colored display? If yes, is there any chance to flash it using the pins PC6/PB5/PB4/... wired on board?

You could try the m-firmware which supports things like color coding for probes or resistor color codes.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf