Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Flip Flop based Staircase Switch

By Ashutosh Bhatt December 5, 2012

In many cases, the stairs have a power switch at the bottom which is often left switched on during night. No one wants to go down to switch it off and hence, unnecessary on, it leads to wastage of electricity.

To solve this problem we have described a simple staircase circuit which contains two micro switches; one at the top and other located at the bottom of the staircase that can be pushed and released easily during climb-up from the bottom of the staircase or climb-down from the top of staircase. In short you can use any switch to on and off the light.

This simple circuit is built around a CD4013 IC which has two independent D type flip flops which exist in complimentary states and can store information.Each module is further equipped with a group of  pin outs assigned as data, set, reset, clock input and a couple complementary output Q and Not Q. As we know, it has couple of output that change or toggle state as response to trigger applied to input terminals.


 

CD 4013 comes in 14 pin dual inline package. To understand the working of circuit first we have to understand its pin lay out. 

 

Pin Diagram Of CD 4013 IC

Fig. 1: Pin Diagram Of CD 4013 IC

1. Pin no1, 2, 13 and 12 are complimentary outputs. This set of output changes state while setting and resetting the IC producing opposite logic level at any instant when operated in bistable mode.

2. Pin 5 and 9 are called Data pins and are generally connected to one of the outputs  for the purpose of lengthening the applied input clock for square wave. For other waves, they may be terminated to any other logic level or they may be connected either connected to supply or to the ground of the circuit. In this circuit we have connected Not Q and Data pin 5 together.

3. Pin 3 and 11 are called as Clock input.  These are input pins which are used to receive clock signals generally in the form of square wave. These signals may be provided by the transistor in the form of astable multivibrator or with the help of NAND or NOR gate. This input will produce effect on any of the output pins, the other being connected to Data pin as explained above. In our circuit we are providing clock signal through transistor circuit.

4. Pin 4, 6 and 10, 8 are called as set and reset pins. Whenever any of the pin goes high, we will get the output. When set and reset are low, output shows that data at input at the time of last low to high clock transition means output is held till the next transition.  For safety, these are also assigned to a logic level generally they are grounded with a high value resistor. Once this is done, the input can be made to alternately respond to positive peak pulses to toggle the logic stage of the Q and Not Q outputs, alternately.

5. Pin 14 and 7 are called supply and ground pin respectively. Pin 14 receives the positive supply input which should not exceed 15V otherwise it will destroy the IC and pin 7 is ground or connected to negative supply input of IC Now you can also see this in truth table-

CLk

D

R

S

Q

Q-

low-hi

0

0

0

0

1

Low-high

1

0

0

1

0

Hi- low

X

0

0

Q

Q

X

X

1

0

0

1

X

X

0

1

1

0

X

X

1

1

1

1

From the above explanation of pin outs we can see that when you press switch S1, clock input goes high and high input is transferred to output. It further drives a transistor which in turns energizes the relay and as a result device connected to it start working. Similar action will take place when you use switch S2. We have used resistor R1, R2 diode D1 and Capacitor C1 to eliminate the effect of switch bouncing and combination of C2 and R3 provides power ‘on’ reset. Before connecting the bulb through relay, verify the voltage and current rating of relay. Also check CD 4013 based two way switch

Circuit Diagrams

Circuit-Diagram-Flip-Flop-based-Staircase-Switch

Project Components

  • Capacitor
  • Diode 1N4148
  • Resistor
  • Transistor BC547


Filed Under: Electronic Projects
Tagged With: cd 4013, flip flop, ic, staircase switch, switch
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • BF999 Input and output impedance
  • Industrial Relay Board Design for Motorcycle Use
  • Sendust vs Ferrite for SMPS
  • On/Off Slide Switch Reassembly Help
  • sim7090g

RSS Electro-Tech-Online.com Discussions

  • I Wanna build a robot
  • Wierd makita battery
  • using a RTC in SF basic
  • Is AI making embedded software developers more productive?
  • ac current limiting

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz
  • Amphenol RF introduces SMPM to SMPM assemblies on RG-178 cable
  • Infineon launches 3D magnetic sensors with ±50 mT to ±160 mT measurement ranges

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe