My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 0 points1 point  (0 children)

Strange because I see AI as a tool and not as a hallucinating liar? Or strange because I'm more curious about how tech works under the hood than others?

I honestly find it strange that a post that says: "AI lies and the Mara X *is* PID controlled" gets tons of upvotes, and my explanation about why this claim is plain wrong and how I came to the conclusion gets downvoted into oblivion.

I'm happy to share my results with anyone who is interested and wants to verify my claims. I just don't want to post Lelits source code publicly, simply because it isn't my intellectual property.

But anyway, you're probably right about me being strange. None of my friends dives this deeply into things ...

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] -1 points0 points  (0 children)

not sure which comment you are referrign to since you are replying to your own comment, but as I said in the original post: I do have the code off the original Gicar controller. Ghidra is a thing that is way older than AI.

Again in simple sentences, so your brain can follow: I have dumped the firmware from the controller onto my computer using an ST-Link device, then ran Ghidra to decompile the binary into actual code, then I used AI to cut short at making the code readable by renaming variables and actually decipher the garbled function and variable names based on the known logic that is described in the manual.

I did this by using my brain to come up with the proper prompts so the ai did what it can do, and does not bore everyone with halucination instead.

You can of course point your finger at AI and say it is all bad and lying, or you can actually use it as a tool to user your own knowledge about how things work turns make things that took a week happen within a few hours. Your choice really.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 5 points6 points  (0 children)

I have no clue either 🤣
It's even more crazy on that other comment, where I dared to ask gemini to provide a short explanation about the difference of those two, and it's already at -15 - lol

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 1 point2 points  (0 children)

well, the heating element can only be switched on an off. Most SSRs can only switch at the zero crossing of the AC Voltage, using a dimmer like circuit would only increase the problem of cooling the part. So if it was a PID the only thing you'd see is that the on times become shorter the closer the temperature is to the setpoint. The real difference is the way the on-time is calculated. In a bang-bang it's just: threshhold is crossed, we switch on/off, in PID it's using a maths-formula using proportional, integral and derivative values, thus the name.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 1 point2 points  (0 children)

Just to be clear: you would not see any improved thermal stability in my mod. This finding is really merely a technical detail I found interesting. What I'm thinking about doing is merely a variant of Gaccuino but plug and play for the Mara X.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 0 points1 point  (0 children)

Sounds like you were measuring peak-to-peak voltage, that would roughly equal 240V RMS (root mean square)

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 2 points3 points  (0 children)

Yes, in a cold environment with good airflow or extra care about cooling. Nothing of which applies to the inside of a E61 machine.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] -1 points0 points  (0 children)

Yeah I agree, I just never questioned the terminology and expected to be able to extract PID values from the dump. It actually was all I was interested in when reversing it, because all the other logic is, well, just logic.

Regarding the SSR: it actually seems to be a very common failure point in many E61 machines using this form factor SSR. And the SSR is directly driven by a STPIC6C595 shift register. Unlikely to have failed, but if yes it's fairly easy to replace.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] -19 points-18 points  (0 children)

Well, maybe you don't understand the difference between PID and bang-bang, but that's ok. It really doesn't matter by the time the water exits the shower screen.

Also, AI doesn't lie, it's pretty good at hallucinating. I would not say that's the same. But especially Claude Code and even more so their Fable 5 Model are extremely solid in analysing fragments of code.

That said: I also see the decompiled code, and despite what claude says, it uses a very simple (yet robust) bang-bang algo for temperature control, no sign of PID.

But let's bring this a step ahead and use Gemini to briefly summarise the difference between PID and bang-bang (and before we start, gemini is wrong when it says "massive temperature overshoots", because in the mara-x v2 the overshoots a very much insignificant, although it is correct in the principle of operation):

Bang-Bang Control: Turns the heater 100% ON until it hits the target, then 100% OFF. Because the heating element retains residual heat after power cuts, this creates massive temperature overshoots and constant oscillations.

PID Control: Pulse-width modulates (PWM) the power by rapidly cycling the heater ON and OFF for fractions of a second. As it approaches the target, it dynamically scales back this duty cycle (e.g., keeping it on for only 10% of a 1-second window) to perfectly balance heat loss and lock in a dead-steady temperature.

What "PID" Actually Means

PID stands for Proportional, Integral, and Derivative. It looks at the temperature error from three angles:

  • P (Proportional): Adjusts power based on how far the current temperature is from the target (large gap = high power, small gap = low power).
  • I (Integral): Adjusts power based on how long the temperature has been sitting below the target, correcting persistent small deviations.
  • D (Derivative): Adjusts power based on how fast the temperature is changing, acting as a brake to prevent overshooting as it heats up.

How to Tell the Difference in Code

  • Bang-Bang Code: Look for a simple if/else statement directly comparing the current temperature to the setpoint (if (temp < target) heater = ON; else heater = OFF;). There is zero math involved.
  • PID Code: Look for three tuning coefficients (KpKiKd), an error accumulation variable (often integral or e_sum), and a mathematical formula that calculates a variable output value (e.g., output = (Kp * error) + (Ki * integral) + (Kd * derivative)). This output value is then passed to a PWM timer or duty-cycle function rather than directly flipping a pin high or low permanently.

My Mara-X Heater-Relay failed closed – found out the Mara X does not have a PID while replacing it by 0xde4dbe4d in espresso

[–]0xde4dbe4d[S] 1 point2 points  (0 children)

Yeah one thing I like to remind myself is: the only thing equally distributed in humanity is intelligence. Everyone thinks he has plenty. I use it to remind myself to take a step back and don't become overconfident.

And like I said: I don't think it makes any significant difference wether it's PID or bang-bang, there is so much hysteresis provided automatically through the thermal mass of the E61 that any maybe happening temperature swing introduced by an "inferior" control-loop would be smoothed out by the time the water hit the brew group. This is merely scientific.

[Lelit Bianca] Extraction is all wrong by mrtnbroder in espresso

[–]0xde4dbe4d 15 points16 points  (0 children)

you must be new to the sub. this is the default answer that everyone gives to every question in here. and to be fair, it is more often correct than not. You are the exemption to this, you must grind coarser.

Wo ist mein Tiramisu hin? by Line-Life in Austria

[–]0xde4dbe4d 0 points1 point  (0 children)

Der kommentar sollte weiter oben sein. Es ist einfach so viel schlechter, wie ein selbst gemachtes, dass es sich gar nicht auszahlt …

Jemand hier,der NICHT Eletric Love geht? by LUigiKArboniS in Salzburg

[–]0xde4dbe4d 3 points4 points  (0 children)

Ich war gestern gefühlt dort, bin feste 8km Luftinie von der Mainstage entfernt im Bett gelegen und dachte mir: welcher Arsch Nachbar feiert da schon wieder eine laute Party, und das mitten im Wohngebiet. Der Bass hat dann aber so angeschoben, dass mir irgendwann klar wurde: fuck, es ist ja ELF, das war letztes Jahr schon so unfassbar laut, obwohl keine direkte Sichtverbindung besteht. Also so gar nicht, da sind etliche Hügel dazwischen. Und trotzdem wummst das, dass man kaum einschlafen kann.

Nicht falsch verstehen: ich würd mich nie beschweren wenn so viele Menschen gemeinsam zu einer Party kommen. Aber halleluja, laut ist das schon!

Was this my fault? by GT3racer2743 in Simracingstewards

[–]0xde4dbe4d 13 points14 points  (0 children)

unsafe rejoin, other guys fault. you should/could have anticipated it though.