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

madires and 12 Guests are viewing this topic.

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1550 on: November 28, 2015, 04:21:08 pm »
madires and tom666: thank you SO MUCH for your assistance!  :)  I think I'm getting closer, but not quite there.

I have one of the China import Transistor Testers, and it seems to work quite well:
http://www.ebay.com/itm/381351024208

I'm trying to compile the source code onto a new ATMega128, but upon upload and startup, the red power LED is on, the LCD screen illuminates, but nothing is displayed. Perhaps I am using the wrong config.h settings? (see attached).

I've tried both this upload command:
Code: [Select]
make
avrdude -b 19200 -c avrispmkII -p m328p -v -U flash:w:ComponentTester.hex

as well as this one, from the banggood forum, above:
Code: [Select]
make
avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"ComponentTester.hex":i -U eeprom:w:"ComponentTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

The chip is exactly the same ATMEGA328P-PU and I am able to burn a bootloader and upload a sample "blink" app from my Arduino.
But I simply cannot seem to make a successful burn of the Transistor tester. Any ideas?

The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar

For writing firmware to the MCU you can use only this command:
Code: [Select]
avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"TransistorTester.hex":i -U eeprom:w:"TransistorTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

a sharp eye! yes, thanks for the correction: the target is ATMEGA328P-PU as noted in the commands, but incorrectly stated in my text as a  x128.

further, the already compiled code at your link code DOES upload and work perfectly! however I'm still not able to compile my own and upload that.


The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar

So it's a ST7565 but with standard I/O pins. The T3/T4 uses different pins. Please try

Code: [Select]
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
//#define LCD_CS           PD5            /* port pin used for /CS1 (optional) */


So this was sounding very promising... but still no-go. Same problem of LED-on, display illuminated, but nothing shown. Here's the section of config.h, with the entire file attached.

Code: [Select]
/*
 * Chinese clone T3/T4 with ST7585 display
 * - thanks to tom666 @ EEVblog forum
 */

//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD4            /* port pin used for /RES */
#define LCD_A0           PD3            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD1            /* port pin used for SI (LCD's data input) */
// #define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif


So we know that the "mega328_st7565_kit" is what I have... but the question is: how is that version compiled?

again - thanks very much for your help! 
 

Online madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1551 on: November 28, 2015, 04:28:43 pm »
Code: [Select]
/*
 * Chinese clone T3/T4 with ST7585 display
 * - thanks to tom666 @ EEVblog forum
 */

//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD4            /* port pin used for /RES */
#define LCD_A0           PD3            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD1            /* port pin used for SI (LCD's data input) */
// #define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif


I see, you haven't changed the I/O pins. Please change

Code: [Select]
#define LCD_RESET        PD4            /* port pin used for /RES */
#define LCD_A0           PD3            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD1            /* port pin used for SI (LCD's data input) */

to

Code: [Select]
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1552 on: November 28, 2015, 04:58:29 pm »
...
The problem is the used software (by Markus Reschke - "m" vesrion). For this type of tester I recommend you to use the version of the software from Karl-Heinz Kübbeler ("k" version). You can directly use the current development version from this link (folder already contains the compiled firmware):
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_st7565_kit/?view=tar

For writing firmware to the MCU you can use only this command:
Code: [Select]
avrdude -c avrispmkII -p m328p -B 4.0 -e -U flash:w:"TransistorTester.hex":i -U eeprom:w:"TransistorTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m

aha! I think I missed that point when I went off changing config.h - Do you know where I can find the source "k" version? this link:

http://www.mikrocontroller.net/svnbrowser/transistortester/Software/

seems to have only the "m" (Markus) source code, but the trunk data does have source code by kubi48  (I missed that earlier; lame, I know).  :palm:

so when I go to the mega328_st7565_kit directory and do a make, I get this error, perhaps just missing some files?

Code: [Select]
root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc  -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d  -DSamplingADC -c  ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
                 from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1


