Experimental Study to Show the Effect of Bouncing On Digital Systems

Similar documents
Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Physics 323. Experiment # 10 - Digital Circuits

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Chapter 5 Flip-Flops and Related Devices

A New Hardware Implementation of Manchester Line Decoder

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

DIGITAL ELECTRONICS MCQs

(Refer Slide Time: 2:05)

Chapter 4. Logic Design

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Combinational vs Sequential

DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201)

Sequential Logic and Clocked Circuits

RS flip-flop using NOR gate

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Decade Counters Mod-5 counter: Decade Counter:

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

FLIP-FLOPS AND RELATED DEVICES

PESIT Bangalore South Campus

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

D Latch (Transparent Latch)

Experiment 8 Introduction to Latches and Flip-Flops and registers

IT T35 Digital system desigm y - ii /s - iii

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Topics. Microelectronics Revolution. Digital Circuits Part 1 Logic Gates. Introductory Medical Device Prototyping

IJMIE Volume 2, Issue 3 ISSN:

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

RS flip-flop using NOR gate

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Asynchronous (Ripple) Counters

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

EE292: Fundamentals of ECE

Introduction to Microprocessor & Digital Logic

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

ELCT201: DIGITAL LOGIC DESIGN

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Chapter 9 Introduction to Sequential Logic

ASYNCHRONOUS COUNTER CIRCUITS

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Other Flip-Flops. Lecture 27 1

Rangkaian Sekuensial. Flip-flop

Digital Circuits I and II Nov. 17, 1999

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

INTRODUCTION TO SEQUENTIAL CIRCUITS

WINTER 15 EXAMINATION Model Answer

16 Stage Bi-Directional LED Sequencer

EXPERIMENT #6 DIGITAL BASICS

CH 11 Latches and Flip-Flops

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

LATCHES & FLIP-FLOP. Chapter 7

Introduction to Digital Electronics

Digital Circuits. Innovation Fellows Program

Digital Circuits Part 1 Logic Gates

Sequential Logic Basics

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

ECE 372 Microcontroller Design

Solar Power for Small Hall

CHAPTER 4: Logic Circuits

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

ECE 341. Lecture # 2

Unit 11. Latches and Flip-Flops

Reaction Game Kit MitchElectronics 2019

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

CPS311 Lecture: Sequential Circuits

UNIT V 8051 Microcontroller based Systems Design

Lecture 8: Sequential Logic

Introduction to Sequential Circuits

CHAPTER 4: Logic Circuits

EKT 121/4 ELEKTRONIK DIGIT 1

CMSC 313 Preview Slides

Synchronous Sequential Logic

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

Sequential Design Basics

Topics of Discussion

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Logic Design. Flip Flops, Registers and Counters

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Digital Fundamentals: A Systems Approach

ME 515 Mechatronics. Introduction to Digital Electronics

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Mission. Lab Project B

WINTER 14 EXAMINATION

1. Convert the decimal number to binary, octal, and hexadecimal.

Fig1-1 2-bit asynchronous counter

MSCI 222C Class Readings Schedule. MSCI 222C - Electronics 11/27/18. Copyright 2018 C.P.Rubenstein Class Seating Chart Mondays

Transcription:

