10% Off For Your First Order, Code:Elephant10



Arduino Project 21: NE555 Timer

Posted by Fiona Su on

thumb

Introduction:
If you ask anyone in the know to rank the most commonly and widely applied integrated circuits, the famous 555 time base integrated circuit would certainly be at the top of the list.
The 555 – a mixed circuit composed of analog and digital circuits – integrates analogue and logical functions into an independent integrated circuit, and hence tremendously expands the application range of analog integrated circuits.
The 555 is widely used in various timers, pulse generators, and oscillators. In this experiment, we will use the REV4 board to test the frequencies of square waves generated by the 555 oscillating circuit and show them on a serial monitor.
Hardware Required:

  • Arduino Board *1
  • USB Cable *1
  • NE555 *1
  • 104 Ceramic Capacitor *2
  • Potentiometer*1
  • 10KΩ Resistor*1
  • Breadboard*1
  • Breadboard Jumper Wires

Connection Diagram:
The 555 integrated circuit was originally used as a timer, hence the name 555 time base circuit. It is now widely used in various electronic products because of its reliability, convenience, and low price.
The 555 is a complex hybrid circuit with dozens of components such as a divider, comparator, basic R-S trigger, discharge tube, and buffer.
555 chip pins are introduced as follows:

thumb

As shown in the picture, the 555 integrated circuit is dual in-line with the 8-pin package. Thus:
Pin 1 (GND): the ground;
Pin 2 (TRIGGER ): the input of lower comparator;
Pin 3 (OUTPUT): having two states of 0 and 1 decided by the input electrical level;
Pin 4 (RESET): output low level when supplied a low voltage level;
Pin 5 (CONTROL VOLTAGE): changing the upper and lower level trigger values;
Pin 6 (THRESHOLD): the input of upper comparator;
Pin 7 (DISCHARGE): having two states of suspension and ground connection also decided by input, and the output of the internal discharge tube;
Pin 8 (VCC): the power supply

Connection for REV4:

thumb

Connection for Arduino Mega 2560 R3:

thumb

Sample Code:

int pin = 7;  //attach to the third pin of NE555
unsigned long duration;  //the variable to store the length of the pulse 
 
void setup()
{
  pinMode(pin, INPUT);  //set the pin as an input
  Serial.begin(9600);  // start serial port at 9600 bps:
}
 
void loop()
{
  duration = pulseIn(pin, HIGH);  //Reads a pulse on pin
  Serial.print(duration);  //print the length of the pulse on the serial monitor
  Serial.println();  //print an blank on serial monitor
  delay(500);  //wait for 500 microseconds
}

Result:
Burn the program into REV4 board. After burning the program, open the serial monitor and you will see the picture shown below.
If you rotate the potentiometer, the length of the pulse (in microsecond) displayed will change accordingly.

thumb

thumb

 

0 comments

Leave a comment

Please note, comments must be approved before they are published