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

0 Members and 14 Guests are viewing this topic.

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 140
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #9375 on: April 05, 2024, 07:16:26 pm »
Everything I need, I try to do myself. All my homemade testers were made for 2.2" - 2.8" color displays. In your eighth decade, it is difficult to work with small displays. The latest solution is a refinement of an earlier idea. Need some work on the symbols and font...
 
The following users thanked this post: indman, Obelix2007, horo

Offline indman

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9376 on: April 05, 2024, 07:39:30 pm »
The latest solution is a refinement of an earlier idea.
Yes, everything is clear now, thank you. You draw an additional diode using 3 lines. :-+
A perfectly reasonable approach, but it does require some work on the existing character sets we currently have.
« Last Edit: April 05, 2024, 07:43:05 pm by indman »
 

Offline Feliciano

  • Regular Contributor
  • *
  • Posts: 214
  • Country: ve
Re: $20 LCR ESR Transistor checker project
« Reply #9377 on: April 06, 2024, 12:07:23 pm »
Congratulations, Yuriy_K, for being active for so long :)
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9378 on: April 06, 2024, 01:55:14 pm »
Yes, everything is clear now, thank you. You draw an additional diode using 3 lines. :-+
A perfectly reasonable approach, but it does require some work on the existing character sets we currently have.

And the symbol size has to be three times the font size for a perfect match. For example, for high resolution displays the default font is 16x26. So the symbols should be 3 * 26 = 78 pixels high. Since symbols are resized in the display driver (only for high resolution displays) by a default factor of 2, the height can be reduced to 78 / 2 = 39 pixels. Alternatively we could go for a resize factor of 3 and use the font's height of 26. But this would look too pixelated.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9379 on: April 07, 2024, 05:06:35 pm »
It took a while but I managed to understand why a flyback diode screwed up the D/S detection of a p-channel JFET and therefore also a few measurements of parameters. The intrinsic diode of a p-channel depletion-mode MOSFET should have the same impact (never tested because I don't have any of those). The fix is fairly simple, just a few lines of code. So the next version of the m-firmware will include the fix and also show an optional flyback diode for JFETs.

If you like to beta-test, edit semi.c, function CheckDepletionModeFET(), in the block for p-channel depletion-mode FETs and look for
Code: [Select]
      /*
       *  Compare gate voltages to distinguish JFET from MOSFET
       */

      /* set probes: probe-1 -- Vcc / probe-2 -- Rl -- Gnd / probe-3 -- Rh -- Gnd */
      R_PORT = 0;                       /* pull down drain via Rl & gate via Rh */
      ...

Directly above that insert:
Code: [Select]
      /* consider intrinsic or optional flyback diode (causes low Diff_2) */
      if (Diff_2 < (Offset / 2))          /* diode */
      {
        /* swap Diff_1 and Diff_2 */
        /* to fix reversed D/S issue caused by diode */
        U_1 = Diff_1;
        Diff_1 = Diff_2;
        Diff_2 = U_1;
      }


      /*
       *  Compare gate voltages to distinguish JFET from MOSFET
       */

And also modify function Show_FET() in main.c to call Show_FET_Extras() without any condition (remove the if (...)).
 
The following users thanked this post: horo

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 140
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #9380 on: April 08, 2024, 02:59:00 am »
There may be something else, this insert does not give the desired result for searching for a diode. Diode search for N-ch JFET stopped working.
  Diode = SearchDiode(Anode, Cathode);
  if (Diode != NULL)          /* got it */    =  NULL
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9381 on: April 08, 2024, 11:21:58 am »
You've inserted the patch into the section for n-channel depletion-mode FETs which causes the new problem. The section for p-channel FETs is a bit further down and starts with:
Code: [Select]
  /*
   *  check if we got a p-channel JFET or depletion-mode MOSFET
   *  - JFETs are depletion-mode only
   */

  if (Flag != SIGNAL_FET)     /* no n-ch dep-mode FET found */
  ...
 
The following users thanked this post: Yuriy_K

Offline Yuriy_K

  • Regular Contributor
  • *
  • Posts: 140
  • Country: ru
Re: $20 LCR ESR Transistor checker project
« Reply #9382 on: April 08, 2024, 04:12:56 pm »
Now everything is working fine. To avoid confusion in the place of correction, I am attaching the modified files. Check who needs...

JFET N-ch 2SK212
« Last Edit: April 08, 2024, 04:29:03 pm by Yuriy_K »
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9383 on: April 08, 2024, 04:19:44 pm »
Back to JFETs with an integrated flyback diode. Yuriy_K has such an n-ch JFET. But are there also p-ch JFETs with a diode?
  I have not found a single mention on the Internet of any JFET p-ch witch a diode.  :)