Journal Name, Vol. 1, Journal of Networks and Telecommunication Systems, Vol. 1 (1), 28-38, September, 2015 ISSN: Pending,, Published online: www.unitedscholars.net/archive Experimental Study to Show the Effect of Bouncing On Digital Systems Fryad Muhammad Rashid School of Computing, Clemson University, Clemson, USA fryadm@g.clemson.edu ABSTRACT What is the reason that when you press on a remote for a TV, the channel shifts by two or three or more? Or have you noticed that while tuning to a channel on the radio you will pass more channels than desired? Have you thought about this problem? It is called button bounce or switch bounce, or chatter. This is a common problem in these types of switches, such as push button switches, toggle switches, and mechanical relays because they are made up of metals and these metals have a characteristic called elasticity or springiness. This project, proposed a new system design to solve this problem. For that reason, the project is divided into three parts: In the first part, an algorithm was designed to show the effect of the bouncing problem on the digital systems, which is called Bouncing Algorithm. This algorithm has been implemented by using a new hardware technique to show this problem in the real world. In the second part, another algorithm was designed to solve this problem, which is called De-bouncing Algorithm. This is a new method to avoid contact bouncing problem. This solution has been implemented by using a new hardware system design. Both algorithms have been implemented by using Multisim simulator for education purposes. These two parts of hardware have been mixed to produce a new integrated circuit (IC), which is called Bouncing/De-bouncing. It is shown in fig.1. This IC consists of two packages: The first package shows the effect of the bouncing problem in reality by connecting 4 LEDs to the pins (6-9) and the second package shows the solution for this problem by connecting the digital display to the pins (10-16). The third part is related to the software de-bouncing approach. It uses a program to solve the contact bouncing problem in microcontroller Atmega168 and then implements it. Keywords: Combinational and Sequential Logic Circuits, Microcontroller Atmega168, and Common Switch Types. Fig.1 IC to show bouncing and de-bouncing INTRODUCTION The main purpose of this project is to understand and demonstrate what the switch bouncing problem is. A new hardware and software solution technique is designed and implemented to eliminate this problem. In addition, one of the fundamental problems in the embedded systems is the contact problem to send and receive information in a real time manner. In the real mechanical world of switches, they aren t simply closed or open when activated, because it causes contact to make and break a number of times before settling down into a closed or open steady state. This is a factor to get the noise. Therefore, this oscillation between high and low is called button glitches. This is a non-ideal behavior of the switches that causes multiple electrical transitions for a single user input. One of the fundamental components in the electrical circuits is the switch. It can control current flow in the circuit. All of the switches have two types of states, which are off-state and on-state. In off-state, 2015 Fryad M. Rashid, open access article. Distributed under the terms of Creative Commons Attribution (CC BY) license 4.0.

the switch is opened to prevent current flow of the circuit which is called open circuit. In on-state, the switch is closed to allow current through the circuit which is called short circuit. One of the important methods to change the state of the switch from offstate to on-state or vice versa is an actuation method. It can be considered an important characteristic for the switch to take a physical action to flip switch states. The actuation of the switch can come from pushing, sliding, rotating.etc, or any other kind of physical interaction to make the mechanical connection on the inside of the switch get decent contact [1]. Basically, every switch should have two terminals, one for current to go in and one for current to go out. For that reason, two important parameters in the switches have been defined which are poles and throws. The poles are used to control separate circuits. For example, one pole switch can control one single circuit; two pole switches can control two different circuits. The throws are used to connect switch pole position. For example, one throw can connect to one pole of the switch terminal; if the switch has two throws, the pole can connect to one of the throws to control the circuit. For that reason, depending on the number of poles and throws, switches are classified into four common types: Single Pole Single Throw (SPST), Single Pole Double Throw (SPDT), Double Pole Single Throw (DPST), and Double Pole Double Throw (DPDT) as shown in the following diagram fig. 2 [2]. types of switches are made up of metals and these metals have a characteristic which is elasticity or springiness. In this situation, we have to ask ourselves how does bounce generate? The answer to this question is when the switch position is changed from open state to closed state or vice versa, the noise is generated because the switch contact is metal and it has elasticity. This problem can be demonstrated by giving this example; it is similar to dropping a basketball. The ball continues bouncing until it comes to rest. This case can be considered as the analogue off-state and on-state of a switch. When the ball touches the ground, it can be considered as analogues to the on-state of the switch when the ball arises to the certain level of the ground to become stable, it can be considered as the off-state of the switch. The result of this effect is generating on and off transitions or oscillations or damping when the switch moves between open state and close state rapidly as shown in fig. 3. The contact bounce is not a problem if the switch is used to turn on and turn off the light or motor, but the contact bounce is a problem if the switch is used as an input to a personal computer, microcontroller, and digital counter, because the time it takes for contacts to stop bouncing is measured in milliseconds but the digital logic circuits can respond in microseconds. Fig.3 Generating transition between on state and off state Fig.2 Common switch types PROBLEM STATEMENTS Switch bounce, button bounce, contact bounce or chatter are a very common problem related to mechanical switches and relays, because these In addition, we have to present this springiness in the output diagram to deepen understanding of the switch bouncing problem. For example, if we have a push button switch in the simple circuit when we pull down the switch, we can see the transition problem between on state and off state as shown in fig. 4. The switch does not directly go from zero to one, as an ideal case shows some dumping or little resistance happening, and then it becomes stable. At the same time, when the switch is pulled up, it does not go directly from one to zero as an ideal 29

case also shows some oscillation happening, and then it becomes stable as shown in fig. 5 [3-5]. Fig.4 Switch bouncing problem during pull down Fig.4 Switch bouncing problem during pull up METHODOLOGIES This review describes de-bouncing techniques or methods to eliminate the effects of switch bounce. Schmitt-Method This technique is used to de-bounce SPST (Single Pole Single Throw) switch or push button which is called Schmitt trigger scheme as shown in fig. 6 below. Fig.6 Schmitt-Method of de-bouncing This method consists of two resistors (R1>>R2), C as (Capacitor), Hex Schmitt-Trigger Inverters (Vin, Vout), and SPST switch. According to the state of the switch, the circuit is working as follows: 1) If the switch is in an open state 1 : The capacitor will be charged to 5V via R1&R2. The charging time constant for the capacitor can be determined by C*(R1+R2). In this case, the voltage at Vin=High logic 1 and Vout=Low logic 0. 2) If the switch is in a closed state 0 : The capacitor will discharge rapidly to zero via R2. The discharge time for the capacitor can be determined by C*(R2). In this case, the voltage at Vin=Low logic 0 and Vout=1. 3) Switch bounces condition: The capacitor tries to charge slowly to backup to High and then discharge rapidly to zero. The voltage threshold levels for this type of Schmitt are (V T- = 0.95 Volt for closed stated and V T+ = 1.8 Volt for open state). When the switch is closed, the capacitor voltage drops below V T- because it discharges rapidly, as a switch bounce tries to charge back up, but it s slow. When the switch is opened, the capacitor is allowed to charge up to +5V. When it crosses V T+, Vout will switch to 0. All these are described briefly in Table I. Button State Open Close TABLE I Time Constant for C Charging Time: T=C*(R1+R2)=10.1ms Discharge Time: T=C*(R2)=0.1ms Threshold Voltage For Vcap or Vin V T+ (1.8 V) V T- (0.95 V) Vcap or Vin Logic 1 Logic 0 As a result by opening and closing the switch we will get a single pulse at the output, though the switch is bouncing as shown in fig.7. It shows contact bouncing during open state and close state of the switch. It also shows that when the switch is closed the capacitor discharges very fast as it appears as a thin line, but when the switch is open the capacitor takes time to go up, that is because of time it takes to charge the capacitor. Vout Logic 0 Logic 1 All in all, the charging time constant is 10 times 30

longer than the discharge time constant, because the capacitor can t charge up fast enough before the switch bounces back to its final closed position so Schmitt trigger keeps the output High. The result is that it doesn t matter how much the switch contact bounces during opening and closing, a regular single output pulse was obtained from the circuit [6-8, 3]. 3) Moving the switch from position A to position B or vice versa. The output changes from High to Low or from Low to High. As a cross NAND circuit requires set and reset. During these two switching actions if any contact bounce happens in the input, it doesn t affect on the output. The output is a regular pulse, it doesn t contain any contact bounce as shown in fig. 9. Fig.7 Output of Schmitt-Method Cross-NAND Method This technique is used to avoid bounces in another type of switch called SPDT (Single Pole Double Throw). This method consists of two cross coupled NAND gates, SPDT switch, and two pull up resistors as shown in fig. 8. Fig.9 Output of Cross-NAND Method D Flip-Flop Method Flip-flop is an important topic in the sequential logic circuits. It is a storage element used to store one bit of information. It has two outputs, one for normal value, which is (Q), and the other for the complement value of the bit stored in it. Generally, flip-flops are working on the edge trigger of the input signal. It causes change state of the flip-flop [9, 6]. This is another method to de-bounce SPDT switch. This method consists of D flip-flop, SPDT, and two resistors as shown in fig. 10. Fig.8 Cross-NAND Method This type of de-bounce circuit operates like an SR flip-flop, which is a second type of logic circuit called sequential logic circuits [6-7, 2-3]. According to the state of the switch, the circuit is working as follows: 1) When the switch is in position A, NAND gate U1A is Set and the output is High. 2) When the switch is in position B, NAND gate U1B becomes Set which Reset U1A and the output is Low. Fig.10 Flip-Flop Method of de-bouncing SPDT According to the state of the switch, the circuit is working as follows: 1) When the switch is in position A, putting zero to set line (PR) the flip-flop is going to go (set, set, set) while even though bouncing the output 31

