Coffee machine doesn't turn the LED on #1

Closed
opened 2025-07-16 15:53:42 +02:00 by rarias · 6 comments
Owner

We almost manage to make it last one day.

It is likely that it was left powered on during the whole day, so it got too hot and the thermal fuse broke. If that is the case, it should be relatively easy to fix.

If that is the case, the design of the machine is quite broken, as it doesn't make much sense to leave it on for more than, say, 5 minutes. I could try to patch the firmware or alternatively add a button so you need to press it continuously for it to work.

We almost manage to make it last one day. It is likely that it was left powered on during the whole day, so it got too hot and the thermal fuse broke. If that is the case, it should be relatively easy to fix. If that is the case, the design of the machine is quite broken, as it doesn't make much sense to leave it on for more than, say, 5 minutes. I could try to patch the firmware or alternatively add a button so you need to press it continuously for it to work.
rarias self-assigned this 2025-07-16 16:11:03 +02:00

The coffee machine is now safe and sound next to Aleix Roca's desk (in the closet nearest to his desk), awaiting reparation 🥲

The coffee machine is now safe and sound next to Aleix Roca's desk (in the closet nearest to his desk), awaiting reparation 🥲
Author
Owner

Bad news, it seems both thermal fuses are fine. The power supply is giving +4.4 V as before, but the MCU is not powering the leds on the wires going to the ON button. There is also 0 V in the yellow wire that comes from the power on button, which previously had +4.4V.

It seems the MCU is deciding not to let the machine power on, the power supply seems okay. I will check the main resistors in case one has blown.

Main resistors are ok.

Bad news, it seems both thermal fuses are fine. The power supply is giving +4.4 V as before, but the MCU is not powering the leds on the wires going to the ON button. There is also 0 V in the yellow wire that comes from the power on button, which previously had +4.4V. It seems the MCU is deciding not to let the machine power on, the power supply seems okay. I will check the main resistors in case one has blown. Main resistors are ok.
Author
Owner

Managed to find a way to power the MCU only, avoiding using their crappy power supply which is not isolated. The MCU starts, but pulls the power-on pin to low (should be high, with high impedance), and it doesn't do anything when pressed.

It seems to me that it enters into panic mode and prevents it from turning on. I did this test with all other connectors removed. Then it occured it to me that it may need to check that the temperature of the boiler is okay, but the NTC sensor was also disconnected.

I connected it, plugged the power again and now it boots! The red light starts blinking as it were heating the water. I don't see anything else that may be broken. Could this just be a bad connection with the NTC sensor? I will assemble it and see if it continues to work.

Also, I saw in the test pads there are two wires for UART (RX/TX), but I don't see any activity. Probably it can be put in debug mode and read some messages there.

Managed to find a way to power the MCU only, avoiding using their crappy power supply which is not isolated. The MCU starts, but pulls the power-on pin to low (should be high, with high impedance), and it doesn't do anything when pressed. It seems to me that it enters into panic mode and prevents it from turning on. I did this test with all other connectors removed. Then it occured it to me that it may need to check that the temperature of the boiler is okay, but the NTC sensor was also disconnected. I connected it, plugged the power again and now it boots! The red light starts blinking as it were heating the water. I don't see anything else that may be broken. Could this just be a bad connection with the NTC sensor? I will assemble it and see if it continues to work. Also, I saw in the test pads there are two wires for UART (RX/TX), but I don't see any activity. Probably it can be put in debug mode and read some messages there.
Author
Owner

After putting it back together, it worked just fine and I was able to prepare coffee, but after some minutes leaving it untouched and powered off, it started blinking the green light, and then it turned the red light permanently. Pressing the power on button did nothing. So I unpluggled it, and plugged it back which caused the light to turn off, but then it didn't do anything when pressed. This is the same that we saw when it failed in the office.

So, I took it appart again and I did a bit more analysis on the PCB. The power on button is grounding the POWER_ON pin, which has a 100k pull up resistor and what it looks like a badly designed RLC debouncing filter, as I suspect it can resonate when releasing the button.

power-button2.png

The POWER_ON pin is only pulled up with the resistor R15, if it were damaged and it goes below the logic high limit, the MCU will assume the power on button is pressed. I have observed it to measure 20mV and 500mV sometimes, others it goes high as expected at around +4.7V.

I measured the resistor, but it seems to hold the value at 100k. When resting, the voltage drop is around 90mV. Even if the coil or capacitors were bad, they won't be able to pull the line down.

This part of the circuit is placed just above the heater, so it may happen that R15 only fails when hot. If that is the case, it can be easily repaired by replacing it or soldering another resistor in parallel.

If the resistor is fine, the problem comes from elsewhere. Another explanation is that the button is causing a false contact, which could explain the intermediate values. But if this is the case, it is unlikely that it will always remain at the same voltage level after being pressed several times. So I will reject this hypothesis.

Another hypothesis is that the input logic of the STM is broken for that pin. On the input circuit, it seems there is a pair of pull up and down resistors before the Schmitt trigger:

image

The input is protected from out of range voltages, but I guess not against too much current. The only way in which I see this could be potentially broken is that if it were configured as an output pin to high, then it is wired to ground, blowing the mosfets. But as I suspect it is always connected as an input pin, it should be fine. This is also consistent with the reliability on that pin when the button is pressed, it always registers it as pressed when the voltage drops from high to low.

I'm unable to make it fail again when powering it from the bench power supply, so I think it may have some interaction with the AC power supply. I could easily test the R15 broken hypothesis by soldering another one which I know is fine. If that continues to cause the pin to go low, that is not the problem. Using a resistor of 10k in parallel causes it to go a bit higher at +4.74V (from +4.75V at VDD) vs +4.66V otherwise. Power draw continues at 90 mW (yes, it will waste energy when OFF for no reason).

I could debug futher the AC power supply, but I would need to get (or build) an isolation transformer so I prevent myself accidentally touching the AC line or blow some of my equipment. A less painful way forward is to make a proper isolated switching power supply with a couple of relays to control the pump and heater, which is probably doable in less budget than what it would take to order a replacement power supply. I would be safer and much easier to repair.

After putting it back together, it worked just fine and I was able to prepare coffee, but after some minutes leaving it untouched and powered off, it started blinking the green light, and then it turned the red light permanently. Pressing the power on button did nothing. So I unpluggled it, and plugged it back which caused the light to turn off, but then it didn't do anything when pressed. This is the same that we saw when it failed in the office. So, I took it appart again and I did a bit more analysis on the PCB. The power on button is grounding the POWER_ON pin, which has a 100k pull up resistor and what it looks like a badly designed RLC debouncing filter, as I suspect it can resonate when releasing the button. ![power-button2.png](/attachments/2dce7161-e3c3-483e-85a1-73cd62e61995) The POWER_ON pin is only pulled up with the resistor R15, if it were damaged and it goes below the logic high limit, the MCU will assume the power on button is pressed. I have observed it to measure 20mV and 500mV sometimes, others it goes high as expected at around +4.7V. I measured the resistor, but it seems to hold the value at 100k. When resting, the voltage drop is around 90mV. Even if the coil or capacitors were bad, they won't be able to pull the line down. This part of the circuit is placed just above the heater, so it may happen that R15 only fails when hot. If that is the case, it can be easily repaired by replacing it or soldering another resistor in parallel. If the resistor is fine, the problem comes from elsewhere. Another explanation is that the button is causing a false contact, which could explain the intermediate values. But if this is the case, it is unlikely that it will always remain at the same voltage level after being pressed several times. So I will reject this hypothesis. Another hypothesis is that the input logic of the STM is broken for that pin. On the input circuit, it seems there is a pair of pull up and down resistors before the Schmitt trigger: ![image](/attachments/f261f3ab-d1b3-4b0d-8405-303085821848) The input is protected from out of range voltages, but I guess not against too much current. The only way in which I see this could be potentially broken is that if it were configured as an output pin to high, then it is wired to ground, blowing the mosfets. But as I suspect it is always connected as an input pin, it should be fine. This is also consistent with the reliability on that pin when the button is pressed, it always registers it as pressed when the voltage drops from high to low. I'm unable to make it fail again when powering it from the bench power supply, so I think it may have some interaction with the AC power supply. I could easily test the R15 broken hypothesis by soldering another one which I know is fine. If that continues to cause the pin to go low, that is not the problem. Using a resistor of 10k in parallel causes it to go a bit higher at +4.74V (from +4.75V at VDD) vs +4.66V otherwise. Power draw continues at 90 mW (yes, it will waste energy when OFF for no reason). I could debug futher the AC power supply, but I would need to get (or build) an isolation transformer so I prevent myself accidentally touching the AC line or blow some of my equipment. A less painful way forward is to make a proper isolated switching power supply with a couple of relays to control the pump and heater, which is probably doable in less budget than what it would take to order a replacement power supply. I would be safer and much easier to repair.
Author
Owner

Soldered a 10k resistor across R15, lowering the equivalence resistance to 9k so it always pulls the pin to high. I assembled the machine back and it turns on properly when I press the button, but when it tries to turn on the heater, the voltage at VDD slowly decays to around 3V and fails to keep the heat on. Probably this lowers the voltage too much in the triac, so it is not able to even turn on. This tells me that there is something broken with the power line on VDD but the MCU is fine.

I simulated the circuit used to provide the 4.85 V and it can provide enough power to keep the voltage at 5V even if I lower the resistance to 1k:

image.png

To fix it I would need to find a way to isolate the power supply from the AC line so I can probe it properly and identify which component is not working properly. There may be other parts that are not working which may be drawing too much power. Getting a replacement board is 24.50 €, but where is the fun in that.

I'm considering another route, which may be more fun. I can reuse the power supply I did for the gardening pump and program a simple firmware in the Arduino that replaces the STM. This seems viable as long as I can find 10 digital pins, 1 analog, a 5V PS and I manage to get 12 V to turn the electromagnet on. Using an old phone charger, I already got myself an isolated 5V power supply that I can fit inside. I also have some relays I used to control the pump, which I can reuse to control the heater and the pump. So the only parts I would need to get are some connectors, a large protoboard and ideally a switch to make sure the machine is OFF and not always connected to the AC line.

The electromagnet is used to hold the lever when the user selects the hot side (or cold) and then it keeps it there for the time selected. It can be used without this electromagnet by making the user hold the lever there for as long as needed. The only thing that we need to keep in mind is that we don't want any flow back to the pump, as that would pull all the residue from the capsule back into the circuit. I could make a prototype without the 12V power supply to test the idea, and then add it later when I figure a way to distribute both 5V and 12V lines isolated from the mains.

Another feature that I think would be useful is to detect low flow from the intake of the water meter, so we can detect when is time to run a descaling cycle. I suspect the original firmware only measures how many coffees has it served and only complains after a certain number has passed.

Soldered a 10k resistor across R15, lowering the equivalence resistance to 9k so it always pulls the pin to high. I assembled the machine back and it turns on properly when I press the button, but when it tries to turn on the heater, the voltage at VDD slowly decays to around 3V and fails to keep the heat on. Probably this lowers the voltage too much in the triac, so it is not able to even turn on. This tells me that there is something broken with the power line on VDD but the MCU is fine. I [simulated the circuit][1] used to provide the 4.85 V and it can provide enough power to keep the voltage at 5V even if I lower the resistance to 1k: ![image.png](/attachments/e7d0c36a-728d-417c-958c-11bef98b6da8) [1]:https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWc0AcAWA7ATgSgbJHmHFigniGhUmgMwgICmAtGGAFABeIeaIATPz69w-FAJAATRgDMAhgFcANgBdmnRgDtGAJ3YA3EKwq1IfY6PGRwDa-1NRHMBOx08+g4X1N9rGBPCQ7ADuRmAUYGLullAhYSZm0T6x-JBYAuQx-JmelFCwcJgMsLRoWHgYeLRY-Hh4qekwcBAwEBwNILR44pHiXeK5vgVmGMWQpeWV1bX1afnN+W1x2RFR-TFBoSsCQp3dO77skhkUub0HEtLyyipxIufb50EAxlm758l8CNB4LKPMgiw0DQkQQNUIbHw2XmkBad28iQ+iU20TOUVyQQA5nsBrt1slrEE3GgUNZziS7LsyfA4hSYusnrTSRd1hj2AB7cBIETWNBpdLEGH1JB2LmdDmOcKOPlYAXWBBgaD8GzK6y0CVscAUXn8zqpBiK5VG8AQdVAA To fix it I would need to find a way to isolate the power supply from the AC line so I can probe it properly and identify which component is not working properly. There may be other parts that are not working which may be drawing too much power. Getting a [replacement board is 24.50 €][2], but where is the fun in that. [2]: https://electrotodo.es/products/circuito-electronico-krups-ms623478 I'm considering another route, which may be more fun. I can reuse the power supply I did for the gardening pump and program a simple firmware in the Arduino that replaces the STM. This seems viable as long as I can find 10 digital pins, 1 analog, a 5V PS and I manage to get 12 V to turn the electromagnet on. Using an old phone charger, I already got myself an isolated 5V power supply that I can fit inside. I also have some relays I used to control the pump, which I can reuse to control the heater and the pump. So the only parts I would need to get are some connectors, a large protoboard and ideally a switch to make sure the machine is OFF and not always connected to the AC line. The electromagnet is used to hold the lever when the user selects the hot side (or cold) and then it keeps it there for the time selected. It can be used without this electromagnet by making the user hold the lever there for as long as needed. The only thing that we need to keep in mind is that we don't want any flow back to the pump, as that would pull all the residue from the capsule back into the circuit. I could make a prototype without the 12V power supply to test the idea, and then add it later when I figure a way to distribute both 5V and 12V lines isolated from the mains. Another feature that I think would be useful is to detect low flow from the intake of the water meter, so we can detect when is time to run a descaling cycle. I suspect the original firmware only measures how many coffees has it served and only complains after a certain number has passed.
Author
Owner

Closing in favor of #2

Closing in favor of #2
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/coffee#1
No description provided.