NE555 Pulse Generator with Adjustable Frequency and Duty Cycle

28,00 DH

Availability:

493 in stock

SKU: 0162 Categories: ,

Description

NE555 Pulse Generator with Adjustable Frequency and Duty Cycle

This NE555 astable pulse-generator module has two potentiometers for adjusting pulse frequency and duty cycle. Jumper positions select different frequency ranges.

🔧 Listed specifications

  • Supply voltage: 5–15 V DC
  • Pulse-frequency range: 0.6 Hz–200 kHz
  • Duty cycle: adjustable from 0.4% to 99.6%
  • Dimensions: 30 × 20 mm
  • Current consumption: 3 mA at 5 V as listed
  • Listed output levels: 4.5–5 V with a 5 V supply; 11.5–12 V with a 12 V supply

Frequency-range jumpers

  • Jumper 1 (LF): 1–50 Hz
  • Jumper 2 (IF): 50 Hz–1 kHz
  • Jumper 3 (HF): 1–10 kHz
  • Jumper 4 (VHF): 10–200 kHz

Use the jumpers to choose the appropriate range, then adjust frequency and duty cycle with the two potentiometers. The exact jumper combinations should be checked against the markings on the module.

⚠️ Output-voltage warning

The output level can rise with the module supply. Do not connect OUT directly to an Arduino or other microcontroller input unless you have confirmed that the signal remains within the input’s permitted voltage. Use a suitable level shifter or divider if needed. Also note that simple polling-based code may not measure the upper part of the stated 200 kHz range accurately.

⚙️ How it works

In astable mode, the NE555 continuously generates pulses. One potentiometer adjusts frequency and the other adjusts duty cycle. If measuring the waveform, the period is the sum of the HIGH and LOW times; frequency is the inverse of that period, and duty cycle is HIGH time divided by total period, multiplied by 100%.

💡 Applications

  • Clock-signal generation for microcontrollers
  • Stepper-motor experiments
  • Audio-tone generation
  • PWM experiments
  • Periodic event triggering

📌 Pinout

  • VCC: supply, 5–15 V as listed
  • GND: ground
  • OUT: pulse output

🔌 Using it with an Arduino Uno

Connect VCC and GND to a suitable supply. Connect OUT to a digital input only after checking the output voltage and conditioning it if needed. The Arduino code examples below are reproduced unchanged from the source listing.

Basic Arduino example

#define PULSE_PIN 2

void setup() {
Serial.begin(9600);
pinMode(PULSE_PIN, INPUT);
}

void loop() {
int pulseState = digitalRead(PULSE_PIN);
Serial.println(pulseState);
delay(100);
}

This example reads the pulse input and reports its logic state in the Serial Monitor.

Advanced Arduino example with an I2C LCD

#include <Wire.h>
#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27, 16, 2);
#define PULSE_PIN 2


volatile unsigned long highTime = 0;
volatile unsigned long lowTime = 0;
volatile bool measuringHigh = true;
unsigned long startTime = 0;
float frequency = 0;
float dutyCycle = 0;


void setup() {
  lcd.begin();
  lcd.backlight();
  Serial.begin(9600);
  pinMode(PULSE_PIN, INPUT);
  attachInterrupt(digitalPinToInterrupt(PULSE_PIN), measurePulse, CHANGE);
  startTime = millis();
}


void loop() {
  unsigned long currentTime = millis();
  if (currentTime - startTime >= 1000) {
    noInterrupts();
    unsigned long totalHighTime = highTime;
    unsigned long totalLowTime = lowTime;
    highTime = 0;
    lowTime = 0;
    startTime = currentTime;
    interrupts();


    if (totalHighTime + totalLowTime > 0) {
      frequency = 1000000.0 / (totalHighTime + totalLowTime);
      dutyCycle = (totalHighTime * 100.0) / (totalHighTime + totalLowTime);
    } else {
      frequency = 0;
      dutyCycle = 0;
    }


    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Freq: ");
    lcd.print(frequency, 2); // Print frequency with 2 decimal places
    lcd.print(" Hz");
    lcd.setCursor(0, 1);
    lcd.print("Duty: ");
    lcd.print(dutyCycle, 2); // Print duty cycle with 2 decimal places
    lcd.print(" %");


    Serial.print("Frequency: ");
    Serial.print(frequency, 2); // Print frequency with 2 decimal places
    Serial.println(" Hz");
    Serial.print("Duty Cycle: ");
    Serial.print(dutyCycle, 2); // Print duty cycle with 2 decimal places
    Serial.println(" %");
  }
}


void measurePulse() {
  if (measuringHigh) {
    highTime += micros() - startTime;
  } else {
    lowTime += micros() - startTime;
  }
  measuringHigh = !measuringHigh;
  startTime = micros();
}

This example counts input pulses and calculates frequency and duty cycle for display on an I2C LCD and in the Serial Monitor.

Components for the advanced example

  • Arduino Uno
  • NE555 pulse-generator module
  • I2C 1602 LCD
  • Connecting wires

Code overview

  1. Include libraries: #include <Wire.h> and #include <LiquidCrystal_I2C.h> for the LCD.
  2. Initialization: Initializes the LCD and input pin, then attaches an interrupt to count pulses.
  3. Read and display: Counts pulses over one-second intervals and calculates frequency and duty cycle for display.

Advanced wiring

  • NE555 VCC: 5V (Arduino), only if supported by your exact module
  • NE555 GND: GND (Arduino)
  • NE555 OUT: D2 (Arduino), only after verifying safe logic voltage
  • LCD VCC: 5V (Arduino)
  • LCD GND: GND (Arduino)
  • LCD SCL: A5 (Arduino Uno)
  • LCD SDA: A4 (Arduino Uno)

Library installation

Install LiquidCrystal I2C through Arduino IDE’s Library Manager: open Sketch → Include Library → Manage Libraries, search for “LiquidCrystal I2C”, and install it.

Disconnect power before changing wiring. Verify the module’s actual supply and output ratings and protect Arduino inputs from excessive voltage.

Thank you for your loyalty!

EN