-
PROBLEM DESCRIPTIONWe use ESP-12F flashed with tasmota + a4988 stepper motor driver, and found follow issue: when we switch on on after any actions of motor is making(for example shutter close/open), level of ENABLE pin set to HIGH, which disables a4988, and coils of motor not under voltage. This situation repeat again and again when switch power Off/On To workaround the problem we set PowerOnState to 1, but its not very safety, because when power appear this can lead to unpredictable movements of shutters, moreover, these movements are rather undesirable(because this reset desire shutter position. in our case when switch off/on, shutters always closing) TO REPRODUCEJust switch on/off, and check ENABLE pin (Relay_i - inverted relay - in our case in on GPIO5) EXPECTED BEHAVIOURWhen switch on on Relay_i pin must be set |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Well, when powering up, there will by necessity be a brief moment until the ESP8266 boots Tasmota, before there is a chance of doing anything to control pin states. If you cannot live with the pin not being high (floating, not the same as being low) until Ideally, you should not be cutting power to the ESP8266, as you then lose the chance to exert any control. |
Beta Was this translation helpful? Give feedback.
-
@sfromis you are right pull up resistor to +3.3V power line helps solve problem, but this absolutely not obvious, i thinked that GPIO may be in only in 2 states I made some experiments, and found that sometimes HIGH level on and this strange for me At the beginning, I thought since that pin goes to HIGH state after some action, that the problem is on software side, and this strange third state |
Beta Was this translation helpful? Give feedback.
-
This is the reason you should have a circuit safe configuration as it is described here: https://tasmota.github.io/docs/Blinds-and-Shutters/#using-normal-motors With this relay configuration you physically ensure the motor will never get power on both lines (up/down). If you buy a device like a shelly they take care the relay start OFF on boot until the software takes over. Also this is save and works fine. Before connecting the motors I always do a "restart test" and check if I can hear a minimum relay click. If yes, this IS A MAJOR problem. In most cases it helps to use the RELAY_I and change the cabeling accordingly. |
Beta Was this translation helpful? Give feedback.
Floating is a normal and very common state until there is an active control to drive a pin high or low. It is possible that a circuit may not be designed to handle floating, meaning that it might not react in a predictable and consistent way. I can't say if this applies in your build. With normal non-inverted pin usage, my starting point would be to expect it to be handled as low, but I have no clear expectations for the inverted case.
And when I mentioned "brief", that was until you can have Tasmota enact what you want, like depending on what
PowerOnState
you have.Anyway, taking control over "unenforced" state (to avoid floating) with a pull-up or pull-down resistor is a standard part o…