# [SOLVED]I need help designing a simple circuit

Status
Not open for further replies.

#### GeoffL

##### Newbie level 4
I'm a software engineer by day and I don't have any experience designing circuitry but I have a simple project which I was hoping you guys (or gals) could help me with.

I currently have a momentary switch that triggers the circuit to close and prompt the action to occur I would like to introduce another source which can close that circuit as well. The other source will trigger the action when its power is removed or added.

One caveat is that I need a counter so that if the momentary switch is pressed and then the power is removed from the other source, the action will not fire again. However, if the momentary switch is pressed an even number of times, the other source will fire the action as necessary.

I realize that I need a relay to monitor for the removal of power from the other source and a binary counter in order to keep track of how many times the momentary switch has been pressed.

This is going in a vehicle so the power requirements are low.

Any help with components and wiring that you all can provide would be much appreciated.

Thanks!

#### GeoffL

##### Newbie level 4
I've created this truth table as well.

Code:
A  B  C  D  |  A  |  (  C  &  ~  D  )  |  (  B  &  D  )
-------------------------------------------------------

0  0  0  0  |  0  0     0  0  1  0     0     0  0  0
0  0  0  1  |  0  0     0  0  0  1     0     0  0  1
0  0  1  0  |  0  1     1  1  1  0     1     0  0  0
0  0  1  1  |  0  0     1  0  0  1     0     0  0  1
0  1  0  0  |  0  0     0  0  1  0     0     1  0  0
0  1  0  1  |  0  0     0  0  0  1     1     1  1  1
0  1  1  0  |  0  1     1  1  1  0     1     1  0  0
0  1  1  1  |  0  0     1  0  0  1     1     1  1  1
1  0  0  0  |  1  1     0  0  1  0     1     0  0  0
1  0  0  1  |  1  1     0  0  0  1     1     0  0  1
1  0  1  0  |  1  1     1  1  1  0     1     0  0  0
1  0  1  1  |  1  1     1  0  0  1     1     0  0  1
1  1  0  0  |  1  1     0  0  1  0     1     1  0  0
1  1  0  1  |  1  1     0  0  0  1     1     1  1  1
1  1  1  0  |  1  1     1  1  1  0     1     1  0  0
1  1  1  1  |  1  1     1  0  0  1     1     1  1  1

A: momentary button
B: power turned off from other source
C: power turned on from other source
D: binary counter in 0 state

#### E-design

Can you draw a block diagram as well as to avoid any confusion to the required operation?

triggers the circuit to close and prompt the action to occur

#### GeoffL

##### Newbie level 4
Currently a momentary switch makes the desired output occur. I'm wanting that same action to occur when the vehicle is powered off or on (if the momentary switch wasn't used while the vehicle was on or off).

#### gaffarnazari@yahoo.com

##### Member level 1
I dont khnow whats your means.is it question for vlsi?

#### E-design

So if you activate the switch, the output will stay on only as long as the switch is pressed, or should it be latching?

#### GeoffL

##### Newbie level 4
I haven't tested to see how long the output stays on but the momentary switch will cause the action to continue until it's limit switch has been reached. I do believe this is what you mean by latching.

I'm learning so thanks for bearing with me.

#### E-design

Is this what you had in mind?

#### Attachments

• switch_logic.gif
10.8 KB · Views: 45

#### E-design

Should the OUT signal switch a relay?

#### gaffarnazari@yahoo.com

##### Member level 1
Do you want generate out signal with three conditions and do you want design with cmos(mosfet)?is this question related to vlsi?

#### GeoffL

##### Newbie level 4
Should the OUT signal switch a relay?

The out signal will provide the same signal as the momentary switch.

Do you want generate out signal with three conditions and do you want design with cmos(mosfet)?is this question related to vlsi?

Yes, there are three conditions which can trigger the output signal. I'm not sure what vlsi means.

#### gaffarnazari@yahoo.com

##### Member level 1
I try to design and send to you.VlSI(very large scale integration)

#### E-design

Here is the circuit I used to get the results. U1 is a 4013 chip. It will work on 12V as well.

#### Attachments

• switch_logic1.gif
10.2 KB · Views: 42
Last edited:

#### GeoffL

##### Newbie level 4
Thanks! Looks good! I'm going to try to build it this weekend!

#### gaffarnazari@yahoo.com

##### Member level 1
YOUR circuit function to generate out signal is (A'B'C'+ACB)+C
A=BIN
CNTL=B
SW=C
IF YOU want implementation with logic cell it is very easy. please tell me please which you want implemetation with logic cell or mosfet transistor?!

Status
Not open for further replies.