Thursday, November 20, 2014

I bought one of these - what sold me was the price, the 800x600 resolution and the 7"size.

I had a Dangerous Prototypes ATX breakout board hooked up to an old power supply, thinking that the 12 v could be supplied to the monitor. However I found that if you draw current from only the 12v supply and nothing from the 5v rail the power supply thinks something bad is happening and shuts down.

I had an radio shack wall wart power supply with multiple jack sizes that plugged in - the holes looked suspiciously the same size as the pin spacing on a screw terminal that i had - so i tried that. Voila the monitor powered up. {note to self - add picture or find link}

The second issue was even though it powered up - plugging it into the rca video gave no picture. Turns out that you had to edit the /boot/config.txt on the PI. NOOBS sets it to only work with HDMI and I had to comment out a few lines.

# NOOBS Auto-generated Settings:

#hdmi_force_hotplug=1

#config_hdmi_boost=4

#overscan_left=24

#overscan_right=24

#overscan_top=16

#overscan_bottom=16

#disable_overscan=0

Now I had video from the pie - it was a bit pixely - but entirely readable.

The arduino IDE in the GUI is larger than the screen resolution. But right clicking on the taskbar at the bottom of the screen and selecting maximize fixed that. or should i say i could now select the menu items - but editing in this mode would be impossible - So its plug in the big monitor when editing, and just use the little monitor to view output.

Opening LOCALHOST on the browser gave a perfectly readable weewx screen.

Monday, November 10, 2014

I did not want to get mired with any customization the first time around, so I decided I would always take the defaults whenever possible. After I fully understand all that got installed, I could mess things up with customization later on. Come on - you have never bollixed up a working system trying to customize it, have you. My primary goal was a simple, no fills, working system.

Make sure you have the latitude, longitude and altitude available. It will be asked for in the installation. This saves editing config files after install. I chose the Simulator driver just to get something on the screen.

Got a lot of missing warnings one of the informational messages was to do this command - it resolved all missing pieces and installed all but the python serial

sudo apt-get -f install

Installed Python serial. I will use this to get serial data from Arduino.

sudo apt-get install python-serial

Picked NGINX as my web server and installed

sudo apt-get install nginx

I kind of got stumped then - I found that the nginx had set up its root to point to /usr/share/nginx/www. Weewx was putting its files at /var/www/weewx.

I tried to set a link from one to another - but the Linux LN link documentation read like graduate physics to me - so I just edited the ngnix conf file - but not the one that is documented.

The basic conf file is located @ /etc/nginx/nginx.conf - this file loads other config files. The one that contained the root location was /etc/nginx/sites-available/default

So I edited that with:

sudo nano default

Commented out the line:

#root /usr/share/nginx/www;

added the line:

root /var/www/weewx; (the semicolon is important)

Voila the pi was serving demo pages on the pi at localhost, and from the pc @

http://pi-ip#/weather/index.html

and on my MotoX

http://pi-ip#/smartphone/index.html

So now I have all three pieces. The weather station transmitting, The Arduino inside receiving, and weewx running. Not all I have to do is get the serial data from the arduino into weewx.

Thursday, November 6, 2014

I am still working on the receiver part - but i think i have the outside part pretty much figured out.My goals are

Interface with the Sparkfun Weather instruments

Use a battery and charger to keep it running as long as possible before replacing. The well head i am using as a mounting base - is 80 or so feet from the back door. Plus i have alread tun over a previous setup's rain gauge cable - never want to do that again.

Interfacing with Sparkfun weather instrument.

I grabbed some code from here and hooked it up and tested it. The code uses interrupts to get the values from the Anemometer and Rain Gage - and relies on Millis() to calculate the values display. It is a single source Solution - and uses the most power since the the Arduino runs at full power all the time.

Power Down sleep mode turns off all the clocks and counters on the chip. I thought through many scenarios to try and figure a way to use other timing sources. One promising one is using a 32,767 watch crystal - but since i am using a pro-mini - getting to the pins was more than I wanted to deal with. Then I saw something on the forums and had a DUH moment - use the outside to gather the raw data - and do data processing on the receiver.

So far I have spent way more than a good Davis weather station would cost - and I am still not getting weather data to the web. So i am going to start all over, again. I can definately say it all has been a ton of fun so far, but it's just not what I wanted to accomplish

Its the inside part that has always been the rub. I have tried with various arduino sketches to get the data and send it out to a PC then on to the weather site. This time I am going to plug the arduino into a Raspberry PI and use weewx. Low power and always on - plugged into the big screen to look every once in a while.

Now all I have to do is conquer Python to interface the weather data to Weewx. Wish Me Luck

wwall sent me an email outlining the task at handif the sparkfun weather station is one-wire, then you can use the OWFS driver. you will have to make a few modifications, depending on the rain bucket and anemometer you use.

https://sourceforge.net/p/weewx/wiki/owfs/otherwise, you will probably have to write a driver. it is pretty easy to write a driver, and there are now many examples. first read the "porting to new weather station hardware" section of the weewx customization guide:

the first approach would have fewer moving parts, but you will need to know how to read/write serial. this is really easy to do inpython using pyserial, but if the device has odd protocol or semantics then you might have to use fctl/select, which is considerably more challenging.

the second approach would let you get something running in about 10 minutes. install weewx, then install this AcuLink driver in the user folder, then modify that driver to parse your "log file" (look for the 12 july posting with aculink.py v0.4):