limchengwei
Published © CC BY-NC

555 Timer PWM Sponsored by JLCPCB

Thank you JLCPCB for sponsoring this project. Please order your PCBs at jlcpcb.com/RAT

IntermediateWork in progress1 hour446
555 Timer PWM Sponsored by JLCPCB

Things used in this project

Hardware components

JLCPCB Customized PCB
JLCPCB Customized PCB
×1
NE555 Timer through hole
×1
IC socket 8 pins 2.54mm through hole
×1
Male Header 40 Position 1 Row (0.1")
Male Header 40 Position 1 Row (0.1")
×1
1N4007 – High Voltage, High Current Rated Diode
1N4007 – High Voltage, High Current Rated Diode
×2
3386 100k Ohm Potentiometer
×1
0.25W 10k Ohm Resistor
×1
Capacitor 10 nF
Capacitor 10 nF
×2

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

NE555 Timer PWM Compact schematic PDF

NE555 Timer PWM Compact schematic

NE555 Timer PWM Compact PCB EasyEDA

NE555 Timer PWM Compact Gerber

Code

Frequency meter

Arduino
#define pulse A0
int ontime, offtime, duty;
double freq, period;
   
void setup()
{
  pinMode(pulse, INPUT);
  Serial.begin(230400); 
}
void loop()
{
   ontime = pulseIn(pulse,HIGH);
   offtime = pulseIn(pulse,LOW);
   period = ontime + offtime;
   freq = 1000000.0/period;
   duty = (ontime/period)*100;
   Serial.println(freq);
   Serial.println(duty);
}

Credits

limchengwei
24 projects • 4 followers
Contact

Comments

Please log in or sign up to comment.