Another Failure 20 with measurements and some test mode?

wow, that’s weird. Backlight is working and the ATMEGA is able to control it - it is on when in test mode.
What do you mean by “flashing the LEDs” - does it look intentional (I mean like for example 1Hz 50% duty cycle) or unintentional (like in my example ~0.1Hz and ~100ms flash)?

I will try to add few 1uF caps to 5V rail to each chip. It hurts when I see the super thin +5V copper trace. And the minimal copper pour clearance… why?!

I wonder if there is a way to identify the moment when ATMEGA restarts itself. When for example watchdog is activated - is the RST pin internally puled down so it is measurable?

My TODO list:

  • Add more decoupling C
  • Route +5V directly to ATMEGA with a wire
  • Try the other FW - HelloFriend.bin
  • Change R35 and R46 to 200k exactly
  • Desolder and meassure al FETs
  • Add more decoupling C
    - done - added 1uF ceramic + 220uF close to ATMEGA, added 4.7uF ceramic to the LCD board, added 4,7uF ceramic close to DAC

  • Route +5V directly to ATMEGA with a wire
    - done

  • Try the other FW - HelloFriend.bin
    - done

  • Change R35 and R46 to 200k exactly
    - done - one is 201.1k the other is 201.5k

  • Desolder and measure al FETs
    - done - all FETs are OK

I also measured resistance of all transformer windings - everything seems to be fine.

Nothing helped.

Any ideas what to do next?


According to this:$+1+0.000005+10.20027730826997+50+5+43 r+176+112+304+112+0+100000 v+448+352+448+80+0+0+40+5+0+0+0.5 r+160+320+160+160+0+200000 a+176+176+304+176+8+15+-15+1000000+4.499937501562461+4.5+100000 w+176+112+176+160+0 w+304+112+304+176+0 w+304+176+368+176+0 w+176+160+160+160+0 w+176+192+112+192+0 g+160+320+160+352+0 r+112+192+112+320+0+100000 r+112+80+112+192+0+100000 r+160+80+160+160+0+100000 w+112+320+160+320+0 R+160+80+160+48+0+0+40+5+0+0+0.5 R+112+80+112+48+0+0+40+9+0+0+0.5 o+10+64+0+4099+5+0.0001953125+0+2+10+3 o+4+64+0+4099+5+0.00009765625+1+2+4+3 38+0+0+1+101+Resistance

Voltages at U10A pin 2 and pin 3 both should be 4.5V when LTC1661 is disconnected.

Edit 2:
My voltages U10 are:

Pin 2 = 4.46V
Pin 3 = 4.44V
Pin 6 = 4.57V
Pin 7 = 4.60V

Pin 1 = 6.04V
Pin 7 = 6.39V

Outputs are suppose to be 6.25V I am few % off - I would say it is OK. Resistors around OPAMPs are OK, OPAMP is working.

Looks like I’m here alone :frowning:

Another try - adding 1R resistor to the center tap of the transformer to more closely mimic the DC resistance of the 42TL004. No luck.
I will try to find real 42TL004 somewhere.

@Cerb: would you be so kind and measure few points on the working unit with an oscilloscope?
all against ground

I am interested in test sequence so please use a single shot and trigger to the PB2 (rising, ~3V).

Also could you please upload the exact binary file you used for the working unit? Not just link to github, upload your file please.

How the f*ck is this possible?!

Red is Q1 drain, yellow is R30 current sensing - all against GND.

There is a voltage ramp which means DAC + U10A + Q3 is working.

There is a switching - the voltage is pulled down with each Q1 impulse to its gate - this means Q1 is working.

But there is no current flowing through the transformer - am I right? There is no significant voltage drop across R30 (check the yellow voltage scale it is 200mV/div!). I cannot explain why there is some voltage drop at the end of the signal. I don’t get it.

The only explanation is the transformer is broken somewhere inside - I measured it twice.
Or the 0.5R resistor (R30) is dead short (thus no voltage drop) which it should not be - there are two 1R in parallel - brown -. black - black - silver - brown… 1R 1%.

