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

0 Members and 7 Guests are viewing this topic.

Offline indman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #4800 on: May 26, 2018, 10:07:09 am »
Get your programmer ready! ;)
v1.33m 2018-05
madires added still something... :D
- The configuration setup for the Fish8840TFT clone is added to the Clones file.
 

Offline mebel

  • Regular Contributor
  • *
  • Posts: 50
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #4801 on: May 27, 2018, 03:26:47 pm »
I don't know why your tester reads larger caps a few percent low, but you could change the correction factor. Look for following lines in function LargeCap() in cap.c:
Code: [Select]
    if (Mode & PULL_10MS) Value /= 109;   /* -9% for large cap */
    else Value /= 104;                    /* -4% for mid-sized cap */

Large cap means capacitance > 47µF, and mid-sized cap 4.7 - 47µF. Simply lower the divisor to get a higher capacitance value.

Get your programmer ready! ;)

v1.33m 2018-05
- Fixed orientation of TRIAC symbol in symbols_32x32_hf.h.
- Added remote commands for automation (via TTL serial).
- The x & y offsets for the ST7735 driver can be changed now.
- Entering the menu by a short circuit of the probes is an option now
  (UI_SHORT_CIRCUIT_MENU).
- Fixed problem with discharge relay when using rotary encoder.
- Added configuration switch to disable MCU sleep modes.
- Added RX support to TTL serial driver (bit-bang & hardware USART).
- Fixed error in serial text output and added serial output for results of
  the optocoupler check.
- Danish texts (provided by glenndk@mikrocontroller.net)
- Settings for capacitor correction factors.


For me correct values were
Code: [Select]
    if (Mode & PULL_10MS) Value /= 102;   /* -9% for large cap */
    else Value /= 99;                    /* -4% for mid-sized cap */

Where the settings are in 1.33m firmware?


« Last Edit: May 27, 2018, 03:28:24 pm by mebel »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4802 on: May 27, 2018, 04:01:22 pm »
The correction factors are set in config.h:
Code: [Select]
/*
 *  Correction factors for capacitors (in 0.1%)
 *  - positive factor increases capacitance value
 *    negative factor decreases capacitance value
 *  - CAP_FACTOR_SMALL for caps < 4.7µF
 *  - CAP_FACTOR_MID for caps 4.7 - 47µF
 *  - CAP_FACTOR_LARGE for caps > 47µF
 */

#define CAP_FACTOR_SMALL      0      /* no correction */
#define CAP_FACTOR_MID        -40    /* -4.0% */
#define CAP_FACTOR_LARGE      -90    /* -9.0% */
 
The following users thanked this post: mebel

Offline carrascoso

  • Contributor
  • Posts: 41
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4803 on: May 28, 2018, 01:45:30 pm »
Hi.
Madires
I'm looking for information to put the protection relay for your ComponentTester-1.33m firmware. And made the one that I have in other testers but it does not work ..
I pray information and a scheme to be able to do it.

Thank you very much
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4804 on: May 28, 2018, 03:35:41 pm »
Have you enabled HW_DISCHARGE_RELAY in config.h?
 
The following users thanked this post: carrascoso

Offline carrascoso

  • Contributor
  • Posts: 41
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4805 on: May 28, 2018, 05:25:52 pm »
Have you enabled HW_DISCHARGE_RELAY in config.h?

Thank you very much.
a greeting
 

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4806 on: May 28, 2018, 08:06:32 pm »
 
The following users thanked this post: carrascoso

Offline carrascoso

  • Contributor
  • Posts: 41
  • Country: es
Re: $20 LCR ESR Transistor checker project
« Reply #4807 on: May 29, 2018, 06:01:53 pm »


The Atmega168 has already been changed to the 328, in addition to a 20MHz crystal.

What Software do I have to put? Mount an LCD SCM1602c 2x16

Thank you very much
« Last Edit: May 29, 2018, 06:07:34 pm by carrascoso »
 

Offline slinkygn

  • Newbie
  • Posts: 6
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4808 on: May 29, 2018, 11:40:17 pm »
If you get an AY-AT Clone, the following is a list of hardware corrections to order if you would like to optimize it's operation on M-Firmware. If you normally order parts from Mouser or Digikey all information and links are provided. (No Supplier Affiliation/No...

<clip>

(3×)470k Resistors
TE Connectivity
MPN: H8470KBZA
Metal Film Resistors - Through Hole H8 470K 0.1% 100PPM
MoPN: 279-H8470KBZA
$0.97each (8/2017)
$2.91 (×3)
DkPN: PTF475KCCT-ND (not stocked)
Dk Alt:
475k 0.1% 1/8W
Vishay Dale
MPN: PTF56475K00BYEB
DkPN: PTF475KCCT-ND
$1.64each (8/2017)

