Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
anyone got a working circuit for an up down barrier. It is controlled by a dc motor and a hbridge. My circuit will be software initiated just cant work out the logic. there are limit switches on at the barrier up and barrier down position.
so you have 3 buttons, one held by the door when its up, one held by the door at the bottom, and one pressed to trigger movement between the two? To plan the logic the first step is to draw or type out each button state and what it should do in those states.
I dont think anyone will hand you very much, I think what you need is a flip-flop, or a latch, to keep the triggered state held until the door hits the other button and changes the state. You already seem to know what an H-bridge is, and if you want to use a MCU you would have mentioned programming and that would be all there is to this project.
Maybe a state table would help. I guess you'd have these states: Down and stopped; Up and stopped; moving down; moving up... ? Most of the behavior is obvious. But let's say you have a single button to raise/lower the door (like a garage door opener button). What happens if you press the button when the door is moving up? Or down? And what happens if you press it again after that?
So you'd have outputs for up, down and inputs for top limit switch, bottom limit switch, and door switch (you could have just one I suppose)
It's been like 15 years since I've translated a state table into flip flops (college) so am a *tad* rusty But happy to try and remember and help... it'll come back to me...
It can also be done with a set of SPST switches, a DPDT switch and a pair of diodes.
The DPDT switch tells the motor what direction to run. The upper limit switch interrupts that direction of current flow going to the motor when it gets trigged. When the DPDT switch is flipped the other way the open upper limit SPST switch gets by passed by one of the diodes. When it reaches the bottom the second SPST switch stops the motor again. The second diode is so that the bottom switch can be bypassed when the current reverses to run the motor the other way and go up again.
Just use the H - Bridge to determine the direction of travel in place of the DPDT switch.
I know I'm basically rewording your idea with mechanical switches. But does he even really need the diodes or the h-bridge, or any thing but electric switches at all for that matter? It seems like a four pole switch (2 NC 2 NO, I have a few of these so they cant be uncommon) for user control could be set up with both leads closed one way in one position and both leads closed in the opposite direction in the other position, at that point you have a door that will move up or down continouously depending on the switch position. Then set up an NC switch the top to kill the power to the circuit that makes it move up when it hits the top, and another to kill the downward circuit when it hits the bottom. (again, sorry for basically just rewording your idea with a little variation, but the guy is a beginner)