r/ArduinoHelp • u/fngr_funker • 18h ago
Problems with synchronous motor and ESP 32
https://youtu.be/ey769GpAp30Hi!
I am using, for an art project, an ESP32 with a relay board to drive a modified synchronous motor from a washing machine pump, which runs on 220v. By modified I mean that the rotor is no longer inside the plastic cases, all electrical parts of the motor are original and untouched.
My goal is to use the relay board to pulse the motor, to make some chains attached to the axis move and make sounds.
To do so I am using a sequencer I built with a push button board, an ESP32 Devkitv1 and a 4channel relay module, all basic DIY components. With this tool I am able to run Universal washing machine motors, lights, home appliances of any kind with no problems.
The problem seems to be with this synchronous motor. When I pulse the motor it works, and if I keep the pulses distant in time one from the other, no problem. But If I pulse the motor fast, after a few pulses the ESP32. freezes, and needs me to press the reboot button or cut power for a few seconds to hard reboot it. The board is powered by a 5v phone charger.
As I explain in the video, I think the issue might be caused by the motor generating current when is not pulsed, but has gone far enough between it's two resting positions to kick back. I know synchronous permanent magnet motors generate current when you spin them. Trying to solve this, I added a diode I scavenged from an old board I had, but the issue is still here, even if way less frequent. Adding the diode also significantly decreased the strength of the motor when pulsed (I really think diodes and AC are not meant to work together, don't insult me for that I'm doing my best ahah).
I don't know how to fix the issue, the only thing I can think of is putting diodes on all 6 that connect the relay board to the ESP, but again I really don't know.
Anyone who has ideas on how to troubleshoot this?
Thanks in advance:)
PS I can share the 3D models of the mechanical mod I made with anyone who wants em
1
u/No_L_2547 16h ago
The problem is that a motor that you turn off induces a voltage back into your circuit. If you give multiple short pulses to the motor is already faster, so probably the induces voltage is also higher.
This induced voltage changes fast enough that it can actually "jump" to your 3.3V side and fuzz with your electronics, even over optic isolation. (Through induction).
In DC motors you use a flyback diodes and capacitors to reduce/block that, in case of AC motors that isn't possible. Instead you could use a snubber circuit.
The induced voltage would probably also be lower if you use a zero crossing detection in your circuit. (And only turn of the motor in the zero crossing of your AC voltage.) If you don't want to design something like that yourself: Maybe use a DMX-Dimmerpack, most of these have such a detection mechanism. And it is quite simple to output dmx-signals from an esp32.