Вы находитесь на странице: 1из 5

Weather data collection system

Purpose
A site survey for a proposed wind turbine electricity generator should include an assessment of the available wind energy. This system measures wind speed and direction near a possible turbine site on Hermit Island, BC, Canada, using a hobby-grade meteorological instrument and data logging computer. Analysis of the time-series data can produce summations of available energy in kilowatt-hours, and wind roses which show the distribution of wind speeds and direction in the interval. The site is off the electrical grid, has no landline access and is poorly covered by cellular networks. Consequently, the electrical power source is a solar cell - lead acid battery system providing 12vdc and limited watt-hours. The data logging computer uses about 12w, too great a load on the power system if running 100% of the time, so the software scripts described and listed below cause the computer to hibernate for all but 5 minutes of every two hours. The hibernating load is about 0.3w.

Hardware
Meteorological observation instrument La Crosse WS-2308 weather station wireless base station display which gets observations automatically from the instruments: anemometer, hydrometers (indoor/outdoor), thermometers (indoor/outdoor), barometer, rain gauge Instrument mast a guyed, 10m (32mm OD) steel pipe on the high rock beside the sundeck. Power supply 6x15w pv panels Sunforce 50048 Xantrex Solar Charge Controller 12V 12A C12 2 x 6v Trojan T105-RE deep cycle lead-acid batteries DC-DC buck boost voltage converter, 2a Data logging computer Intel Desktop Board D945GSEJT mini-ITX 12v Kingston 30GB SATA solid state drive Mini-box M350 enclosure with PS/2 and 9-pin serial connectors PS/2 keyboard with a sleep key

Software
Windows XP Pro SP3 Heavy Weather data manager Real VNC remote desktop server (weather computer) and listener (laptop) Wakeup On Standby wosb.exe (thanks, www.dennisbabkin.com) pskill, a utility from PsTools 05 January 2012 Sid Tupper 1

Weather data collection system


Operation
The instruments are on the mast by the sea, about 50m from the house. The wireless radio in the instrument case communicates with the base station in the house. The base station communicates with the weather data logger computer over a serial connection (COM1). The computer is headless, ie, has no monitor or mouse. The keyboard just provides a sleep button in case Remote Desktop manipulation of the Turn Off Computer / Hibernate button doesn't work. The computer software configuration controls data acquisition from the base station as follows: When the computer reboots, the start.bat startup script runs cycle.bat and then puts the computer into hibernation mode. cycle.bat runs wosb.exe (WakeUpOnStandby) which schedules the cpu to wake up from hibernation in two hours and at that time run getmetrecords.bat. getmetrecords.bat runs cycle.bat to reschedule a cpu wake up in two hours. Then it starts heavyweather.exe to download data from the base station through the serial port. It starts a thread to stop heavyweather.exe after 5 minutes, which is enough time to get all of the data from the base station. When heavyweather.exe stops, the script checks if a memory stick is plugged into a usb port, and if so, writes the whole current data file to it. It checks if the time is near midnight and if so, reboots the computer; otherwise it puts the computer into hibernate mode.

Operating Procedures
In principle, the system runs unattended indefinitely, except for maintenance and taking data . Starting connect the DC-DC converter to the power bus connect the computer to the DC-DC converter connect the base station cable to the serial socket and the keyboard to the PS/2 socket press the power button on the faceplate to start the computer System health check the battery charge controller LEDs indicate at least 12v (no more than 2 red LED blinks) the DC-DC converter red LED is lit the green LED inside the computer enclosure is lit once every 2 hours the blue LED at the computer power switch stays lit for about 5 minutes values on the base station display are not missing or grayed-out Maintenance Every 6 months, check the 2 AA batteries in the instrument case by the sea, and the 2 AA batteries in the base station. If the battery voltages are less than 1.5v, replace them with Lithium Ultimate batteries. Alkaline batteries lose voltage as the temperature approaches freezing, and the system fails. 05 January 2012 Sid Tupper 2

Weather data collection system


Every 6 months, check the electrolyte levels in the lead-acid batteries and replenish if necessary with de-ionized water. Every three months, condition the batteries by connecting the battery charger at 15a and running the generator for 15 minutes.

