Go Down

Topic: "Directional Switch" Design (Read 1 time) previous topic - next topic

Graynomad

#5
Oct 12, 2010, 03:42 pm Last Edit: Oct 12, 2010, 03:47 pm by graynomad Reason: 1
Something like this



Apply power with the drawer open, the light will come on because both FFs are set by the RC circuit.

1/2 close drawer, FF1 gets clocked with 1 on D, light stays on. FF2 changes state.

Drawer closed, FF1 gets reset, light off.

Open drawer, at 1/2 pos FF1 is clocked but has 0 on D so no light. Also FF2 changes state.

Close drawer, at 1/2 position  FF1 gets clocked with 1 on D, light stays on. FF2 changes state.

Drawer closed, FF1 gets reset, light off.

etc etc.


I think that's about right although my brain hurts when I do this stuff and I often get my levels arse about face.

The 1/2 closed switch should provide a positive level and MUST be debounced, the closed switch input should provide a low level and doesn't need to be debounced.


_______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

flyboy

No need for flip flops or any electronic parts other than some switches.  Use two microswitches.  On switch #1, connect the common terminal to +V and the NC terminal connects to the NO terminal of switch #2.  Common terminal of switch #2 connects to one side of light bulb or LED.  Other lead of light goes to ground.

When drawer is closed, one of the two switches is open and the other is closed -- light off.  When drawer is half open, one switch is closed and the other is open -- light on.  If drawer is opened past the second switch, one switch is open and the other is closed -- light off.


tspecsp

@Rob - That helps a lot. I've been trying to understand this logic stuff for a while now and that explanation clears some things up for me. I have one question though: Should the 1/2 closed switch be a momentary switch, or does it need to remain closed while the drawer is closed?

Thanks!

Graynomad

#8
Oct 13, 2010, 02:54 am Last Edit: Oct 13, 2010, 02:54 am by graynomad Reason: 1
Both switches would be momentary, the FFs remember the state. The "closed" switch would in fact remain activated when the drawer is closed, but that doesn't matter.

There are no end of limit switches good for this.

@flyboy. I like the idea of not using any logic at all, but does this differentiate between opening and closing the drawer?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

macegr

A flipflop circuit is nice but will be plagued by contact bounce.

A switch could detect direction of motion by dragging a probe on the side of the drawer, closed only during drawer close. A simple cam could close and open another switch at the correct times.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Go Up