(3×)680ohm Resistors
TE Connectivity
MPN: H8680RBYA
Metal Film Resistors - Through Hole H8 680R 0.1% 15PPM
MoPN: 279-H8680RBYA
$1.14each (8/2017)
$3.42 (×3)
DkPN: H8680RBYA-ND(not stocked)
Dk Alt:
681ohm 0.1% 1/4W
Note: listed as discontinued by digikey (w/available stock 8/2017)
TT Electronics/Welwyn
MPN: RC55Y-681RBI
DkPN: 985-1036-1-ND
$1.70each (8/2017)

<clip>

Apologies if this has been asked.  I can't imagine it hasn't been brought up yet, but at the same time seaching turned up nothing -- which may just mean I'm terrible at coming up with the right search terms!

The parts recommendations here give alternates for each of the 0.1% resistors.  The suggested alternate for the 470k resistor is a 475k 0.1%, and the one for the 680ohm resistor is 681 0.1%.

Thing about that is, 475k is of course slightly over 1% more than 470k, and 681 is much closer but still between 0.1% and 0.2% of 680.

I can't imagine the recommendations are "wrong" and just uncaught after this long, but the only other conclusion I could come to would be that the 0.1% resistor tolerance is at least an order of magnitude above what the device's precision could resolve anyway.  If a 475k 0.1% resistor is for all practical purposes equivalent to a 470k 0.1% resistor, doesn't that indicate that one would likely still be just fine using a 470k 1% resistor?  (And in fact, perhaps even more so than using a 475k 0.1% resistor, as if the calculations depend fairly tightly on the 470k value then probability is on your side that you're better being +-1% off than starting at +1.1% and then being +-0.1% off from there.)

And same question for the 681 vs the 680 ohm resistor -- except doubly so, since the 680ohm value poses a problem in the 0.1% tolerance in that it doesn't exist in the E192 value series, or in fact any series higher than E24, and 681 of course doesn't exist in E24 or prior but is in every precision higher (including E192) so it's possible but far more difficult to find a 680ohm 0.1% cap than a 681ohm 0.1% cap, but at 1% it's actually slightly easier around here to find 680ohm than 681ohm caps (and it's a huge pain to find 5% 681s of course, not that it matters for our purposes).
 
The following users thanked this post: garthk

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4809 on: May 30, 2018, 01:03:59 am »
I think the idea is that the exact value of the resistor is not super important. The software can compensate for the actual value. Most important is that the resistor is stable, and doesn't drift. I could be wrong though.
« Last Edit: May 30, 2018, 01:09:54 am by timelessbeing »
 
The following users thanked this post: garthk

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4810 on: May 30, 2018, 10:29:25 am »
The Atmega168 has already been changed to the 328, in addition to a 20MHz crystal.

What Software do I have to put? Mount an LCD SCM1602c 2x16

k-firmware: mega328_2X16_menu (but needs to be re-compiled for 20MHz)
m-firmware: choose HD44780 driver
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4811 on: May 30, 2018, 10:48:55 am »
I can't imagine the recommendations are "wrong" and just uncaught after this long, but the only other conclusion I could come to would be that the 0.1% resistor tolerance is at least an order of magnitude above what the device's precision could resolve anyway.  If a 475k 0.1% resistor is for all practical purposes equivalent to a 470k 0.1% resistor, doesn't that indicate that one would likely still be just fine using a 470k 1% resistor?  (And in fact, perhaps even more so than using a 475k 0.1% resistor, as if the calculations depend fairly tightly on the 470k value then probability is on your side that you're better being +-1% off than starting at +1.1% and then being +-0.1% off from there.)

The values of the probe/test resistors R_low and R_high can be changed in a config file for the source code. If you go for different values please update the config file. Very simple, isn't it? ;)
 
The following users thanked this post: bitseeker, elecdonia, slinkygn

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4812 on: May 30, 2018, 10:52:07 am »
I think the idea is that the exact value of the resistor is not super important. The software can compensate for the actual value. Most important is that the resistor is stable, and doesn't drift. I could be wrong though.

You're spot on!
 
The following users thanked this post: garthk

Offline slinkygn

  • Newbie
  • Posts: 6
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4813 on: May 30, 2018, 04:54:51 pm »
The values of the probe/test resistors R_low and R_high can be changed in a config file for the source code. If you go for different values please update the config file. Very simple, isn't it? ;)

Ah hah!  I knew my search talents were at fault.  Just in a different way. :)  One of the first places I looked was the Karl-Heinz document, thinking "surely there might be a config setting for those values," but R_low and R_high are not mentioned as config settings there.  And then for some reason I didn't think to search for related config changes in the thread, and only looked for info specifically about resistor precision -- my apologies!

The question that I remain curious about then would be: at what point does the device's inherent precision make it so there isn't further return to increasing the precision of the test resistors?

