- Thu Jul 06, 2017 10:17 am
#195481
Hi everyone,
I am making an arduino project to heat a heater (LAMP in my example ) using thyristor, it is working fine, but the only problem is the frequency.
when i give a frequency of 1 Hz in the Pulse R3(2) the curve is perfect, but when i change the frequency to 50 Hz, the curve become disturbed, and unfortunately i want to use the frequency of 50 Hz.
Im attaching the circuit.
the code :
I am making an arduino project to heat a heater (LAMP in my example ) using thyristor, it is working fine, but the only problem is the frequency.
when i give a frequency of 1 Hz in the Pulse R3(2) the curve is perfect, but when i change the frequency to 50 Hz, the curve become disturbed, and unfortunately i want to use the frequency of 50 Hz.
Im attaching the circuit.
the code :
Code: Select all
thanks alotfloat value = 1;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
if (voltage > value) {
delay(200);
digitalWrite(13, HIGH);
Serial.println("UP"); } else {
digitalWrite(13, LOW);
}
}