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

Feliciano and 6 Guests are viewing this topic.

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4750 on: May 16, 2018, 09:57:23 am »
The protection relay is basically controlled by ADC_DDR. When the output mode is enabled (setting the bit for TPRELAY) the relay is released, and when set to input mode (clearing the bit) the relay is activated. To figure out when the relay will be activated/released please see main.c for all occurrences of ADC_DDR. >:D
 
The following users thanked this post: timelessbeing

Offline KD0CAC John

  • Frequent Contributor
  • **
  • Posts: 707
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4751 on: May 16, 2018, 01:09:30 pm »
Still looking for another one of these - recommendation / link .
I have one from several yrs. ago ,
Would like to get one that has a case , or case ready , I do surface mount work - so wold like the pads on the outside of case to test SMD
Any suggestions / links ?
Ebay has too many , with possibility of getting one that is " not " recommended ?
Thanks   
 

Offline carrascoso

  • Contributor
  • Posts: 41
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4752 on: May 16, 2018, 02:37:14 pm »
Hello, greetings to all.

I have this checked in disuse and wanted if it is possible to update it.
It has mounted the ATMEGA168v, in the firm K it appears but there are 3 versions and I do not know what would be necessary.
I would appreciate your help to know what is the version needed to update the device.



Thank you very much

« Last Edit: May 16, 2018, 02:51:26 pm by carrascoso »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4753 on: May 16, 2018, 04:13:46 pm »
I'd recommend to upgrade the MCU to an ATmega 328. The 168 has only 16kB flash and can run just the very basic features.
 

Offline carrascoso

  • Contributor
  • Posts: 41
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4754 on: May 16, 2018, 04:38:36 pm »
I'd recommend to upgrade the MCU to an ATmega 328. The 168 has only 16kB flash and can run just the very basic features.

Okay, thank you very much
 

Offline -AFS-

  • Newbie
  • Posts: 2
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4755 on: May 18, 2018, 06:01:02 pm »
I'm sorry for asking such a noob question, but I haven't find any information about this.

I have one of these modules, with the ST7735 display.


I am trying to update the firmware, but when I compile the code, I get that the program goes up to 113.2% of the memory of the device.
What am I doing wrong?

The only way I have found to significantly decrease the size of that is compilling without menu, but that makes no sense, as it must be possible to use it...

Sorry if the question is very stupid or if it has already been answered.
« Last Edit: May 18, 2018, 06:09:01 pm by -AFS- »
 

Offline sofakng

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4756 on: May 18, 2018, 06:16:15 pm »
Still looking for another one of these - recommendation / link .
I have one from several yrs. ago ,
Would like to get one that has a case , or case ready , I do surface mount work - so wold like the pads on the outside of case to test SMD
Any suggestions / links ?
Ebay has too many , with possibility of getting one that is " not " recommended ?
Thanks
I'm also looking for a recommendation.  I'd like something that has a removable Atmega328 chip so I can upgrade the firmware (?).

The Drok Mega328 on Amazon looks nice (if a bit expensive, but it has a very nice case), but I don't know if I can be updated, etc.

 

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4757 on: May 18, 2018, 07:06:44 pm »
@ -AFS-

Is your toolchain updated? Some versions of GCC are known to produce fatter code.
 
The following users thanked this post: -AFS-

Offline KD0CAC John

  • Frequent Contributor
  • **
  • Posts: 707
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4758 on: May 18, 2018, 08:06:11 pm »
Still looking for another one of these - recommendation / link .
I have one from several yrs. ago ,
Would like to get one that has a case , or case ready , I do surface mount work - so wold like the pads on the outside of case to test SMD
Any suggestions / links ?
Ebay has too many , with possibility of getting one that is " not " recommended ?
Thanks
I'm also looking for a recommendation.  I'd like something that has a removable Atmega328 chip so I can upgrade the firmware (?).

The Drok Mega328 on Amazon looks nice (if a bit expensive, but it has a very nice case), but I don't know if I can be updated, etc.

On the price , seems ok , it is assembled & in a case , so extra , color display .
On the minus no SMD to test surface mount testing / identifying lose components , missing rotary encoder - so missing some options - but I do not know what .   
 

Offline casinada

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4759 on: May 18, 2018, 08:19:58 pm »
@ -AFS-
Is part of the growing pains. I had the same problem a while back. It took me a while to get it to compile with the right versions of the software. With the right versions of the compiler you should not have space problems just as mentioned by timelessbeing.

I had some notes but I don't know if they would help. (I don't have the links but they should be easy to find)
*Collection of Helpful information *
Firmware Building environment for Windows

1.   Download and Install WinAVR > Link
2.   Download Toolchain > Link
3.   Extract Toolchain using Winrar or 7-zip into the C:\WinAVR-20100110 folder overwrite everything, avr, bin, doc...
4.   credit: tom
Compiling the Firmware

1.   Download GNU tarball > Link
2.   Extract GNU tarball using Winrar or 7-zip somewhere
3.   Download and Install Cygwin 64 bit
4.   Launch Programmers Notepad installed by WinAVR
5.   Open desired Makefile in the device specific folder from extracted tarball
6.   Click Tools menu > [WinAVR] Make All
7.   In the folder of Makefile you will find the flash .hex and eeprom .eep files
.   From heelzFlyW
.   I have mega328_color_kit "AY-AT" with LCD 7735.  Took trendy 1.24m for a drive.

To get LCD to work I had to change lines below.  One weird thing I see is on Start the LCD refreshes with multi color dots/sand.

In config_328.h:
1. From
.   Code: [Select]
.   #define LCD_ST7735
.   #define LCD_DC           PD3            /* port pin used for D/CX */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SDA          PD1            /* port pin used for SDA */
...
To
.   Code: [Select]
.   #define LCD_DC           PD1            /* port pin used for D/CX */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SDA          PD3            /* port pin used for SDA */
2. From
.   Code: [Select]
.   //#define LCD_FLIP_X                      /* enable horizontal flip */
#define LCD_FLIP_Y                      /* enable vertical flip */
.   To
.   Code: [Select]
.   #define LCD_FLIP_X                      /* enable horizontal flip */
//#define LCD_FLIP_Y                      /* enable vertical flip */
And for Encoder changed:

3. From
.   Code: [Select]
.   #define ENCODER_A        PD2       /* rotary encoder A signal */
.   To
.   Code: [Select]
.   #define ENCODER_A        PD1       /* rotary encoder A signal */


I also noticed in PWM and Square Wave modes it shows Pins 2-13.  I don't understand what it means   

In variables.h
.   Code: [Select]
.   const unsigned char PWM_Probes_str[] EEMEM = "2-13"

DIY Kit "AY-AT"
- with ST7735 color LCD module
- provided by flywheelz@EEVBlog


Hardware Options:

#define HW_ENCODER
#define HW_REF25
#define HW_ZENER
#define HW_FREQ_COUNTER


LCD module:

#define LCD_ST7735
#define LCD_COLOR                       /* color graphic display */
#define LCD_SPI_BITBANG                 /* bit-bang SPI interface */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RES          PD0            /* port pin used for /RESX */
#define LCD_CS           PD5            /* port pin used for /CSX (optional) */
#define LCD_DC           PD1            /* port pin used for D/CX */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SDA          PD3            /* port pin used for SDA */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       160            /* number of vertical 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 FONT_10X16_H                    /* 10x16 font, horizontally aligned */
#define SYMBOLS_24X24_H                 /* 24x24 symbols, horizontally aligned */


Rotary Encoder:

#define ENCODER_A        PD1       /* rotary encoder A signal */
#define ENCODER_B        PD3       /* rotary encoder B signal */


Input for the frequency counter is PD4 (T0).

 :-//


 
The following users thanked this post: Chris56000, -AFS-

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4760 on: May 19, 2018, 10:54:21 am »
To get LCD to work I had to change lines below.  One weird thing I see is on Start the LCD refreshes with multi color dots/sand.

-> LCD_LATE_ON  (starting with v1.28m)

I also noticed in PWM and Square Wave modes it shows Pins 2-13.  I don't understand what it means   

It meant signal output via probe #2 and ground via probes #1 and #3. Was changed to "1:- 2:s 3:-" later on.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4761 on: May 19, 2018, 09:45:08 pm »
Would someone with a TC-1 running the vendor's modified firmware please do me a favor and check two signals with a scope? The TC-1 has an 8-pin MCU (U4) which controls the power. Pin 7 is connected to PD1 of the ATmega324, and pin 8 to PD2. A short press of the start button will power on the tester and pin 7 goes high while pin 8 stays low. Does any of those pins change their state when pressing the button briefly again (most likely pin 7)? Do pin 7 or 8 receive any signals from the ATmega?
 

Offline -AFS-

  • Newbie
  • Posts: 2
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4762 on: May 19, 2018, 10:43:30 pm »
@ -AFS-

Is your toolchain updated? Some versions of GCC are known to produce fatter code.

@ -AFS-
Is part of the growing pains. I had the same problem a while back. It took me a while to get it to compile with the right versions of the software. With the right versions of the compiler you should not have space problems just as mentioned by timelessbeing.

I had some notes but I don't know if they would help. (I don't have the links but they should be easy to find)
*Collection of Helpful information *
Firmware Building environment for Windows
[...]

Thank you very much timelessbeing and casinada for your advise.

I tried updating the toolchain, and now it compiles fine. To the limit (99.1% Full), but ok.
I have already uploaded it, and seems to be working, so I suppose I did the rest of the proces correctly.

I'm not sure if I updated the toolchain to the last version. But it is working, so no problem for now. XD

Thankyou
 

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4763 on: May 20, 2018, 01:40:06 am »
I'm not sure if I updated the toolchain to the last version.

Current Versions

    gcc 7.2.0 & 6.4.0
    binutils 2.29.0
    avr-libc 2.0.0
    gdb 7.8.2

 
The following users thanked this post: -AFS-

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4764 on: May 20, 2018, 03:51:27 am »
You don't need to enable anything in the k-firmware for using the protection relay. It's part of the basic code.

Well I had absolutely no luck with this.

To be sure, I removed my relay from the tester, and instead I connected an LED and DMM (set to peak hold) to PC4. I tested some components and PC4 never went high. I started the tester with probes shorted, and PC4 never went high. (1.13k)

I also ran a quick sketch to flash an LED on PC4, just to make sure the mcu wasn't damaged.

 :-//

Both the voltage ref and resistor to Vcc on PC4 are removed, if that makes any difference.
« Last Edit: May 20, 2018, 04:29:24 am by timelessbeing »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4765 on: May 20, 2018, 10:31:48 am »
The protection relay needs the pull-up resistor since PC4 is simply set to low to switch the relay. It's designed this way to support an external voltage reference and the protection relay via the same pin.
 
The following users thanked this post: timelessbeing

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4766 on: May 20, 2018, 11:23:18 am »
To set the proper offset for FISH8840_TFT, find in ST7735.c:

Code: [Select]
#ifdef LCD_ROTATE
  /* swap X and Y */
  #define LCD_PIXELS_X        LCD_DOTS_Y
  #define LCD_PIXELS_Y        LCD_DOTS_X
  #ifdef LCD_OFFSET_X
    #define LCD_SHIFT_Y       3     /* shift y by 4 dots */
  #endif
  #ifdef LCD_OFFSET_Y
    #define LCD_SHIFT_X       1     /* shift x by 2 dots */
  #endif
#else

The next firmware version will allow you to set the offsets for the ST7735 directly in config-<mcu>.h. For example:
#define LCD_OFFSET_X     2
#define LCD_OFFSET_Y     1

There are also some ST7735 displays with the addressing aligned to the mid.
 

Offline jellytot

  • Contributor
  • Posts: 42