To explain my question in a different way:  when I first thought about there possibly being a config value for the resistor values, I figured I could simply sit with a pile of a few hundred 5% resistors for each value (which I happen to have sitting around) and, with a nice Fluke 6.5-digit bench multimeter that is available for my use near here, a spreadsheet and a few minutes of patience, I could easily find three resistors that were within 0.1% value of each other.  Now I'm curious about extending that concept -- I erred toward caution early in the decision process here and bought 0.1% resistors anyway, and bought 10 because there was a significant price break at that quantity (can't have too many resistors!).  Well, now I suppose I could use that same nice bench meter and measure out those 10, and I imagine the likelihood of my finding three that are within, say, 0.05% of each other is actually rather high.  Maybe even 0.02% or so.  And I could always buy more resistors... that same pile of a few hundred resistors as before but all 0.1%, plus said patience, would make 0.01% precision between the three resistors easily achievable -- and maybe even more than that.  (And I don't think the compiler particularly cares if there are a few more significant digits in the value of course: if I find, say, 3 caps that are all within 0.01% of 473188 ohms  or 688.888 ohms or whatever I'd think r_high and r_low will handle those numbers just fine!)  I imagine it's largely a thought-experiment kind of question, then, but how precise can these values get before they are *too* precise to make a difference?
 

Offline slinkygn

  • Newbie
  • Posts: 6
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4814 on: May 30, 2018, 05:15:45 pm »
I think the idea is that the exact value of the resistor is not super important. The software can compensate for the actual value. Most important is that the resistor is stable, and doesn't drift. I could be wrong though.

Is this actually the case?  I think it's Vishay that did some white papers on the drift stability of modern metal-film resistors.  If I recall, drift in most precision resistors one would be likely to buy today is really remarkably low.  I do have some military-spec 6-band resistors around here somewhere that have ppm/degC drift bands and failure-rate markings on them, but largely speaking a parts tester would have to be in some pretty unusual temperatures to really see a difference that would even come close to approaching 0.1% of the resistor's value.  (Consider: 0.1% = 1000ppm; just as an example, the datasheet for the 470k 0.1%'s I just bought -- cheapest I could find -- state that they're 50ppm/degC, so a 10degC/18degF difference in temperature would make the resistor deviate 0.05%, and may still be within its rated value.)  Further, all the test resistors would ostensibly be experiencing the same temperature change, so would be all drifting in the same direction; for all practical purposes real-world drift performance as far as deviation between resistors goes would likely be an order of magnitude greater.

Likewise, age-related drift at typical operating temperatures is very low as well -- for those same resistors I bought, they're rated at <0.1% drift over 8000h of continuous operation at 85degC.  Since that is a very temperature-dependent value, and these resistors are unlikely to ever see even half of that temperature, their drift over the lifetime of the device is virtually negligible.

(I should note that the drift characteristics of these 0.1% resistors are virtually identical to much more easily acquirable 1% resistors, as they are both metal film resistors.)

So I think it may be that the precision of the resistors both among themselves and with relation to the set config values are the criteria of importance, more so than drift of the resistor (which is not related to being 0.1% or 5% precision but instead separately specified as a ppm/degC value for temperature-based drift, and failure rate ppm for drift in general).
« Last Edit: May 30, 2018, 08:28:21 pm by slinkygn »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4815 on: May 30, 2018, 05:54:03 pm »
I imagine it's largely a thought-experiment kind of question, then, but how precise can these values get before they are *too* precise to make a difference?

I'd guess 0.01%. Instead of buying 0.1% resistors you could also use a proper bench DMM to measure and select 1% metal film resistors. They don't have to be exactly 680 or 470k as you can change the values in the config file. We recommend the 0.1% types because they are much cheaper than a 6-1/2 digit or better DMM ;)
« Last Edit: May 30, 2018, 05:56:25 pm by madires »
 
The following users thanked this post: slinkygn

Offline timelessbeing

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: 00
Re: $20 LCR ESR Transistor checker project
« Reply #4816 on: May 30, 2018, 06:51:56 pm »
The values of the probe/test resistors R_low and R_high can be changed in a config file for the source code.
Does the calibration/self test not adjust for the resistors too?

I imagine it's largely a thought-experiment kind of question, then, but how precise can these values get before they are *too* precise to make a difference?
I like having some margin too. I would rather my accuracy be limited by things like the PCB, not my choice of resistors. Besides, most kits come with 0.1% resistors any way.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4817 on: May 30, 2018, 07:40:18 pm »
The values of the probe/test resistors R_low and R_high can be changed in a config file for the source code.
Does the calibration/self test not adjust for the resistors too?

No, but for the probe leads / PCB traces and the ATmega's internal switching. Therefore probe resistors with known value are required.
 

Offline slinkygn

  • Newbie
  • Posts: 6
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #4818 on: May 30, 2018, 11:19:01 pm »

I'd guess 0.01%. Instead of buying 0.1% resistors you could also use a proper bench DMM to measure and select 1% metal film resistors. They don't have to be exactly 680 or 470k as you can change the values in the config file. We recommend the 0.1% types because they are much cheaper than a 6-1/2 digit or better DMM ;)

But it's such a good investment! ...
Who am I kidding, the one I have access to isn't even mine.  If I could afford that, I probably wouldn't need to be building meters out of $20 DIY kits, would I? :)

One more quick question on this topic (which worst case I can answer myself by actually grabbing the code, I suppose): I mentioned that I didn't see r_low and r_high in Karl-Heinz' documentation.  Does that mean that the config values are only in the m-version, and not the k-version?  Will I have to go ifdef-hunting in the code if I want the k-version to use different cap values?
 

Offline phunky2018

  • Newbie
  • Posts: 3
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #4819 on: May 31, 2018, 10:05:42 am »
Hi folks,
this is my first post, I have some trouble with 1.33m firmware and sending serial commands to the tester.

My hardware:
- China AY-AT tester (16MHz)with a broken TFT Display (this was the reason why i want to activate and test the automation via serial tx and rx via e.g. terminal program)
- FTDI USB-Serial adapter (5V)

My own changes so far:
1. I removed the (broken)TFT, wired PD0 to FTDI TX pin and PD1 to FTDI RX pin and of course GND together
2. Cut the trace between R13 and PD1, wired now one of the encoder pins to PD2 and the other encoder pin is default PD3
3. Enabled UI_SERIAL_COPY, UI_SERIAL_COMMANDS, SERIAL_HARDWARE and SERIAL_RW (config.h)
4. Changed the ENCODER A pin to PD2 (config_328.h)

Receiving data from the tester to the terminal program is working, but if I send OFF or PROBE or MSG or something else, the tester goes to a closed loop(it's look like the tester reboot endless) and I don't get a messages back on the terminal screen (e.g. OK or ERR).
After a restart, the receiving data from the tester is working again till I send something to the tester.

Any ideas or are more modifications necessary?
« Last Edit: May 31, 2018, 10:07:36 am by phunky2018 »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4820 on: May 31, 2018, 10:42:35 am »
One more quick question on this topic (which worst case I can answer myself by actually grabbing the code, I suppose): I mentioned that I didn't see r_low and r_high in Karl-Heinz' documentation.  Does that mean that the config values are only in the m-version, and not the k-version?  Will I have to go ifdef-hunting in the code if I want the k-version to use different cap values?

For the k-firmware it's R_L_VAL and R_H_VAL.
 
The following users thanked this post: bitseeker, slinkygn

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #4821 on: May 31, 2018, 11:08:48 am »
Receiving data from the tester to the terminal program is working, but if I send OFF or PROBE or MSG or something else, the tester goes to a closed loop(it's look like the tester reboot endless) and I don't get a messages back on the terminal screen (e.g. OK or ERR).
After a restart, the receiving data from the tester is working again till I send something to the tester.

Any ideas or are more modifications necessary?

Are PD0 and PD1 also used for the LCD? In most cases LCD_RESET and LCD_CS are optional and can be disabled. Simply change the other control lines to unused pins. It seems we need a dummy LCD driver with no functionality or maybe ANSI/VT100 output.
 

Offline phunky2018

  • Newbie
  • Posts: 3
  • Country: de
Re: $20 LCR ESR Transistor checker project
« Reply #4822 on: May 31, 2018, 05:14:32 pm »
I disabled LCD_RES and LCD_CS in config_328.h without success.

/*
 *  ST7735, SPI interface (bit-bang, 4 wire)
 */

//#if 0
#define LCD_ST7735
#define LCD_COLOR                       /* color graphic display */
#define LCD_SPI                         /* SPI interface */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
//#define LCD_RES          PD1            /* port pin used for /RESX (optional) */
//#define LCD_CS           PD5            /* port pin used for /CSX (optional) */
#define LCD_DC           PD3            /* port pin used for D/CX */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SDA          PD4            /* 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_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_LATE_ON                     /* turn on LCD after clearing it */
#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 */
//#endif

Maybe your idea in the future with an dummy LCD could work. 
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #4823 on: May 31, 2018, 06:11:37 pm »
Hi madires! :)
At me it is also impossible to receive the response in an automatic mode.
ERR responds to any command.
I try simulation of the project in Proteus.
 
The following users thanked this post: timelessbeing

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: $20 LCR ESR Transistor checker project
« Reply #4824 on: May 31, 2018, 06:47:55 pm »
Nice! I started making the same yesterday! Can you share the Proteus project files?

Alexander.
Become a realist, stay a dreamer.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf