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

0 Members and 8 Guests are viewing this topic.

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5075 on: September 08, 2018, 09:26:26 pm »
@azure: you cannot dump the flash from STC chips. the (hardcoded) bootloader simply does not support that. Therefore our best bet is to reprogram it, thats what I am trying at the moment.
« Last Edit: September 08, 2018, 09:30:18 pm by flodo »
 

Offline logic021

  • Newbie
  • Posts: 1
  • Country: cs
Re: $20 LCR ESR Transistor checker project
« Reply #5076 on: September 09, 2018, 08:04:40 am »
Need help.
I have GM328A with faulty TEST pin 2.
1. Measurements between pin 1 and 3 is OK.
2. Test pcb lines from ZIF to IC - OK
3. Tested IC with blink program:
    direct pins 23,23,25  - OK
    resistor pins 12,13,14,15,16,17  - OK

I tried with another IC - the same result







 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5077 on: September 09, 2018, 11:20:22 am »
This is the header you need for U4: https://gist.github.com/atar-axis/430ae53213e2c193e8c3eaa9e89eb21f
I also attached a pinout of U4, as you can see it is easy to access MCU RxD and TxD via P1 and P2.

@madires:
I flashed a first mockup for U4's fw, can you maybe give me some instructions for modifying your atmega_fw appropriately for  the TC1? (maybe you can even give me yours?)




P.S.: Here is another, more detailed diagram by user zappenduster: https://www.eevblog.com/forum/testgear/tc1-lcr-meter-transistor-tester-fix/)
« Last Edit: September 09, 2018, 11:38:26 am by flodo »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5078 on: September 09, 2018, 01:19:35 pm »
@madires: Is there anything I need to modify at your firmware? Can you provide me a "ready to flash" hex file - so I can concentrate on U4 :)

The settings for the TC1 are:

Code: [Select]
Hardware Options:
#define HW_REF25
#define HW_ZENER
#define HW_IR_RECEIVER
#define HW_ADJUST_CAP

Misc settings:
#define BAT_DIRECT
#define BAT_OFFSET       0
#define BAT_WEAK         3700
#define BAT_LOW          3500

LCD module:
#define LCD_ST7735
#define LCD_COLOR                       /* color graphic display */
#define LCD_SPI                         /* SPI interface */
#define LCD_PORT         PORTB          /* port data register */
#define LCD_DDR          DDRB           /* port data direction register */
#define LCD_RES          PB4            /* port pin used for /RESX (optional) */
//#define LCD_CS           PB?            /* port pin used for /CSX (optional) */
#define LCD_DC           PB5            /* port pin used for D/CX */
#define LCD_SCL          PB7            /* port pin used for SCL */
#define LCD_SDA          PB6            /* 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 LCD_LATE_ON                     /* turn on LCD after clearing it */
#define LCD_OFFSET_X     2              /* enable x offset of 2 or 4 dots */
#define LCD_OFFSET_Y     1              /* enable y offset of 1 or 2 dots */
#define FONT_10X16_HF                   /* 10x16 font, horizontally aligned & flipped */
//#define FONT_8X16_CYRILLIC_HF           /* 8x16 cyrillic font, horizontally aligned & flipped */
#define SYMBOLS_30X32_HF                /* 30x32 symbols, horizontally aligned & flipped */
#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 */

Pinout for test probes:
#define TP_ZENER         PA4       /* test pin with 10:1 voltage divider */
#define TP_REF           PA3       /* test pin with 2.5V reference */
#define TP_BAT           PA5       /* test pin with 4:1 voltage divider */
#define TP_CAP           PA7       /* test pin for self-adjustment cap */

Pinout for probe resistors:
#define R_PORT           PORTC     /* port data register */
#define R_DDR            DDRC      /* port data direction register */
#define R_RL_1           PC0       /* Rl (680R) for test pin #1 */
#define R_RH_1           PC1       /* Rh (470k) for test pin #1 */
#define R_RL_2           PC2       /* Rl (680R) for test pin #2 */
#define R_RH_2           PC3       /* Rh (470k) for test pin #2 */
#define R_RL_3           PC4       /* Rl (680R) for test pin #3 */
#define R_RH_3           PC5       /* Rh (470k) for test pin #3 */

