Wind data logger

TheMerovingian, Fri Feb 05 2010, 10:14PM

In attempt to rationalize and determine if a given site is fit or not for wind power generation I figured out how to design a system to log the wind speed without the aid of a PC, with solar powering for set-n-forget applications.

I have thought about two possible systems:
-Storing values in a on-board flash memory and downloading it through RS-232 or USB (limited memory and need to design a software to download the data)
-Storing value directly in a SD/MMC memory card (FAT16, max 2GB) in text files readable by excel or origin

I chose the second route mainly because the larger memory space available, the low cost of SD/MMC cards and the ease of interfacing it with a pic microcontroller via SPI interface.

I have already design the hardware and the software for the project and it is in final stage of construction.

Parts:
PIC18F2550 microcontroller
DS1307 real time clock
74HCT125
4050N
LCD 20x4 display with backlight

Wind speed sensing is performed by counting the pulses of the rotation of the anemometer shaft (corresponding to a particular wind speed)

Features:
-Unlimited sampling point capacity (limited by memory of the card and by the importing limit of excel or other softwares)
-Real time quartz clock independent from microcontroller and with separate backup battery
-Programming interface through LCD display
-Sampling and programming control
-All adjustments and calibrations are done through internal interface
-Sampling times: 2s 5s 10s 15s 20s 30s 1m 2m 5m 10m
-Auto reset after 3 SD card errors
-Auto recovery after blackouts/errors
-m/s kmh and knots units selectable
-FAT16 formatted card compatible
-Software controlled PWM backlight
-Low power consumption

I will test it in lab and then in an of-field application fed by a 12V SLA battery charged by a 5W solar panel.

More updates to come
1265408047 14 FT0 Cimg2480

1265408047 14 FT0 Cimg2481

1265408047 14 FT0 Cimg2482

1265408047 14 FT0 Cimg2483
Re: Wind data logger
klugesmith, Sun Feb 07 2010, 05:49AM

Looks like a great project. I didn't know SD cards supported a simple SPI interface -- sounds like an ideal medium for stand-alone dataloggers. Is it easy to buy SD card sockets?

How low is your "low power" goal?
Re: Wind data logger
Steve Conner, Sun Feb 07 2010, 10:44AM

Nice project! smile

Years ago I was involved with doing these wind site surveys. We used a commercial instrument just like this, except that it was made long before SD cards were invented. It stored its results to an EEPROM plugged in a socket, and would run for months off two 9V batteries.

Well, except for the time somebody smashed it open and stole the two 9V batteries. :(

SD cards mainly use a 4-bit parallel interface for speed, but are required to support SPI as a fallback mode for low-end devices. It's in the SD card standard. The sockets are available from most big electronics suppliers, and probably Sparkfun too. But they're surface mount.

Another device I like is the "Vinculum" from FTDI, that converts USB memory sticks to RS232 or SPI, and has a built-in FAT32 driver. Saves huge amounts of time and effort because the filesystem driver is done for you.
Re: Wind data logger
Bjørn, Sun Feb 07 2010, 11:52AM

Futurlec has a quite nice SD card socket, but may or may not send you what you ordered: Link2
Sparkfun do send you what you ordered, but as usual they are very expensive: Link2

For most simple uses there is no need to use a full file system. You can write the data directly on the card and dump it on a PC, or you can create the files on a PC then write the data to the correct address without knowing anything about the file system.

There are also cheap Flash chips with SPI interface if you only need a few megabytes of storage: Link2
Re: Wind data logger
TheMerovingian, Sat Feb 13 2010, 08:07PM

Klugesmith wrote ...

Looks like a great project. I didn't know SD cards supported a simple SPI interface -- sounds like an ideal medium for stand-alone dataloggers. Is it easy to buy SD card sockets?

How low is your "low power" goal?


Bought mine on Link2, cheap and with on-board decoupling capacitors and pull-ups.

Bjørn wrote ...

For most simple uses there is no need to use a full file system. You can write the data directly on the card and dump it on a PC, or you can create the files on a PC then write the data to the correct address without knowing anything about the file system.

There are also cheap Flash chips with SPI interface if you only need a few megabytes of storage: Link2

The use of a "complete" file system is simpler for users that want to mess with raw data readers and so on. I make two copies of it, one for me and one for another person (it must be reliable at 200%).

About power consumption here is the table i wrote on my manual of the logger

STATE Backlight OFF Backlight MIN Backlight 50% Backlight 100%
IDLE 31.8 mA 32.8 mA 44.8 mA 58.7 mA
WAITING 31.6 mA 33.0 mA 45.0 mA 58.6 mA
SAMPLING 32.7 mA 33.5 mA 45.5 mA 59.2 mA
CARD ACCESS 41.4 mA 42.7 mA 55.5 mA 68.8 mA (low duty cycle)

the backlight goes automatically at MIN after 15 seconds (if you dont press any keys) so a realistic long-term power consumption is around 33mA , the voltage is 7.5V-16V (the 5V and 3.3V regulators don't have a heatsink)
The unit can be powered by a 2200mAh 8cell Ni-MH stack or a 2200mAh 12V SLA with a 2-5W solar panel, around 22Euros in my area)

I will post the photos after a while... wait for updates

UPDATE:
THe logger now logs also gust speed, useful to determine the survival speed of a turbine.

EDIT: (Images)


1266093695 14 FT0 Cimg2542

1266093695 14 FT0 Cimg2543

1266093695 14 FT0 Cimg2544

1266093695 14 FT0 Cimg2545

1266093695 14 FT0 Cimg2546

1266093695 14 FT0 Cimg2547



PS: I ordered many and many parts from futurlec (including the parts for two windloggers) and never had problems with them except some mistakes in the dimensions of LCD and holes spacing in the datasheets.
Re: Wind data logger
TheMerovingian, Sun Feb 21 2010, 06:18PM

Added also gust wind speed logging along with the average of wind during the integration time
Re: Wind data logger
TheMerovingian, Sun Feb 28 2010, 11:40PM

The project is in final stage, the anemometer is mounted and his sensor is potted in polyester resin (to be waterproof), and awaiting calibration. The pulses for complete rotation are 20, giving me a resolution between 0.35-0.50 Kmh for 1 second integration time
1267400413 14 FT83766 Cimg2559

1267400413 14 FT83766 Cimg2558

1267400413 14 FT83766 Cimg2557

1267400413 14 FT83766 Cimg2556
Re: Wind data logger
DivisionByZero, Mon Mar 01 2010, 03:03AM

Very nice.

I have been considering a general data-logging project using PICs, but it's terra incognita for me. Do you have any suggestions on where to start learning PIC stuff and data handling?
Re: Wind data logger
TheMerovingian, Tue Mar 02 2010, 11:25AM

hmmm let me think. Most of the data and information comes from the datasheed, as each PIC is different from the others. For the rest, since i used PicBasic, comes from the picbasic manual. I started with PIC16f84As lighing leds and so on, then moving on more and more compicated things (such as coilgun timing, ADC etc)
Re: Wind data logger
TheMerovingian, Sat Mar 20 2010, 03:55PM

Final assembly of the system

1269100506 14 FT83766 Cimg2591

1269100506 14 FT83766 Cimg2592

1269100506 14 FT83766 Cimg2593

1269100506 14 FT83766 Cimg2595
Re: Wind data logger
TheMerovingian, Thu May 13 2010, 10:48PM

UPDATE

THe previous windlogger was released in the final version (some minor bugfixes, but now it is complete).

New windlogger:

This time i use the PIC18F2680 64Byte microcontroller for more memory and code space.
New features:

-16Bit trigonometry (with some functions working with 32 bit inputs, such as SQRT and ATAN2) for accurate average wind direction calculation
-10Bit windvane based on the AS5040, PWM output (second order low pass filtered) read by the PIC18F... onboard ADC, indicated both in the angular form and text form (eg NE, SW, E, etc)
-Logging minimum wind speed and standard deviation of the samples within the samplig period in addition to wind average and wind maximum
-Supports transfer function in the Y=M * X + Q format (the previous version worked only with Y = M * X, giving some errors at low wind speeds), future version may support polynomials(?)
-Support all the characteristics of the old program.




1273790900 14 FT83766 Cimg2737

1273790900 14 FT83766 Cimg2738

1273790900 14 FT83766 Cimg2739

1273790900 14 FT83766 Cimg2740

1273790900 14 FT83766 Cimg2741

1273790900 14 FT83766 Cimg2743

1273790900 14 FT83766 Cimg2744
Re: Wind data logger
Pankaj Patel, Sat Oct 30 2010, 02:41PM

TheMerovingian can you post the schematic and source code of your project.
Re: Wind data logger
101111, Sun Oct 31 2010, 04:55PM

I like this project, keep on the good work.