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

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

                        @gohan Good point on the 50 pieces. I can do some experimenting prior to the final design to figure out what is going to work best.

                        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
                          #29

                          keep in mind that if you don't have a regulated voltage, the LED may change brightness as battery drains out. It just came to my mind: can you manage on the sw side 2 of your reed switches on at the same time? If you can find a way you can still use the magnet and add additional "half step" in your wind direction and make it more precise

                          dbemowskD 1 Reply Last reply
                          0
                          • gohanG gohan

                            keep in mind that if you don't have a regulated voltage, the LED may change brightness as battery drains out. It just came to my mind: can you manage on the sw side 2 of your reed switches on at the same time? If you can find a way you can still use the magnet and add additional "half step" in your wind direction and make it more precise

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

                            @gohan My plan I think is going to be to have a solar panel that will charge a small LiPo or SLA battery. I would size the battery big enough to handle the regulator on the pro mini and use the regulated output voltage to run the LED to give it a constant brightness.

                            My original plan with the reed switches was to have the ability to trigger 2 reed switches at once. That was the reason for having 4 reed switches for N S E W and the other 4 for NE SE SW NW. I designed it to use 2 IO lines for the 2 different banks of 4 reed switches. That way if the N and NE reed switches were triggered that you would get that extra half step. The biggest problem that I am running into is that for some reason the reed switches don't seem to be triggering consistently with any of the magnet configurations I have tried. That is why I wanted to look at another approach.

                            I ordered the 10 photo transistors this morning. I will still look at a way to run them as 2 banks of 4 sensors like I did with the reed switches so I can get that extra half step.

                            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 gohan

                              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 :)

                              F Offline
                              F Offline
                              flopp
                              wrote on last edited by flopp
                              #31

                              @gohan said in MySensors weather station:

                              The tricky part will be to find the right brightness for the LED when it is crossing between 2 photo-transistor, but I think it will be easier to adjust than changing a magnetic field :)

                              What I did for wind direction is that I "look" for the first photo-transistor that get light from the LED and use that direction. So I don't care if the light is crossing between 2 photo-transistor. I scan from first digital in until i scanned all of them.

                              void readWindDirection()
                              {
                                //check in what direction the wind is. First sensor that have light will be the direction
                                int i = 4;
                                for (i; i < 9 ; i++){
                                  if (!digitalRead(i)){
                                    WD = WDarray[i-4];
                                    return;
                                  }
                                }
                                i = 14;
                                for (i; i < 17 ; i++){
                                  if (!digitalRead(i)){
                                    WD = WDarray[i-9];
                                    return;
                                  }
                                }
                              }
                              
                              dbemowskD 1 Reply Last reply
                              0
                              • F flopp

                                @gohan said in MySensors weather station:

                                The tricky part will be to find the right brightness for the LED when it is crossing between 2 photo-transistor, but I think it will be easier to adjust than changing a magnetic field :)

                                What I did for wind direction is that I "look" for the first photo-transistor that get light from the LED and use that direction. So I don't care if the light is crossing between 2 photo-transistor. I scan from first digital in until i scanned all of them.

                                void readWindDirection()
                                {
                                  //check in what direction the wind is. First sensor that have light will be the direction
                                  int i = 4;
                                  for (i; i < 9 ; i++){
                                    if (!digitalRead(i)){
                                      WD = WDarray[i-4];
                                      return;
                                    }
                                  }
                                  i = 14;
                                  for (i; i < 17 ; i++){
                                    if (!digitalRead(i)){
                                      WD = WDarray[i-9];
                                      return;
                                    }
                                  }
                                }
                                
                                dbemowskD Offline
                                dbemowskD Offline
                                dbemowsk
                                wrote on last edited by
                                #32

                                @flopp I am curious how you wired your electronics. I saw that as one of your original questions in your fody weather station post. so based on what you are saying, you really only use the 8 different directions, N, NE, E, SE, S, SW, W, NW, correct?

                                I have the basic design of the one you had pictured in your post mostly done. I still have to plan for circuit board mounting and wire connections, but I don't think that should be too difficult.

                                Here is my starting design done in OpenSCAD. I have the center hole threaded part way with a US 1/4 x 20 thread as that is what I used for the bolts to go through the wind vane.
                                0_1493275410728_upload-206e872f-5ef5-4ef8-9c8b-5e4536d8fb31
                                0_1493275543341_upload-febb1225-6256-4cc2-bee9-2c4d220d3238

                                I shoud be getting the phototransistors by Monday, so I want to draw up a preliminary design for the circuit board before 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/

                                F 2 Replies Last reply
                                1
                                • dbemowskD dbemowsk

                                  @flopp I am curious how you wired your electronics. I saw that as one of your original questions in your fody weather station post. so based on what you are saying, you really only use the 8 different directions, N, NE, E, SE, S, SW, W, NW, correct?

                                  I have the basic design of the one you had pictured in your post mostly done. I still have to plan for circuit board mounting and wire connections, but I don't think that should be too difficult.

                                  Here is my starting design done in OpenSCAD. I have the center hole threaded part way with a US 1/4 x 20 thread as that is what I used for the bolts to go through the wind vane.
                                  0_1493275410728_upload-206e872f-5ef5-4ef8-9c8b-5e4536d8fb31
                                  0_1493275543341_upload-febb1225-6256-4cc2-bee9-2c4d220d3238

                                  I shoud be getting the phototransistors by Monday, so I want to draw up a preliminary design for the circuit board before that.

                                  F Offline
                                  F Offline
                                  flopp
                                  wrote on last edited by
                                  #33

                                  @dbemowsk said in MySensors weather station:

                                  @flopp I am curious how you wired your electronics. I saw that as one of your original questions in your fody weather station post. so based on what you are saying, you really only use the 8 different directions, N, NE, E, SE, S, SW, W, NW, correct?

                                  Yes, correct. I have 8 receivers for the light.

                                  I want to know more about this product https://www.youtube.com/watch?v=-oQiJ50LcAc

                                  1 Reply Last reply
                                  0
                                  • dbemowskD dbemowsk

                                    @flopp I am curious how you wired your electronics. I saw that as one of your original questions in your fody weather station post. so based on what you are saying, you really only use the 8 different directions, N, NE, E, SE, S, SW, W, NW, correct?

                                    I have the basic design of the one you had pictured in your post mostly done. I still have to plan for circuit board mounting and wire connections, but I don't think that should be too difficult.

                                    Here is my starting design done in OpenSCAD. I have the center hole threaded part way with a US 1/4 x 20 thread as that is what I used for the bolts to go through the wind vane.
                                    0_1493275410728_upload-206e872f-5ef5-4ef8-9c8b-5e4536d8fb31
                                    0_1493275543341_upload-febb1225-6256-4cc2-bee9-2c4d220d3238

                                    I shoud be getting the phototransistors by Monday, so I want to draw up a preliminary design for the circuit board before that.

                                    F Offline
                                    F Offline
                                    flopp
                                    wrote on last edited by
                                    #34

                                    @dbemowsk said in MySensors weather station:

                                    Here is my starting design done in OpenSCAD. I have the center hole threaded part way with a US 1/4 x 20 thread as that is what I used for the bolts to go through the wind vane.

                                    Your drawings look good.

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

                                      Here is possibly how it would be fitted into the wind vane body cap. It'll be a tight fit for the PCB, but I'm sure I can make it.
                                      0_1493290462764_upload-41341d20-831d-4331-9aba-56d34034fbb9

                                      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
                                      • wallyllamaW Offline
                                        wallyllamaW Offline
                                        wallyllama
                                        wrote on last edited by
                                        #36

                                        Some things about the direction sensor, your magnet/reed switch is exactly what is in the old dallas 1-wire weather station and it worked well giving 16 positions,

                                        the led/photodiode method mentioed by gohan is interesting, if you used analog inputs you could use the value across 3 of them at a time to interpolate a pretty high resolution answer, multiplexing could make it so you dont need 8 analog inputs.

                                        Another thing is a rotary encoder, ive seen them used to measure the angles of telescope mounts, i believe they can be had with good enough resolution for your needs.

                                        I didnt read the whole thread, apologies if i am repeating ideas, or if you have decided on a solution.

                                        dbemowskD 1 Reply Last reply
                                        1
                                        • wallyllamaW wallyllama

                                          Some things about the direction sensor, your magnet/reed switch is exactly what is in the old dallas 1-wire weather station and it worked well giving 16 positions,

                                          the led/photodiode method mentioed by gohan is interesting, if you used analog inputs you could use the value across 3 of them at a time to interpolate a pretty high resolution answer, multiplexing could make it so you dont need 8 analog inputs.

                                          Another thing is a rotary encoder, ive seen them used to measure the angles of telescope mounts, i believe they can be had with good enough resolution for your needs.

                                          I didnt read the whole thread, apologies if i am repeating ideas, or if you have decided on a solution.

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

                                          @wallyllama No problem, I appreciate the input.

                                          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


                                          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