I try to think on a good way to control motor when I shut down the main PCB (which includes the MCU).
How the system works today is when it's ON, the MCU enables the motor, the motor moves a mechanical part which presses on a push button and "lock" it (gives the MCU the sign to disable motor).
I would like your help to think on a way to return the motor to his normal state after I turn off the system and the MCU no longer have voltage.
What I was thinking on is another small PCB circuit that will connect to the same motor and another push button. The small PCB will always get voltage and when system turns off, it will "recognize" it, maybe using a transistor base (please advise if possible), turn the motor to the other way and press the other push button- which will stop the motor from moving.
Other suggestion is somehow "delay" the "shut down" after moving the "shut down" switch and give a few second to the MCU to keep work, activate the motor to the other way and then turn it off.
I would appreciate any kind of help to that hard problem.
The MCU controls the motor driver which controls the Motor using A and B nets. If "10" is send, motor switch to one direction, if "01" it switched to the other direction and if "00" then it stops. The system start by moving the motor, let say with "10", until a mechanical part pressing the "open motor" button, which tells the MCU to stop motor ("00"). My problem is, that I want somehow, that when I completely shut down the voltage, the motor will move to the other way until it presses the other button ("close motor" button) and then stop moving. How can I in the most simple and low cost way you can think of?
I was thinking on adding another PCB which will always get voltage from batteries, connect to shutdown switch, A and B nets and close motor button. How can I make such PCB do the trick and close it?