Hello, I have an ESP-12E micro-controller that is employed to move up an down a shutter. Trough 2 pins, I control 2 MOC3083 and they drive two BTA12-600B triacs to handle the two directions. This works fine but I have a problem: in the self contained 230V AC - 200W motor, there are embedded limit switches to stop the motor when the shutter is supposed to have reached either end.
My software is timed, but to reset from an unknown position, I move the shutter up for an excess time. In other words, when I don't know the position, to reset my timed position tracker, I give power for many extra seconds to be sure the shutter is stopped by the limit switch(es). I noticed that most of the times, when the switch opens, the micro crashes.
I reproduced the exact same problem with a 220V 50W light bulb and a manual switch: should I "software" turn on the light, as soon as I open the switch, most of the times, the micro crashes. If it doesn't crash, it may crash when I close the switch or at the next opening, but it crashes anyway very soon. In contrast, whenever I give-remove power through the triac, nothing bad happens. While I cannot see any feedback in the circuit, I can only suppose the switches generate a sort of spike in the supply. I think I have enough capacitors in the supply circuit (1000uF + 0.1uF close to the ESP).
Any better idea?
Any suggestions to avoid this problem?
Follows a reduced schematic of the circuit. Please note I cannot place anything in parallel with the embedded switches, while I could place any kind of "filter" in parallel to the supply.
My software is timed, but to reset from an unknown position, I move the shutter up for an excess time. In other words, when I don't know the position, to reset my timed position tracker, I give power for many extra seconds to be sure the shutter is stopped by the limit switch(es). I noticed that most of the times, when the switch opens, the micro crashes.
I reproduced the exact same problem with a 220V 50W light bulb and a manual switch: should I "software" turn on the light, as soon as I open the switch, most of the times, the micro crashes. If it doesn't crash, it may crash when I close the switch or at the next opening, but it crashes anyway very soon. In contrast, whenever I give-remove power through the triac, nothing bad happens. While I cannot see any feedback in the circuit, I can only suppose the switches generate a sort of spike in the supply. I think I have enough capacitors in the supply circuit (1000uF + 0.1uF close to the ESP).
Any better idea?
Any suggestions to avoid this problem?
Follows a reduced schematic of the circuit. Please note I cannot place anything in parallel with the embedded switches, while I could place any kind of "filter" in parallel to the supply.