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

Lightages and 8 Guests are viewing this topic.

Offline Giox040

  • Newbie
  • Posts: 9
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #5450 on: January 17, 2019, 11:10:50 am »
I own an "AY-AT" ATmega328 with ST7735 color LCD module.
Recently I tried to compile the 1.34M firmware, either using WinAVR, avr-gcc-8.2.0 and Atmel Studio 7.
I get a warning, is it normal ?:

Quote
tools.c: In function 'Cap_Leakage':
tools.c:3302:9: warning: 'U1' may be used uninitialized in this function [-Wmaybe-uninitialized]
         Display_Value(U1, -3, 'V');          /* display voltage */
         ^~~~~~~~~~~~~~~~~~~~~~~~~~

Another problem is that I can not make everything I want in the chip .... maybe I ask too much from this small tool.
Basically I would need to be able to test the goodness of the components but I do not need to measure resistance, impedance,
capacity, read or generate frequencies, because I own other equipment.

But I wish I could test loss and ESR, IR detector and IR transmitter, Zener.
 
Below is my config.h, what could I remove to make us stay SW_IR_TRANSMITTER?

Code: [Select]
/* config.h  */

/* source management */
#define CONFIG_H

/*  rotary encoder for user interface */
#define HW_ENCODER
#define ENCODER_PULSES   4
#define ENCODER_STEPS    20

/*  Typical voltage of 2.5V voltage reference (in mV) */
#define UREF_25           2495

#define HW_ZENER

#define HW_FREQ_COUNTER_BASIC  // <<<

#define FREQ_COUNTER_PRESCALER   16   /* 16:1 */

#define SW_PWM_SIMPLE

#define SW_INDUCTOR

#define SW_ESR

#define SW_ENCODER

//#define SW_SQUAREWAVE  // <<<

#define SW_IR_RECEIVER

//#define SW_IR_TRANSMITTER // <<<

#define SW_IR_EXTRA // <<<

#define SW_OPTO_COUPLER // <<<

#define SW_UJT

#define SW_PROBE_COLORS

//#define SW_SERVO

#define SW_DS18B20 // <<<

#define SW_CAP_LEAKAGE

/* ************************************************************************
 *   Makefile workaround for some IDEs
 * ************************************************************************ */
#ifndef OSC_STARTUP
  #define OSC_STARTUP    16384
#endif

#define UI_ENGLISH

#define CYCLE_DELAY      3000

#define CYCLE_MAX        100    // 5

#define BAT_DIVIDER

#define BAT_R1           10000
#define BAT_R2           3300

#define BAT_OFFSET       100  // 290  misurato 7,51 - 7,46

#define BAT_WEAK         7400

#define BAT_LOW          6400

#define SAVE_POWER

#define UREF_VCC         5001

#define UREF_OFFSET      0

#define R_LOW            680
#define R_HIGH           470000

#define RH_OFFSET        350

#define R_ZERO           20

#define CAP_WIRES        2

#define CAP_PROBELEADS   9

#define CAP_DISCHARGED   2

#define CAP_FACTOR_SMALL      0      /* no correction */
#define CAP_FACTOR_MID        -40    /* -4.0% */
#define CAP_FACTOR_LARGE      -90    /* -9.0% */

#define ADC_SAMPLES      25

#define CPU_FREQ    F_CPU

#if defined(__AVR_ATmega328__)

  #include "config_328.h"

#elif defined(__AVR_ATmega324P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284__)

  #include "config_644.h"

#else
  #error <<< No or wrong MCU type selected! >>>
#endif


/*  ADC clock  */
#if CPU_FREQ == 20000000
  /* 20MHz MCU clock */
  #define ADC_FREQ    156250
#else
  /* all other MCU clocks */
  #define ADC_FREQ    125000
#endif


/* 1MHz/250kHz */
#if CPU_FREQ / ADC_FREQ == 4
  #define ADC_CLOCK_DIV (1 << ADPS1)
#endif

/* 1MHz/125kHz 2MHz/250kHz */
#if CPU_FREQ / ADC_FREQ == 8
  #define ADC_CLOCK_DIV (1 << ADPS1) | (1 << ADPS0)
#endif

/* 2MHz/125kHz 4MHz/250kHz */
#if CPU_FREQ / ADC_FREQ == 16
  #define ADC_CLOCK_DIV (1 << ADPS2)
#endif

/* 4MHz/125kHz 8MHz/250kHz */
#if CPU_FREQ / ADC_FREQ == 32
  #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS0)
#endif

/* 8MHz/125kHz 16MHz/250kHz */
#if CPU_FREQ / ADC_FREQ == 64
  #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1)
