diy solar

diy solar

Time for a new weather station?

svetz

Works in theory! Practice? That's something else
Joined
Sep 20, 2019
Messages
7,293
Location
Key Largo
Weather station alerts went off last night, winds in excess of 600 mph.

No, I don't live on Venus... the anemometer died and sent bad data. Resurrection doesn't seem possible. The salt seems to be hard on them, they don't last over 3 years. Not sure if just because I'm buying cheap junk or if that's the way it is.

Thinking about getting a new weather station compatible with the software project, perhaps an ultrasonic wind anemometer so I don't have to replace them every few years?

If you know of a perfect system that'll last for years (or if DIY for affordable quality) please let me know!

External Projects you might find of interest
 
Last edited:
Ruled the NetAtmo out, they don't have a solar irradiance sensor and the wind sensor is only accurate from 0 to 100 mph.
With hurricanes I'm most interested in speeds above 60 mph. Pity, looks like they put some work into the api.

Update: DIY annemometer
 
An alternative approach might be a set of wings attached to a strain gauge to measure lift force. Got the idea from:
GQ4WH.jpg

The Magnus Effect might be more sensitive as you could vary the speed to calibrate sensitivity...but it would consume a lot of power and have wear and tear.
 
If you know of a perfect system that'll last for years (or if DIY for affordable quality) please let me know!
I think Davis sells Anemometers separately. Your software would have to be programmed for the number of clicks per mph of wind speed.
 
Last edited:
Ecowitt has a $36 wifi gateway, so should be able to get that and the peripherals as @Ampster suggests.

They have an ultrasonic anemometer with irradiance sensor for $140, no direct API...but as they export data and cell phones can access might be able to figure it out. It also broadcasts in 915/868/433 Mhz, so might also be able to tap into that stream with the SDR dongle. They also have a regular cup anemometer for ~half the price.

Only accurate to about 90 mph, but as I've shopped around none of them claim to be much more accurate.
 
Anyone have a lightening sensor or know anything about them? Are they useful?
Asking as Ecowitt has the WH57.

Seems like surge sensor would be more appropriate for solar.
 
Seems like surge sensor would be more appropriate for solar.
I don't get much lightening where I live so I have no use for a sensor that might give me early warning. I did install a whole house surge suppressor in my main panel which protects against surges in the incoming power whether by lightening or other reasons. My solar panels are grounded per code.
 
I have been using for a few years with an app on my iphone called My radar. Used this a lot to see if how the weather is looking when i was checking job sites for concrete pours. Pretty accurate and lets you move the map to put cross hairs on the area your watching. zoom in or out. Options for satellite, or road map. Also lets you put markers on places you've been to check weather at that paticular place. There is a pc version and android version available and it's free. There is a paid version available but i have always used the free one without issue. The free version gives several options for many weather conditions and it does have a visual lightning detection (flashes) Give it a look .?
 
That's a great app!

I did think of a use for measuring lightening... since it provides distance you could see if lightening was getting closer and open circuits to delicate electronics and then close them once the weather departs.
 
The saga goes on... ordered from Ecowitt not realizing they were in China, Turns out the ultrasonic anemometer is exclusive in the USA for Ambient, so they couldn't ship it. I asked them to cancel the rest of the order (would be useless without the anemometer). Glad I followed @ghostwriter66's advice on translating English to Chinese and back... my first couple of attempts were amusing (e.g., I understand your position changed to I know where you live).
 
I know that somewhere in the treasure horde, I have some transducers dug out of something from long ago.
Could I build an ultrasonic anemometer with an Arduino Uno?

Clock speed on an Arduino is 16 MHz, let's say the average instruction takes 3 cycles, so ~5 million instructions/s, or 5 instructions / µs.

To reduce windage (no reason for a hurricane to blow it to Kansas, after all @jasonhc73 already has an anemometer) I'd want to keep the diameter small, let's say 4" (use a 4" PVC pipe fitting for mounting?) or 10 cm.

Speed of sound is ~344 m/s. The worst case times would be at 45°; d/(Vwind + Vsound) sin(45); so for varying wind speeds:

Code:
mph     mps    d(Vw + Vs)sin(45)       Δ
  0       0      203.49 µs
  1       0.44   203.22 µs           0.27 µs @ 1 mph
  5       2      202.31 µs           1.1 µs @ 5 mph
20       9      198 µs
50      22      191 µs
100      44      182 µs
175      78      165.87 µs
179      80.02   165.087 µs
180      80.46   164.915 µs          0.78 µs @ 5 mph, .172 @ 1 mph

So the Arduino would transmit a chirp, then time how long it takes to get a chirp.

The loop could probably be short, something like:
sendPulse()
n = instructionCounter() + #instructionsThisStep;
while (pin5<4){} # time critical step
n = instructionCounter() - n - #instructionsThisStep;

At the worse case time of 165 µs, the resolution between than and 5 mph less is .78 µs, or about 3 instructions. The delta between 0 and 5 mph is 1.1 µs, so ~5 instructions.

The trick would be to optimize the time critical step into less than 3 instructions and even then that would only be +/- 5 mph accuracy. To get to 1 mph accuracy the measurement would need to be less than 1 instruction.

Doesn't look like the Arduino UNO would be fast enough for this straight up.

A Propeller chip at 100 MHz or NodeMCU D1Mini at 80 MHz might be fast enough for 5 mph accuracy.

To get to deltas of 1 mph it would take .27 µs measuring accuracy at low wind speeds and .17 at high speeds.

A Raspbery Pi has a 1.5 GHz quadcore, so around 500 instructions per µs. So the CPU should be able to measure accurately enough, but the GPIO pin speeds are only 25 MHz... so it probably won't work either. (Update, the Pi 4B has 50 MHz pin speeds)

Update: the $4 Raspberry Pico might work, 133 MHz, but no information on GPIO pin speeds.
 
Last edited:
The $27 Teensy 4.1 runs at 600 MHz and has analog pins... hmmm... it can be overclocked too...
Consumes .3W @600 MHz; of course you only need to run it for a ms every other minute.

Sticking with an average of 3 cycles per instruction, that would be 200 instructions per µs. Not really sure how many cycles the hypothetical critical step (i.e., while (pin5<4){} ) is; The BLT is just one...but the analog pin value needs to be fetched, converted A2D... so lets guess 20 instructions, giving us a resolution of 0.1 µs?

We know from post #13 that's enough to detect a 1 mph windspeed difference.
Hmmm... I wonder how many of these would release the magic smoke in the name science trying to make this work?
 
In #13 the algorithm was to send a chirp, then get the time delta to when it was received. That required some pretty tight timing constraints. Here's a way it might be done at a lower CPU speed.

Suppose instead the transmitter transmits a signal at 40 kHz. The receiver
will receive at the same frequency, but the wave should be offset as shown
to the right by Δy, which is the time delay due to distance and wind.

The timing of the transmitted wave is known so by sampling a number of
points at known times (V2), the equation for the dashed line can be
solved for and that will give the Δy between the sent and received signals.
Delete the speed of sound adjusted for humidity and altitude, and what
you're left with is shift from wind speed. The more points you sample the
greater the accuracy as errors should counteract each other. Although,
that'll take some heavy math to normalize the points.
phase-shift.gif
 
Last edited:
Turns out the chip (ARM Cortex M7) on the Teensy 4.1 can simultaneously sample and hold analog signals, thereby eliminating "noise" due to time deltas (compare the sequence in the right and left in the diagram):
1595018667870.png
So, instead of calculating Δy as shown in post #16, you could get ΔV with a high degree of accuracy and solve for the dash lined to get Δy ...allowing you to avoid all the icky math on normalizing points. Now that's a useful feature!
 
Last edited:
Didn't took the time to read all the new posts yet but just warning about something: US transducers are usually well tuned to a frequency and going outside by even 10 % reduces the sensitivity by a lot. The usual transducers (for the robots, etc...) work at 40 kHz.
 
I was wondering about that too... have to find my transducers to know for sure but I bet your right.
I did find information on the PWM here: https://www.pjrc.com/teensy/td_pulse.html...looks like the tone function won't have a problem setting a square wave of the appropriate frequency, so possible a capacitor/resistor to make it more analog?

I have to amend my prior post... just because there's a picture of one doesn't mean it really works... haven't found any data from that project... ;-)
 
Last edited:
Back
Top