thanks again! the help is super appreciated!
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1553 on: November 28, 2015, 05:13:18 pm »
Code: [Select]
/*
 * Chinese clone T3/T4 with ST7585 display
 * - thanks to tom666 @ EEVblog forum
 */

//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD4            /* port pin used for /RES */
#define LCD_A0           PD3            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD1            /* port pin used for SI (LCD's data input) */
// #define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif


I see, you haven't changed the I/O pins. Please change

Code: [Select]
#define LCD_RESET        PD4            /* port pin used for /RES */
#define LCD_A0           PD3            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD1            /* port pin used for SI (LCD's data input) */

to

Code: [Select]
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */

DOH!  :palm: sorry, another lame oversight on my part. time to take a break... BUT... I have success! (uh, well, in a sortta comical way).

so here's that section of my config.h

Code: [Select]
/*
 * Chinese clone T3/T4 with ST7585 display
 * - thanks to tom666 @ EEVblog forum
 */

//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
// #define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif

it works a bit differently than the software it shipped with (the mega328_st7565_kit code, that I've yet to successfully compile), but at least now I have this version working with a variety of messages displayed and no "main menu".... but the really crazy thing: is I need to look in a mirror to properly see what it says! lol. everything is reversed. perhaps just a bit more fine tuning of the config.h?

thanks again - I owe you a beer. :)
 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1554 on: November 28, 2015, 05:40:56 pm »
so when I go to the mega328_st7565_kit directory and do a make, I get this error, perhaps just missing some files?

Code: [Select]
root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc  -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d  -DSamplingADC -c  ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
                 from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1

For the compilation you need to download the complete source code from this link:
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/?view=tar


Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1556 on: November 28, 2015, 06:14:27 pm »
it works a bit differently than the software it shipped with (the mega328_st7565_kit code, that I've yet to successfully compile), but at least now I have this version working with a variety of messages displayed and no "main menu".... but the really crazy thing: is I need to look in a mirror to properly see what it says! lol. everything is reversed. perhaps just a bit more fine tuning of the config.h?

Add the following line to your configuration:
Code: [Select]
#define LCD_FLIP_X

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1557 on: November 28, 2015, 07:18:53 pm »
it works a bit differently than the software it shipped with (the mega328_st7565_kit code, that I've yet to successfully compile), but at least now I have this version working with a variety of messages displayed and no "main menu".... but the really crazy thing: is I need to look in a mirror to properly see what it says! lol. everything is reversed. perhaps just a bit more fine tuning of the config.h?

Add the following line to your configuration:
Code: [Select]
#define LCD_FLIP_X

success!  8) this worked perfectly, although I did need to also add:
Code: [Select]
#define LCD_OFFSET_X                    /* enable x offset of 4 dots */

such that my final config section for display looks like this:
Code: [Select]
/*
 * Chinese clone T3/T4 with ST7585 display
 * - thanks to tom666 @ EEVblog forum
 */

//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
// #define LCD_CS           PD5            /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_OFFSET_X                    /* enable x offset of 4 dots */
#define LCD_FLIP_X                      /* enable horizontal flip */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif


cool! so that's the "M" version, freshly compiled and working well, thanks a LOT for your help! Now on to the "K" version it shipped with... let's see if I can get that to work. :)

(hmm... on that topic, are there any plans to eventually merge the "K" and "M" versions?)

edit: added "m" version glory pic. :)
« Last Edit: November 28, 2015, 07:32:01 pm by gojimmypi »
 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1558 on: November 28, 2015, 07:44:07 pm »
@gojimmypi
instead #define LCD_OFFSET_X use #define LCD_OFFSET_Y

Edit:
instead #define LCD_FLIP_X use #define LCD_FLIP_Y
« Last Edit: November 29, 2015, 12:51:05 pm by tom666 »
 

Online madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1559 on: November 28, 2015, 08:03:35 pm »
@gojimmypi
instead #define LCD_OFFSET_X use #define LCD_OFFSET_Y

Can't remember that there's such an option ;) BTW, for the rotary encoder PD1 and PD3 seem to be used, so gojimmypi could change