#endif

/* 16MHz/125kHz 20MHz/156.25kHz */
#if CPU_FREQ / ADC_FREQ == 128
  #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0)
#endif


#define C_ZERO           CAP_PCB + CAP_WIRES + CAP_PROBELEADS

#define MCU_CYCLES_PER_US     (CPU_FREQ / 1000000)

#define MCU_CYCLES_PER_ADC    (CPU_FREQ / ADC_FREQ)

#define MCU_CYCLE_TIME        (10000 / (CPU_FREQ / 1000000))

/* additional keys */
/* rotary encoder, increase/decrease push buttons or touch screen */
#if defined (HW_ENCODER) || defined (HW_INCDEC_KEYS) | defined (HW_TOUCH)
  #define HW_KEYS
#endif

/* options which require additional keys */
#ifndef HW_KEYS

  /* PWM+ */
  #ifdef SW_PWM_PLUS
    #undef SW_PWM_PLUS
    #define SW_PWM_SIMPLE   
  #endif

  /* squarewave generator */
  #ifdef SW_SQUAREWAVE
    #undef SW_SQUAREWAVE
  #endif

  /* Servo Check */
  #ifdef SW_SERVO
    #undef SW_SERVO
  #endif

#endif


/* options which require a MCU clock >= 8MHz */
#if CPU_FREQ < 8000000

  /* ESR measurement */
  #ifdef SW_ESR
    #undef SW_ESR
  #endif

  /* old ESR measurement */
  #ifdef SW_OLD_ESR
    #undef SW_OLD_ESR
  #endif

#endif


/* SPI */
#if defined (SPI_BITBANG) || defined (SPI_HARDWARE)
  #define HW_SPI
#endif


/* I2C */
#if defined (I2C_BITBANG) || defined (I2C_HARDWARE)
  #define HW_I2C
#endif


/* TTL serial */
#if defined (SERIAL_BITBANG) || defined (SERIAL_HARDWARE)
  #define HW_SERIAL
#endif

/* VT100 display driver disables other options for serial interface */
#ifdef LCD_VT100
  #ifdef UI_SERIAL_COPY
    #undef UI_SERIAL_COPY
  #endif
  #ifdef UI_SERIAL_COMMANDS
    #undef UI_SERIAL_COMMANDS
  #endif 
#endif

/* options which require TTL serial */
#ifndef HW_SERIAL
  #ifdef LCD_VT100
    #undef LCD_VT100
  #endif
  #ifdef UI_SERIAL_COPY
    #undef UI_SERIAL_COPY
  #endif
  #ifdef UI_SERIAL_COMMANDS
    #undef UI_SERIAL_COMMANDS
  #endif
#endif

/* options which require TTL serial RW */
#ifndef SERIAL_RW
  #ifdef UI_SERIAL_COMMANDS
    #undef UI_SERIAL_COMMANDS
  #endif
#endif


/* OneWire: probe leads prevail */
#ifdef ONEWIRE_PROBES
  #undef ONEWIRE_IO_PIN
#endif
#ifdef ONEWIRE_IO_PIN
  #undef ONEWIRE_PROBES
#endif

/* options which require OneWire */
#if ! defined (ONEWIRE_PROBES) && ! defined (ONEWIRE_IO_PIN)
  #ifdef SW_DS18B20
    #undef SW_DS18B20
  #endif
#endif


/* touchscreen */
#ifdef TOUCH_PORT
  #define HW_TOUCH
#endif


/* LCD module */
#ifdef LCD_CONTRAST
  #define SW_CONTRAST
#else
  #define LCD_CONTRAST        0
#endif


/* color coding for probes requires a color graphics display */
#ifdef SW_PROBE_COLORS
  #ifndef LCD_COLOR
    #undef SW_PROBE_COLORS
  #endif
#endif


/* component symbols for fancy pinout */
#if defined (SYMBOLS_24X24_H)
  #define SW_SYMBOLS
#endif
#if defined (SYMBOLS_24X24_HF) || defined (SYMBOLS_30X32_HF) || defined (SYMBOLS_32X32_HF)
  #define SW_SYMBOLS
#endif
#if defined (SYMBOLS_24X24_VFP)
  #define SW_SYMBOLS
#endif
#if defined (SYMBOLS_24X24_VP_F)
  #define SW_SYMBOLS
#endif

/* symbols require graphic display */
#ifdef SW_SYMBOLS
  #ifndef LCD_GRAPHIC
    #undef SW_SYMBOLS
  #endif
#endif


