Over the last year or so I’ve been working on a lightning sensor system for my weather station. I originally found a circuit published by Charles Wenzel that I thought looked interesting, and I decided to give it a try. The circuit worked quite well. So well, in fact, that it picked up lights turning on and off around the house. It also goes wild when the stove-top in the kitchen is used. I guess the stove has a noisy PWM circuit or something. I made a PCB for the circuit, and integrated it into my weather station and have let it run for a few months now.
As the summer draws near a flaw in this design has presented itself. The flaw is severe temperature instability. Hotter temperatures increase the sensitivity of the system, and on hot days the thermal noise of the circuit causes a significant amounts of false triggers. This will be addressed in an upcoming design change in an attempt to reduce the number of false triggers.
The event on May 4th was an actual lightning storm and strikes were observed by persons in the area. Note the large drop in barometric pressure preceding the rise in lightning strike counts.
Now that we’ve made some initial design choices about how the signals will be routed in the design, it’s time to start nailing down some of the finer details. But first, before getting into too much detail about the receiver design, let’s take a moment to survey the signals that we intend to receive using an oscilloscope:
We can see both the transmitted and received signals using the simple test setup shown in the photograph below. In the final design the transducers will be much farther apart in order to minimize airflow disturbance.
The received signal will be much weaker in the final design due to the increased spacing between transducers. Amplification will obviously be necessary. This leads us to the design of the first stage of the receiver.
The incoming signal from the transducer will need to be amplified to account for the losses incurred during the waves journey through the air as well as the losses incurred in the transducers and multiplexer. Based on some rough oscilloscope measurements, we will need around 35dB of gain to amplify the 50mV signal that will reach the amplifier to get a 3V signal that we can then send on to the two processing stages. In order to make the circuit more immune to self-oscillation and to increase flexibility I will split the amplifier into two stages.
For the initial amplifier stage I have chosen to use a multi-feedback (MFB) band-pass topology. This topology will use an op-amp to both amplify and filter the incoming signal. The gain of the first stage will be fixed at around 20dB. I’d like to have a Q of approximately 5. This is a trade-off between amplifier ringing and filtering ability. The transducers themselves have inherent filtering ability since they are tuned, thus, anything above 5 does not seem necessary at this point.
For the second stage I have chosen a basic inverting topology, whose gain could be easily adjustable by changing a resistor or using a potentiometer. I have drawn the second stage with about 20dB of gain. This will likely be adjusted later, but should be close enough for now. If the system ends up being too sensitive simply varying the output drive a few Hertz away from the resonant point will reduce the sensitivity without the need for any adjustments to the circuit. The output drive frequency is very easily modified in micro-controller firmware, and may end up as part of a calibration/initialization routine in the future.
It’s not yet clear to me weather or not separate bias circuits will be necessary, so I’ve included two at this point. The SPICE simulation doesn’t seems to show any adverse affects, but because there is a signal path to the bias circuit in the first stage, I’ve chosen to have another isolated bias circuit in the second stage just to be sure. I’ll find out later if this was over-kill (a colleague and I have a running joke that ‘over-kill’ is often ‘just-the-right-amount-of-kill’). The SPICE simulation shows results as expected, with just under 40dB of total system gain, and a nice peak at around 40kHz.
Over the Thanksgiving holiday I was on vacation with family in Spokane where I installed an improved remote weather station. This entire operation is mainly a learning experience, but at the same time offers significant insight into the trends and patterns in the weather. The objectives of this mission were to design and build a weather station that offered accurate and precise weather reporting, in an package that could be deployed without too much difficulty at multiple locations around the world.
The foundation of the system is the processor board I recently finished: the QI2C485. I’ve been working on this board for a few months and after about 5 different revisions, I’ve finally completed the development of this board. The system was installed in Spokane. Following a few rounds of firmware adjustments and tweaks it has been successfully collecting data for a few days now.
Modularity was always on my mind when making this device. The main processor board (QI2C485) provides a lot of flexibility in this sense. It is essentially a RS485-I2C bridge, that has 2 I2C ports and 2 RS-485 ports. The RS-485 ports allow the board to be mounted a significant distance from any artificial heat sources, or other things that might affect weather readings. The I2C ports allow multiple sensor boards to be connected. Currently, a BME280 is connected to one of the I2C ports and is programmed to make temperature, pressure, and humidity readings every 15 minutes.
In the future, a combination brightness sensor and thermopile will be installed in the second port to make sky observations used to determine cloud conditions. Also in the works are wind speed, and rainfall sensors. The modularity of the process board will allow for easy addition of these sensors in the future, requiring only firmware modifications. The second RS-485 port on this board is designed to either terminate the RS-485 line, or allow it to pass through to other QI2C485 boards.
The QI2C485 host also includes a lightning detection circuit that will count electromagnetic pulses in the vicinity. All of this information is uploaded via a php script to an SQL database where it is currently stored for access later. It can be displayed via a php page on my website that is currently under development.
The future will likely hold an additional revision, and added modularity, but for now the current design will undergo a full test for the remainder of the cold Eastern Washington winter.
It wasn’t until the last few years that ordering small-batch printed circuit boards became so affordable for the average low-budget hobbyist. Over the last few years several US and Chinese companies have sprung up that cater to the small quantity of circuit boards that a hobbyist usually needs for their projects.
One of these companies is OSH Park. OSH stands for “Open Source Hardware”. OSH Park is based in Portland, OR where members of the local maker/hobbyist scene founded Dorkbot PDX, which grew into a PCB service, and eventually OSH Park.
The nice things about OSH Park is that they have no setup cost. You pay a flat $5.00/sq in. for your circuit boards. They send you three copies of the finished product with free shipping about two weeks after you submit the order. The result is a nice quality purple PCB, with gold plated pads.
I’ve been using them both at work for cheap prototyping, and at home for my own personal projects. This particular board is part of a weather station kit that I’m working on. More info will follow when it’s closer to being complete.