Code: [Select]
#define ENCODER_A        PD2       /* rotary encoder A signal */

to

Code: [Select]
#define ENCODER_A        PD1       /* rotary encoder A signal */

and check if that helps with the encoder.
 

Offline johnka

  • Newbie
  • Posts: 8
  • Country: gr
Re: $20 LCR ESR Transistor checker project
« Reply #1560 on: November 28, 2015, 08:15:34 pm »
I will get this tester but I also ordered one of these displays to build my own adding all the additional features (rotary encoder, frequency counter e.t.c) with protection input.
COuld someone help me how to connect this display on the mcu? It has SDA(SI), SCL, A0, RST and CS pins. Is it ST7565 SPI?
 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1561 on: November 29, 2015, 10:20:29 am »
@gojimmypi
instead #define LCD_OFFSET_X use #define LCD_OFFSET_Y

@gojimmypi
Sorry, I made a mistake in my post.
I thought this method for correction of text on G-LCD:
instead #define LCD_FLIP_X use #define LCD_FLIP_Y

Code: [Select]
//#if 0
#define LCD_ST7565R_SPI
#define LCD_GRAPHIC                     /* monochrome graphic display */
#define LCD_PORT         PORTD          /* port data register */
#define LCD_DDR          DDRD           /* port data direction register */
#define LCD_RESET        PD0            /* port pin used for /RES */
#define LCD_A0           PD1            /* port pin used for A0 */
#define LCD_SCL          PD2            /* port pin used for SCL */
#define LCD_SI           PD3            /* port pin used for SI (LCD's data input) */
// #define LCD_CS        PD5      /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X       128            /* number of horizontal dots */
#define LCD_DOTS_Y       64             /* number of vertical dots */
#define LCD_OFFSET_X                    /* enable x offset of 4 dots */
#define LCD_FLIP_Y                      /* enable vertical flip */
#define LCD_START_Y      0              /* start line (0-63) */
#define LCD_CONTRAST     11             /* default contrast (0-63) */
#define FONT_8X8_V                      /* 8x8 font, vertically aligned */
#define SYMBOLS_24X24_V                 /* 24x24 symbols, vertically aligned */
//#endif

Online madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1562 on: November 29, 2015, 11:52:28 am »
I will get this tester but I also ordered one of these displays to build my own adding all the additional features (rotary encoder, frequency counter e.t.c) with protection input.
COuld someone help me how to connect this display on the mcu? It has SDA(SI), SCL, A0, RST and CS pins. Is it ST7565 SPI?

Possibly some compatible controller, there's a hint in the parameters picture ;) I'd recommend to buy a few LCDs in case you want to try if the controller's SPI is 5V tolerant. Otherwise you need to add a level shifter, e.g. a 74HC4050.
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: $20 LCR ESR Transistor checker project
« Reply #1563 on: November 29, 2015, 11:18:19 pm »
so when I go to the mega328_st7565_kit directory and do a make, I get this error, perhaps just missing some files?

Code: [Select]
root@raspberrypi:~/transistortester/mega328_st7565_kit# make
avr-gcc  -Wall -DWITH_MENU -DNO_ICONS_DEMO -DSHORT_UNCAL_MSG -DSamplingADC_CNT -DWITH_ROTARY_SWITCH=2 -DFOUR_LINE_LCD -DLCD_ST7565_H_FLIP=0 -DLCD_ST7565_H_OFFSET=0 -DLCD_ST7565_V_FLIP=1 -DVOLUME_VALUE=37 -DFONT_8X15 -DICON_TYPE=3 -DBIG_TP -DINVERSE_TP -DWITH_SELFTEST -DAUTO_CAL -DWITH_AUTO_REF -DREF_C_KORR=12 -DREF_L_KORR=40 -DC_H_KORR=0 -DRMETER_WITH_L -DCAP_EMPTY_LEVEL=4 -DAUTOSCALE_ADC -DREF_R_KORR=3 -DESR_ZERO=20 -DNO_AREF_CAP -DPULLUP_DISABLE -DANZ_MESS=25 -DPOWER_OFF -DBAT_CHECK -DBAT_OUT=150 -DBAT_POOR=6400 -DBAT_NUMERATOR=133 -DBAT_DENOMINATOR=33 -mcall-prologues -DLCD_ST_TYPE=7565 -DLCD_ST7565_RESISTOR_RATIO=4 -DF_CPU=8000000UL -DMHZ_CPU=8 -mmcu=atmega328p -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT lcd_hw_4_bit.o -MF dep/lcd_hw_4_bit.o.d  -DSamplingADC -c  ../lcd_hw_4_bit.S
In file included from ../config.h:984:0,
                 from ../lcd_hw_4_bit.S:7:
