DC motor reverse with DPDT switch toggled by 555 timer, with limit switches

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
First time post but I've been a lurker for about a month. This forum has been so helpful in teaching me about electronics. It is such a rich resource that this is the first time I haven't found what I was looking for with a search. So thanks to all in advance.

Anyway, I have a 12V DC motor that turns a horizontal chain. I pull an object on the chain. I need that object to go in one direction, but not too far (limit switch), wait a while (555 timer), and then reverse (by toggling the DPDT switch). How can I do this using the simplest possible circuit?

I suppose I should further qualify what I need by explaining what isn't important to me. I don't need this to be very precise. So, for example, the timer could be set to travel in one direction for 30 seconds. But it could hit the limit switch after 20 seconds. So there could be an extra 10 seconds where nothing is happening. That's fine. In fact, if it is easier to plan my resting period this way I'd be happy with that too. My object travels at a uniform speed. So if I set the timer to go one way for 60 seconds, reverse, and repeat - that would be ok because I know my object will only take, say, 20 seconds to get to the other side.

I realize this means that at shorter intervals programmed into the 555 timer, my object may not make it to other side before it reverses. That's fine too because I'd rather fix that by adjusting the 555 timer.


Background:

My motor is positioned perpendicular to the floor and the object hangs on the lower side of a horizontal chain.

At first, I tried to attach another small object on the top side of the chain in order to bump a two position DPDT switch. I was hoping I could just trigger the switch this way and I would have an object that would constantly bounce back and forth. Not only did that not work, but I've realized that it's more desirable to introduce a timer into the system.

I read on an instructables comment that I can use a 555 timer to toggle a DPDT switch, but I haven't really found a good post/schematic explaining how to do it. However, there are some similar posts, particularly this one by Sgt Wookie.

I don't really understand how to specify the timing of a 555 switch, but I am familiar with the general idea and will learn about that later. For now, I'd like to get some help on how to implement the system described above.

Thanks again!
 

praondevou

Joined Jul 9, 2011
2,942
Anyway, I have a 12V DC motor that turns a horizontal chain. I pull an object on the chain. I need that object to go in one direction, but not too far (limit switch), wait a while (555 timer), and then reverse (by toggling the DPDT switch). How can I do this using the simplest possible circuit?
.............
I was hoping I could just trigger the switch this way and I would have an object that would constantly bounce back and forth. Not only did that not work, but I've realized that it's more desirable to introduce a timer into the system.
The "circuit" I attached will inverse the motor direction after a delay when one of the limit switches was hit. I'm not sure if that's what you wanted so I didn't make an effort to put all the details in it.

It's just a basic idea and will need some more thinking. The 555 will be triggered when a limit switch is activated. The 555's output goes HIGH. After a delay it goes LOW and triggers a negative edge triggered D-flipflop or any other circuit with the same function (maybe a modified 555 bistable or a few transistors). The FF's output will toggle and reverse the motors direction.

To drive the relay a driver may be needed at the output.

This circuit will constantly reverse the motors direction, so depending on what you want a little more control needs to be added.
I have no drawing software available right now, that's why it's so napkin-like.;)
 

Attachments

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
The "circuit" I attached will inverse the motor direction after a delay when one of the limit switches was hit. I'm not sure if that's what you wanted so I didn't make an effort to put all the details in it.

It's just a basic idea and will need some more thinking. The 555 will be triggered when a limit switch is activated.
Thanks for the reply. I don't really need the limit switch to activate the 555 timer or to reverse polarity. I need the limit switch to just stop the motor from moving in the direction it's traveling.

I'd like to have the 555 timer just turn the motor on in one direction for a number of seconds. If it hits the limit switch within those seconds, fine. It will wait and then switch direction after the time expires.
 

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
Ok, just a few questions.

how is the circuit initially triggered?
Once the motor reversed how is the motor being stopped?
My battery pack has an on/off switch. I'd like to switch to turn it on that way and leave it on forever.

I'd like for there to be a limit switch on both sides. When the object hits the switch it stops turning in that direction and will reverse when the 555 timer tells it to do so.

I don't know much about this stuff, but I'm trying to learn. I'm sorry if my answers aren't very good. Thanks again for the help.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hello Bob,
I saw your post this AM, but I didn't have time to reply before heading out.

Here's the start of a circuit that would basically do what you want.

For the best results, you really need to give me the time it takes to travel each way, from end to end.

The idea is that the timer stays set one direction for a period of time. The object hits a limit switch, which stops the motor because the current path for the relay coil is interrupted. The timer then times out, and the opposite relay gets energized; the motor moves the object until the other limit switch is struck. The timer eventually times out, and the direction reverses again.

You really want the motor to stop and wait a couple of seconds before reversing it. It is very hard on a motor, the relays and the power source to reverse a motor from full speed one direction to full speed the other direction; you will break things pretty quickly if you attempt this.

The idea here is to set the minimum time using fixed resistors to get you in the ballpark for timing - and then have pots so you can "fine tune" adjust the total delay on the other end.
 

Attachments

praondevou

Joined Jul 9, 2011
2,942
Here is a circuit that will turn the motor until it hits the limit switch or the timer circuit toggles it's output.

The limit switches are shown in their position when the motor is still running.

If a limit switch is hit, the timer has to finish one period then it will change the motors direction. If the limit switch was not hit when the timer period is finished the motor will also reverse.

EDIT: Ahem, Sgt was faster...I didn't refresh my browser ;)

Yes, depending on the load, it maybe it's a good idea to stop the motor first before reversing it.
 

Attachments

Last edited:

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
Hello Bob,
For the best results, you really need to give me the time it takes to travel each way, from end to end.

.

20 seconds should allow it to reach the other side and have time to rest before moving back. Once I get this version squared away I'm going to make a larger one, so I'll eventually have to learn how to adjust the 555 timer myself.

Thanks so much for your help. I've seriously learned a lot just by coming across so many of your old posts.
 

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
Ok so I've been doing research on how to select the right components to get the right frequency out of a 555 timer. Wow, it's complicated and I'm way over my head. I found some simple calculators for 2 resistors and a capacitor, but there are tons of things on this circuit.

Is it possible for you to just tell me what components I need to get 20 seconds at 50/50? If getting 25 -30 seconds is easier that's fine too. If not, can you point me to a resource for adding everything together?

It's obvious I need to teach myself much more on this whole subject, but for right now I need to get this thing up and running.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK then, change R3 to 330k, and R4 to 390k.
That should give you roughly 25 seconds each way, give or take the tolerance of the components and the error% of the simulation. You may wind up having to change R3 and R4. Their adjustment is independent of each other.

R3 controls how long the motor runs in the forward direction. R4 controls the reverse direction.

I did not show an 0.1uF and a 100uF cap across the 555 timer; they are needed.

[eta]
After some further thought, you'd be better off changing R3 to 33k, R4 to 39k, and C1 to 1,000uF, rated for 16v.
The reason is that electrolytic caps have leakage; the higher the resistance that R3 and R4 are, the more significant the leakage becomes, increasing the chance for error.

Capacitors can have a significant variance in their actual capacitance vs their marked capacitance. The numbers I've given you keep this in mind. If you wish to have the times adjustable, you can add 5k potentiometers wired as rheostats in series with both R3 and R4.
 
Last edited:

Thread Starter

bobhawkens

Joined Oct 29, 2011
9
Thanks for the suggestion. Two quick questions:

Is it ok if my capacitor is rated for 35v? I can't seem to find one rated for 16v.

Where do I put the other two capacitors not shown on the diagram? I don't want to screw it up.

Sorry if those are dumb questions.
 

SgtWookie

Joined Jul 17, 2007
22,230
Is it ok if my capacitor is rated for 35v? I can't seem to find one rated for 16v.
Yes, that should be OK. The higher you go in the voltage ratings, the greater the leakage current. This is because when you double the voltage rating, you have to double the spacing between the plates; so you have to quadruple the amount of plate area for the same amount of capacitance. Also, the package size increases significantly for increases in voltage ratings.

Where do I put the other two capacitors not shown on the diagram? I don't want to screw it up.
The 0.1uF/100nF cap should go directly across the Vcc and GND pins; keeping the leads as short as possible. The 100uF cap should be within an inch or so of the timer.

Sorry if those are dumb questions.
Not dumb questions at all. :)
 
Top