Need help in my fan speed control related project

ok, so value changing on serial monitor with up and down button but speed doesn't changing,
and with remote button only showing keep zero and speed not changing.

as @ruilviana suggested, are you sure dimmer.setPower() does what you think.

try setting full power in setup ().

But did you say this to us before?

When I asked what type of engine you were using,

you just answered the type of power (AC) but not the type of motor,

RV mineirin

Types of eletric motors:::: and more....

1 Like

I feel really sorry! for confuse both of you

but i am trying to control ceiling fan which have induction motor

Any idea

have you tried this?

Yes but still no change sir

void setup ()
  Serial.begin (115200);
#ifdef RECV_PIN
  irrecv.enableIRIn ();

  pinMode (upbotton,   INPUT_PULLUP);
  pinMode (downbotton, INPUT_PULLUP);

  dimmer.begin (NORMAL_MODE, ON);

see @jamsyogendra comments

What you mean sir

if the above doesn't turn the fan on, i don't know what to tell you

Ok so let's avoid fan motor , if we change the intensity of bulb brightness then

I think you should watch this video

And please watch this also there is changing fan Speed, using remote and manual buttons

Hi @.
I tried to analyze your sketch but ran into some difficulties.

You could post a schematic of your project (it can be with a lamp instead of the motor) ,even if done by hand, to help me.

Avoid posting fritizing as it gets confusing to analyze in detail.

RV mineirin

let's verify that the hardware does what is expect

#define MyHW
#ifdef MyHW
enum { ON, NORMAL_MODE };
class dimmerLamp {
    int  pin;
    dimmerLamp (int pin)  { };
    void begin (int a, int b)  { };
    void setPower (int a)  {
        Serial.println (a);
# define upbotton   A1
# define downbotton A2
# include <RBDdimmer.h>
# include <IRremote.h>
# define  RECV_PIN  3
IRrecv irrecv (RECV_PIN);
# define upbotton 8
# define downbotton 9

#define outputPin  5
dimmerLamp dimmer (outputPin);

// -----------------------------------------------------------------------------
void setup ()
    Serial.begin (115200);

    dimmer.begin (NORMAL_MODE, ON);
// -----------------------------------------------------------------------------
void loop () {
    dimmer.setPower (100);
    delay (1000);

    dimmer.setPower (0);
    delay (1000);

are you sure this code will do anything?

Hi @ruilviana,


  1. Robodyn dimmer
  2. Arduino Uno
  3. 5v ac to dc convtr.

Software part-

i think you guys find all your answer here how my hardware works with any kind of Micro-controller

maybe you should figure out how to test your HW