Not sure why you deleted your post but you are correct! They are suppose to alternate. I will investigate it further. Still it does not explain missing signal at R30.

Maybe (and this is big maybe based on absolutely nothing) because this is a test sequence the magnetic field canceling is desirable - you don’t want to shock anyone by this test.

Anyway big thanks for your (deleted) reply. I will investigate this.

I deleted the post because, just as you said it seems plausible that in a test sequence the cancelling of the magnetic field is desirable and aditionally it could not explain the low voltage drop at R30.

You could also check the current limit of Q3 (IRF9Z24). To my understanding this MOSFET is applied as current limiter (constant current source). If you can’t get enough current through R30 it may be too much limited, the voltage ramp (red) shows the open-circuit voltage, to my understanding there should always be around 9V at Q1, when not switched on. It seems that you may are at the very beginning of the characteristic curve when you not even have enough current to get the 9V on Q1.

This is also exactly what you see at the very end of the test sequence, where the red curve does stay at the 9V. That the current does increase slightly at the end could have some cause in any capacitance or inductance of the circuit.

Hope this helps more.

FUCK YEAH! It is working!

There is a difference between IRF9Z24PBF (VISHAY) and IRF9Z24NPBF (INFINEON).
You can not use IRF9Z24PBF!

IRF9Z24PBF (VISHAY) has Vt=3.58V.
IRF9Z24NPBF (INFINEON) has Vt=2.98V.

Apparently because this transistor is used in the linear segment this makes enough difference for the unit to go into the Failure 20 mode.

From IRF9Z24PBF (VISHAY) datasheet:

From IRF9Z24NPBF (INFINEON) datasheet:

They should be the same but they are not.

If there will be a demand - I will measure all important signals with a scope on a working unit and post it there. I think it will make future debugging much easier.


Good finding. I want to learn more about the signals.:pray:
I just finished building my MK312 and got the Failure 20 :open_mouth:

Hi Gary,
tell me which signals you need.

But first I recommend to go through this checklist:

  1. double check all resistor values around the DAC and the OPAMP feeding both IRF9Z24NPBF

  2. meassure Vt of your IRF9Z24NPBF (a simple component tester will do)

  3. check if you have the correct transformer

  4. check the transformer orientation

  5. check the value of the 0R5 current sensing resistor

Also the PCB design is problematic, I am not trying to be rude, but it seems the PCB was designed by a programmer - not an electronic engineer. Grounding seems to be the main issue - and I know grounding with 2-layer PCB is always a problem.

I was facing frequent restarts of the processor - it was awful. It restarted itself after just few seconds of working. Sometimes after a button pressed. Garbage…
More decoupling caps did not helped. 5V rail is rock solid.

There are these issues I had with the board:

  1. grounding - I had to route several external ground wires to critical parts of the circuit

  2. ATMega reset pin should have RC circuit connected or at least external pullup (this is not the root cause of restarts)

  3. there are no pull-ups for the buttons! There are no pull-ups in the 4066 - how does it even work? Some parasitic current? God? Add pull-up and 100nF cap for each button. It seems the self-restarts were caused by this 4066 and floating buttons. Buttons without pull-ups are sensitive to interference -> 4066 creates some bullshit signals -> ATMega freezes (or maybe processing of this bullshit signals takes too long) -> watchdog -> restart

  4. there is a resistor in the audio input section which is not even connected on one side?!

Hello Bumerang,

Thanks for your suggestion.

I have check the resistor values around the DAC and the OPAMP and nothing odd at all.

I had order IRF9Z24NPBF and IRL520NPBF at element14 but it turn out IRL520NPBF out of stock and I have source it again from china seller.
When I purchase IRL520NPBF, I also purchase the IRF9Z24NPBF as well but I suspect I got inferior counterfeit. I checked them both with component tester. IRF9Z24NPBF VT=2.0V C=685pf |AND|
IRL520NPBF VT= 1.8V C=1.83nF

I using the 42TU200 transformers as same as you. I don’t want to have too many wires flying around and I connect 3 wire only (Have not connect the Transformer P side because I think the output side is direct connect to 3.5 output jack only and AVR will know nothing regarding the final output.

The 1/2 watt 0R5 is good. I check it value with LCR meter.

I google the IRF9Z24NPBF and IRL520NPBF image and try to located what the genuine chips exactly look like. I found tons of different image, beyond 10+ different outlook. That’s horrible, I have no idea which one is genuine now.

Please do me a favor and share the image of working IRF9Z24NPBF and IRL520NPBF. I want to know how the working one look like. Please also check them with component tester and let me know all the measurement value you got from the tester.


IRF9Z24NPBF (Infineon) purchased from TME has Vt=2.98V. I think this might be the problem.
There should not be a problem with the IRL520NPBF because they operate in fully saturated mode. Mine has also Vt around 1.8V.


Note - after all the trouble I decided to buy ridiculously expensive 42TL004 transformers from Ebay and I build completely new unit.

Thanks for the picture.

I got this IRF9Z24N from element14. It have a small circle at the bottom left to indicate it’s the first PIN, which match with the PCB. Everything looks legit.


Below two are from China seller.

IRL520N = Apparently they don’t have the correct font for IR Logo :rofl:
IRF9Z24N = Look legit but the small circle is in the middle. The VT did not match with Yours. :thinking:

The IRF9Z24N you got have a small circle in bottom center instead of bottom left. I am really confuse about the small circle location. It should be represent PIN1, right ?
If you google about the image of IRF9Z24N, You will find tons of different small circle location :joy:

I always thought the dimple has something to do with the plastic injection process. It is pretty hard/stupid to put TO-220 backwards. I dont think it is the “pin 1” indicator as with IC packages.
Try IRF9Z24N from a different vendor.
As I said there should not be a problem with IRL520N.

Maybe stupid idea - are those Chinese fakes even pin compatible?

I just found this :disappointed_relieved:

Counterfeit IR mosfet have a smaller size in die

Counterfeit IR mosfet performance issue :cold_sweat:

Anyway, I have order the new mosfet from mouser directly and they are on the way now. I will report back either the new mosfet solve the problem.:sunglasses:

Replaced all of the counterfeit mosfet with genuine one and problem solved. No longer having failure 20.

1 Like

Gary, do you experience any random restarts?
Do you experience problems with buttons (for example multiple presses are read by the MCU) - did you use pull-up resistors for the buttons?

I still waiting for the 42TL004. The flying wire to 42TU200 is really annoying and therefore I haven’t test it completely.

I had forward the problem you mention to engineer and here is the answer.

Buttons are multiplexed with the LCD pins, the program switches these pins to the internal pull-ups when polling the input which is 40K or so. More than likely the long ribbon cable is causing these issues which are now solved with the repositioning of J10 so that it is approximately 2.5 inches long now.

You should use a shorter cable. The shorter the better.

Buttons are multiplexed through 4066 which is “CD4066B CMOS Quad Bilateral Switch”.

Yes, there is an internal pull-up in the AVR but how the pullup can act through the 4066? You pulling HIGH the processor side of the 4066 -> so the button side of the 4066 is also HIGH.
Then you press the button -> it pulls the button side of the 4066 LOW but at the same time the processor side of the 4066 is still pulled HIGH (with the internal pull-up)… you input the signal from both sides.

I am really confused how the 4066 acts when you feed some signal from both sides at once.

I currently have the same issues - usually it will just not boot and I get squares in the top row of the LCD with the backlight on. But sometimes I get error 20 and no backlight.
I do have the IRF9Z24NPBF and IRL520NPBF but they’re from china and look fake. I’ve ordered some real ones through mouser now but I’m just wondering if this sorted both issues or is it only the error 20, with something else causing the boot issue?

squares in the top row of the LCD means the LCD is not initialized properly by the MCU -> maybe the MCU is not working (try to measure the crystal oscillations) AND/OR there might be some interference issue with the ribbon cable (try to make it as short as possible) AND/OR there might be a problem with the LCD power rails (either ground or +5V… adding more ceramic capacitors certainly wont hurt).