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. Enclosures / 3D Printing
  3. MySensors weather station

MySensors weather station

Scheduled Pinned Locked Moved Enclosures / 3D Printing
138 Posts 16 Posters 58.6k Views 15 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.
  • sundberg84S sundberg84

    @dbemowsk - maybe we could do some sort of basic PCB to use with your project later on and MySensors people can buy and assemble both PCB and 3d printed thereself. Well that for the future. Good luck!

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

    @sundberg84 I love the idea of putting together a board for this. I would probably hold off though until I get the hardware built to know what we are dealing with. If we do it, it could be designed with connectors for all of the sensors and be set up as some sort of modular design so that people could build as much or as little of the project as they want.

    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/

    sundberg84S 1 Reply Last reply
    1
    • dbemowskD dbemowsk

      @sundberg84 I love the idea of putting together a board for this. I would probably hold off though until I get the hardware built to know what we are dealing with. If we do it, it could be designed with connectors for all of the sensors and be set up as some sort of modular design so that people could build as much or as little of the project as they want.

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #9

      @dbemowsk - sounds like a good plan!

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DavidZH
        wrote on last edited by
        #10

        Can I make a suggestion? Reverse the placement of the nuts to the top part, and the little machine screws to the bottom part of the housing. That way it will be easier to keep the water out as it will not creep in to the gap between the ABS and the screw. That capillary action will also work upside down, but good old gravity counters that to a great degree.

        dbemowskD 1 Reply Last reply
        1
        • dbemowskD dbemowsk

          @Yveaux I have been working on the rain gauge that I will use with this. I will probably start posting the pics for the rain gauge in this thread from now on and just link the other thread to this one.

          One other part that I haven't mentioned that I want to incorporate is a vented radiation shield like this to hold some of the sensors like temp, humidity, barometric pressure, etc.. I could possibly fit the MySensors board in this.
          0_1492609871971_upload-c7184435-2dae-4656-ba4b-2aa10de8616a

          Just did a quick google image search on "home weather station" and found a few that I could possibly use as models for the design since the wind sensor parts are similar to mine:
          0_1492610587524_upload-3edce7d8-df62-41ef-b664-aa07c550e9d4
          0_1492610971206_upload-9424bd18-349f-413e-8e48-114f5cf3fd62

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #11

          @dbemowsk I have exactly the same weather station as the first one (Alecto DKW-2012 in my case).
          I would very much like to have all sensors integrated into a single unit, not having single units (wind, rain, temp) interconnected with some bars.
          This would also have a much higher WAF :nail_care: IMHO
          Maybe I'd better sit down and drawn something to get the creativity flowing ;-)

          What material did you use to print it BTW?

          http://yveaux.blogspot.nl

          dbemowskD 1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #12

            For what I read ASA filaments are uv resistant and can sustain outdoor exposure.

            1 Reply Last reply
            0
            • YveauxY Yveaux

              @dbemowsk I have exactly the same weather station as the first one (Alecto DKW-2012 in my case).
              I would very much like to have all sensors integrated into a single unit, not having single units (wind, rain, temp) interconnected with some bars.
              This would also have a much higher WAF :nail_care: IMHO
              Maybe I'd better sit down and drawn something to get the creativity flowing ;-)

              What material did you use to print it BTW?

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

              @Yveaux You can NEVER forget the WAF. Luckily, my wife is to the point of just asking, "so what are you building now".

              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
              3
              • D DavidZH

                Can I make a suggestion? Reverse the placement of the nuts to the top part, and the little machine screws to the bottom part of the housing. That way it will be easier to keep the water out as it will not creep in to the gap between the ABS and the screw. That capillary action will also work upside down, but good old gravity counters that to a great degree.

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

                @DavidZH Good point. Reversing these should not be a big problem. Just a matter of re-designing the internal rotors that hold the magnets. I'd have to do that because one side has more room than the other. They are only like 15 minute prints anyway

                Thanks for the suggestion.

                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
                1
                • dbemowskD Offline
                  dbemowskD Offline
                  dbemowsk
                  wrote on last edited by
                  #15

                  So Monday I should have my new reed switches and should be able to start working on the board for the wind sensors. For the anemometer, the setup is pretty simple. The rotor has a magnet (red arrow) that passes by the reed switch (blue arrow) to count the revolutions.
                  0_1492875963522_upload-373e9c0b-f453-4328-97fc-62a7be9b5cc1

                  The reed switch wire for the anemometer will pass through the hole at the edge (green arrow) and connect to the direction rotor PCB. Had a small problem when I was cutting the board (blue arrow), but it should still be usable for the prototype. The red lines (red arrow) are where the reed switches will get mounted for the wind direction rotor.
                  0_1492876264052_upload-b165feee-93e0-48a9-b1d0-4c2af21c550e

                  The direction rotor has a small round magnet (blue arrow) which should face the nose cone of the wind direction vane and will pass by the magnetic reed switches mounted on the round PCB
                  0_1492876688706_upload-57ee9f7c-ac97-4704-855f-72e916d8eb07

                  The circuit board mounting plate will get sandwiched between the top and bottom covers and have the main connection wire feed through the side hole near the wind direction magnet in the previous pic.
                  0_1492877066850_upload-e840a1bf-f9b5-4b42-bfcb-4b18d46d47cf

                  Later I will post the proposed schematic for how this will all connect to the pro mini. I will also hopefully have some test code for the setup.

                  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
                  • dbemowskD Offline
                    dbemowskD Offline
                    dbemowsk
                    wrote on last edited by
                    #16

                    So I was playing around a bit on the circuits.io website and came up with this for a test circuit. Each push button switch represents a reed switch for the direction rotor.
                    0_1492881263412_upload-beb662b0-043a-4250-aedd-3a51ac3497f1

                    The idea is to separate the 8 reed switches into two banks which will only use 2 analog IO lines to handle all 8 switches. The first bank of reed switches will be for North, South, East and West. The second bank will be for Northeast, Southeast, Southwest and Northwest. My main reason for doing it this way was due to the fact that the MySensors library API uses V_DIRECTION for the wind direction and is a number between 0 and 360. I needed a way to get more accurate than just 0, 45, 90, 135, 180 etc... which I could do tying all of the reed switches to 1 analog IO line. With this design, I can catch the directions when the magnet is in-between 2 of the reed switches and activating both giving me another 1/8 step of accuracy.

                    Below is the code that I tested on the above circuit. The code should handle debouncing of the reed switches. With the reed switch and magnet rotor setup in place, the code should never reach a 999 value. It should always return a value between 0 and 337 based on the direction of the wind.

                    int old_NSEW = 0, old_NeSeSwNw = 0;
                    
                    void setup() {
                      Serial.begin(9600);
                      pinMode(A0, INPUT);
                      pinMode(A1, INPUT);
                    }
                    
                    int getNSEW()
                    {
                      int i, z, sum;
                      int button;
                    
                      sum = 0;
                      for (i=0; i < 4; i++)
                      {
                         sum += analogRead(A0);
                      }
                      z = sum / 4;
                      //Serial.println(z);
                      if (z > 1021) button = 999;                                           
                      else if (z > 357 && z < 361) button = 0;                     
                      else if (z > 405 && z < 409) button = 90;                
                      else if (z > 467 && z < 471) button = 180;                
                      else if (z > 551 && z < 555) button = 270;  
                      else button = 999;
                    
                      return button;
                    }
                    
                    int getNeSeSwNw()
                    {
                      int i, z, sum;
                      int button;
                    
                      sum = 0;
                      for (i=0; i < 4; i++)
                      {
                         sum += analogRead(A1);
                      }
                      
                      z = sum / 4;
                      //Serial.println(z);
                      if (z > 1021) button = 999;                                              
                      else if (z > 357 && z < 361) button = 45;                     
                      else if (z > 405 && z < 409) button = 135;                
                      else if (z > 467 && z < 471) button = 225;                
                      else if (z > 551 && z < 555) button = 315;  
                      else button = 999;
                    
                      return button;
                    }
                    
                    
                    void loop ()
                    {
                      int NSEW, NeSeSwNw, NSEW_curr, NeSeSwNw_curr, triggered_NSEW, triggered_NeSeSwNw;  
                      NSEW = getNSEW(); 
                      NeSeSwNw = getNeSeSwNw();
                      if (NSEW != old_NSEW)
                      {
                          delay(50);        // debounce
                          NSEW_curr = getNSEW();
                    
                          if (NSEW == NSEW_curr)
                          {
                             old_NSEW = NSEW;
                             triggered_NSEW = NSEW;
                            if (NSEW == 999 || NeSeSwNw == 999) {
                               triggered_NSEW = NSEW;
                            } else if (NSEW < NeSeSwNw) {
                               triggered_NSEW = ((NeSeSwNw - NSEW) / 2) + NSEW;
                            } else {
                               triggered_NSEW = NSEW - ((NSEW - NeSeSwNw) / 2);
                            }
                             Serial.println(triggered_NSEW);
                          }
                       }
                      if (NeSeSwNw != old_NeSeSwNw)
                      {
                          delay(50);        // debounce
                          NeSeSwNw_curr = getNeSeSwNw();
                    
                          if (NeSeSwNw == NeSeSwNw_curr)
                          {
                             old_NeSeSwNw = NeSeSwNw;
                            if (NSEW == 999 || NeSeSwNw == 999) {
                               triggered_NeSeSwNw = NeSeSwNw;
                            } else if (NSEW < NeSeSwNw) {
                               triggered_NeSeSwNw = ((NeSeSwNw - NSEW) / 2) + NeSeSwNw;
                            } else {
                               triggered_NeSeSwNw = NeSeSwNw - ((NSEW - NeSeSwNw) / 2);
                            }
                            Serial.println(triggered_NeSeSwNw);
                          }
                       }
                    }
                    

                    Does anyone see any issues in this approach to the wind direction?

                    Next I plan on working on the code for the anemometer to calculate wind speed. I could possibly have that figured out later today.

                    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
                    1
                    • gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #17

                      Personally I think you may have issues with the position when magnet will be around the middle of 2 sensors because it could either trigger both or none of them so magnet strength will be crucial to your setup. I still think the optical sensor used by the other weather stations is a preferred solution

                      dbemowskD 1 Reply Last reply
                      0
                      • gohanG gohan

                        Personally I think you may have issues with the position when magnet will be around the middle of 2 sensors because it could either trigger both or none of them so magnet strength will be crucial to your setup. I still think the optical sensor used by the other weather stations is a preferred solution

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

                        @gohan the diameter of the circuit board is 52mm or a radius of 26mm. From the center of the shaft to the center of the magnet is 17.75mm. The reed switches I ordered were 7mm long. I had to get shorter ones because of the tight space they will be in. The magnet's diameter is 4.25mm and it is a pretty strong neodymium magnet. Calculating the circumference to the center of where the magnet is mounted on the rotor, that is 111.5mm. Dividing that by 8 gives a distance between the reed switches of 13.94mm. I tested with a different reed switch that I had and found that the detection distance from magnet to reed switch is roughly 5mm plus or minus a smidge. The rotor should be fairly close to the reed switches if my calculations are correct. I can't say 100% till I get the reed switches and build the assembly, but I think I am going to be fine. I think worst case, I might have to get a slightly larger magnet, and even if I did it wouldn't have to be more than 1 to 2 millimeters bigger than the one I have.

                        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
                        • dbemowskD Offline
                          dbemowskD Offline
                          dbemowsk
                          wrote on last edited by
                          #19

                          So here is an update on where I am at with the direction rotor assembly. I came up with the following proposed circuit board assembly based on my circuits.io layout from my previous post. All of the reed switches are in a circular configuration and alternate the 2 different switch banks seen in the above post.
                          0_1493175374379_upload-a0192f97-d885-4f50-b4cd-9f01ec151da7

                          Following that diagram, here is the final prototype board. The only difference in the final board is that I used 3.3k resistors, as I was low on 2.2k's. I figured all I should have to do is make a couple adjustments to the code for the derived values when a reed switch was activated.
                          0_1493175842348_upload-46ddb478-2a46-4b59-88fa-6a290eec5272

                          Even though the design seemed pretty solid, I seem to be having some issues with it. I have tried a few different rotor and magnet assemblies. All of the magnets are neodymium magnets that I got from various salvage operations. The order from left to right is the order that I tested them in.
                          0_1493176935322_upload-3b93081d-dd79-412c-b882-e6327d927e4b

                          It appears that @gohan was correct about the first test rotor. Some of the other ones just seemed a bit erratic. There are a couple other things that I want to try, but I'm starting to look at some kind of 360 degree angle sensor to potentially use. I am wondering if anyone in the forum has done any kind of rotational angle sensing, and what sensor did you end up using?

                          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/

                          YveauxY 1 Reply Last reply
                          1
                          • hekH Offline
                            hekH Offline
                            hek
                            Admin
                            wrote on last edited by
                            #20

                            @dbemowsk

                            Maybe you can get some inspiration from this (that's using a potentiometer)
                            http://www.thingiverse.com/thing:952978

                            1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by gohan
                              #21

                              20$ for a potentiometer???? :scream_cat:
                              With that price it is cheaper to hack a spare part from another weather station :D

                              1 Reply Last reply
                              0
                              • hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #22

                                Haha.. yes.. didn't google prices. That's pricey :grimacing:

                                1 Reply Last reply
                                0
                                • dbemowskD dbemowsk

                                  So here is an update on where I am at with the direction rotor assembly. I came up with the following proposed circuit board assembly based on my circuits.io layout from my previous post. All of the reed switches are in a circular configuration and alternate the 2 different switch banks seen in the above post.
                                  0_1493175374379_upload-a0192f97-d885-4f50-b4cd-9f01ec151da7

                                  Following that diagram, here is the final prototype board. The only difference in the final board is that I used 3.3k resistors, as I was low on 2.2k's. I figured all I should have to do is make a couple adjustments to the code for the derived values when a reed switch was activated.
                                  0_1493175842348_upload-46ddb478-2a46-4b59-88fa-6a290eec5272

                                  Even though the design seemed pretty solid, I seem to be having some issues with it. I have tried a few different rotor and magnet assemblies. All of the magnets are neodymium magnets that I got from various salvage operations. The order from left to right is the order that I tested them in.
                                  0_1493176935322_upload-3b93081d-dd79-412c-b882-e6327d927e4b

                                  It appears that @gohan was correct about the first test rotor. Some of the other ones just seemed a bit erratic. There are a couple other things that I want to try, but I'm starting to look at some kind of 360 degree angle sensor to potentially use. I am wondering if anyone in the forum has done any kind of rotational angle sensing, and what sensor did you end up using?

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #23

                                  @dbemowsk You could use a compass sensor (e.g. HMC5883L) with a small magnet revolving above it.
                                  Requires some math to get the angle but once you nail it you'll get incredible precision from it.

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • gohanG Offline
                                    gohanG Offline
                                    gohan
                                    Mod
                                    wrote on last edited by
                                    #24

                                    I still think the central LED with 8 phototransistor around is the cheapest solution :) (given that you are already 3D printing everything, I don't think one more part will make much difference; there is one example in another topic about hacking a weather station)

                                    dbemowskD 2 Replies Last reply
                                    0
                                    • gohanG gohan

                                      I still think the central LED with 8 phototransistor around is the cheapest solution :) (given that you are already 3D printing everything, I don't think one more part will make much difference; there is one example in another topic about hacking a weather station)

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

                                      @gohan I am assuming that you are talking about this post:
                                      https://forum.mysensors.org/topic/6645/fody-weather-station-wind-sensor/2

                                      I would have to figure out how to wire everything, but that would be an option.

                                      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
                                      • gohanG gohan

                                        I still think the central LED with 8 phototransistor around is the cheapest solution :) (given that you are already 3D printing everything, I don't think one more part will make much difference; there is one example in another topic about hacking a weather station)

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

                                        @gohan $5 US for a 10 pack
                                        http://www.ebay.com/itm/10PC-LTR-301-002-Lite-On-Phototransistor-NPN-Plastic-Side-Look-10-pieces-/111612940043?hash=item19fca64f0b:g:uKIAAOSwv0tVBIf4

                                        Or I could go this route and have a bunch of spares for the parts bin. The per unit cost would be cheaper that way, but you have to buy a bigger bulk of them.
                                        http://www.ebay.com/itm/50-HONEYWELL-SDP8436-003-2-PIN-PHOTO-TRANSISTOR-DETECTOR-NPN-SIDE-LOOK-/191915022332?hash=item2caf06d7fc:m:mT-sRL8E_IkMeYJBasXQtng

                                        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
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #27

                                          I was referring exactly to that topic. Maybe you could ask Flopp if he could measure his part for you. The tricky part will be to find the right brightness for the LED when it is crossing between 2 phototransistor, but I think it will be easier to adjust than changing a magnetic field :)
                                          About those parts, I can't say much, it is up to you: with 10 you still have 2 as spares just in case, 50 are quite a lot unless you plan to build more for your friends :)

                                          dbemowskD F 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          18

                                          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