Tell us about yourself!

Complete Your Profile
  • rameshadkri commented on diy_bloke's instructable Arduino Controlled Light Dimmer11 months ago
    Arduino Controlled Light Dimmer

    Hi bloke, thanks for this instruction, i have successfully done this project with interrupt using software given in step 4, output pin 3 (using delay). But i want to do it using timer function(output pin 11). the software in step 6 always turns on the bulb. I thought it is a hardware problem so i simply changed pin 11 to 3 and used a software of step 4 and it works fine. so it cannot be a hardware problem. how can i solve this?

    View Instructable »
  • rameshadkri commented on diy_bloke's instructable Arduino Controlled Light Dimmer1 year ago
    Arduino Controlled Light Dimmer

    I searched for this library but i didn't get. Yes, I am using delay(1000); so that counting will be held for 1000 ms i.e 1 sec. I tried using millis(); but can't reset it for another counting so result is like 1000, 2001, 3001, 4002.........

    Thank you. I did but it is showing large number of ZC per second. When i did not call firing() inside ISR function it was around 100 which is correct for my 50 hz supply. But with firing it is too large even with volatile int count=0;

    View Instructable »
  • rameshadkri commented on diy_bloke's instructable Arduino Controlled Light Dimmer1 year ago
    Arduino Controlled Light Dimmer

    Thanks @diy_bloke . I made some changes and now it is working. Can i ask 1 more question?If i want to give let's say only 75% power to the blub (continuously), what changes should i make in this for loop?for (int i=5; i <= 128; i++){dimming=i;delay(10);}Can i simply do this?dimming = 0.75*128;delay(10);

    Thank you so much, it worked. It is really a great project. Now can i count the number of zero crossing simply like this:int count=0;float hz;int AC_LOAD = 3; int dimming = 128;void setup(){ Serial.begin(9600); Serial.println("Zero Cross count"); pinMode(AC_LOAD, OUTPUT); attachInterrupt(0, zero_crosss_int, RISING); }void zero_crosss_int(){ count++; firing();}void firing(){ int dimtime = (75*dimming); delayMicroseconds(dimtime); digitalWrite(AC_LOAD, HIGH); delayMicroseconds(10); digitalWrite(AC_LOAD, LOW); }void loop() { delay(1000); noInterrupts(); float zc = count; count = 0; interrupts(); Serial.print("n="); Serial.print(zc); Serial.println("ZC per second"); if(zc>=100) { dimming=0*128; } else{ dimming=0.25*...

    see more »

    Thank you so much, it worked. It is really a great project. Now can i count the number of zero crossing simply like this:int count=0;float hz;int AC_LOAD = 3; int dimming = 128;void setup(){ Serial.begin(9600); Serial.println("Zero Cross count"); pinMode(AC_LOAD, OUTPUT); attachInterrupt(0, zero_crosss_int, RISING); }void zero_crosss_int(){ count++; firing();}void firing(){ int dimtime = (75*dimming); delayMicroseconds(dimtime); digitalWrite(AC_LOAD, HIGH); delayMicroseconds(10); digitalWrite(AC_LOAD, LOW); }void loop() { delay(1000); noInterrupts(); float zc = count; count = 0; interrupts(); Serial.print("n="); Serial.print(zc); Serial.println("ZC per second"); if(zc>=100) { dimming=0*128; } else{ dimming=0.25*128; } delay(10);}I tried this but the problem is if i call function firing() within void zero_crosss_int() (as below) then number of zero crossing per second (which is want) goes higher than it should. I think this is due to delaymicroseconds() inside firing() which is causing some delay and made the time more than 1 second. void zero_crosss_int(){count++;firing();}Can you please suggest how can i do both stuff ( calculating zero crossing per second as well as firing the traic) at once like this:if(zc>=100){dimming=0*128;}else{dimming=0.25*128;}delay(10);

    View Instructable »
  • rameshadkri followed diy_bloke1 year ago
      • Working With the Funduino W5100 Ethernet Module.
      • Uploading Data to ThingSpeak With MQTT
      • Adding an MCP23017 I/O Extender to Arduino or ESP8266
  • rameshadkri followed peter_bjorge1 year ago