Mains power is comprised of an alternating current that flows in one direction and then in the other, along the cable, at the rate of 50 or 60 cycles per second.
The number of cycles in one second is called the frequency. The frequency is given in a unit called hertz (symbol Hz) where 1 Hz = 1 cycle per second .
The value 50 or 60Hz is dependent on the countries power system. The current alternates back and forth changing direction at the zero point.
If we will to look at the waveform (yellow) with the Osciloscope it would appear as a sinusoidal shape. Drawing a line through the middle and this is what is called the zero crossing point. At this instant in time no current is flowing in either direction.
Yellow : AC line - 50Hz
Blue : ZCD module output
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Selam. Devre kartındaki ayırma anahtarına bağlı olan ESP8266 WIFI Şebeke Güç Kapama / Anahtarının bağlantısını kestim. Aşağıda verdiğim kodun sıklığını hesaplıyorum. Sorunum: ESP8266 şebeke frekansını sabit olarak bulamıyor. Sırasıyla 72 Hz, 75 Hz, 69 Hz ve 80 Hz. Aynı kodu arduino versiyonuna çevirdiğimde frekansın 50 Hz olduğunu görüyorum. ESP8266'daki frekansı hesaplayamamanın nedeni ne olabilirdi.
kodum:
#include <ESP8266WiFi.h>
statik yapı uint8_t D6 = 12;
int sayısı = 0;
# saniye saniye 2
geçersiz kurulum () {
Seri.beg (115,200);
// pinMode (D6, INPUT_PULLUP);
pinMode (D6, INPUT);
attachInterrupt (D6, sıfır, YANLIŞ);
}
sıfır sıfır () {
count ++;
}
Void döngü () {
// ++ sayısı;
Gecikme (saniye * 1000);
şamandıra hz = saniye başına sayım / 2;
sayı = 0;
Serial.print ("hz =");
Serial.println (Hz);
}
Are you sure? yes | no