Author Topic: IT LIVES!  (Read 639 times)

0 Members and 1 Guest are viewing this topic.

Offline JohnG

  • Member
  • *
  • Posts: 30
IT LIVES!
« on: August 11, 2017, 08:03:48 PM »
As the subject line suggests....

IT LIVES!!!!!!

Next step is to check T and RH against the refrigerator, if I can get the I^2C to read over wiring that long ;)

Elevation is approximate, but close enough for a DIY non-scientific instrument.

 [ You are not allowed to view attachments ]
« Last Edit: August 11, 2017, 08:11:31 PM by JohnG »

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #1 on: August 12, 2017, 09:36:54 AM »
Yes it does, actually a terminal session from a python script.

This is still a manual process with the anemometer and tipping bucket rain gauges still DOA.

Goals for the weekend are to get a script that will run on a timer and *hopefully* get the WS and Rain sensors reading correctly.

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #2 on: August 26, 2017, 09:52:20 AM »
UPDATE:

Anemometer LIVES!!!!

So as of TODAY, I have a weather station that will report from ALL of the following sensors (all I originally planned on)!!!

I^2C:
Temperature
Relative Humidity
Atmospheric Pressure
Wind Direction (bearing)

GPIO Digital Inputs:
Rain Gauge
Anemometer

In the spirit of full disclosure, these do not all report out by running a single program, but hopefully by later this weekend, I can get that figured out.  The sensor are also not yet installed in the station as I am completing this project in a step-based manner.  The physical station will come after the software is working to my liking.

Any suggestions for clock?  How important is it to have a Real-Time clock????  Why not use internet time?
« Last Edit: August 26, 2017, 09:55:28 AM by JohnG »

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #3 on: August 26, 2017, 01:59:18 PM »
Thanks.

I have an I^2C board with a RTC on it and discovered this morning that the address is different than the documentation I got with it, so I might be able to make it work.

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #4 on: August 26, 2017, 10:32:20 PM »
More "living" sensors!!!!  \:D/ \:D/ \:D/


Currently, I can get data on:
BME-280: Temperature, RH, Pressure
HMC5883L: Wind Direction (compass)
Accumulated Rainfall for 24 hours <<< New TODAY!!  \:D/
Wind Speed (kph) <<< New in past 24 hours (will convert to mph tonight) \:D/

I also have the weather vane designed, will update other thread with photos of it.

Tomorrow's work: Try to get all the sensors reading in one program.  ](*,)

Also, apparently the RPi will use "internet time" when Wi-Fi connected, which this will be 24/7 so the RTC not working should not be an issue.

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 698
  • K2BIG
Re: IT LIVES!
« Reply #5 on: August 27, 2017, 07:20:11 AM »
If you are putting the Pi outdoors, how about adding a cheap GPS module and configuring ntpd to use that as a time source to sync with?  In for a penny, in for a pound.....
WU Gold Stars for everyone! :lol:

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #6 on: August 27, 2017, 10:30:22 AM »
I considered that option, but low power GPS receivers are in the $40 range and do not provide more accurate time, except when the power is out and there is no internet time.

Since the magnetometer was $7 and that gives me direction, I see no *real* pressing need for a RTC at this time.

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #7 on: August 27, 2017, 08:21:37 PM »
/devious and malicious voice

Why, Yyyyeeesssss, yes I do!

/off

In other news, ALL sensors are reading and doing so correctly, but not all at the same time nor in the format I would like.  Continual WIP.

BTW, RTC is now working as well, do not know what I did/undid that "fixed" it :shrug:

I also performed a much more cautious thermometer calibration than the first time.  Initially, I thought the thermometer deviation from actual was non-linear.  Glad I retested more carefully, within my old eyes ability to read a 1" diameter mechanic's thermometer, it reads 4*F low at 32* and at 212* (28* and 208* respectively).  Given this more accurate deviation, I was able to really drill the calibration of the BME280's temperature readings down.

Based on local Wundergound reports, I think I will have the most accurate non-scientific station.

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #8 on: August 28, 2017, 08:23:55 AM »
Waayyy too late last night, or this AM depending on your perspective, I figured out how to pull the data from all the sensors into a common thread/program.

Which ever input sensor is enabled (so far only one at a time works due to timing), that data is displayed in a common program to all sensors.

Basically I have a master program, "Weather Reporting" that calls the outputs of each individual sensor array vie their respective programs and displays it.

YEY!!!!!

Offline Phil23

  • Contributor
  • ***
  • Posts: 124
    • Phil's Backyard
Re: IT LIVES!
« Reply #9 on: August 28, 2017, 06:32:30 PM »
Hi John,

There's an interesting weather station build over on "The Back Shed".

It's using a PIC32 loaded with MMbasic firmware.
Basic chip is a few bucks & and all up board with a touch screen can be had for around $30+ US.

The code may offer a few suggestions as the Basic reads a lot like Python & it's not hard to work between the two.

Have a browse about & search weather etc.

http://www.thebackshed.com/forum/forum_topics.asp?FID=16&PN=1

Cheers

Phil.

Offline JohnG

  • Member
  • *
  • Posts: 30
Re: IT LIVES!
« Reply #10 on: August 28, 2017, 09:33:05 PM »
Thanks Phil, they have some very inventive fellows on that site.  But as I was reading thru the weather station topic, I saw HEX.... which sent me running to the corner to huddle up in the fetal position ;) 

After a few minutes to recover, I'm all better now :)

I spent some time and performed the magnetometer calibration.  In the beginning.... the readings were off from -0.3 deg to +6.0 deg.  After calibration the errors range from -0.26* to +1.56*.  This is far more accurate than any "smart phone" I tested it against, both in terms of absolute accuracy and repeatability.  It is also, most certainly, more accurate than any of the three old school compasses I compared it with.

This took three passes and I think there is more accuracy to be had, but will require at least double the previous effort for 1/10th the improvement; hardly passes the "cost-benefit" test.

Offline Phil23

  • Contributor
  • ***
  • Posts: 124
    • Phil's Backyard
Re: IT LIVES!
« Reply #11 on: August 29, 2017, 04:14:21 AM »
Thanks Phil, they have some very inventive fellows on that site.  But as I was reading thru the weather station topic, I saw HEX.... which sent me running to the corner to huddle up in the fetal position ;) 

After a few minutes to recover, I'm all better now :)

Don't be too concerned about the lumps of HEX,

It was probably stuff that can be done without. Probably was for fancy graphic gauges.

The only other times you use HEX is to add additional Fonts for the touch screen.
Bit like this, but you just paste the block in at the end...

Code: [Select]
    ' Font: Hom_16x24_LE
    ' Includes all ASCII characters
DefineFont #2
  5F201810 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000 00000000 80010000 80018001
  80018001 80018001 00018001 00010001 00000000 80010000 00008001 00000000
Reading Temp & Humidity from say a DHT22 module, connected to pin 15 is just code like this,

Code: [Select]
HUMID 15, temp, humidity
PRINT "The temperature is" temp " and the humidity is" humidity


Cheers