/* frequency counter */
#if defined (HW_FREQ_COUNTER_BASIC) || defined (HW_FREQ_COUNTER_EXT)
  #define HW_FREQ_COUNTER
#endif


/* IR detector/decoder: probe lead based decoder prevails */
#ifdef SW_IR_RECEIVER
  #undef HW_IR_RECEIVER
#endif
#ifdef HW_IR_RECEIVER
  #undef SW_IR_RECEIVER
#endif

/* ************************************************************************
 *   EOF
 * ************************************************************************ */


Thank You very much for any answer.
 

Offline pepe10000

  • Regular Contributor
  • *
  • Posts: 87
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #5451 on: January 17, 2019, 11:20:37 am »
I own an "AY-AT" ATmega328 with ST7735 color LCD module.
Recently I tried to compile the 1.34M firmware, either using WinAVR, avr-gcc-8.2.0 and Atmel Studio 7.
I get a warning, is it normal ?:

Quote
tools.c: In function 'Cap_Leakage':
tools.c:3302:9: warning: 'U1' may be used uninitialized in this function [-Wmaybe-uninitialized]
         Display_Value(U1, -3, 'V');          /* display voltage */
         ^~~~~~~~~~~~~~~~~~~~~~~~~~


https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/msg1879004/#msg1879004

https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/msg1879076/#msg1879076

A greeting.
 
The following users thanked this post: Giox040

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5452 on: January 17, 2019, 03:15:02 pm »
Another problem is that I can not make everything I want in the chip .... maybe I ask too much from this small tool.
Basically I would need to be able to test the goodness of the components but I do not need to measure resistance, impedance,
capacity, read or generate frequencies, because I own other equipment.

The resistance and capacitance measurements are essential and can't be disabled. But you can disable PWM (SW_PWM_SIMPLE) and the basic frequency counter (HW_FREQ_COUNTER_BASIC). If the firmware is still too large go for a tester with an ATmega 644 (look for "transistor tester M644" for example).
 
The following users thanked this post: elecdonia, Giox040

Offline Stinger

  • Regular Contributor
  • *
  • Posts: 53
  • Country: fr
Re: $20 LCR ESR Transistor checker project
« Reply #5453 on: January 19, 2019, 12:25:29 am »
Hello,

I received acrylic case for my LCR T4 V2.68 tester. But, Case are to short for 2,5mm... :-[

Are V2.68 tester with chinese caracters have differents dimension than generic ?

Mine :


 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5454 on: January 19, 2019, 03:47:23 pm »
I've seen T4 clones with slightly different PCBs. So my advice would be to buy a tester which includes the case.
 

Offline elbuit

  • Newbie
  • Posts: 6
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #5455 on: January 19, 2019, 04:00:46 pm »
Hello,

I received acrylic case for my LCR T4 V2.68 tester. But, Case are to short for 2,5mm... :-[

Are V2.68 tester with chinese caracters have differents dimension than generic ?


As far as I know there are no generic or standard dimensions.
I bought a LCR T4 with case and it fits perfectly, but as there are some diferent versions of transistor tester there are diferent kind of cases.

You can build a case yourself using or even screw it to a small plastic or wood rectangle.
 

Offline E440Qf

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #5456 on: January 23, 2019, 05:21:56 pm »
where can i find the english firmware precompiled (.hex and .eep) for GM328A?
i've been searching for hours |O
 

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #5457 on: January 23, 2019, 07:58:05 pm »
Did you check page 1?
 

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 168
  • Country: us
    • Upcycle Electronics
Re: $20 LCR ESR Transistor checker project
« Reply #5458 on: January 24, 2019, 11:10:20 pm »
Finally  :)
1 of 2 working with just the most basic circuits for power and startup.
 

Offline GregDunn

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #5459 on: January 25, 2019, 02:41:16 am »
Just got one of the AY-AT marked testers and wanted to test it out thoroughly.  I didn't have a 9V battery clip to mate with the device (it only has a barrel connector), so I looked around and found a 9VDC power supply with the proper polarity.  But before plugging it into the device, I measured the voltage and it was almost 14VDC!

This spec is not visible in the manual, and a 15-20 minute search of this thread didn't come up with the desired info, so: how much voltage is safe to put into one of these without blowing it up?  I know most wall warts will drop substantially when loaded, but this one is designed for a much heavier load, so I don't want to blindly try it out.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #5460 on: January 25, 2019, 04:21:13 am »
any transformer based psu will be way over without a load.
the max input of the ay-at is going to be down to the voltage regulator - get a datasheet.
 

Offline GregDunn

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #5461 on: January 25, 2019, 08:53:45 am »
Looks like the max regulator voltage is about 13V - and the PSU voltage is 13.5 even with a load comparable to the tester.    :(  Time to hunt for another one...
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5462 on: January 25, 2019, 12:41:36 pm »
The AY-AT clones have an HT7550 LDO usually (24V max). We have also to consider the power control circuitry with the BJTs and the LED since they are powered directly. 14V should be ok if the LDO can handle that voltage.
 

Offline GregDunn

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #5463 on: January 25, 2019, 05:25:13 pm »
Mine didn't come with a schematic and I didn't want to tear it apart to try and decipher the markings, so I just bodged an adapter and fed it 9VDC from one of my lab supplies.

Unfortunately, it looks like mine has a problem; when trying to set any of the parameters or run any of the routines, it hangs.  And the default "test on startup" always returns a fail - i.e., no part.  Looks like this one goes back.
 

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 168
  • Country: us
    • Upcycle Electronics
 
The following users thanked this post: GregDunn

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5465 on: January 26, 2019, 08:40:47 pm »
Finally  :)
1 of 2 working with just the most basic circuits for power and startup.

Plug-n-play ;D
 

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 168
  • Country: us
    • Upcycle Electronics
Re: $20 LCR ESR Transistor checker project
« Reply #5466 on: January 27, 2019, 03:30:56 am »
Plug-n-play ;D
Yeah I got 1.34m working on it today. It's nice to be able to try anything I want without much planning or CAD. I just need perfboard, wire, and a note pad to sketch on.
  It all fits into a bench enclosure. The test pad and rotary encoder are just there for stand alone testing. I still have a bunch of stuff to figure out, but I'm having fun. I have all of my HD44780 displays working in parallel with both firmwares, and I'm currently working on a ST7920 adapter that will test that display with parallel and serial. I may hook up the KS0108 on this board too.
 I'm super confused why KH's makefiles don't include 644/1284 options for all of the displays and stuff but I just need to test some stuff out before going into that...or I'm going to suck it up and build a 1280 board out of madness...

  One question. Who has the VT100 setup? I don't think I've seen that before. Are they running it on an Emulator or the real DEC'ing deal? (Sorry if I've overlooked this)
 

Offline upsss

  • Regular Contributor
  • *
  • Posts: 163
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #5467 on: January 27, 2019, 04:27:25 am »
Looks like the max regulator voltage is about 13V - and the PSU voltage is 13.5 even with a load comparable to the tester.    :(  Time to hunt for another one...
Just preload the output with about 100mA and the output will drop close to 9V, 100Ω 2W resistor will do it.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: $20 LCR ESR Transistor checker project
« Reply #5468 on: January 27, 2019, 07:23:00 am »
Unfortunately, it looks like mine has a problem; when trying to set any of the parameters or run any of the routines, it hangs.  And the default "test on startup" always returns a fail - i.e., no part.  Looks like this one goes back.

Since yours came assembled, you might give the board a thorough clean to get all the shmutz off. Then, check for the usual solder bridges, dry or cracked joints, etc. Also verify that the microcontroller is getting the correct voltage.
TEA is the way. | TEA Time channel
 

Offline E440Qf

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #5469 on: January 27, 2019, 04:51:12 pm »
yes but i can't figure out which one is the right one...
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5470 on: January 27, 2019, 04:52:28 pm »
I'm super confused why KH's makefiles don't include 644/1284 options for all of the displays and stuff but I just need to test some stuff out before going into that...or I'm going to suck it up and build a 1280 board out of madness...

You'll find the port and pin assignments for the display in config.h. Search for HW_LCD and make sure that you edit the 644 section. BTW, the k-firmware doesn't support hardware SPI.

One question. Who has the VT100 setup? I don't think I've seen that before. Are they running it on an Emulator or the real DEC'ing deal? (Sorry if I've overlooked this)

No need for a classic DEC terminal, most terminal programs support VT100.
 
The following users thanked this post: jakeisprobably

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5471 on: January 27, 2019, 04:59:28 pm »
yes but i can't figure out which one is the right one...

Have you tried mega328_GM328? ;) Or post a picture of your tester and we might be able figure out the model.
 

Offline E440Qf

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #5472 on: January 27, 2019, 05:09:10 pm »
GM328A, does the gm320 firmware works?
and which fuse config should i use?
Thanks in advance
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5473 on: January 27, 2019, 05:12:34 pm »
That one looks like an AY-AT clone. Please try mega328_color_kit.
 

Offline E440Qf

  • Newbie
  • Posts: 4
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #5474 on: January 27, 2019, 05:20:13 pm »
which fuse configuration?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf