Designing, and Building My Own Wind Turbine
Field Notes from Irricana, Alberta, Canada
by Steven Fahey

24 September
"Lights ON"
24 October
14 November
"Battery Test"
15 January
15 February
"Solar Panels"
5 June
"Water Pump"
31 December
1 October

DIARY ENTRY for 1 October, 2017

Datalogger Installation and Testing

Datalogger / Wild AC Tachometer Installed
First Data Output from Datalogger and Wild AC Tachometer Thoroughly pleased by the quality of the data coming out of my new datalogger. The first data collection run today didn't last long, but it is so consistent that my fears have been put to rest. The graph shows that the output is very well-mannered in Star, and some scatter when switched to Jerry (High Power) can be due to acceleration and deceleration as it was furling on a gusty day like today.

The disappointing start - 2010 - PICLog

This addition to my system has been a long time coming. Ever since installing the turbine in 2010, I have not had a reliable way to record its speed and power output. Sure, I could make spot-checks at any time, but no long-term monitoring, no performance tests, nothing. It's not like I didn't try. Early data logging efforts started with a fun idea from "Gizmo", an Australian blogger and tinkerer who created PICLog. There were a lot of problems with that datalogger. First, it was based on a PICAXE chip which requires 100% circuit board fabrication to create any useful device, but the device is not very flexible and design changes often mean you discard the board you spent 50 hours soldering together and making a new one! Another drawback of PICLog was that it didn't include a decent tachometer measurement. This one piece of the puzzle rendered most of my data useless, not knowing even how fast the turbine was turning. It took a long time and some hard thinking to figure out how to get a reliable tachometer to work with my wind turbine. Gizmo's PICLog
Old garbage data from Piclog Without a believable turbine speed, I gave up on data logging for a long time. The essence of my problem was that my wind turbine is an unregulated, unruly, wild AC generator. Worse, the current it produces is rectified to charge my batteries. When AC is rectified, the "switching" spike adds a pulse that ruins the perfect waveform, and the "clamping" to the battery voltage means that any similarity to a sinewave is lost when the peak is flattened off abruptly. Inevitably there is a lot of noise and harmonics in such an AC system. It works perfectly well to charge DC batteries, and I get more than enough energy form this wind turbine to keep them topped up!

I could have skipped the whole AC problem by installing a tachometer encoder on the wind turbine. But this solution causes many problems of its own:

First, putting an encoder on the shaft of the wind turbine means a little device up at the top of the tower, in the rain, hail, snow, ice, and sun. It had better not be fragile.

Second, the encoder would need a set of wires coming down the tower, either powered by the datalogging system or passively giving an on/off signal. Either way, skinny little wires. Looking at the wind turbine itself, which has a bundle of very heavy cables transmitting power to the ground, subject to twising as it pivots and the weight of gravity as 50 feet of it hangs from the top, adding a few skinny little wires is not such a simple idea any more.

The bottom line was that to add an encoder required adding slip rings, on a wind turbine that currently works just fine without them. No Thanks!

The theoretical perfect sine wave.  This never happens in Wild AC generators
A perfect sine wave has few features, and the rising edge as voltage passes through zero happens at regular and predictable intervals.
When fully loaded, the wave is distorted by the battery voltage clamping and the rectifier switching which causes harmonic ringing.
When fully loaded, the wave is distorted by the battery voltage clamping and the rectifier switching which causes harmonic ringing.
When transitioning from zero power to lower power, the harmonics DOMINATE the waveform.  A tachometer chip can make no sense of this.
When transitioning from zero power to lower power, the harmonics DOMINATE the waveform. A tachometer chip can make no sense of this.

Oscilloscope Plot of Typical Wile AC Noisy Waveform The solution had to involve making a reliable RPM calculation out of the messy AC coming out at the bottom of the tower, but for a long time I had no way to do it. This is not a common problem. I've never found a similar solution. On the grid, the voltage and frequency is tightly regulated, and any distortion of the sine wave is the user's responsibility to correct (known as power factor correction). When AC is well regulated, or fits nicely into certain design conditions, there are plenty of tachometer solutions out there. The LM2907 tachometer chip is one, and I certainly gave that a try, but it also failed. My isolated system has no regulation at all, just the power of the wind to drive it, and the battery charge to load it. The consequence is that the AC is all over the place. That's what it's called, by the way: "Wild AC". Common tachometer solutions do not work under these conditions. The sketches below illustrate the problem:

The New Idea - 2017 - Arduino Interrupts

After giving up on PICLog, I also gave up on the PICAXE chips, too, and turned my attention to the Arduino and other board-based DIY systems. These boards have INTERRUPTS, which stop all processing when an event happens. After learning what interrupts do and how they work, it suddenly occurred to me that 3 interrupts, that proceed in sequence, could be used to identify one complete cycle of a 3-phase alternator. I had hit upon the solution by discovering that the SEQUENCE of 3 phase power could become my RPM reference, rather than measuring any single voltage waveform. I finally had a way to prevent the spurious spikes and wiggles from interfering with the count of turbine rotations. I was so excited to try out my idea that I promptly fried my pocket digital oscilloscope! Oh well, I've always wanted a REAL oscilloscope, and picked one up from a surplus auction for 70$ last spring. Seeing the waveform under various conditions, and tuning the Arduino interrupt tachometer until it did not care what the waveform looked like, I confirmed I had a working circuit in May. After that, it was just a matter of boxing up the rest of the pieces and I'd have my tachometer at last! *

Easy to detect rising edge of sine, even a clipped sine when it does not have harmonic distortions.
Detecting the FIRST rising edge of a distorted waveform, then proceeding only after the other phases complete the same, provides a firm definition of a complete 3-phase cycle.
The truth-table above illustrates a way to force the program flow to takes steps forward as each phase passes from negative to positive, but only identify a full cycle when each phase has completed its positive cycle, and only when they occur in the right order.

Tachometer First Test with LCD Installed Well... Of course I couldn't just stop there... Once the tachometer was working better than my hopes (up to 7 samples per second!) I couldn't help myself from adding piece after piece until this thing turned into a fully-fledged data logger. The first thing I added was a LCD to continuously display turbine speed. The Arduino is so fast that instead of refreshing the RPM many times per second, it is better to sample and display an average of 10 values. The RPM updates every 1 to 2 seconds, which is still plenty responsive.

Developing the system and adding components made it obvious that a shield board on top of the Arduino was needed. I used this SEEED Studio Mega board. I concentrated the Tachometer connectors and filters into one corner of the board to allow future development of other circuits for tracking voltage and current on multiple channels. One thing the Arduino Mega does NOT lack is digital I/O pins. Once the LCD was in place, I was concerned that it would consume power when I wasn't around to look at it. Easily solved by powering the LCD off of several digital pins, and using two more to accept an on/off command from a switch. The LCD that I chose to use was the Ladyada_Adafruit RGB LCD Shield Kit which has been a lot of fun to set up. It's the one part of this project that came as a kit with instructions, hence, a learning experience for my son to solder it together.

Got fancy with the LCD, too. When the turbine is stopped, the LCD reads "STOP". When turning below cut-in speed, it turns green, and above cut-in it's blue. If the turbine is faster than 500 RPM it turns red! Actually, 500 RPM is quite normal when the turbine is switched to Jerry connection, but that's not the normal state of affairs and probably best to have a reminder if I do leave it set that way.

* Measuring current was the next challenge. I'd already taken a stab at this with my earlier data logger experiments, so I dusted off the old current sensors for another try. My previous setup had been to assemble a box with a row of curent sensor inside it, and run the power through a thick terminal block to each one.

This time I took a different view. The central box meant that a lot of heavy power wires needed to be extended to the central location, and added 4 more connections to each line. Since every connection is a potential point of failure, I doubted the reliability of this arrangement. So it seemed easier to take the box apart, and replace the sensors with connectors, and run thin data cables out to each of the sensors externally, which would be mounted on the power wires where they belonged. In the photo you can see the sensor around the upper white wire, which is the input from the wind turbine, and the data cable running away to the current sensor box.


* CAT-3 (telephone) cables turned out to be the most convenient (and cheapest) way to hook up these sensors. I will soon include a temperature sensor so that I can calibrate the current readings in the cold. As a matter of fact, it's worth pointing out that none of the data has yet been calibrated at all, except for a few bench tests to get "sane" numbers. Also some spot-checks with my clamp-on ammeter...

I am carefully including in the Arduino program steps to calibrate each sensor with linear slope and offset corrections. It's just too early to use them, yet.

Having a box to concentrate all of the current sensors maintained a distinct advantage: independent power supply. Running all of these sensors doesn't demand a LOT of power, but it does demand enough to be taxing to the main datalogger, which is already running an Arduino Mega and an illuminated LCD. The last thing I'd want would be current sensor values to dip when the LCD was turned on!

Here was an opportunity to try out an adjustable power supply, the SWADJ3 power supply module from Dimension Engineering. (I had already tried using a common LM7809 to drive the current sensors, but it overheated in about 2 minutes trying to drive 4 of them, so I went looking for a more powerful alternative.) Finding the SWADJ3 provided a rock-steady voltage supply, and I had some fun dialing in an exact voltage, and putting it through its paces to see if it is as efficient as they claim.

Yes, it is!


Testing the SWADJ3 switching voltage regulator

* *

* *

* *

1 October, 2017.