diy solar

diy solar

Time for a new weather station?

<sigh> Why does the circuit board look more complicated then the diagram?

looks like they built one send/receive circuit for each transducer? Why not just use a multiplexer?
1600191921636.png1600191953374.png

I wonder how accurate 4 transducers using two legs offset at 90° would be? I suppose the when the wind was 45° to one arm would cause interference with the second.... although altering height of the second arm might fix that?
 
Last edited:
...I saw from the Heathkit post that they have weather station parts...
I found a "reconditioned" replacement anemometer for $18 from the manufacturer based on your idea in post #4 ... but this still seems like a cool project so whenever I get a few minutes waiting on something else I delve into it. Possibly someday I'll actually build one.
 
The TDC7200 has two modes, 12 ns precision over 500 ns, or 250 ns over 8 ms. The signal takes over 500 ns, so that leaves us with the 2nd mode. Let's try that calculation backwards to see what the minimum distance would be given t= d/(Vwind + Vsound) for a 1 mph sensitivity

.25 µs = T1 - T0 // from post #13
T0 = d / (344) // 344 is the speed of sound in m/s
T1 = d / (344 + 0.44) // 0.44 is 1 mph in m/s
.25 = d / (344 + 0.44) - d / 344
d = .25 / ( 344 + 0.44) - 1 / 344) = 118,487m

Looks like we can eliminate the TDC7200. Well rats... that was the last ToF chip... perhaps there's another or a high precision counter?
 
Last edited:
Honestly I would use some analog and discrete circuitry to solve that, but I'm a dinosaur... ?

It's basically the same problem as the good old radar, you should look into how they were designed when they didn't had MCU and all that new stuff :)
 
...I'm a dinosaur... ?
A dinosaur who knows what he's doing... I don't have that luxury!

What the authors of that paper did freaked me out:
Thus, we excited it with 40 kHz pulses of 120 V peak-to-peak, present at the transformer output. Also, before reaching the transformer, the excitation signal passes through an RC low-pass filter formed by R4 and C2. This filter has cutoff frequency of 7 Hz and has the function of filtering the noise present in the system power supply2 . In turn, the component D2 is a zener diode and causes the voltage induced by the primary of the transformer during its unloading to be 13 V. This is very important because it causes less distortion in the secondary of the transformer, which is the signal responsible for exciting the transmitting transducer

The datasheet says the maximum continuous driving voltage is 20Vrms. When I first read that I thought they were applying 120V to the transducer, although now I'm thinking the 120V is the input to the transformer and the transducer only saw 13V. Sounds like they filtered the 120V and then the 120:13 dropped any remaining distortion. But I'm a little surprised they'd have to do that; I'd expect the square wave off an MCU to be cleaner. The Arduino seems pretty clean [ref].

I'm thinking using the Teensy again to run a 50% duty cycle to a transistor to drive the transmitter at a higher voltage, then amplify the receiver and use the M7's sample and hold as discussed in post #17. But given what the authors did to clean up the transmit signal I'm betting it won't work well and is going to take an oscilloscope to keep playing with filters and voltages to get right.
 
Well I'm pretty young but somehow prefer the dinosaur solutions in electronics, I hate the "use an MCU and software to solve every problem" approach...

The datasheet says the maximum continuous driving voltage is 20Vrms. When I first read that I thought they were applying 120V to the transducer, although now I'm thinking the 120V is the input to the transformer and the transducer only saw 13V. Sounds like they filtered the 120V and then the 120:13 dropped any remaining distortion. But I'm a little surprised they'd have to do that; I'd expect the square wave off an MCU to be cleaner. The Arduino seems pretty clean [ref].

I think your read right the first time because they say the 13 V is on the primary side and the secondary side (i.e. 120 V) is on the transducer side.

You can do that kind of things if you know exactly what you're doing and/or have asked the manufacturer to confirm it's ok to do that.

But given what the authors did to clean up the transmit signal I'm betting it won't work well and is going to take an oscilloscope to keep playing with filters and voltages to get right.

Yep, IIRC I told you earlier you'll need an oscilloscope for this kind of project. But the good thing is that given the frequencies used you only need a very basic one ;)
 
In looking at the diagram again you've got to be right... looks like a 12V power source driving the circuit.

From their paper the distance is 20 cm, using the sound pressure level calculations in #22 for a few voltages using a distance of 20 cm we get the table below (The 120V is way out of spec from the datasheet so dubious at best for it):

transmit VSPL VSPL ΔdSPL loss ΔdλSPLμbarReceiver mV
3​
-10.5​
6.0​
0.037​
103.5​
30.0​
5.34​
5​
-6.0​
6.0​
0.037​
108.9​
50.0​
8.90​
7​
-3.1​
6.0​
0.037​
110.9​
70.0​
12.46​
10​
0​
6.0​
0.037​
114.0​
100.0​
17.80​
13​
2.3​
6.0​
0.037​
116.3
130.1​
23.1​
15​
3.5​
6.0​
0.037​
117.5​
150.1​
26.71​
20​
6.0​
6.0​
0.037​
120.0​
200.1​
35.61​
120​
21.6​
6.0​
0.037​
135.6​
1200.5​
213.68​
1600257773782.png

Could the noise really be so bad they'd need 213 mV at the receiver? After all, AM/FM is in the μV; if your using an amplifier that just seems crazy... is this what happens when you put 7 EEs in a room? I need to re-read that several more times....
 
Last edited:
...Well I'm pretty young but somehow prefer the dinosaur solutions in electronics, I hate the "use an MCU and software to solve every problem" approach...
Didn't mean to imply you were old, and I do understand what you mean... beauty is in the eye of the beholder and and the artistry of something tangible is far more evident then something intangible like s/w (which far to often isn't very pretty at all).
 
They're using the STM32F429 180 MHz chip, so that's 6 ns/cycle and should be fast enough for 1 mph wind speeds deltas. On the transmitter, they're using the MCU as a signal generator to R1. From there it goes through a non-isolated driver U1 to protect the micro-controller. That feeds MOSFET Q1 which excites the 1:10 transformer. R4 and C2 form a low pass filter with a cutoff at 7 Hz to get rid of noise in the power supply (battery shouldn't have that problem). R5 and C3 allow discharging the energy stored in the transducer.
That all seems straight forward.

1600271062643.png
Then there's D2 is a zener diode and it causes the voltage induced by the primary of the transformer during its unloading to be 13 V? They say:
This is very important because it causes less distortion in the secondary of the transformer, which is the signal responsible for exciting the transmitting transducer. Empirically we observed that, without the zener diode, the RMS value of the wave applied to the transducer is 8% smaller, resulting in a lower excitation amplitude and causing the reception signal to be more noisy and of lower intensity

Sounds suspiciously like magnetic magic, I get the transformer's magnetic field will resist the change in current flow but not how the zener is bumping the voltage up in combination with it. Tried simulating it (see attachment) but didn't see 13V... to many unknowns. Certainly the output transformer voltage didn't ramp up very fast.
 

Attachments

  • PzTransformer.txt
    1.1 KB · Views: 2
Could the noise really be so bad they'd need 213 mV at the receiver? After all, AM/FM is in the μV; if your using an amplifier that just seems crazy... is this what happens when you put 7 EEs in a room? I need to re-read that several more times....

Maybe. Maybe also for convenience; when you don't want to have amps and filters and take the time to tweak all that perfectly right to get your signal out of the noise you just improve the SNR right at the transmitter ;)

Wow, can't really compare that to radio/TV signals, that's a whole another can of worms with some black magic in it... ^^
Didn't mean to imply you were old, and I do understand what you mean... beauty is in the eye of the beholder and and the artistry of something tangible is far more evident then something intangible like s/w (which far to often isn't very pretty at all).

Yea don't worry, it was just that I wrote it in an ambiguous way so I thought it was a good idea to be more clear ;)

They're using the STM32F429 180 MHz chip, so that's 6 ns/cycle and should be fast enough for 1 mph wind speeds deltas.

Be careful about using the base clock for that kind of things, sometimes you can have big surprises.

R5 and C3 allow discharging the energy stored in the transducer.

I'd say it's more a resonant circuit than anything else. You can omit them at the cost of the efficiency.

Then there's D2 is a zener diode and it causes the voltage induced by the primary of the transformer during its unloading to be 13 V? They say:

Yep, remember the old ignition coils with the mechanical contacts? they used a capacitor to avoid pitting them too fast, here they use a zener to avoid destroying the driver and/or MCU instantly ^^

Sounds suspiciously like magnetic magic, I get the transformer's magnetic field will resist the change in current flow but not how the zener is bumping the voltage up in combination with it. Tried simulating it (see attachment) but didn't see 13V... to many unknowns. Certainly the output transformer voltage didn't ramp up very fast.

It doesn't bump up the voltage, it's the opposite, it limits it. It's the same thing as why we put a diode in anti-parallel on a relay coil when it's driven by some electronics ;)
 
... Yea don't worry...
I just don't want to offend my sensei as I struggle towards circuit nirvana ;-)

...It doesn't bump up the voltage, it's the opposite, it limits it. It's the same thing as why we put a diode in anti-parallel on a relay coil when it's driven by some electronics ;)

I was just questioning what the 7 EEs said:
...component D2 is a zener diode and causes the voltage induced by the primary of the transformer during its unloading to be 13 V.
According to them it's very important as it gives an 8% signal boost.

Although that's not what I saw when I tried to simulate it; but I'll look at it again soon and see if I can figure it out. They've got a separate driver to protect the MCU. I can't help but wonder if they didn't throw in this as a crazy bit just to see if anyone was reading it.
 
Last edited:
According to them it's very important as it gives an 8% signal boost.

That makes sense as you keep the current flowing with D2 (current stored as the magnetic field).

Although that's not what I saw when I tried to simulate it; but I'll look at it again soon and see if I can figure it out.

You need a simulation who account for every effects for it to be accurate.
 
...That makes sense as you keep the current flowing with D2 (current stored as the magnetic field)...

From their experimental data the voltage from the transformer (inductor kickback) as the field degrades must initially be about 1V to get them to a total of 13V. I'm assuming D2 is some fairly low voltage and it's purpose is just to ensure current flow does stop at some point so the field dies and voltage on the far side goes all the way to 0.

This is where it would be nice to have an oscilloscope to see how different values of D2 affected the low side and if adding an inductor might help with the high side.
1600435205350.png
 
Yep.

But honestly that's not really needed, a standard flyback diode would be good enough and simpler ;)
 
Back around post #16 there are some ways to try and calculate the time the signal takes. There's a couple of methods, but they all were based on measuring the pitiful voltage created by the receiver from the incoming sound pressure waves.

The three approaches in this paper are similar:
  • increase the transmit voltage to 120V
  • filter the receiver signal
  • amplify the receiver signal
Like post #16/17 they're dependent on a strong receiver voltage being induced to trigger the stop time accurately.

But do you really need to do that?

The whole reason to boost the transmitter voltage is to create enough
sound pressure so the receiver creates enough voltage to measure.

But suppose you needed just enough sound pressure to get the receiver
to vibrate at the correct frequency and didn't care about the output
voltage it produce?

From the datasheet, we can see at the resonant frequency the impedance
of the transducer drops to 500 Ω. A circuit that measures the impedance
might provide a more accurate stop time, not need filtering, not
need amplification, and not need as much incoming sound pressure.
1600521273085.png