Re: $20 LCR ESR Transistor checker project
« Reply #4767 on: May 20, 2018, 01:05:24 pm »
Would someone with a TC-1 running the vendor's modified firmware please do me a favor and check two signals with a scope? The TC-1 has an 8-pin MCU (U4) which controls the power. Pin 7 is connected to PD1 of the ATmega324, and pin 8 to PD2. A short press of the start button will power on the tester and pin 7 goes high while pin 8 stays low. Does any of those pins change their state when pressing the button briefly again (most likely pin 7)? Do pin 7 or 8 receive any signals from the ATmega?

Hi Madires. There does appear to be data between this U4 and the atmega. see attached pics. (U4-pin7,8.jpg)  pin 7 ch1 and 8 ch2 at turn on and approx 1 sec later data appears at pin 7 only, (U4-pin7.jpg).
Pin 3 also go high at turn on. Pressing the button while on doesn't show any activity on Pins 7,8.

 
The following users thanked this post: madires

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4768 on: May 20, 2018, 03:05:47 pm »
Thanks for checking the two pins! Someone has put some effort into preventing others to use his clone with the original OSHW firmware. So far we know that U4 is an STC15L104W MCU. That MCU stays in sleep mode until the start button is pressed. Then it sets pin 3 high to enable the boost converter IC. Pins 7 and 8 are obviously TX and RX for a serial protocol. When the start button is pressed for 1.5s the MCU disables the boost converter. The same after a timeout (there are two pads on the PCB for setting a delay of 10-25s) triggered by the end of a measurement/test cycle (this is suggested by the manual). We don't know if a button press is passed on to the ATmega. Let's discuss our options:
- don't buy the TC-1 clone
- reverse engineer the protocol
- write a new firmware for U4 (simple power_on signal from the ATmega and button press signal for the ATmega)
- replacing U4 with some transistors (standard power circuitry)
- let the ATmega create an enable signal for the boost converter in parallel with U4 (via diodes?) and add a test button (plus rotary encoder?)
 

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4769 on: May 20, 2018, 10:57:26 pm »
The protection relay needs the pull-up resistor since PC4 is simply set to low to switch the relay.

Huh?
Wouldn't a pullup resistor turn the transistor/relay on?

The documentation says, "The de-energized contacts of the relay protect the ATmega". It seems to me that grounding PC4 would de-energize the relay and short the probes. This is the opposite of what I thought .... I don't get it. :o

http://tinyurl.com/y8uwzne6
« Last Edit: May 21, 2018, 12:31:16 am by timelessbeing »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4770 on: May 21, 2018, 11:03:24 am »
The relay contacts are wired to short the tests pins when the relay isn't powered. When powered the shorts are removed. This way the relay can be switched by changing the MCU pin between input and output mode (low). For the external reference we need the input mode (HiZ) to feed the ADC. The pull-up resistor also turns on the relay via the BJT (removes shorts). In output mode the current (limited by the pull-up resistor) flows to ground via the MCU and the BJT switches off the relay (shorts test pins). And with this design you won't BBQ the ATmega when you connect a charged cap to a switched-off tester.
 
The following users thanked this post: timelessbeing, edavid

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: $20 LCR ESR Transistor checker project
« Reply #4771 on: May 21, 2018, 01:54:06 pm »
Is there a tester that implements all those new features?

Alexander.
Become a realist, stay a dreamer.

 

Offline 4RESTER

  • Newbie
  • Posts: 2
  • Country: ua
Re: $20 LCR ESR Transistor checker project
« Reply #4772 on: May 21, 2018, 02:33:53 pm »
Thanks for the firmware of the BSIDE ESR02 PRO (DTU-1701)!
Is there an even newer firmware (with russian or english)?
« Last Edit: May 21, 2018, 02:37:15 pm by 4RESTER »
See ya...
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #4773 on: May 21, 2018, 02:48:41 pm »
4RESTER,these firmwares which I offered are relevant and fresh today! :D
 



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf