Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Dimmer sensor

Dimmer sensor

Scheduled Pinned Locked Moved Development
24 Posts 9 Posters 15.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M mainali

    Can this dimmer sketch be used to control the speed of a fan ? If yes then what are the changes I need to do to this sketch. As part of a project I am working on, I intend to control a AC 230V fan using arduino. I was planning to create a sketch which explicitly controls a AC FAN.
    By doing this am I reinventing the wheel or someone has done this already which I can use.

    jeylitesJ Offline
    jeylitesJ Offline
    jeylites
    wrote on last edited by
    #15

    @mainali http://forum.mysensors.org/topic/647/mysensored-230v-motion-sensor-with-light-level/6

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mainali
      wrote on last edited by
      #16

      I have the dimmer circuit with me already. I am looking for the sketch to integrate this with the sensor and send message to the gateway using MQTT for controlling the speed of the fan.

      Note: I am using a custom controller build using Ruby on Rails(WIP). and ruby-mqtt to send message to the MQTT gateway which is running mysensor code.

      jeylitesJ 1 Reply Last reply
      0
      • M mainali

        I have the dimmer circuit with me already. I am looking for the sketch to integrate this with the sensor and send message to the gateway using MQTT for controlling the speed of the fan.

        Note: I am using a custom controller build using Ruby on Rails(WIP). and ruby-mqtt to send message to the MQTT gateway which is running mysensor code.

        jeylitesJ Offline
        jeylitesJ Offline
        jeylites
        wrote on last edited by
        #17

        @mainali I don't think I have what you're looking for :( ...

        1 Reply Last reply
        0
        • korttomaK Offline
          korttomaK Offline
          korttoma
          Hero Member
          wrote on last edited by
          #18

          Would this be of any help? ->

          https://codebender.cc/sketch:44734

          1 Reply Last reply
          1
          • M Offline
            M Offline
            mainali
            wrote on last edited by
            #19

            I have kind of implemented the fan control with a new message type V_FAN, but anyways I will check this out and revert after testing

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mainali
              wrote on last edited by
              #20

              Can the dimmer led actuator example be used to dim a AC 60w incandescent bulb connected 220v connection. If yes what are the modification needed.

              when it comes to controlling the speed of a FAN or dimming a normal tungsten filament bulb. I have found so many answers but not a single one which explains all.

              ferpandoF 1 Reply Last reply
              0
              • korttomaK Offline
                korttomaK Offline
                korttoma
                Hero Member
                wrote on last edited by
                #21

                All the dimmer examples does is to change the level on an PWM output according to a 0-100% dimmer slider in the controller. What you connect to the PWM output is up to you. In the example sensor device I posted I have connected a transistor that controls the speed of a 12VDC fan.

                I have also maid another sensor that shows as a dimmer in the controller but in the arduino it controls 3 relays instead ( there are not so many rules you have to follow here you can create what you need, that's the beauty of MySensors ).

                1 Reply Last reply
                0
                • M mainali

                  Can the dimmer led actuator example be used to dim a AC 60w incandescent bulb connected 220v connection. If yes what are the modification needed.

                  when it comes to controlling the speed of a FAN or dimming a normal tungsten filament bulb. I have found so many answers but not a single one which explains all.

                  ferpandoF Offline
                  ferpandoF Offline
                  ferpando
                  Hero Member
                  wrote on last edited by
                  #22

                  @mainali
                  Dimming AC current is far more complex than dimming DC from the hardware perpective.
                  Do a search on the internet about it and come back with a solution that fits your needs.

                  1 Reply Last reply
                  0
                  • korttomaK Offline
                    korttomaK Offline
                    korttoma
                    Hero Member
                    wrote on last edited by korttoma
                    #23
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • jeylitesJ Offline
                      jeylitesJ Offline
                      jeylites
                      wrote on last edited by jeylites
                      #24

                      @mainali

                      This circuit might help with what you are doing. See attached. Try building this circuit and connect "signal & ground" to dimmer LED actuator PWM. Again I can't stress enough be careful with AC power!!!

                      AC-board-schematic.jpg

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      11

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular