Go Down

Topic: Nano in Espresso machine 'randomly' crashing. Where do I start troubleshooting? (Read 237 times) previous topic - next topic


Hello everybody!

My name is Arne, i live in Germany and I am new to this forum. I hope you can help me with an electronics-problem I have with my Arduino Nano:

I have equipped my Espresso machine, a Gaggia Classic, with an Arduino Nano to control the timing, the power of the pump and to measure the pressure on the coffee.

This is my Setup:

I have glued the Controller together with a 230AC to 5VDC power supply, a Relais and two terminal strips to a 3D-printed Plate. In Addition to that, I have connected a Rotary Encoder and a 0,96" IC2-OLED-Display to the board. The power Adapter gets the power from the machine´s main wiring and the 5V and GND ports on the adapter are connected to the terminal strips, from where the voltage and Ground is distributed to Controller, Relais, Encoder and Display. The display is connected to the 3,3V-pin on the Nano instead of the 5V supplying terminal Strip.
Finally, I am using Pin D9 to Control a power Regulator, which is connected to the Membrane pump. The board an the Encoder are located inside the steel Body of the machine, the display, and the power regulator including a PWM to 230V-Signal-Converter are mounted outide at the back of the machine.

The Controller is programmed to display the user the currently set duration for which the machine will pump water. The time can be changed by turning the encoder. When you press the encoder, it will turn on the relais, which will turn the pump and Solenoid Valve of the machine on and will let it run, until the set time has run out. In the meantime the Controller will tell the power Regulator via PWM to Change the pump´s power in a certain way. When the time is up, the Relais will be turned off and the contoller returns back to displaying the set duration for the next shot.

This is my Problem:
I ran the Setup quite a while without the power regulating element, just to have a shot timer, and it worked just fine. Since I have upgraded it to power Regulation, I frequently have the Problem, that the Controller crashes. The display freezes or Shows weird artifacts and the Nano does not respond to Encoder interaction anymore, so i have to turn the power off. It only happens, when the pump is working; when I turn the power of the pump off, the Contoller always works fine, but when the pump is running, this is likely to happen.

It does not always happen, though, sometimes it goes trough the loop just successful and sometimes the diplay turns black and stops working for a while, but the encoder and power regulation still work fine.

I don't have  a deep understanding of electronics and I find it hard to see a predictable pattern in this. It seems to rise and fall with the pump, but why did it not happen when I just used the Controller als a Shottimer? Has it something to do with magnetic shielding or fluctuations in the wiring? I just don't know where to start looking for the errors...

I hope somebody can help me, i would appreciate it. I hope, it is all comprehensible; i do speak english, but i have never written a technical text like this in english.



I suspect you changed the wiring arrangement when redoing the power, and this has increased the amount
of interference from the motor that is getting to the Arduino.

Any kind of motor is going to generate a lot of electrical interference, and you need to protect against this

1) reducing the interference generated - this depends on the kind of motor, for a DC motor a small
ceramic capacitor is often used to reduce high frequency noise from the brushes (sparks generate
all sorts of noise).  Motor controllers often use PWM at high currents, which is essential to function so
cannot really be reduced (but the higher frequencies can be reduced somewhat)

2) preventing interference coupling from motor circuit to other circuits - use twisted pairs (preferrably shielded
as well) for motor wiring, run motor wiring well away from other more sensitive circuits, never in parallel
with sensor wiring.

3) reducing the sensitive circuitry's sensitivity by shielding it and the cables it uses, and keeping as far away
from the noisy components as possible, certainly from the motors.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Ok, thank you. I have tried my best and seperated the pump and power regulator cables (and the devices themselves as well, of Course) as much as possible from the board. It now has at any Point at least a distance of 10 cm to all the other cables and components, except the wires between power supply and the points, where I tapped into the machine's circuit. But I guess, don't matter anyway, because there is still the power supply itself between the board and the cables?!

The pump runs on 230V AC and has a power consumption of 40W. It is working like a speaker, a electromagnet is pulling in a high frequency at a Membrane, which moves water through a spring-driven Valve. Can I even expect the pump to now, with the new cable Management and considering the current flowing through its cables, create enough interference to crash the Nano? Should I consider other sources of error?

I can hardly tell, if the setup now really works or if I was just lucky the last couple of times I used the machine, because the crashings are occuring so randomly...


This is also related to why the old timers say "It can't hurt to sprinkle your design with some decoupling capacitors"... 



Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you also post a picture of your project?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


Problems like this are usually solved with snubber circuits across the relay contacts.

Go Up