of the flip-flop is going to go High or logic 1. 2) When the switch is moved to position B, putting zero to reset line (CLR), the flip-flop will (reset, reset, reset) until it settles down, keeping it reset. It makes output Low or logic 0. 3) The real output of the flip-flop is shown in fig. 11. It shows the pure output of the flip-flop. Fig.11 The output of D Flip-Flop After changing the state of the switch from open to close or vice versa, the switch generates pulses, but it is not pure. It contains bouncing. If we want to use these pulses as an input to digital systems, it will affect it. For example, the block diagram shows that the connected switch to the digital counter, giving us random digital numbers. It doesn t show a regular sequence of numbers, because of the bouncing or glitches between pulses. This is a method to prove that bouncing is a real big problem in the world. In addition, based on this method, the bouncing algorithm is clarified by this flowchart to give us a good understanding, and demonstrate the effect of bouncing or glitches problem on digital systems as shown in fig. 13. Start PROPOSED SYSTEM DESIGN The project is divided into three sections: In the first section, an algorithm was designed to show the effect of the bouncing problem on the digital systems, which is called Bouncing Algorithm. In the second section, another algorithm was designed to solve this problem, which is called De-bouncing Algorithm. This is a new method to avoid the contact bouncing problem. Both algorithms have been implemented by using Multisim simulator for educational purposes. In the third section, a different type of software solution was used by converting bounced signal into stream signal and found a solution based on this conversion. Bouncing Algorithm In this section, a block diagram is provided to prove that contact bouncing is a real big problem in the world. It gives us more understanding from the contact bouncing problem. The following block diagram shows the effect of bouncing on digital systems as shown in fig. 12. Two Manual Input Actions: ON/OFF SPST Process to Generate Pulses That Contains Bouncing This Bouncing Becomes Input To Digital Counter Digital Counter Process to Analyze Impure Input Signal Output: Shows Digital Random Numbers End Fig.13 Bouncing Algorithm Fig.12 Block diagram to show the effect of bouncing 32

Bouncing Algorithm Implementation This implementation shows the bouncing problem. This is a new hardware design that has been implemented by using a Multisim simulator. This is a well-known simulation software designed by Texas National Instruments for educational purposes. This simulator can be used to implement any electronics models, or embedded systems that you have designed, if you want to see the result of your model before printing it on the board. This design consists of SPST switch, digital counter, 4 LEDs; pull up resistor, and a capacitor as shown in fig. 14 below. effecting the result by getting random numbers in each cycle. Fig. 16 shows some samples of the output. Fig.15 State diagram for the output Fig.16 Show clock signal and the result De-Bouncing Algorithm Fig.14 bouncing algorithm implementation According to the state of the switch, the circuit is working as follows: 1) When the switch is in open position, it sends a not-pure signal to the digital counter. The capacitor was placed to show us the exact input signal that was produced by the switch. 2) When the switch is moved to close, it is not directly going to down, after some glitches settle to down and then it becomes stable. 3) The output is shown by 4 LEDs. For that reason, it has to show it by the state diagram for each result. This is one of the implementations of the sequential logic circuit, to see the response for each opening and closing of the switch. The result is shown in fig. 15 for each state. Also, the following diagram presents the effect of the bouncing problem in each cycle. It is In this section, a block diagram is provided to show us how to eliminate the bouncing problem in the digital systems as shown in fig. 17. Fig.17 De-Bouncing block diagram After generating bouncing from the switch, it should send this signal to the de-bounce circuit to get the pure digital signal. Otherwise, the digital counter doses not work properly. For example, the block diagram shows that the new de-bounce circuit connected to the digital counter, to get the digital sequence numbers. In addition, based on this method, the de-bouncing algorithm is explained by a flowchart to prove how to avoid or eliminate this problem, as shown in fig. 18. 33

Start Two Manual Input Actions: ON/OFF SPDT Process to Generate Pulses That Contains Bouncing This Bouncing Becomes Input To De-Bounce Circuit De-Bounce Circuit Process to Get Pure Digital Signal This Digital Signal Becomes Input To Digital Counter Digital Counter Process to Analyze Digital Input Signal The Digital Signal Becomes Input To Digital Decoder 1 2 Process of Digital Decoder is Sending Digital Input to Digital 7- Segment Display Output: 7- Segment Display Shows Digital Sequence Numbers End De-Bouncing Algorithm Implementation This is a new method to avoid the contact bouncing problem. This is a new hardware design to eliminate bouncing. This design consists of JK flip-flop, SPDT switch, two pull up resistors, and two capacitors, NAND gate, digital counter, BCDto-seven segment decoder, and seven-segment display. This circuit is shown in fig. 19. According to the state of the switch, the circuit is working as follows: 1) When the switch is in position A; it connects to a set line of the JK flip-flop through pull up resistor R1, to working on the edge trigger of the signal to smooth it out when the switch is going to an open state. The capacitor C3 is to show the bouncing before smoothing for open status. 2) When the switch is in position B; it connects to a reset line of the JK flip-flop, through pull up resistor R2, to working on the edge trigger of the signal in order to smooth it out when the switch is going to a close state. The capacitor C4 is for showing the bouncing before smoothing for close status. 3) The output of the JK flip-flop becomes an input to the digital counter. For that purpose, the digital counter is like a checkpoint. It can only accept a pure digital signal. After that the digital counter sends the signal to the decoder to change it to a decimal number and then the 7-segement display shows the digital numbers. PRODUCED IC These two sections of hardware have been mixed to produce a new integrated circuit (IC), which is called Bouncing/De-bouncing. This IC consists of two packages; package one for showing the bouncing problem, and the other package for showing how to solve it. This IC is shown in fig.1. The inside of this IC described in fig.21, and it shows the input requirements such as resistors, capacitors, and switches for each package. Fig.18 De-Bouncing Algorithm 34

Fig.19 De-bouncing algorithm implementation Fig. 20 shows the pure digital input signal is going to a digital counter. It means that the de-bouncer circuit is working properly to produce the digital input signal. Fig.20 Digital input signals to counter Fig.21 inside IC and the input requirements 35

SOFTWARE DE-BOUNCING In this section, a scenario is prepared to solve the bouncing problem through software. In this case, we want to solve the bouncing problem using a microcontroller Atmega168 through software. For that purpose, we need the following requirements: Atmega168, and two LEDs. PB0 was connected to LED1; PB1 was connected to the button, and finally connect PB2 to LED2. This circuit is setup so that when you press the button, the stream will be 0 s, and when you release the button the stream will be 1 s. This is because the pin on the microcontroller Atmega168 that the button is connected to is pulled up high and then the button goes to ground when you press it, and it reads the signal, which is 0 [10]. The main purpose of this scenario is to show you how to convert bounced signal to stream 1 s and 0 s and then write a program for it as shown in fig. 22. LEDs are working like this, it means there is no bouncing. 4) If the button was bouncing mechanically, LED2 becomes ON and OFF with the same button press very shortly because stream of 0 s and 1 s are very short. At the same time LED1 is ON. This is true for vice versa. 5) To solve the bouncing problem: these two counters can be used to count the press state and release state. These counters will reset to zero if opposite conditions exist. The main idea behind these two counters is to find a good threshold to get a good press state and release state. This means that this threshold is sampling numbers of 1 s and 0 s that should be enough to omit any sporadic bouncing. Through the following program, by trial and error it was found that this threshold (750) is working quite well to omit any sporadic bouncing. Fig.22 Convert signal to stream to write a program The following points are analyzing stream signals: 1) Released counter: It needs to count the button s release state. 2) Pressed counter: It needs to count the button s pressed state. 3) Toggling between LED1 and LED2: It needs to show you the switching between LED1 and LED2. When you press the button LED1 is ON and LED2 is OFF, when you press the button again LED1 is OFF and LED2 is ON. If the 36

EVALUATION In this section, our result was compared with the other result of the researchers that worked on this problem before. They focused on the bouncing problem and how to solve it. For that purpose, they proposed some hardware and software solutions. Our case is different because it was focused on the effect of the bouncing problem on the digital systems and how to see this problem in the real world. For that reason, different approaches were proposed or methods to look at this problem, and how to solve it on the same integrated circuit. This is the hardware solution. For the software solution, bounced signals were directly converted into stream signals. Based on this conversion, the solution was found. CONCLUSION AND FUTURE WORKS Ultimately, bouncing is one of the problems in the switching systems and it affects the response of the system. It can be concluded that contact bounce is not a problem if the switch is used to turn on and turn off the light, but it is a problem if the switch is used as input to a personal computer, microcontroller...etc. All in all, our conclusions can be classified into three parts: In part one; it is concluded that understanding is very important because it was very helpful as a starting point to address the contact bouncing problem. It helped me to design an algorithm to show the effect of the problem on digital systems. In part two, after deepening understanding of the problem, it is concluded that this is a good step to think about a solution for the problem. Another algorithm was designed to eliminate glitches. It was concluded that these two hardware parts can be combined to get a new integrated circuit under the name School of Computing/IC Clemson University. These two parts are hardware solutions. These two algorithms can be implemented by an electronics simulator which is called Multisim. It is very helpful to implement your model before printing it on the board. In part three, this is the software solution part. It was concluded that bounced signals had to be converted into streams (0 s and 1 s) and separate parts (open state and close state) from bouncing parts to provide a good solution for this problem. A new idea was used to achieve a good state, which is using threshold to omit the bouncing problem. By trial and error, a new value was obtained for Atmega168 where, at this value, no bouncing was observed. Finally, hardware and software solutions were provided for the contact bouncing problem. As for my final conclusion, the hardware solution is more difficult than the software solution, because the hardware solution depends on a background in design of electronic circuits. For that purpose, combinational logic circuits and sequential logic circuits were combined to get a decent design and an optimal solution. The future work for this research is the implementation of another method in the software approaches, such as shift register method, and to compare it with our result. 37

REFERENCES [1] Jimbo, Switch Basics, sparkfun, Retrieved February 2 2015: https://learn.sparkfun.com/tutorials/switch-basics [2] Brunvand E., Lights! Speed! Action! Fundamentals of Physical Computing for Programmers, Volume (1.0), pages (55-56). [3] Shenoy M., Switch De-bouncing, ElectroSome. Retrieved January 26 2015: https://electrosome.com/switch-debouncing/ [4] Engineering classes, Contact Bouncing, Youtube, Retrieved February 9 2015 from: https://www.youtube.com/watch?v=5evwgkw92cs [5] Electronics Tips: Contact Bounce and De- Bouncing, 09/20/2005. Retrived February 16 2015, from Rensselaer Polytechnic Institute: http://www.rpi.edu/dept/ecse/mps/switch_de- Bouncing.pdf [6] Dueck R., and Reid K., Digital Electronics, Delmar Cengage Learning, 2011 [7] Input Interfacing Circuits: Retrived February 28 2015, from Electronics-Tutorial: http://www.electronics-tutorials.ws/io/inputinterfacing-circuits.html [8] How Can I Remove Glitches or Bounce on My Digital Line?, 04/16/2008. Retrieved February 23 2015, from Texas National Instruments: http://digital.ni.com/public.nsf/allkb/14a90e575987 5BBF86256DD400034FDD#SR [9] Mano M., and Ciletti M., Digital Design, 4E, Prentice Hall, 2007 [10] Microcontrooler- A Begineers Guide Button Debouncing Through Software, 2014. Retrieved April 12 2015, from: https://www.newbiehack.com/buttonorswitchdebo unceinsoftware.aspx 38