../font.h:48:42: fatal error: fonts/8x15_vertikal_LSB_1.h: No such file or directory
compilation terminated.
Makefile:368: recipe for target 'lcd_hw_4_bit.o' failed
make: *** [lcd_hw_4_bit.o] Error 1

For the compilation you need to download the complete source code from this link:
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/?view=tar

Well, I don't know what happened there, as indeed there were many files missing. The tree was created, many files in sub-directories... but not all. weird. after I re-downloaded, and re-extracted, all the files are indeed present and I am able to compile! but I've spent hours trying to figure out why this "k" version does not work. As you may recall from prior threads,  I was able to get the "m" version working and uploaded with a few config.h tweaks (many thanks again to tom666 and madires) to get the display working properly.

However with this "k" version, things are much worse: the LED and display illuminate only when the rotary switch is pressed, then both go immediately dark. This is super weird, as the pre-compiled files upload and work perfectly - the same as the software that it shipped with. But I'm not able to reproduce this by doing my own compile.

If at all possible, would you mind kindly taking a peek at my make/avrdude log file (attached).  In short, I'm simply running "make" from the "mega328_st7565_kit" directory, then uploading with avrdude.

I've poured over the config and make files, and have found nothing obvious. I even did apt-get upgrade / apt-get update, and booted fresh. Still no-go.

Perhaps later this week I'll be better equipped to do some debugging, as I have an Atmel AVR Dragon in the mail! I'm open to suggestions if anyone has some ideas for reading material and/or online tutorials.

My last debugger was from quite some time ago, and was a genuine "emulator": hardware that actually replaced the CPU and connected to the PC via some rather expensive hardware. And the only thing I debugged was assembly language. How times have changed! I'm really looking forward to my Dragon. I hope it works well, as I almost spent the extra $$ to get the ICE.

Thanks again for all the help. :)
« Last Edit: November 29, 2015, 11:53:26 pm by gojimmypi »
 

Offline ryanna

  • Newbie
  • Posts: 5
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #1564 on: November 30, 2015, 10:40:51 am »
Hi,

Just bought this MK-168 Transistor Tester Iam using it normaly to test diodes and capacitors, and its working, but now i remember ever since it arrived its asking for calibration and i just short out the 3 clips and it work again, i used it about 3-5 times only then when i try to use it again when it test the battery voltage it shows 8 to 8.2 volts only and shows "Cell"  288mv 0mv 0mv, then it stay there and turns off, i suspect the battery is low so i changed it to new one but still the battery test shows only about 8.3-8.5V although my battery is new and reads 9.2on my voltmeter so its seems its now showing the correct battery status, but my problem is i cannot use it and it show only up to ""Cell"  288mv 0mv 0mv, page then it turn off i cannot use it, i tried checking the pcb for cold solder joints and check resistors and other component and all seems okay,

Please see attached photos when the leads are disconnected and when the lead are connected only 288mv 0mv 0mv, any body if you know or have idea how to solve this problem please advice.

Thanks
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #1565 on: November 30, 2015, 11:25:16 am »
@Ryana, I have a couple of those MK168's and they both have that issue with 9V batteries - I just assumed there is a reverse protection diode in circuit which would give a 0.6-0.7v drop.

