Power on/off sequencer for my telescope drive controller project

Thread Starter

buda

Joined Sep 7, 2016
2
Hello All,
I am working on a DIY stepper motor drive for my telescope. I need 12V for the stepper motors and 5V for the control logic. The power on/off of the system must be sequenced, to not kill the dedicated stepper driver chips (TB6560)
The logic supply must be always present before applying - and little after removing - motor power.
I attached my circuit schematic of the sequencer, please have a look if you have some time, and tell me if you see any problem based on your experience.
A short description: the main power comes from a wall adapter of a laptop, but some 12V car battery/power tank also should work. Plugging the main still
not turns on anything. When ON/OFF pushed, Q2 turns on and the 7805 starts to supply LOGIC power. Then the U2 (PIC12F675) wakes up, and
switches on Q5 ASAP to maintain the LOGIC power by bypassing the switch. Then waits a second and turns on Q4 and so Q3, so the MOTOR power.
And theoretically that is all for turn on, So the U2 goes to sleep state.
On a new button press, U2 wakes from sleep by an inteerupt caused by high to low transition edge on pin5. then waits for a second, checks again the pin state and if still low, then switch MOTOR power off and after again 1 sec. also the LOGIC voltage off (and so itself too)
The MOTOR power feeds two 12V bipolar stepper motor (330mA each coil) and ~100uF of capacitors. The logic feeds 3 more PIC 18F.. controller
on 4MHz, two TB6560 chips, a 4x20 LCD, 4x4 matrix keypad, again some 10uF of capacitors. (maybe even a samall 28BYJ-48 stepper motor, but then I need some decent heatsink for the 7805...)
I added also a small 9V battery to maintain LOGIC voltage even if the mains unplugged by accident.
What is annoying me in simulation there is some voltage left in the LOGIC line after turn off. Maybe it is just simulation failure, but in real there will be also some capacitors on the LOGIC line... may it cause problems?
Thanks for reading this far, and your comments are welcome! :)
Kind regards,
Buda
 

Attachments

Papabravo

Joined Feb 24, 2006
21,225
You do know that mechanical switches will bounce, that is make and break rapidly over a period of 10's to 100's of milliseconds.

Also you don't show explicitly where U2 gets it's power. You CANNOT have a microcontroller explicitly controlling it's own power. You knew that -- right?
 
Last edited:

Thread Starter

buda

Joined Sep 7, 2016
2
Hi Papabravo!
The pic program takes care of the debounce, after interrupt, the IR handler routine switch off further IR request, wait a whole second(!) then checks the button state again.
Regarding the self power control of the uC: It is powered on by the button press, and after if button pressed again, in the IR routine it is forced to turn off itself. And to turn on again you need to press again, and so on... Of course the pic switch off itself, but if you keep pressing the button, the logic voltage will die only after the button released.
 
Top