« Last Edit: April 08, 2024, 04:59:20 pm by indman »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9384 on: April 08, 2024, 05:25:50 pm »
Me neither. All I've found was some paper about a high voltage SiC JFET with integrated flyback diode.
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9385 on: April 09, 2024, 09:55:02 pm »
Hello people, getting crazier and crazier, I am trying to update the firmware from version 1.40 to 1.52, since I had to return the programmer, since I have not been able to make it work, I set up the connection this way,


I tried loading an Arduino bootloader from Arduino and perfect, I loaded the ArduinoISP.ino file onto the Arduino master board and placed it in Arduino as ISP mode. and it works well, now when I have loaded previous versions of firmware to the GN328, it always starts like this. To know that the connection worked
But the next step was to upload my compilation, which I couldn't do, so I started changing Arduinos uno and mega, and the target chip and nothing. So I thought that my build now was really garbage.

I said I'm going to load the one I'm using that I had downloaded from the web, which is the one I'm using, but the same problem continues and I have configured AVRdude in many ways and it still gives me the same result



The truth is that unfortunately I never captured the screen of how I configured it, with the programmer that they had lent me it loaded, but the screen remains blank, now nothing, nor loads. any ideas friends

 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: $20 LCR ESR Transistor checker project
« Reply #9386 on: April 09, 2024, 10:11:22 pm »
Hello people, getting crazier and crazier, I am trying to update the firmware from version 1.40 to 1.52, since I had to return the programmer, since I have not been able to make it work, I set up the connection this way

You should have a 12-22pF a capacitor from pin 9 to ground and from pin 10 to ground. Oscillator may be unstable without them.
Also, putting a 0.1uF capacitor across pins 7 & 8 might be a good idea.
« Last Edit: April 09, 2024, 10:15:18 pm by Kim Christensen »
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9387 on: April 09, 2024, 10:18:15 pm »
Hello people, getting crazier and crazier, I am trying to update the firmware from version 1.40 to 1.52, since I had to return the programmer, since I have not been able to make it work, I set up the connection this way

You should have a 12-22pF a capacitor from pin 9 to ground and from pin 10 to ground. Oscillator may be unstable without them.
Also, putting a 0.1uF capacitor across pins 7 & 8 might be a good idea.

Yes, they are not in that image but I put the two capacitors in it 22pf
 

Offline hapless

  • Regular Contributor
  • *
  • Posts: 195
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9388 on: April 09, 2024, 11:02:20 pm »
I would check and update fuses and use the "Erase flash and EEPROM" option.
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9389 on: April 10, 2024, 05:09:07 pm »
Well, after a lot of work, this is the configuration that worked, with my five atmega328p, what I can't do is make a good firmware, I can't accommodate the make, the screen doesn't turn on, I press on and off, only the brightness.

easiest photo sharing site


I can't upload the makefile, but there aren't many modifications, the most important is the one from 8Mhz to 20Mhz
 

Offline Feliciano

  • Regular Contributor
  • *
  • Posts: 214
  • Country: ve
Re: $20 LCR ESR Transistor checker project
« Reply #9390 on: April 10, 2024, 07:13:28 pm »
The Chinese ATmegas have been found unstable at 20MHz (and the ADC needs to be set to another division ratio as well). More information on previous posts on this thread. The short version: it's recommended to run these MCUs at 16MHz.

And if your display only shows backlight but no text, it's important to double check the pin mapping between the MCU and LCD controller, and that against the config (config_328.h if trying the m-firmware).
« Last Edit: April 11, 2024, 02:02:03 pm by Feliciano »
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9391 on: April 11, 2024, 05:01:12 pm »
download the new version of markus from herehttps://github.com/kubi48/TransistorTester-source/tree/master/Markus, to start from scratch
2- remove the 20MHz crystal and place a 16Mhz one, since they said it is unstable.
3. I already have Ubuntu installed and other files to compile. and it works well.
questions
1- only makefile and config_328.h are modified?? or there are more files.
2- makefile, apart from the 16mhz crystal frequency, something else is changed, since mine is like the video they recommended I watch.
3- in the config.h file I only modified the language. #define #define UI_SPANISH, I don't know if I'm missing something there?
4- in config_328.h I don't understand how to configure tft.

Known problem, the files load well from avrdude 2.17, I don't press the encoder, the screen lights up, I stop pressing the encoder and it turns off.

The version that I have previously installed is one of markus 1.40 in Spanish that they published on YouTube, but not how it was done. This one works fine, but it lacks options.

excuse my clumsiness


in spanish

descargue la version nuevamente de markus desde aquihttps://github.com/kubi48/TransistorTester-source/tree/master/Markus, para arrancar de cero
2- quite el cristal de 20mhz y coloque uno de 16Mhz, ya que dijeron que es inestable.
3. ya tengo instalado ubuntu y demas archivos para compilar. y funciona bien.
preguntas
1- solo se modifica makefile y config_328.h?? o hay mas archivos.
2-   makefile, aparte de frecuencia de cristal a 16mhz, se cambia algo mas, ya que el mio es como el video que me recomendaron ver.
3- en el archivo config.h yo solo modifique el idioma. #define #define UI_SPANISH, no se si me falta algo ahi.?
4- en el config_328.h no entiendo como configuar tft.

problema conocido, se cargan bien los archivos desde avrdude 2.17, preciono el encoder, pantalla se ilumina, dejo de realizar precion en el encoder y esta se apaga.

la version que tengo instalada anteriormente es una de markus 1.40 en español que publicaron en youtube, pero no como se realizo. esta funciona bien, pero le fantan opciones.

disculmpen mi torpeza
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9392 on: April 11, 2024, 06:57:02 pm »
Does the old 1.40m firmware you've downloaded include Makefile, config.h and config_328.h?
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9393 on: April 11, 2024, 09:28:13 pm »
I tell you, the truth is I don't remember which colleague posted it on YouTube, but in the backup files I have I only have the .hex and the .epp, since it was already ready to upload to the atmega328, I don't remember that there were more files in the zip file. In addition, the YouTuber commented that he was going to carry out the entire process in a video, but it was not carried out.

If I found the makefile, should I just replace it with the one I recently used or should I do something else???
« Last Edit: April 11, 2024, 09:42:06 pm by Adrian_Arg. »
 

Offline hapless

  • Regular Contributor
  • *
  • Posts: 195
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9394 on: April 11, 2024, 11:58:15 pm »
Start by replacing only config_328.h. See if this gets your display working.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9395 on: April 12, 2024, 09:56:33 am »
If I found the makefile, should I just replace it with the one I recently used or should I do something else???

Since you don't have the configuration of the old firmware version I'd recommend to look for your tester model in the Clones file and to use the listed settings as a starting point.
 

Offline Adrian_Arg.

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9396 on: April 12, 2024, 04:07:24 pm »
Thanks, I'll see if this weekend I review that information.
 

Offline edgard22

  • Newbie
  • Posts: 6
  • Country: uy
Re: $20 LCR ESR Transistor checker project
« Reply #9397 on: April 13, 2024, 09:10:30 pm »
Good afternoon everyone, I would like to ask if it is possible to change the way in which the values ​​of, for example, capacitors are displayed, that is, an autoscale, so that instead of showing 1000pF it shows 1n.
Maybe it's already implemented and I don't know. Thank you.

Buenas tardes a todos, quisiera consultar si es posible cambiar la forma en que se muestran los valores de por ejemplo los capacitores, o sea una autoescala, que en lugar de mostrar 1000pF muestre 1n.
Quizá ya esté implementado y yo no lo sé. Gracias.
« Last Edit: April 13, 2024, 09:12:13 pm by edgard22 »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: $20 LCR ESR Transistor checker project
« Reply #9398 on: April 13, 2024, 10:02:07 pm »
I did end up doing that earlier.
I'm not that great at coding, so it was a bit of a hack. I modified the "Display_Value" routine in Display.c to check a flag variable I named "UpScaleReadout" and reset it at the end of the routine like so:
Code: [Select]
/*
 *  display unsigned value plus unit (character)
 *  - scales value to max. 4 digits excluding "." and unit
 *
 *  requires:
 *  - unsigned value
 *  - exponent of factor related to base unit (value * 10^x)
 *    e.g: p = 10^-12 -> -12
 *  - unit character (0 = none)
 */