Taking data Wait for a time when the weather computer isn't going to wake up during the next 10 minutes. Put a memory stick in a USB port on the weather computer Connect a laptop, with Real VNC Listener on it, to the weather computer, using a cross-over cable between the Ethernet ports. Turn on the laptop, and when it's booted and stable, press the power button ONCE on the weather data logger computer to wake it up. Run Real VNC Listener addressing the weather computer as 192.168.10.110 to manipulate the weather computer desktop on the laptop display. On the weather computer desktop, start the heavyweather software by clicking on its taskbar icon. Check that heavyweather begins to download data from the base station. Click on the Show History button, and then when the History window comes up, click on Save as Text, and use the Open dialogue to save the data in a file on the memory stick. Still in the History window, click on Change Settings and check that the History Period is set to 0 Hours 1 Minutes, ie, data interval = 1 minute. This software has a nasty habit of resetting the interval to 1 hour. Set Next Data Set in: to a minute. Stop heavyweather. Make sure the WOSB window shows that a download event is scheduled. If not, reboot the weather computer. Otherwise, on the remote desktop, click on Start, Turn Off Computer. Hold the shift key down and click on the Standby button to hibernate. Remove the Ethernet cable from laptop immediately because otherwise the weather computer will wake up again spontaneously. The sleep button on the keyboard puts the computer into hibernation too. The blue LED behind the power button goes off in hibernation. Remove the memory stick and check for data anomalies with Excel on the laptop.

Notes
Although the weather computer boots very quickly (< 20 seconds) because of the speed of the SSD, it takes minutes to shut down or hibernate. WOSB might have something to do with this.

Behavior of power button


Computer state off on hibernating

Computer outcome on off on

A memory stick in a USB port doesn't reliably get named E: so the script that tries to write to that device may not succeed. The BIOS is set to boot the computer on power up, but it doesn't.

05 January 2012

Sid Tupper

Weather data collection system


Scripts
start.bat REM Startup script to run the acquisition scheduler after reboot and hibernate. REM REM Sid Tupper 24-Oct-2010 @echo off echo "%date% %time% starting after reboot" >> "C:\Documents and Settings\sid\My Documents\HeavyWeather\log.txt" start "" "C:\Documents and Settings\sid\My Documents\HeavyWeather\cycle.bat" wosb /hibernate exit cycle.bat REM schedules the next met data acquisition, relative to now() REM REM Sid Tupper 24-Oct-2010 @echo off start "" C:\WINDOWS\system32\wosb.exe /run /ami tm="+2:00:00" file="C:\Documents and Settings\sid\My Documents\HeavyWeather\getmetrecords.bat" exit getMetRecords.bat REM Scheduled script to download met data @echo off REM REM 1. schedule the next download REM 2. start the download program, heavyweather REM 3. wait five minutes REM 4. stop heavyweather REM 5. if USB memory stick installed REM write weather data to it REM update .bat files, if any REM 6. if near midnight then reboot REM else hibernate REM REM Sid Tupper 08-Jun-2011 start "" "C:\Documents and Settings\sid\My Documents\HeavyWeather\cycle.bat" start "" "C:\HeavyWeather\heavy weather.exe" set /p var=<counter.txt set /a var+=1 05 January 2012 Sid Tupper 4

Weather data collection system


echo %var% > counter.txt echo "%date% %time% %var% starting data download" >> "C:\Documents and Settings\sid\My Documents\HeavyWeather\log.txt" sleep 300 pskill -t "heavy weather" if exist e: copy /y C:\HeavyWeather\*.dat e: if exist e:\*.bat copy /y e:\*.bat "C:\Documents and Settings\sid\My Documents\HeavyWeather\" echo "%date% %time% %var% ending data download" >> "C:\Documents and Settings\sid\My Documents\HeavyWeather\log.txt" set /a flag=0 if "%time%" GEQ "19:00:00.00" set /a flag=1 if "%time%" LSS "21:00:00.00" set /a flag+=1 if %flag% == 2 ( wosb /closeall echo "%date% %time% %var% rebooting" >> "C:\Documents and Settings\sid\My Documents\HeavyWeather\log.txt" shutdown -r -f -t 01 ) else ( echo "%date% %time% %var% hibernate" >> "C:\Documents and Settings\sid\My Documents\HeavyWeather\log.txt" wosb.exe /force /hibernate ) exit

05 January 2012

Sid Tupper