I had an issue when I tried to use the calibration feature on one of them. I didn't have the correct capacitor to hand and ever since instead of giving the "Invalid/no component" message it reports back a capacitor when all the leads are disconnected. I flashed one of the newer firmwares and it's been ok since. Try flashing a fresh firmware.
 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1566 on: November 30, 2015, 01:50:48 pm »
@ryanna
I guess the MCU ports are damaged, which may be a result of testing the charged capacitors.

Offline ryanna

  • Newbie
  • Posts: 5
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #1567 on: November 30, 2015, 03:06:16 pm »
@Ryana, I have a couple of those MK168's and they both have that issue with 9V batteries - I just assumed there is a reverse protection diode in circuit which would give a 0.6-0.7v drop.

I had an issue when I tried to use the calibration feature on one of them. I didn't have the correct capacitor to hand and ever since instead of giving the "Invalid/no component" message it reports back a capacitor when all the leads are disconnected. I flashed one of the newer firmwares and it's been ok since. Try flashing a fresh firmware.


@Macbeth and tom666, thanks for the reply, do you have any link where you get the firmware that you use, also how can i flash it can i do it onboard or do i have to but a programming jig?I have no experience flashing firmware please guide me.

 
 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1568 on: November 30, 2015, 05:03:59 pm »
@ryanna

Procedure for flashing firmware:

Required hardware:
- USBasp programmer (price around US $1.87)
- AVR Development Board (price around US $1.55) - or other AVR ISP adapter

Note:
Alternatively, it can use USBasp with a breadboard (for example 400 pin) - see attached picture.

Required Software (download links below):
- USBasp Driver
- AVRDUDE
- Firmware

1. Unzip the downloaded files into a separate directory and then perform installation of the USBasp driver.
2. Then remove MCU from the socket and insert it into the AVR ISP adapter.
3. Through the ISP cable connect the USBasp programmer with the ISP connector on the AVR ISP adapter.
4. Navigate to the folder with the unpacked software and perform this following command from command line:
   avrdude -c usbasp -p m328p -B 4.0 -e -U flash:w:"TransistorTester.hex":i -U eeprom:w:"TransistorTester.eep":i -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0x04:m
   This command (also includes a section for writing fuses) can be copied and saved as e.g. "flash.bat" and stored in a prepared folder. In the future you can simplify this flashing of the firmware by the usage of "flash.bat".
5. After, if MCU is successfully burned, fit it back into the socket of the tester.
6. The first time the tester is suitable to calibrate. The procedure can be found in the manual.

Links:
USBasp - Driver:
http://www.fischl.de/usbasp/usbasp-windriver.2011-05-28.zip
or
http://www.protostack.com/download/USBasp-win-driver-x86-x64-v3.0.7.zip

AVRDUDE:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1-mingw32.zip

Firmware:
http://www.mikrocontroller.net/svnbrowser/transistortester/Software/trunk/mega328_2X16_menu/?view=tar

USBasp - How to install driver on Windows 8:
http://letsmakerobots.com/node/36841

USBasp - How to install driver on Windows 8.1:
http://openchrysalis.wordpress.com/2014/09/26/installing-usbasp-driver-software-in-windows-8-1/

USBasp - User Guide:
http://www.protostack.com/download/Users%20Guide%20(AC-PG-USBASP-UG-V2.0).pdf
« Last Edit: January 01, 2016, 08:47:13 pm by tom666 »
 
The following users thanked this post: gr8tfly, junandaaa

Offline onlooker

  • Frequent Contributor
  • **
  • Posts: 395
Re: $20 LCR ESR Transistor checker project
« Reply #1569 on: December 01, 2015, 03:21:28 am »
I just made/modified a case to hold my tester. My crafting skill may need improvement, but, the case is cheap,  functional and easy to make. In fact, it is not just a case; it includes the needed power management circuitry (a over kill).

The original case was a USB power bank case for 4x18650 ($2.50 on ebay). One resistor was changed to have it output 8.5V and connecting to the tester. A flat cell Li battery from a old camera is used here as the power source. The two pictures below show some details.