Pinout for test button and power management:
#define CONTROL_PORT     PORTD     /* port data register */
#define CONTROL_DDR      DDRD      /* port data direction register */
#define CONTROL_PIN      PIND      /* port input pins register */
#define POWER_CTRL       PD2       /* controls power (1: on / 0: off) */
#define TEST_BUTTON      PD1       /* test/start push button (low active) */

Pinout for fixed IR detector/decoder:
#define IR_PORT          PORTD     /* port data register */
#define IR_DDR           DDRD      /* port data direction register */
#define IR_PIN           PIND      /* port input pins register */
#define IR_DATA          PD3       /* data signal */

Pinout for fixed cap for self-adjustment:
#define ADJUST_PORT      PORTC     /* port data register */
#define ADJUST_DDR       DDRC      /* port data direction register */
#define ADJUST_RH        PC6       /* Rh (470k) for fixed cap */

PD1 is the input for the button and PD2 is the output for switching power.
 
The following users thanked this post: flodo

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5079 on: September 09, 2018, 01:26:15 pm »
I have GM328A with faulty TEST pin 2.

I tried with another IC - the same result

Did test pin 2 work before? You could try to remove IC SRV05-4.
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5080 on: September 09, 2018, 02:30:34 pm »
Thanks madires!
Is the attached behaviour correct?
« Last Edit: September 09, 2018, 03:32:44 pm by flodo »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5081 on: September 09, 2018, 03:29:37 pm »
Yep, the signals look fine. To reduce the quiescent current it could be a good idea to keep the button signal for the ATmega low when the boost converter isn't enabled. What do you think?
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5082 on: September 09, 2018, 03:33:23 pm »
Okay, will do that afterwards :D

The TC1 is starting up now with U4's new FW, but...
* the display is flipped and [fixed by commenting out 'LCD_FLIP_X' and commenting 'LCD_FLIP_Y']
* once online the device is testing and so on, afterwards it says IMMEDIATELY 'bye' - there is no delay, you cannot even read the values
* it then stops there, the device is not yet shutting down after that - or, sometimes, it starts again and again after the "bye" being displayed, think there is still something wrong with the FSM

thats something we can fix I guess :)
« Last Edit: September 09, 2018, 04:02:07 pm by flodo »
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5083 on: September 09, 2018, 04:34:50 pm »
Ups, looks like the endless "testing loop" is by design, right? (It does only shut down if no component is detected for x iterations, otherwise it is testing every 3 seconds or so)
« Last Edit: September 09, 2018, 04:40:19 pm by flodo »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5084 on: September 09, 2018, 04:39:17 pm »
Have you set the MCU clock to 16MHz in the Makefile? When the tester is started in "continuous mode" (short key press at start-up) it will run the test cycles continuously and power down if nothing is found for five times in a row. There's also an auto-hold mode which is selected by powering on the tester with a long key press (>300ms). And a very long key press (2s) will reset some values.
« Last Edit: September 09, 2018, 04:45:37 pm by madires »
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5085 on: September 09, 2018, 04:41:34 pm »
found it, yes it is by design  8)

therefore the new U4 firmware is working :P
will have to change some details and will publish it afterwards with some informations on how to upload it to the TC1.
(debouncing, sleep mode and thing like that are still missing)

thanks for your support and your efforts!


edit: yes i made those Makefile changes you mention :)
« Last Edit: September 09, 2018, 05:02:57 pm by flodo »
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5086 on: September 09, 2018, 09:04:55 pm »
I somehow damaged the strong drivers of my STC ... :-// Unfortunately it will take some days or maybe weeks to get a new one here in Germany. Maybe someone has an idea where I can get a new one faster?
« Last Edit: September 09, 2018, 09:47:27 pm by flodo »
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: $20 LCR ESR Transistor checker project
« Reply #5087 on: September 09, 2018, 11:03:29 pm »
The AY-AT clone I bought comes with version 1.12 firmware. Why so old (five years)?

