Continue to Site

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.

  • 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.

Circuit help (I think people call it a flip flop circuit?)

Status
Not open for further replies.

Abodon

New Member
Hi there.

I found this forum through Google and hoping someone might help me

I am planning to convert the dashboard on my car to that of a later model, it's a Renault Clio and the two versions can be referred to as Phase 1 (Ph1) and Phase 2 (Ph2).

One of the differences is the Ph1 has a rocker switch that operates the car locking. The up action makes the car lock, the down action makes the car unlock.

Theoretically you would never need to press either button twice in a row. If you do, it just tries to unlock or lock the car again.

I believe that these switches under the rocker are called momentary switches?

Essentially I want to create a circuit to hide behind the dashboard, that will complete my criteria and allow me to have 1 button (again momentary I believe) that will activate the lock button, but if you press it again then it will unlock the car etc.

I know this is possible and the requirements are probably very simple to some of you, just hoping someone might share some knowledge to get me started.

Best regards,

abodon.
 
I think you are looking for a "Bistable Flip Flop"

toggle.gif

A quick search came up with that circuit diagram along with this :"Here are two examples of bistable flip flops which can be toggled between states with a single push button. When the button is pressed, the capacitor connected to the base of the conducting transistor will charge to a slightly higher voltage. When the button is released, the same capacitor will discharge back to the previous voltage causing the transistor to turn off. The rising voltage at the collector of the transistor that is turning off causes the opposite transistor to turn on and the circuit remains in a stable state until the next time the button is pressed and released. Note that in the LED circuit, the base current from the conducting transistor flows through the LED that should be off, causing it to illuminate dimly. The base current is around 1 mA and adding a 1K resistor in parallel with the LED will reduce the voltage to about 1 volt which should be low enough to ensure the LED turns completely off."

Although this type of circuit is not momentary in its final state, like the rocker switch in your example...
 
You could also use a D Flip-flip such as a CD4013. You connect the D input to the /Q output. The PB output goes to the CLK input. You will also need a debounce circuit for the PB to prevent multiple triggerings of the FF from contact bounce. That can be done with a diode and an RC circuit (diode in series, cathode to the CLK input, and a 0.1uF cap in parallel with a 1 megohm resistor from the CLK input to ground). If you need to drive a relay from the output, then you will need to add a transistor buffer.

Below is a simulation of such a circuit with multiple pulse input to simulate the bounce of the PB switch. The actual PB replaces the components inside the dotted line and goes between +12V and the diode. The power and ground connections to the CD4013 are not shown and must be added. Also add a 10kΩ in series with the power to the CD4013 and a 10uF cap from the power pin to ground for noise and transient suppression.

PB Alternate Action.gif
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top