void Display_Value(uint32_t Value, int8_t Exponent, unsigned char Unit)
{
  unsigned char     Prefix = 0;         /* prefix character */
  uint8_t           Offset = 0;         /* exponent offset to lower 10^3 step */
  uint8_t           Index;              /* index ID */
  uint8_t           Length;             /* string length */

  /* scale value down to 4 digits */
  while (Value >= 10000)
  {
    Value += 5;                       /* for automagic rounding */
    Value = Value / 10;               /* scale down by 10^1 */
    Exponent++;                       /* increase exponent by 1 */
  }


  /*
   *  determine prefix and offset (= number of digits right of dot)
   */

  if (Exponent >= -15)                  /* prevent index underflow */
  {
    Exponent += 15;                     /* shift exponent to be >= 0 */
    Index = Exponent / 3;               /* number of 10^3 steps */
    Offset = Exponent % 3;              /* offset to lower 10^3 step */

    if (Offset > 0 || !UpScaleReadout)  /* dot required */
    {
      Index++;                          /* upscale prefix */
      Offset = 3 - Offset;              /* reverse value (1 or 2) */
    }   

    /* look up prefix in table */
    if (Index < NUM_PREFIXES)           /* prevent array overflow */
    {
      Prefix = DATA_read_byte(&Prefix_table[Index]);
    }
  }


  /*
   *  display value
   */

  #ifdef UI_COLORED_VALUES
  Display_UseValueColor();              /* set value color */
  #endif

  /* convert value into string */
  utoa((uint16_t)Value, OutBuffer, 10);   /* radix 10: max. 5 chars + /0 */
  Length = strlen(OutBuffer);             /* get string length */

  /* we misuse Exponent for the dot position */
  Exponent = Length - Offset;           /* calculate position */

  if (Exponent <= 0)                    /* we have to prepend "0." */
  {
    /* 0: factor 10 / -1: factor 100 */
    Display_Char('0');                  /* display: 0 */
    #ifdef UI_COMMA
    Display_Char(',');                  /* display: , */
    #else
    Display_Char('.');                  /* display: . */
    #endif
    if (Exponent < 0)                   /* factor 100 */
    {
      Display_Char('0');                /* additional 0 */
    }
  }

  if (Offset == 0)                 /* no dot needed */
  {
    Exponent = -1;                 /* disable dot */
  }

  /* adjust position to match array or disable dot if set to 0 */
  Exponent--;

  /* display value and add dot if requested */
  Index = 0;
  while (Index < Length)                /* loop through string */
  {
    Display_Char(OutBuffer[Index]);     /* display char/digit */

    if (Index == Exponent)              /* starting point of decimal fraction */
    {
      #ifdef UI_COMMA
      Display_Char(',');                /* display: , */
      #else
      Display_Char('.');                /* display: . */
      #endif
    }

    Index++;                            /* next one */
  }

  #ifdef UI_COLORED_VALUES
  Display_UseOldColor();                /* reset pen color */
  #endif

  /* display prefix and unit */
  if (Prefix) Display_Char(Prefix);
  if (Unit) Display_Char(Unit);
 
  UpScaleReadout = 1; /* disable scaling flag */
}


Then, whenever I wanted the reading to be upscaled one level, I'd set "UpScaleReadout = 0" before calling the "Display_Value" routine:
Code: [Select]
void Show_SingleResistor(uint8_t ID1, uint8_t ID2)
{
  Resistor_Type     *Resistor;     /* pointer to resistor */

  Resistor = &Resistors[0];        /* pointer to first resistor */

  /* show pinout */
  Display_Char(ID1);
  Display_EEString(Resistor_str);
  Display_Char(ID2);

  /* show resistance value */
  Display_Space();
  UpScaleReadout = 0;
  Display_Value(Resistor->Value, Resistor->Scale, LCD_CHAR_OMEGA);
}

 
The following users thanked this post: edgard22

Offline edgard22

  • Newbie
  • Posts: 6
  • Country: uy
Re: $20 LCR ESR Transistor checker project
« Reply #9399 on: April 13, 2024, 10:59:21 pm »
I'm not good at programming, thank you very much, I'll try it!

Yo soy nulo en programación, muchas gracias, voy a probar!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf