I will publish a schematic of the complete circuit in the near future (this year) but in the meantime there is still the slow process of troubleshooting.
- the complete circuit is not isolated from mains so testing is pretty critical. I have been feeding 3.6V to test the low-voltage part but in the end it will have to be hooked up to 220V
- the boiler / water heater can only take a limited amount of pressure. If the thermistor is not properly calibrated in software there is the risk of a scalding hot water explosion
With that being said there is some small but steady progress being done.
The MSP430 has a some strange power requirements that are not properly documented. The VCC supply
needs to rise with >1V/ms otherwise it gets into an undefined state. That undefined state might also mean that some GPIOs are high, causing catastrophical failure. Currently the nRST pin is tied directly to Vcc but I think I will wire that through a diode or LED that will provide a voltage drop so that the chip only starts when power is well above 2.5V. This is a job for a voltage monitor but there is no place to stick one in.
A 2.2k pull-up resistor from the power button was burned out causing strange issues.
The water sensor, which is basically a hall transistor, does not work properly with less than 5V. So, when the magnet is nearby it is only producing 0.5V instead of >3V required to trigger the Schmidt on the chip input. This means that the input will have to be read analogically, not a big issue.
I've got the schematic wrong for the NTC thermistor which means that all my calculations were wrong. The voltage on the analog input RISES with temperature instead of decreasing as I originally thought. It is ~0.5V at room temperature, 3V at 200C and 2.6V at 180C.
It's probably a non-linear curve so it will have to either be calibrated or carefully calibrated so that the boiler cannot get a chance to reach >100C causing a blow-out.
The original circuit had an input directly from the line voltage which had me puzzled for a while. I finally figured out what that might be: input for a zero-crossing detector. The triac that turns on the boiler should turn on only on the 0V crossing of the mains voltage, otherwise large EMI could occur. Maybe I can get around without needing this.
Another point to consider would be the optimal temperature to start brewing the coffee, assuming the coffee pads use real coffee and not some substitute. According to Wikipedia the ideal temperature should be between 91C and 94C, though Breaking Bad suggests a bit lower (85C). I guess also the pressure is also above atmospheric so it makes sense to lower the brewing point.
Considering that there is some thermal inertia between the temperature reported by the sensor and the actual water temperature with the heater running I would choose 85C as the right temperature to start the pump. I just wish there was a way to feed a precise temperature to the sensor, this might come in a future 'episode'. Unfortunately my JBC station goes down only to 180C and I don't trust the multimeter so much. Time for an IR thermometer.