MySensors weather station
-
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
@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.
-
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.

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.

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.

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?
-
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.

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.

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.

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?
-
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)
-
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)
-
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)
@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:uKIAAOSwv0tVBIf4Or 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 -
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 :) -
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 :) -
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
-
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
@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.
-
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 :)@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; } } } -
@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; } } }@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.


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


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


I shoud be getting the phototransistors by Monday, so I want to draw up a preliminary design for the circuit board before that.
@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.
-
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.
-
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.
@wallyllama No problem, I appreciate the input.