« Last Edit: December 01, 2015, 03:23:03 am by onlooker »
 

Offline ryanna

  • Newbie
  • Posts: 5
  • Country: it
Re: $20 LCR ESR Transistor checker project
« Reply #1570 on: December 01, 2015, 07:47:04 am »
@tom666 thanks, ok i try buy those things first,one more question, if my case is what you said that i damaged the port can i buy a new ATMEGA and flash the software?

Thanks

 

Offline tom666

  • Regular Contributor
  • *
  • Posts: 173
  • Country: sk
    • Slovak discussion forum - AVR Component Tester (RLC/ESR & Semiconductors Tester)
Re: $20 LCR ESR Transistor checker project
« Reply #1571 on: December 01, 2015, 09:34:34 am »
@ryanna
In your case it will certainly be better to replace the MCU.

Offline MorseMan

  • Newbie
  • Posts: 1
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #1572 on: December 05, 2015, 03:51:01 pm »
I noticed an odd 'event' on an MK-168 that I recently aquired.

While testing a capacitor the tester produced a screenfull of repeating characters.

The capacitor was 2u2, and had a fairly high esr, and I wondered if this 'bug' was peculiar to the MK-168 or maybe other testers/firmwares exhibit the same flaw.

In the process of trying out some comparison tests I came across other limitations (some may already be known about, but I thought I would add them for completeness of the report.

As a reference device I used an LCR-300 from Voltcraft. The $20 testers included an MTester with V2.07 firmware, an MK-168 with V1.07K firmware, and a Fish4480 with V2.2 firmware.

Using a 2u2 capacitor with a 1k Ohm preset in series I obtained the following results:

Preset @ zero Ohms >>> LCR-300 ESR 2.1R, MTester ESR 2.4R, MK-168 ESR 2.5R, Fish4480 ESR 2.5R

Preset @ 102.26 Ohms >>> LCR-300 ESR 104.3R, MTester ESR 16R, MK-168 ESR 93R, Fish4480 ESR 95R

Preset @ 151.17 Ohms >>> LCR-300 ESR 152.8R, MTester EST 17R, MK-168 ESR 130R, Fish4480 ESR 130R

Preset @ 198.35 Ohms >>> LCR-300 ESR 200R, MTester ESR 17R, MK-168 ESR 140R*, Fish4480 ESR 140R

Even when higher values were tried the MTester never read more than 17R max ESR. The MK-168 and the Fish4480 seemed to top-out at 140R. Only the Voltcraft instrument continued to give accurate readings even when the preset was set at its maximum, but then you would expect that due to it being a 'professional' instrument.

It was at settings above approx 160R that the MK-168 started to show a screenfull of rubbish.

Now, I accept that these units are cheap hobby-class devices, and for such basic hardware I think they do a tremendous job. I also accept that if a capacitor has a highish ESR these units would highlight that fact sufficiently to cause the person concerned to replace/reject the capacitor concerned.

My two 'puzzles' are:

1) Has the MTester been limited to show a maximum ESR of 17R for any technical reason,

2) How come the MK-168 goes crazy when presented with high ESRs?

Just curious!  :)

 

Online madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: $20 LCR ESR Transistor checker project
« Reply #1573 on: December 05, 2015, 04:49:16 pm »
As a reference device I used an LCR-300 from Voltcraft. The $20 testers included an MTester with V2.07 firmware, an MK-168 with V1.07K firmware, and a Fish4480 with V2.2 firmware.

I don't know on which k-firmware versions the MTester and Fish4480 firmwares are based, but 1.07k is about 3 years old. The current ones are 1.12k and 1.19m.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: $20 LCR ESR Transistor checker project
« Reply #1574 on: December 05, 2015, 08:29:05 pm »
@MorseMan,

You state you are testing a variable resistor in series with a capacitor. That is a circuit, not a component. Remember the old computer adage "Garbage in / Garbage out".

I can see you are trying to "emulate" an ESR, but that is simply not how it works in the real world. Those sorts of ESR are unheard of!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf