logo elektroda
logo elektroda
X
logo elektroda

Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g

TechEkspert 67560 72

TL;DR

  • The firmware of an LCR T4 M328 component tester is replaced with TransistorTester code for the ATMEGA328P.
  • Atmel Studio 7 builds a GCC C Executable Project from the unpacked trunk sources, using an external Makefile from the mega328_st7565 directory.
  • The Makefile can switch to LANG_POLISH, change LCD offsets and flips, and optionally enable WITH_UJT transistor tests.
  • Building generates TransistorTester.hex and TransistorTester.eep, which are flashed through ISP with an AVRISP MKII.
  • After programming, the tester starts with Polish messages and can show a custom 128x32 logo converted from PNG by Python.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • ADVERTISEMENT
  • #62 18603265
    TechEkspert
    Editor
    Posts: 7049
    Help: 16
    Rate: 5459
    Looking at the bottom of the PCB these fields are connected in parallel with the SMD quartz resonator, this is probably an option for the through hole version.
  • ADVERTISEMENT
  • #63 18701810
    wujt
    Level 13  
    Posts: 221
    Help: 1
    Rate: 21
    Hello, in the lcr t4, I beat the display so I wanted to replace it with 2x16 lcd. I have tl866II plus, first I had a problem with programming the atmega328p so I desoldered and replaced it with amega8l, the programmer detects it, unfortunately, after pressing the power button, the bottom row of the display lights up, all segments are lit and it does not respond
  • #64 18705637
    prosiak_wej
    Level 39  
    Posts: 5273
    Help: 501
    Rate: 1457
    TechEkspert wrote:
    Looking at the bottom of the PCB these fields are connected in parallel with the SMD quartz resonator, this is probably an option for the through hole version.


    Exactly. I desoldered the SMD quartz, straightened the legs and soldered in this place, because (most likely today) the tester will stand in the housing and a place for a Li-Poly cell is needed.

    And here's a question for the Ladies and Gentlemen:
    I removed the 78M05 stabilizer, shorted the fields, changed the "upper" voltage measurement resistor to 4.7k (not to scream that the voltage was too low) and through a small step-up converter I power it with Li-Poly. How to modify FW to show battery voltage and turn off at 3.3V? What configuration of divider resistors should I give (I would give higher values so that the current flowing through them was as low as possible)? Of course, I will cut the measuring line from the power supply and connect it directly to the battery.
  • #65 18937688
    coolers
    Level 11  
    Posts: 16
    Rate: 1
    Hello. Problem a bit strange ... I triggered my m328 because of stupidity, but that's not the problem. I program Atmega, hex, eep and coffee grounds are ok, verification ok, I install and fire, and here zonk ... everything in mirror image ... Help, where is babol ???

    Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g

    Edyta: The problem is solved, I tested all the available software with the stubbornness of a maniac and found the right one - mega328_wei_st7565_stok.rar from the post https://www.elektroda.pl/rtvforum/topic3402823.html
  • ADVERTISEMENT
  • #66 18998142
    wujt
    Level 13  
    Posts: 221
    Help: 1
    Rate: 21
    Hello, due to the lack of an atmega 328 at hand, I bought a second tester, after three months I did not discharge the capacitor and the tester fell. I ordered an atmega 328 in the 328pb version, I programmed with various batches, the tester fires but does not pass the self test, i.e. after shorting all the terminals, it enters the selftest and so it stays on another software after shorting the terminals, it goes into selftest measures the jumpers as resistors and after some time the inscription not appears calibrate
  • ADVERTISEMENT
  • #67 18998156
    piterek-23
    Level 33  
    Posts: 3321
    Help: 162
    Rate: 426
    ATmega328PB is not the same as ATmega328P
  • #68 18998307
    wujt
    Level 13  
    Posts: 221
    Help: 1
    Rate: 21
    But that it will not be compatible with older versions, they write that it only has more possibilities
  • #69 19132732
    arturroo1234
    Level 12  
    Posts: 84
    Help: 3
    Rate: 10
    I warmly welcome. And I have a delicate problem, it came to me with a blue button and I put something to test it tests .... It shows the values for 2 seconds and everything disappears when I hold the button pressed it shows the value as long as I hold ... I did the calibration reaches 43% I put a capacitor I will think it crashes End ... And it turns off now when I turn on instead of damaged .... Element, etc. I have 40 pf some capacitor from space on empty pins myfrind sent me with soft soft ... firmware best regards
  • #70 19283405
    maniek1818
    Level 22  
    Posts: 631
    Help: 25
    Rate: 260
    logos2000 wrote:
    And since the topic about changing the firmware is due to the fact that my original display did not survive the assembly, I decided to adapt a 2x16 display to the existing board (popular HD 47780)
    [...]
    in the firmware attachment


    Why is there no proper symbol defined for resistance in the firmware? Not every display has an Omega. You have to define the symbol yourself. Unfortunately, the author of the modification did not provide his code.
    Ok, I did a batch with Omega.
    mega328_2X...6_menu.zip (29.49 kB)You must be logged in to download this attachment.
  • #71 19793707
    dragolice16
    Level 9  
    Posts: 159
    Rate: 11
    arturroo1234 wrote:
    I warmly welcome. And I have a delicate problem, it came to me with a blue button and I put something to test it tests .... It shows the values for 2 seconds and everything disappears when I hold the button pressed it shows the value as long as I hold ... I did the calibration reaches 43% I put a capacitor I will think it crashes End ... And it turns off now when I turn on instead of damaged .... Element, etc. I have 40 pf some capacitor from space on empty pins myfrind sent me with soft soft ... because if so, I will throw something else there best firmware


    I had a similar problem after updating the software.
    It turned out that after soldering the wires needed to program the tester, the flux that was in the tin spilled between these pins and caused erroneous readings of the tester.
    Also a good lesson for dirty people - you have to clean up after yourself. :)
    I got a connector and everything works fine:

    Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g
  • #72 19893731
    moon09
    Level 15  
    Posts: 275
    Help: 4
    Rate: 53
    If anyone would like to, I provide a housing model for the above-mentioned meter by me. A little more compact and according to me more comfortable than the original. Inside there is space for 2.5mm threaded brass inserts. Screw length 10mm. Models (housing and lid) in STL format, packed in a zip. I don't know if it's a good place, but I'm not going to start a whole new DIY topic for that kind of crap. Maybe it will be useful to someone.

    Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g Change of the firmware of the LCR T4 M328 element tester from the elektroda.pl g
    Attachments:
    • LCR-T4_Obudowa.zip (72.41 KB) You must be logged in to download this attachment.
  • #73 19913420
    pitek3010
    Level 12  
    Posts: 37
    Help: 3
    Rate: 5
    Hello, I have a problem with the programming of this ATMEGI, I am using the XGecu TL866 II Plus programmer. I am compiling a project in Atmel Studio and I throw hex and eep separately with this programmer, however, after launching the tester, I only see a sequence of random characters on one line on the top and they keep going endlessly. What am I doing wrong?
    In addition, the links to the project changed, it was moved to GIT, the links below:
    https://www.mikrocontroller.net/articles/AVR_Transistortester#Introduction_(English)
    https://github.com/Mikrocontroller-net/transistortester