Update: This won't work like I was thinking!
Turns out I didn't actually understand impedance. That's okay... deepening my understanding is a part of the journey.
So, where did I go wrong? It was thinking AC is like DC, that once the sound frequency was correct the resistance would be set and could be measured. While true, the "rub" is in the measuring. You can't just apply a bias DC current as a DC current won't be passed despite the sensor "ringing" (that is DC still has open-circuit resistance). If you use AC current, then whatever frequency you use will see the expected resistance of that frequency. Pretty evil, right? To add insult to injury, the MIT Understanding Impedances considers this to be something high schoolers should know. <sigh ;-)>
 
Last edited:
But suppose you needed just enough sound pressure to get the receiver
to vibrate at the correct frequency and didn't care about the output
voltage it produce?

Well the problem is anything exciting the transducer will mess your reading (first thing that come to mind is bats).

But you can compensate low levels with good filtering. It's always a balance and a compromise, if your prefer to do filtering than upping the voltage then do that. Of course there's a limit and you can't fix a SNR of 1...

From the datasheet, we can see at the resonant frequency the impedance
of the transducer drops to 500 Ω. A circuit that measures the impedance
might provide a more accurate stop time, not need filtering, not
need amplification, and not need as much incoming sound pressure.

Yeah but it's not resistance, it's impedance, which means you need to give it some AC signal to mesure it. This graph is mostly used for the transmitter side because impedance changes can mess with your driver (same problems as with loudspeakers and amplifiers in the audio world).
 
I found a "reconditioned" replacement anemometer for $18 from the manufacturer based on your idea in post #4 ... but this still seems like a cool project so whenever I get a few minutes waiting on something else I delve into it. Possibly someday I'll actually build one.
It died... fortunately just the batteries... although the panels are a bit dirty.... so, going to haul the hose up for a quick rinse... ?
 
Just thought I'd add a reference to a company that builds kits for weather stations based on Raspberry Pi: https://www.switchdoc.com
Not great quality anemometer or wind vane but is nice that you can easily add your own sensors even ones that don't come with the kit.. and easy to get the data to the internet. Also a big bonus that the software for it is all open source.

This one is also interesting; an atmospheric infrasound monitor: https://raspberryshake.org/products/raspberry-boom/
 
An alternative approach might be a set of wings attached to a strain gauge to measure lift force. Got the idea from:
GQ4WH.jpg
We have a weather rock too. When the ice melts I'll share a picture. ;)
 
We get high and gusty winds. Something with moving parts, even the chain, would wear out way too fast. Have you seen this product completed?
Nope.

But there's a number of store-bought versions you can buy, they're popular on salt-water craft, the National Weather Service is choosing ultrasonic sensors as opposed to mechanical ones.

As the theory and mechanics seem fairly simple, I don't see any reason why a DIY version wouldn't work.
 
Two year follow up report...

So, rather than DIY I shelled out and purchased an EcoWitt Wittboy back in 2022. It's worked well and most importantly didn't die after it's first year as every outdoor weather station before it has. It's even still on it's first battery. AFAIK, the solar has kept the capacitor charged to where it's never needed to use the battery.
1714743091693.png
Pretty sure batteries won't leak unless the voltage goes down, but given the salt, humidity, and heat thinking I might want to replace them anyway.

Temperature, humidity, and pressure seem to be spot on. It's harder to say how accurate the wind and rain gauge actually are as sometimes they agree with other local weather stations and sometimes they don't.
1714743588956.png
It's accuracy goes down as windspeed picks up, so hurricane wind speed reports might be dubious, but for what we normally see day to day it's pretty good.

The haptic sensor range guage seems to do a pretty good job when compared to my other range gauge (how much water collects in the trashcans), but doesn't exactly match the "official" reports. My wife gives me grief because I keep confusing the rate with the amount ; -)
1714743997973.png

Solar seems pretty good, but I think it's a little too good in cloudy conditions. But at least I can tell when the panels have become pollen coated
based on comparing their output to the input.
1714743474464.png



So, all in all I'm pretty happy with the no-moving parts and solar powered system.
 

diy solar

diy solar
Back
Top