microswitch

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
It doesn't get much easier than this:



Just a beam running through the car attached to both bumpers.
There's a hole in the beam; the handle of a DPDT switch goes through the hole; the body of the switch is mounted fixed to the car body.

When the front bumper strikes something, the bumper beam flips the switch to the other direction, reversing the polarity of the motor.

No gates, flip-flops, relays, or anything else is needed.

the problem is that i might not be able to find the component ....
for than that, is there anymore simpler one?
 

retched

Joined Dec 5, 2009
5,207
Its just a switch. and a popsicle stick with a hole in it to flip the switch. I think you can find them.

The handle of the switch goes into the hole in the stick. when the front of the stick hits the wall, it flips the switch backwards. When the back of the stick hits a wall, the switch is flipped forewards.
 

SgtWookie

Joined Jul 17, 2007
22,230
the problem is that i might not be able to find the component ....
for than that, is there anymore simpler one?
That's as simple as it gets.

You might use a DPDT slide switch, but a DPDT bat-handle switch would be better.
[eta]
The DPDT slide switch would not have positive disengagement/engagement. The bat-handled switch would have only one of two states.
 
Last edited:

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
That's as simple as it gets.

You might use a DPDT slide switch, but a DPDT bat-handle switch would be better.
[eta]
The DPDT slide switch would not have positive disengagement/engagement. The bat-handled switch would have only one of two states.
do you have any alternative other than this ?
can you help me check whether my circuit will work? (regarding the one shot ...)
 

SgtWookie

Joined Jul 17, 2007
22,230
do you have any alternative other than this ?
Why? Is a popsicle stick/tongue depressor and a DPDT switch too complex for you? Perhaps you can attach a piece of string or fishing line to it so you can pull it. That would definitely be easier, and you wouldn't have to worry about batteries running down. Environmentally friendly, too.

can you help me check whether my circuit will work? (regarding the one shot ...)
Sure. It won't work. If you can't find a DPDT toggle switch, you certainly won't be able to find all of those parts you have drawn up in that circuit that won't function even if you could find them.
 

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
because the bumper that i use do only have no, nc and com. Can i still be able to use your idea? Because when the bumper-microswitch is activated it will not move...
 

retched

Joined Dec 5, 2009
5,207
The bumper is not elecronic, it is mechanical. When the physical bumper hits a wall it pushes the stick back. That moving stick strikes the switch, flipping it. So yes. It will work for you. And should cost under $2.00us. + the price for a popsicle :)
 

BillB3857

Joined Feb 28, 2009
2,570
Have you looked at the data sheet for the J-K to see what happens when a clock pulse is applied with both J and K tied to Vcc?
 

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
Have you looked at the data sheet for the J-K to see what happens when a clock pulse is applied with both J and K tied to Vcc?

do you mean that i connect the 2 microswitch to the clock input n tied the jk input to vcc so that when the microswitch is activated, the output will toggle meaning a change in direction. Is this what you are trying to tell me?
 

BillB3857

Joined Feb 28, 2009
2,570
do you mean that i connect the 2 microswitch to the clock input n tied the jk input to vcc so that when the microswitch is activated, the output will toggle meaning a change in direction. Is this what you are trying to tell me?
Yes. The JK will toggle with each clock. Now that the JK is toggling, how do you intend upon using the outputs of the JK to run the motor forward/reverse? The output of the JK cannot drive the motor directly.
 

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
i do have a circuit that will enable the motor to reverse or forward when the microswitch is activated.

i have 1 more question which is what is the purpose of putting the unpolarised capacitor (0.1uF, 0.1uF, 10uF)across the relay ?
 

Attachments

BillB3857

Joined Feb 28, 2009
2,570
The 0.1 non polar cap across the motor will help reduce the electrical noise from the brushes. The 0.1 and the 10.0 on the output of the 7805 are to reduce electrical noise and provide some additional filtering to the output of the 7805. As for driving the relay with the JK output, looks like a winner to me. How are you setting up the switches to clock the JK? Again, back to the data sheet to see what it needs.
 

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
The 0.1 non polar cap across the motor will help reduce the electrical noise from the brushes. The 0.1 and the 10.0 on the output of the 7805 are to reduce electrical noise and provide some additional filtering to the output of the 7805. As for driving the relay with the JK output, looks like a winner to me. How are you setting up the switches to clock the JK? Again, back to the data sheet to see what it needs.
i have thought of connecting the NO of the microswitch to 5v. the COM to the clock for the jk ff. however the clock is a active low. so how do i go about connecting the microswitch to the clock ?
 

BillB3857

Joined Feb 28, 2009
2,570
You could tie a resistor from the clock input to ground and when the switch closes, it will pull the clock up to 5 volts and when it opens, the resistor will pull it to ground. Now you need to be concerned with switch bounce. JK's may see several clock pulses for a single switch transition. You need to "debounce" the switch contacts. Google is your friend.

Here is a good article on debouncing. http://www.ganssle.com/ www.ganssle.com/debouncing.pdf
 
Last edited:

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
i have research for the debouncing circuit and i have found 1 that is suitable for my circuit.
i would like to know is this the circuit that i am going to connect to the clock input?
 

Attachments

Thread Starter

kuxz2008

Joined Nov 16, 2009
84
You could tie a resistor from the clock input to ground and when the switch closes, it will pull the clock up to 5 volts and when it opens, the resistor will pull it to ground. Now you need to be concerned with switch bounce. JK's may see several clock pulses for a single switch transition. You need to "debounce" the switch contacts. Google is your friend.

Here is a good article on debouncing. http://www.ganssle.com/ www.ganssle.com/debouncing.pdf
but this circuit have the resistor tied to 5v instead of ground ? should i change the position of the resistor?
can you draw the diagram out for me with the microswitch and the debouncing circuit?
 
Top