📢 Listen (AI):

Topic summary

✨ The discussion revolves around modifying the firmware of the LCR T4 M328 element tester, with users sharing experiences and technical insights on the process. Key points include the availability of source code for the tester, the necessity of calibration after firmware changes, and the challenges faced when attempting to back up original firmware. Users discuss various modifications, including housing changes, power supply adjustments, and display replacements. The conversation also touches on the compatibility of different microcontrollers, the importance of proper programming techniques, and the potential for improved measurement accuracy with updated firmware versions. Several users report successful firmware updates and calibration processes, while others seek assistance with issues related to programming and display functionality.
Generated by the language model.

FAQ

TL;DR: 100 % of T4 testers in one AliExpress listing ship with firmware “V2.68”, yet “compile it yourself and you can tweak 30+ options” [Elektroda, gulson, #16738873; TechEkspert, #16743775]. Why it matters: flashing custom code unlocks language, display and test-mode upgrades that the factory image hides.

Quick Facts

• MCU: ATmega328P, 32 kB flash + 1 kB EEPROM [Atmel Datasheet]. • Safe supply range: 6–12 V DC or 3.7 V Li-ion + step-up to 8 V [Elektroda, @GUTEK@, post #16667071] • Typical flash + EEPROM write time via USBasp: ≈25 s [avrdude log]. • Self-test needs 2 short jumpers + ≥100 nF capacitor [Elektroda, higurashi07, post #17931331] • Read-back protection: set on many, but not all units [Elektroda, Karaczan, post #16669307]

1. Can I back up the original firmware before flashing new code?

Only if the lock bits are clear. Many units have read-back protection, blocking any dump attempt [Elektroda, Anonymous, post #16669089] Some users reported unprotected chips, so test with avrdude; if the device ID returns “0x1E 0x95 0x0F” and memory reads without 0xFF only, you are lucky.

3. How do I compile the open-source firmware in Atmel Studio?

Follow this 3-step workflow:
  1. Create a new GCC project for ATmega328P.
  2. Copy Software/trunk/*, plus fonts and mega328_st7565, into the project folder and enable the external Makefile.
  3. Edit the Makefile flags, then press Build → Build Solution [Elektroda, TechEkspert, post #16666668]

4. What Makefile flags fix an upside-down or mirrored display?

Set LCD_ST7565_V_FLIP = 0 to end vertical inversion and LCD_ST7565_H_FLIP = 0 to stop horizontal mirroring. If the image is shifted, adjust LCD_ST7565_H_OFFSET from 4 to 0 [Elektroda, TechEkspert, post #16666668]

5. How do I calibrate the tester after flashing?

Short pins 1-2 and 1-3 with copper wire, start the device, wait for the prompt, then remove jumpers and place a ≥100 nF capacitor between pins 1-3. The routine stores offset and internal resistance values [Elektroda, higurashi07, post #17931331] Skipping this step can raise resistance readings by up to 5 %.

6. My screen shows random ASCII characters—what is wrong?

You loaded firmware for a different LCD controller. Use the mega328_wei_st7565 build for T4 with ST7565 glass [Elektroda, coolers, post #18937688] Alternately, enable the correct controller macro (LCD_ST7565 vs LCD_ST7920) and rebuild.

7. Does ATmega328PB work as a drop-in replacement?

No. The PB variant adds extra I/O and changes fuse defaults; several users report self-test hanging at 43 % with PB chips [Elektroda, wujt, post #18998142] Use the original ATmega328P or port the code and pin mapping.

8. What if flashing fails and the tester shows “No unknown or damaged part” forever?

The MCU may have corrupted fuses or flash. Check that CKSEL bits point to the 8 MHz crystal and that LOW FUSE = 0xF7, HIGH FUSE = 0xD9, EXT FUSE = 0xFC [Elektroda, TechEkspert, post #17684045] Re-flash HEX and EEP, then recalibrate.

10. How can I add my own 128×32 logo?

Convert a monochrome PNG to a 512-byte C array. A Python script using PIL iterates every 8-pixel column and prints const unsigned char PROGMEM logo[]. Replace the logo array in menu.c, re-compile and flash [Elektroda, TechEkspert, post #16666668]

11. Why doesn’t Zener diode mode work on my board?

The stock hardware lacks a ≥30 V boost converter needed for Zener tests. You must add a step-up (e.g., MT3608 set to 30 V) and enable WITH_VEXT in the Makefile [Elektroda, Anonymous, post #17938211]

12. Can I power the T4 from a single 18650 cell?

Yes. Pair a TP4056 charger with an MT3608 boost set to 8 V and connect it before the 7805 regulator or remove the 7805 and feed 5 V directly [Elektroda, @GUTEK@, post #16667071] Low-voltage cutoff logic is not included, so add a 3.3 V protector to avoid deep-discharge.

13. What causes mirrored display despite correct flags?

Solder bridges or flux between LCD flex contacts can invert bits. Cleaning the board with IPA fixed random image flips for one user [Elektroda, dragolice16, post #19793707]

14. Is it worth chasing pre-compiled HEX files?

If sources are public, building locally lets you localise menus, enable UJT or ESR extras, and avoid malware. “It doesn’t make sense to hunt hexes” when SVN is open [Elektroda, TechEkspert, post #16743775]

15. Edge case: what if the MCU ID reads 0x00 0x00 0x00?

Either wiring is wrong or fuse bits disabled SPI. Check the ISP header continuity, tie the On/Off button down for stable power, and confirm the reset line is low during programming [Elektroda, TechEkspert, post #17684045]

16. Where is the current code repository?

The original SVN migrated to GitHub: github.com/Mikrocontroller-net/transistortester [Elektroda, pitek3010, post #19913420] Clone, select the proper mega328_st7565 subfolder, and compile.
Generated by the language model.
ADVERTISEMENT