If it ain't broke, don't fix it; time is money; etc.
TEA is the way. | TEA Time channel
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5088 on: September 10, 2018, 03:19:50 am »
Fortunately I was mistaken, my STC U4 is still alive.


I attached the first firmware version for TC1 U4 (without any kind of power saving mode, will do that later).

How To:
Just grab any kind of USB-to-UART(3V3) Adapter, hook up...
* TXD (Stick) to P1,
* RXD to P2 and
* GND to GND

Download the STC-ISP Software, leave everything as it is and select the firmware.
Press "Download/Program" and now hook up 3V3 at VCC (power the IC).
Wait for the firmware being uploaded.

That's it.


I am not yet 100% sure if it behaves correctly, I would appreciate any video of 1.33m


https://github.com/atar-axis/tc1-u4/releases
« Last Edit: September 21, 2018, 02:09:07 pm by flodo »
 
The following users thanked this post: madires, indman

Offline indman

  • Super Contributor
  • ***
  • Posts: 1010
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #5089 on: September 10, 2018, 06:36:00 am »
Fortunately I was mistaken, my STC U4 is still alive.
I am not yet 100% sure if it behaves correctly, I would appreciate any video of 1.33m
flodo,сan you make small video of work of the LCR-TC1 with a new firmware U4? :)
What settings for STC-ISP software need to be made? In this program there are a lot of additional points.
Did you use stc-isp6.86?
« Last Edit: September 10, 2018, 06:45:48 am by indman »
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5090 on: September 10, 2018, 08:38:19 am »
flodo,сan you make small video of work of the LCR-TC1 with a new firmware U4? :)

I think it is better to wait for a video from someone with the transistor-mod since I am not sure if it behaves correctly.

What settings for STC-ISP software need to be made? In this program there are a lot of additional points.

Just leave everything as it is (at least for now).

Did you use stc-isp6.86?

Jap.
« Last Edit: September 10, 2018, 08:40:00 am by flodo »
 

Offline seanspotatobusiness

  • Regular Contributor
  • *
  • Posts: 84
Re: $20 LCR ESR Transistor checker project
« Reply #5091 on: September 10, 2018, 09:32:04 am »
Regarding editing 'config.sh', why do some entries have only a # while others have //#? I understand that the # comments-out options but does that mean to enable the servo check I should remove only the # and leave the // or should I remove both to enable? Thanks.

Code: [Select]
/*
 *  color coding for probes
 *  - requires color graphics LCD
 *  - uncomment to enable
 *  - edit colors.h to select correct probe colors
 */

#define SW_PROBE_COLORS


/*
 *  Servo Check
 *  - requires additional keys and display with more than 2 text lines
 *  - uncomment to enable
 */

//#define SW_SERVO

Also for the battery offset setting, I don't think my AY-AT clone has a reverse voltage protection diode - is that a bad design? Should I just measure the voltage drop across the 9014 transistor next to the LED at the top of the board?

Code: [Select]
/*
 *  Voltage drop by reverse voltage protection diode and power management
 *  transistor (in mV):
 *  - Schottky diode about 200mV / PNP BJT about 100mV.
 *  - Get your DMM and measure the voltage drop!
 *  - Could be also used to compensate any offset by the voltage divider
 *    used to measure the battery voltage.
 */ 

#define BAT_OFFSET       290
« Last Edit: September 10, 2018, 09:45:44 am by seanspotatobusiness »
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5092 on: September 10, 2018, 10:11:47 am »
In C '#' is not a comment but a preprocessor directive ;) Remove '//' to enable
« Last Edit: September 10, 2018, 10:14:17 am by flodo »
 
The following users thanked this post: seanspotatobusiness

Offline seanspotatobusiness

  • Regular Contributor
  • *
  • Posts: 84
Re: $20 LCR ESR Transistor checker project
« Reply #5093 on: September 10, 2018, 10:18:04 am »
In C '#' is not a comment but a preprocessor directive ;) Remove '//' to enable

Thanks. Do you know why some options have //# while others only have #? Are the # options the default in case nothing is changed?

Also, I notice inductance measurement is disabled by default. Is there some disadvantage to enabling inductance measurement on some testers? I have an AY-AT clone.

Code: [Select]
*
 *  Inductance measurement
 *  - uncomment to enable
 */

#define SW_INDUCTOR
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5094 on: September 10, 2018, 10:54:44 am »
If a line starts with "//", then it is a comment :)
Therefore "//#" means that this specific option is commented out.

If a line does not have a leading "//" (like #define BAT_OFFSET       290) then it is not commented out...

But there is another kind of comments which :
/* this is a
multiline
comment
*/



Beside commenting out, you can also disable options by using preprocessor directives:
#if 0 ... #endif,
you can enable those blocks by changing the 0 to 1 like:
#if 1 ... #endif


Regarding the AY-AT questions: I don't know

« Last Edit: September 10, 2018, 11:00:42 am by flodo »
 

Offline seanspotatobusiness

  • Regular Contributor
  • *
  • Posts: 84
Re: $20 LCR ESR Transistor checker project
« Reply #5095 on: September 10, 2018, 11:27:11 am »
If a line does not have a leading "//" (like #define BAT_OFFSET       290) then it is not commented out...

Are you sure? The following code is what appears in the config.h file I downloaded. It says uncomment to enable which suggests that it's disabled by default and you need to remove the # to uncomment the option. Shouldn't it say "comment to disable" instead of "uncomment to enable" if # is not a comment marker?

Code: [Select]
/*
 *  Enter sleep mode when idle to save power.
 *  - uncomment to enable
 */

#define SAVE_POWER
 

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5096 on: September 10, 2018, 11:48:19 am »
Yes, I am 100% sure  ;) ^-^ It reads "Uncomment to enable" so, since it is already uncommented, it is enabled. Someone wrote that when it was commented out by default, but it isn't anymore.

If you still don't believe me, google for "preprocessor directive C" - e.g.: http://www.cplusplus.com/doc/tutorial/preprocessor/
« Last Edit: September 10, 2018, 11:50:46 am by flodo »
 
The following users thanked this post: seanspotatobusiness

Offline flodo

  • Contributor
  • Posts: 41
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #5097 on: September 10, 2018, 12:08:54 pm »
flodo,сan you make small video of work of the LCR-TC1 with a new firmware U4? :)

 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5098 on: September 10, 2018, 01:13:55 pm »
Also, I notice inductance measurement is disabled by default. Is there some disadvantage to enabling inductance measurement on some testers? I have an AY-AT clone.

Code: [Select]
*
 *  Inductance measurement
 *  - uncomment to enable
 */

#define SW_INDUCTOR

The inductance measurement is enabled by default for all testers. Please don't get confused by the '#'. In an unix shell script it would be a comment, but in C it's a directive for the preprocessor as flodo has explained already. And the '//' is used to indicate a comment.
 
The following users thanked this post: seanspotatobusiness

Offline madires

  • Super Contributor
  • ***
  • Posts: 7752
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #5099 on: September 10, 2018, 01:20:37 pm »
Are you sure? The following code is what appears in the config.h file I downloaded. It says uncomment to enable which suggests that it's disabled by default and you need to remove the # to uncomment the option. Shouldn't it say "comment to disable" instead of "uncomment to enable" if # is not a comment marker?

Code: [Select]
/*
 *  Enter sleep mode when idle to save power.
 *  - uncomment to enable
 */

#define SAVE_POWER

Copy and paste ;) In this case the feature is enabled by default (it's starting with the #define directive). If you want to disable it you'd insert a '//' in front of the '#define':
Code: [Select]
//#define SAVE_POWER

The 'uncomment to enable' implies a "comment out to disable'. You'll learn all this when you start programming in C ;)
 
The following users thanked this post: seanspotatobusiness


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf