Introduction: USE a PUSH BUTTON AS a SWITCH !

Hi i'm Erik from México!

In this instructable i'll share you how to use a push button as a switch with a CD4013 FLIP FLOP and a relay.

VOLTAGE FOR IC: 5-12 V VDC

PARTS LIST:

1X IC4013 D TYPE FLIP FLOP

3X 1K OHM RESISTORS

3X TERMINAL BLOCK

1X 5VDC 10A RELAY

1X NPN GENERAL PURPOSE 2N2222 TRANSISTOR

1X 5mm LED

1X 1N4001 DIODE

1X PUSH BUTTON ANYONE

1X AC CABLE FOR CONNECT TO THE AC OUTPUT OF YOUR HOME

1X AC CHARGE FOR EXAMPLE: 120 VAC BULB

Step 1: SCHEMATIC AND PRINCIPE OF FUNCTION

HERES WE GO!

Another instructable for share that i made... :)

"How do I switch my fans on and off with a single push-button switch?" and the usual answer is:

"Use a flip flop!".

That's a logic IC such as the CMOS 4013B where the output changes state every time it gets a positive pulse on the input (from a square-wave clock signal or by you pushing the button), so the first push can be used to turn something on, a second push will turn it off.

In this circuit, we show how to build a D flip flop circuit with a 4013 D flip flop chip.
A D flip flop is just a type of flip flop that changes output values according to the input at 3 pins: the data input, the set input, and the reset input. All flip flops do the same thing- they store a value at the output(s) indefinitely unless the value is intentionally changed by manipulating the inputs. If we don't change the input values, then the values at the outputs stay the same. The 4013 is a dual D flip flop chip. This means it's composed of 2 independent flip flops. However, in this circuit, we will simply show how to operate 1 of them. If you know how to use 1 of them and how it works, then you will know how to use the other one. In this circuit, we will operate the flip flop using nothing but manual pushbutton control. By using pushbuttons to control the inputs, you can see exactly how the flip flop reacts to changes in inputs . You can physically how the output changes. Therefore, it's very hands-on and you can really see how a D flip flop operates according to its logic truth table.

Step 2: RELAY AND CHARGE!

I put a transistor in the output of the IC4013 FLIP FLOP for amplify the output and a diode for protection of the same transistor for "inductive efects" of the relay that coulkd damage our precious NPN general purpose transistor 2N222 Oor could be anything you want for low current and general prupose. :)

Step 3: THE PCB LAYOUT AND MASK READY TO PRINT!

Here you can download the circuit for your purpose you can connect a load as:

AC motor,120V LAMP, A TV, ANYTHING YOU CAN CONNEC DIRECTLY TO AC LINE OUTPUT OF YOUR HOME!

Step 4: VIDEO

In this step i'll show you how the circuit works!

Comments

author
eblack8 (author)2016-12-22

You can use the other flip flop in the chip to make a one-shot circuit like others have mentioned...here is a link to one using just that!

http://www.discovercircuits.com/DJ-Circuits/oneshots.htm

author
fabiojcortes (author)2016-11-28

Good one! I put the switch to VCC and the resistor to GND and works better.

author
gm280 (author)2016-11-17

I looked over your schematic diagram and also notice that you had problems turning your LED on and off watching your videos you provided. And there are a couple reasons for that situation. First you are using a positive edge clocked flip flop, but switching it via a push button that applies a ground to the clock input. So until you release the push button, it doesn't change. If you want to fix that, swap the push button to the VCC power supply side instead of the ground. That way when you push the push button, it will activate the clock on a positive going input. Secondly, I also seen a flickering of the LED when you tried to switch the circuit lot of times. And that can be caused by the push button switch bounce. Regardless how you try, when you push the momentary push switch, it produces switch bounce. And that can be fixed by using a one-shot circuit so when you press the switch, it triggers just one clock cycle and not a bunch. I worked in digital circuitry for years and know how switch bounce can really make things iffy. Research one-shot debounce circuits and see what I am talking about. Other then that, you did make a nice circuit.

author
FloridaJo (author)gm2802016-11-22

Good update. I second that motion. -elec tech

author
erik_montesdeoca (author)gm2802016-11-17

The reason for that i use push button only and i not used a 555 as a monostable is for economy, the function is ok, aprox 90% of times, but you have a lot a reason in the "anomalies" when i pressed the pushbutton, it depends of the quality of the button, and i recommend to use a NC (normally closed push button for better results).
best regards!

author

Put your switch between plus and the clock input, the resistor goes to gnd and add a small cap in parallel to it to debounce the switch, and it will work fine. I made hundreds of things like that !

author
KISELIN (author)2016-11-22

PUSH BUTTON

About This Instructable

8,312views

170favorites

License:

Bio: I am very athletic and enjoy sports. I often participate in many different activities and love to be busy all day. I enjoy to wake ... More »
More by erik_montesdeoca:MAKE a 1.5V AM RADIO! Garbage Line Follower Robot!Make a Ghost Detector!
Add instructable to: