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. Controllers
  3. Vera
  4. control 12 V fan via Vera/Arduino

control 12 V fan via Vera/Arduino

Scheduled Pinned Locked Moved Vera
10 Posts 2 Posters 2.2k Views 2 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.
  • S Offline
    S Offline
    scottdube
    wrote on last edited by
    #1

    I want to control a 12 V fan using a scene on my vera. When temp or humidity exceed X I want to be able to turn the fan on and vary it's speed based on the those variables. I have been thinking about this for a while looked at a lot of posts and youtube vids. I can't seem to get my head around the way to do it. Any ideas would be appreciated. I have built several sensors and relay controls for mysensors so I have a rough idea of how his stuff works.

    Thanks!

    dbemowskD 1 Reply Last reply
    0
    • S scottdube

      I want to control a 12 V fan using a scene on my vera. When temp or humidity exceed X I want to be able to turn the fan on and vary it's speed based on the those variables. I have been thinking about this for a while looked at a lot of posts and youtube vids. I can't seem to get my head around the way to do it. Any ideas would be appreciated. I have built several sensors and relay controls for mysensors so I have a rough idea of how his stuff works.

      Thanks!

      dbemowskD Offline
      dbemowskD Offline
      dbemowsk
      wrote on last edited by
      #2

      @scottdube the key for the speed control is to use a PWM signal. To control the fan, i would either use a mosfet or an h-bridge controller. Use an h-bridge if you at any time think you would want to run the fan in reverse. The mosfet or h-bridge will take the 12v needed for powering the fan and the 3.3v or 5v PWM signal from the arduino to control the fan.

      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

      S 1 Reply Last reply
      0
      • dbemowskD dbemowsk

        @scottdube the key for the speed control is to use a PWM signal. To control the fan, i would either use a mosfet or an h-bridge controller. Use an h-bridge if you at any time think you would want to run the fan in reverse. The mosfet or h-bridge will take the 12v needed for powering the fan and the 3.3v or 5v PWM signal from the arduino to control the fan.

        S Offline
        S Offline
        scottdube
        wrote on last edited by
        #3

        @dbemowsk Thanks, I think I get that part. How would I present it (the fan) to the vera so that I could have variable speed? So that it would show up as a dimmer rather than an on off switch?

        dbemowskD 1 Reply Last reply
        0
        • S scottdube

          @dbemowsk Thanks, I think I get that part. How would I present it (the fan) to the vera so that I could have variable speed? So that it would show up as a dimmer rather than an on off switch?

          dbemowskD Offline
          dbemowskD Offline
          dbemowsk
          wrote on last edited by
          #4

          @scottdube that i am a little unsure on. I run an Vera controller, but i have nothing that uses variable control like that. When i get home later i can look a bit and get back to you.

          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

          S 1 Reply Last reply
          0
          • dbemowskD dbemowsk

            @scottdube that i am a little unsure on. I run an Vera controller, but i have nothing that uses variable control like that. When i get home later i can look a bit and get back to you.

            S Offline
            S Offline
            scottdube
            wrote on last edited by
            #5

            @dbemowsk Thanks Dan... It's not critical to vary the speed but it seems like a good feature.

            dbemowskD 1 Reply Last reply
            0
            • S scottdube

              @dbemowsk Thanks Dan... It's not critical to vary the speed but it seems like a good feature.

              dbemowskD Offline
              dbemowskD Offline
              dbemowsk
              wrote on last edited by
              #6

              @scottdube simple on/off would be done pretty much the same way with a mosfet, or it could be done with a relay module. The mosfet would be a more compact solution over a relay module.

              Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
              Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

              S 1 Reply Last reply
              0
              • dbemowskD dbemowsk

                @scottdube simple on/off would be done pretty much the same way with a mosfet, or it could be done with a relay module. The mosfet would be a more compact solution over a relay module.

                S Offline
                S Offline
                scottdube
                wrote on last edited by
                #7

                @dbemowsk ya mofset is the way to go on this very small fan under .5 amp. I'm just having trouble how to present it to vera so I can change the speed of the fan.

                1 Reply Last reply
                0
                • dbemowskD Offline
                  dbemowskD Offline
                  dbemowsk
                  wrote on last edited by
                  #8

                  Just doing some looking at the serial API pages, I think you would want to present the fan as a S_DIMMER with V_PERCENTAGE. I am not sure if you are on UI5 or UI7 for your Vera, but it looks like you should see something like this (UI5 example)
                  0_1526760929622_2b154a51-8ad1-4838-a62a-367d72c9b20d-image.png
                  I don't know if you can change the icon or not though.

                  Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                  Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                  S 1 Reply Last reply
                  0
                  • dbemowskD dbemowsk

                    Just doing some looking at the serial API pages, I think you would want to present the fan as a S_DIMMER with V_PERCENTAGE. I am not sure if you are on UI5 or UI7 for your Vera, but it looks like you should see something like this (UI5 example)
                    0_1526760929622_2b154a51-8ad1-4838-a62a-367d72c9b20d-image.png
                    I don't know if you can change the icon or not though.

                    S Offline
                    S Offline
                    scottdube
                    wrote on last edited by
                    #9

                    @dbemowsk that looks interesting! Then I would just map the percentage in the declarations?

                    dbemowskD 1 Reply Last reply
                    0
                    • S scottdube

                      @dbemowsk that looks interesting! Then I would just map the percentage in the declarations?

                      dbemowskD Offline
                      dbemowskD Offline
                      dbemowsk
                      wrote on last edited by
                      #10

                      @scottdube Something like that.

                      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

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


                      12

                      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