Another Failure 20 with measurements and some test mode?

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?
DAC OUT A
U10A OUT
R30
PB2
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.

Thanks!

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.

image
image

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.

e14F9Z24

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.

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).

Thanks for the quick response. I hadn’t shortened the ribbon cable yet so I cut it down as short as possible but it made no difference unfortunately
Also, I forgot to mention that when it goes to error 20, the A / B LEDs flash but they don’t when it displays the squares. That leads me to believe the problem is not with the display but I don’t have anything to check the crystal with

IIRC when I got “Failure 20” the LEDs also flashed once (both at the same time).

I am 90% certain there is something wrong with the 4066 (how it is connected) in combination with the program (how buttons are read - I think it can block the MCU).

Try this:

  1. Add pull-up (10k-100k) to each button.
  2. Add some capacitors close to the 4066 (ceramic + electrolytic combo)
  3. Add some additional short grounding wire between ground planes of both PCBs.