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,501
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:
Found 4 of them, 400EP18A and they are 40 kHz... but are they usable?
This will be fun, no clue what I'm doing.... ;-)

They have a max of 20Vrms and in the datasheet they show 110 dB at 10V.
1595077103720.png
10 Vrms means an irregular square wave (pwm with duty) over 10V if converting into more a sine wave. That could be a problems as the circuit probably won't be over 5V.

Need to study up on these.
 
Last edited:
So, what sort of dB would be generated at 3.3V and how many volts should the receiver see? Assuming I’m interpreting this correctly…

Datasheet Facts
Transmitting Sound Pressure Level
at 40.0Khz; 108 dB min, 0dB re 0.0002Pbar per 10Vrms at 30cm
Receiving Sensitivity at 40.0Khz 0dB = 1 volt/μbar -75dB min.

From the ref:
Determining SPL at the front end of Receiver​
SPL loss for 3 Vrms driving voltage = 20 * log (3V / 10V) = -10.46 dB​
SPL Gain at 10 cm = 20 * log (30 cm / 10 cm) = 9.54 dB​
Wave absorption = ~ .1886 dB/m * .1 = .02 dB (page 4)​
The SPL at 10 centimeters becomes = 108 – 10.46 + 9.54 - .02 = 107 dB​
Converting SPL to μbar: 107 dB = 20 * log ( X / 0.0002 μbar)​
X = 45 μbar​
Determining Receiver Sensitivity in Volts/μbar​
Converting Sensitivity to Volt/μbar: -75 dB = 20 * log ( X / 1 Volt/μbar)​
X = 0.178 mV/μbar​
Voltage generated under 0.178 mV/μbar = 0.178 mV/μbar * 45 = 8 mV​
At 5V it the receiver would be:
Determining SPL at the front end of Receiver​
SPL loss for 3 Vrms driving voltage = 20 * log (5V / 10V) = -6.02 dB​
The SPL at 10 centimeters becomes = 108 – 6.02 + 9.54 - .02 = 111.5 dB​
Converting SPL to μbar: 107 dB = 20 * log ( X / 0.0002 μbar)​
X = 75.16 μbar​
Determining Receiver Sensitivity in Volts/μbar​
Voltage generated under 0.178 mV/μbar = 0.178 mV/μbar * 75.16 = 13 mV​
Update: The Cortex M7 ADC has 12 bits and covers -3.3 to 3.3, so steps of 1.6 mV? If so, wouldn't need a transistor to boost the receiver signal for a chirp, but to curve match we'd get a better fit with a transistor.
 
Last edited:
You can send square wave into US transducers without a filter ;) If you want a bit more efficency you can add an inductor which should be calculated to have the resonant frequency of the resulting LC network (a piezo transducer is basically a capacitor) equal to the tuned frequency of the transducer (usually 40 kHz).

The transducers usually need a lot more voltage than 3.3 V to do something useful, something like 12 or 15 V is generally a minimum. But in your application the receiver is close to the the emitter so 3.3 V may be do-able. The simplest is to try it as maths for that are a PITA and there's a lot of variables to ruin your accuracy anyway. Just feed one 40 kHz and experiment with directivity, distance, etc... looking at the output of the other one.

IBut 'd recommend you to use a ready made time of flight telemeter who already does all the work and outputs a 0-5 V voltage proportional to the distance (wind speed in your case) or even talks directly via serial, I2C, SPI, ... the only modification would be to unsolder one of the transducer to put it in front of the other some distance appart. Just be careful of the minimal distance measurable, usually something like 10-20 cm, they need to be farther appart than that obviously.
 
Thanks BiduleOhm!

...You can send square wave into US transducers without a filter...
Really! Cool!
What would the wave form look like on the receiving side? The way I was planning to get the delta time was to grab a few receiver voltages, then solve for wave offset (see post #16). But I was assuming both waves would be pretty close to a sine wave.

...transducers usually need a lot more voltage than 3.3 V to do something useful, something like 12 or 15 V is generally a minimum. B... simplest is to try it as math...
Did that in the post #22. Came up as 8 mV at the reciever for 3V at the transmitter and 13 mV for 5V.... assuming I did it right... and there's no minimum voltage to fire the p-crystal.

...I'd recommend you to use a ready made time of flight telemeter ...
More stuff to research! ;-)
 
Last edited:
Found a couple of ToF chips: The $6 TDC7201 and the $10 ISL29501IRZ-T7A (although that looks like it's for optical circuits).

The cheaper one has two channels, looks like they operate as stop watches, start/stop pins, 3.9V max, then an SPI interface to get the time (accurate to picoseconds).

Seems like it would be a crime not to use it... except... all the pins are on the bottom? How are you supposed to solder that?? Socket for it or am I going to have to get an easy bake oven? It's a 5x5 (25 pin) FBGA (fine ball grid array).

The $3 TDC7200 has a single channel and a TSSOP(14) package, so probably easier to work with. 55 ps resolution. 2 to 3.6V.

Similarly the $6 MAX35101 has an accuracy of 20 ps and a 32-TQFP Exposed Pad.
 
Last edited:

diy solar

diy solar
Back
Top