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

0 Members and 5 Guests are viewing this topic.

Offline hapless

  • Regular Contributor
  • *
  • Posts: 196
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9375 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: 447
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9376 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: 248
  • Country: ve
Re: $20 LCR ESR Transistor checker project
« Reply #9377 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: 447
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9378 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: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9379 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: 447
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9380 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: 196
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9381 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: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9382 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: 447
  • Country: ar
Re: $20 LCR ESR Transistor checker project
« Reply #9383 on: April 12, 2024, 04:07:24 pm »
Thanks, I'll see if this weekend I review that information.
 

Offline edgard22

  • Contributor
  • Posts: 11
  • Country: uy
Re: $20 LCR ESR Transistor checker project
« Reply #9384 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 »
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1750
  • Country: ca
Re: $20 LCR ESR Transistor checker project
« Reply #9385 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

  • Contributor
  • Posts: 11
  • Country: uy
Re: $20 LCR ESR Transistor checker project
« Reply #9386 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!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9387 on: April 14, 2024, 09:04:50 am »
You could try following:

In display.c, function Display_Value() change
Code: [Select]
    if (Offset > 0)                     /* dot required */
to
Code: [Select]
    /* dot required or 4-digit value */
    if ((Offset > 0) || (Value >= 1000))

Edit: Will be an option in the next firmware version.
« Last Edit: April 14, 2024, 11:42:38 am by madires »
 
The following users thanked this post: Jacon, edgard22

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1750
  • Country: ca
Re: $20 LCR ESR Transistor checker project
« Reply #9388 on: April 14, 2024, 03:21:35 pm »
At first, I tried something similar to your solution madires. But found that some calls to Display_Value() returned unwanted results. One I remember was the self tests and corrections mV readouts being in volts.
So in the end, I wrote my code so it only changed the default behavior for certain calls to Display_Value(). I'm sure there's a more elegant way than my solution.
 
The following users thanked this post: edgard22

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9389 on: April 14, 2024, 04:17:49 pm »
The only value looking a bit strange should be T6 (Rh+) in the self test. It's near Vcc, e.g. 4990. 4990 would become 4.980k (because it's just a plain number).

@all: Please tell me if you encounter other strange values when testing the modification for 4-digit values!
« Last Edit: April 14, 2024, 04:25:16 pm by madires »
 

Offline edgard22

  • Contributor
  • Posts: 11
  • Country: uy
Re: $20 LCR ESR Transistor checker project
« Reply #9390 on: April 15, 2024, 12:16:27 am »
Thanks, I haven't tested it thoroughly but everything seems to be ok.

Gracias, no he probado a fondo pero parece estar todo ok.
 

Offline Feliciano

  • Regular Contributor
  • *
  • Posts: 248
  • Country: ve
Re: $20 LCR ESR Transistor checker project
« Reply #9391 on: April 19, 2024, 07:47:22 pm »
The only value looking a bit strange should be T6 (Rh+) in the self test. It's near Vcc, e.g. 4990. 4990 would become 4.980k (because it's just a plain number).

@all: Please tell me if you encounter other strange values when testing the modification for 4-digit values!
For normal and ESR capacitor measurements, the new dot option works for me.
Indeed the more noticeable "strange" results are in the SelfTest: I don't mind T1 showing 1.1xxV, but T6 showing 4.9xxK(mV) can be confusing. I think that part would require a little adjustment too :-/O
« Last Edit: April 19, 2024, 07:55:45 pm by Feliciano »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9392 on: April 20, 2024, 09:40:42 am »
Also, three times 4.9xxk plus two spaces exceeds a line length of 16 chars. The new firmware version will come with a simple workaround when 4-digit values are disabled.
 

Offline indman

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: by
Re: $20 LCR ESR Transistor checker project
« Reply #9393 on: April 20, 2024, 09:49:56 am »
madires, there is a suggestion to implement the possibility to disable the "Selftest" option in the firmware? This will save some memory, as this procedure is usually done only a few times when hardware problems are detected. Now I disable this option myself if I compile the firmware for myself. If I am sure that my circuit is correct, I only need the "Self Adjustment"option. If any strange results appear, you can always enable self-test if necessary or use the standard firmware where this option is enabled.
« Last Edit: April 20, 2024, 10:00:18 am by indman »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9394 on: April 20, 2024, 11:06:57 am »
Ok, I'll add that to the to-do list.
 
The following users thanked this post: indman

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9395 on: April 20, 2024, 04:52:04 pm »
Disabling the self-test reduces the firmware size by about 86 bytes (and a few bytes in the EEPROM). I also replaced a few similar function calls of Display_Value() with a new convenience function, freeing up another 50 bytes.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9396 on: April 23, 2024, 05:44:12 pm »
Bohu has updated the PDFs (for firmware 1.52m, Czech, English and German): https://github.com/madires/Transistortester-Warehouse/tree/master/Documentation
 

Offline szpila

  • Newbie
  • Posts: 8
  • Country: pl
Re: $20 LCR ESR Transistor checker project
« Reply #9397 on: April 30, 2024, 09:14:43 am »
Hi @madires

Updated translation file for UI_POLISH up to v1.52
 
The following users thanked this post: madires

Offline dave356

  • Contributor
  • Posts: 38
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #9398 on: April 30, 2024, 02:21:45 pm »
Hi guys,

Need a replacement screen for this:

Looking around but I don't know what I need.
Any help will be appreciated.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #9399 on: April 30, 2024, 03:35:00 pm »
That should be an ST7565 based LCD.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf