Go Back   IceInSpace > Equipment > ATM and DIY Projects

Reply
 
Thread Tools Rate Thread
  #41  
Old 23-11-2019, 05:11 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
More experimentation this week. I've been researching cloud models and came across a paper that compares a number of models that predict sky temperature for clear and cloudy skies. Most of the cloud based models factor in air moisture content either as dew point or vapour pressure, something I didn't have in my home grown model.

I've been busy trying out the various theoretical models this week and have settled on a couple that seemed to fit my data reasonably well. I've now added the necessary code to my WeatherBox app. I also decided to add a more accurate relative humidity sensor to my arduino project since this is one of the key variables in predicting cloud and the DHT11 sensors don't have a great reputation for accuracy.

It's clear at the moment but supposedly getting cloudy tonight so I'm looking forward to see how the new model goes.
Reply With Quote
  #42  
Old 30-11-2019, 05:09 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
I feel like I've made some progress on this over the week. I've incorporated and tuned the literature based sky temperature models and I'm getting quite a good fit to my measured temperatures. I've got a bit more tweaking to do on the cloud model but it is also looking quite good I think.

I've also done some better colour coding for the display to change with a set of thresholds I've set.
Attached Thumbnails
Click for full-size image (Model.JPG)
52.5 KB59 views
Click for full-size image (Display.JPG)
29.0 KB59 views
Reply With Quote
  #43  
Old 03-12-2019, 10:47 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
I've made some more progress over the past few nights. I've now got a test app writing the Boltwood style single line data file. The significance of that is the existing Ascom Observing Conditions Drivers (available from the Ascom website) will read this file and pass the information to any compliant app (including SGP) so I don't need to write my own Ascom driver.

The data file is very specifically formatted (spacing of the numbers seems to be critical for it to work) so a lot of the effort is in creating a string with the data values in the right places:
2019-12-03 22:40:24.00 C K 14.0 2.0 7.0 1.0 9 13.2 3 0 0 00002 043802.94472 1 1 1 1 0 0

Next step is to link this to the actual live data.

Happy days
Reply With Quote
  #44  
Old 04-12-2019, 06:30 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
I've got my Boltwood single line data file code incorporated into my WeatherBox app and now have live data feed to SGP.

Ascom is a beautiful thing!

A bit more tweaking on the data being passed through and I'm almost done.
Attached Thumbnails
Click for full-size image (SGP.JPG)
55.6 KB45 views
Reply With Quote
  #45  
Old 04-12-2019, 08:31 PM
troypiggo's Avatar
troypiggo (Troy)
Bust Duster

troypiggo is offline
 
Join Date: Nov 2008
Location: Brisbane, Australia
Posts: 4,846
Sweet! Well done mate!

Is that cloud cover % in SGP window rounded down from your 0.7?
Reply With Quote
  #46  
Old 04-12-2019, 08:51 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Quote:
Originally Posted by troypiggo View Post
Sweet! Well done mate!

Is that cloud cover % in SGP window rounded down from your 0.7?
Cheers Troy. The Boltwood system reports Clear, Cloudy or Very Cloudy. They transpose to 0%, 50% 100%.

My app outputs % cloud cover throughout the entire range 0-100% but to use the generic Boltwood single line data driver I've had to translate my figure to their three steps for pass through to SGP.
Reply With Quote
  #47  
Old 05-12-2019, 09:04 AM
troypiggo's Avatar
troypiggo (Troy)
Bust Duster

troypiggo is offline
 
Join Date: Nov 2008
Location: Brisbane, Australia
Posts: 4,846
So the Boltwood system is a bit "coarser" than your app, and to use their ASCOM driver you end up having to dumb down your more accurate modelling. Again - well done.
Reply With Quote
  #48  
Old 05-12-2019, 09:12 AM
sil's Avatar
sil (Steve)
Not even a speck of dust

sil is offline
 
Join Date: Jun 2012
Location: Canberra
Posts: 1,474
good to see your progress with this. arduino is dead simple to get into and tinker with. I often find myself reading academic papers like you did with clouds and can get enough information to be usable to refine part of how i'm measuring and other factors to take into effect. I built a lap timer just to measure tweaks I make to my coding of an autonomous driving robot. ended up having to learn about rolling averages to smooth out sensor noise and using temp/hum measurements to make precise distance calculations across the track as my method of detecting the robot passing by (as opposed to hall sensor or laser line methods but thats the beauty too of arduino you can try all these methods and see which you find most effective for your project.) As you're finding integrating with other systems can impose limits when they only accept certain values but you have the luxury to use the true values in your own custom display while passing modified values to another system calibrated to your projects scope and observations. for example you may take values of 20% as measured and transpose those to 50% so Boltwood reports cloudy.

Plus arduino is such an easy platform to replicate. I mostly use Arduino Uno as my base boards and bought an official one which is nice and stable to use as my development board then get others from ebay which are chinese clones with often dubious construction quality. hooking parts up to the cheaper board and copying the code across and its a functional copy that should give the same results. So for your project you may want to provide the info for others to replicate your build and maybe gather test data for you to help refine your coding. or maybe not if your aim is to profitise your work rather than share. but arduino is dead easy and affordable to pretty much anyone really. there is so much information out there. grab an arduino uno starter kit from ebay and go to arduino.cc and start with simple tutorials doing simple things then tinker with ideas from there. its NOT difficult.
Reply With Quote
  #49  
Old 05-12-2019, 04:23 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Quote:
Originally Posted by troypiggo View Post
So the Boltwood system is a bit "coarser" than your app, and to use their ASCOM driver you end up having to dumb down your more accurate modelling. Again - well done.
I've had to apply their three settings to my continuous measurement for both cloud and light and ultimately the same will apply for wind. I still have the full 0-100% measurement in my desktop app however the interface via the ascom driver I'm using only has the 0%/50%/100% type options.

Quote:
Originally Posted by sil View Post
good to see your progress with this. arduino is dead simple to get into and tinker with. I often find myself reading academic papers like you did with clouds and can get enough information to be usable to refine part of how i'm measuring and other factors to take into effect. I built a lap timer just to measure tweaks I make to my coding of an autonomous driving robot. ended up having to learn about rolling averages to smooth out sensor noise and using temp/hum measurements to make precise distance calculations across the track as my method of detecting the robot passing by (as opposed to hall sensor or laser line methods but thats the beauty too of arduino you can try all these methods and see which you find most effective for your project.) As you're finding integrating with other systems can impose limits when they only accept certain values but you have the luxury to use the true values in your own custom display while passing modified values to another system calibrated to your projects scope and observations. for example you may take values of 20% as measured and transpose those to 50% so Boltwood reports cloudy.

Plus arduino is such an easy platform to replicate. I mostly use Arduino Uno as my base boards and bought an official one which is nice and stable to use as my development board then get others from ebay which are chinese clones with often dubious construction quality. hooking parts up to the cheaper board and copying the code across and its a functional copy that should give the same results. So for your project you may want to provide the info for others to replicate your build and maybe gather test data for you to help refine your coding. or maybe not if your aim is to profitise your work rather than share. but arduino is dead easy and affordable to pretty much anyone really. there is so much information out there. grab an arduino uno starter kit from ebay and go to arduino.cc and start with simple tutorials doing simple things then tinker with ideas from there. its NOT difficult.
Steve,

That pretty much sums up my experience. Have you turned your arduino projects into something more that a prototype - I'm wondering whether the sensors and interface board could be manufactured onto a custom arduino shield? I'm also happy to share what I've done if anyone is interested in giving it a try.
Reply With Quote
  #50  
Old 08-12-2019, 03:37 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
More work on the code this weekend. I've now tidied up my WeatherBox code into a series of sub routines and this has made it a lot easier to follow. I've re-configured the display to add wind and a third trend plot as I'll be adding an anemometer sensor over the holidays. Finally I've added a basic checksum to the Arduino data string to ensure the data being received by my app is the same as that being transmitted by the Arduino.
Attached Thumbnails
Click for full-size image (V7.JPG)
30.1 KB32 views
Reply With Quote
  #51  
Old 14-12-2019, 07:13 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
A bit more progress today. A trip to Jaycar to get some parts in preparation for the wind speed sensor I'm planning to add and some tests to check if the extra voltage required for the sensor can be supplied via the Arduino.

I've also been tweaking my cloud model to tune it to my local observations.

More holes to drill in the enclosure tomorrow to take in 9 or 12V feed and signal line to the anemometer.
Reply With Quote
  #52  
Old 14-12-2019, 08:24 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
Where did you get the enclosure Peter? Jaycar?
Reply With Quote
  #53  
Old 14-12-2019, 08:36 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Rob - yes all the basic stuff has come from Jaycar. I've purchased some of the sensors that Jaycar doesn't stock from Core Electronics.
Reply With Quote
  #54  
Old 23-12-2019, 05:26 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Put some finishing touches on this project over the past few days. I've now added the anemometer and adjusted the code to cater. I've also worked out how to better format some of the output to make it easier to read.
Attached Thumbnails
Click for full-size image (20191223_171925_1577085659498_resized.jpg)
99.5 KB62 views
Click for full-size image (20191223_172009_1577085657125_resized.jpg)
199.5 KB60 views
Click for full-size image (20191223_171936_1577085658821_resized.jpg)
146.1 KB62 views
Click for full-size image (V8.JPG)
30.5 KB54 views
Reply With Quote
  #55  
Old 23-12-2019, 09:32 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
Looks great.
Thanks for sharing the layout pics - very nicely organized....
Reply With Quote
  #56  
Old 30-12-2019, 07:38 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Service test of the rain sensor tonight. It works.
Reply With Quote
  #57  
Old 31-12-2019, 04:42 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
After my test of the rain sensor last night, I decided it would be a good idea to add an audible alarm to the rain detection just in case I'm not looking at the computer at the time. That turned out to be quite straight forward and I gave it a test today by manually adding a drop of water to the sensor. Everything worked as planned.

I've also done a bit of work on the Arduino code to select the gain settings for the TSL light sensor in a more robust way. It now has a day and a night mode and automatically switches between the two depending on the light level.
Reply With Quote
  #58  
Old 04-01-2020, 04:52 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Moved onto the next phase of this project yesterday. I'm re-working the PC interface in VB.net as a more mainstream and flexible alternative to Processing. Thanks to the excellent help from my good friend Chris Garbz I've now got the basic form with serial connection to the Arduino working and displaying data in boxes. Next step is to work out how to draw the plots.
Attached Thumbnails
Click for full-size image (VB_V0.JPG)
33.6 KB35 views

Last edited by peter_4059; 04-01-2020 at 06:51 PM.
Reply With Quote
  #59  
Old 11-01-2020, 07:22 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Made a bit more progress on this project today. I've worked out how to format the plots and how to create a form with tabs. This means I can reduce the footprint of the application and add some other functionality. I've added the ability to change the thresholds on the fly and also a screen showing the raw sensor values being transmitted from the arduino (these are random numbers in my test case in the attached screen shots). I'm still grappling with an error when I try to increase the number of history points that is taking some time to resolve. Any ideas on how to resolve this will be gratefully received!
Attached Thumbnails
Click for full-size image (page1.JPG)
23.0 KB25 views
Click for full-size image (page2.JPG)
36.2 KB26 views
Click for full-size image (page3.JPG)
31.7 KB31 views
Click for full-size image (page5.JPG)
27.7 KB32 views
Click for full-size image (error.JPG)
18.0 KB31 views
Reply With Quote
  #60  
Old 12-01-2020, 01:54 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Feeling quite pleased with myself this afternoon. I've managed to resolve the bug in my code that was preventing me adding extra history points to the graph. Turned out a different approach to adding data was required. I've also worked out how to flush the serial port so I don't need to unplug the arduino if I stop and re-start the code.

The majority of my remaining work list improves functionality and should be pretty straight forward.
Attached Thumbnails
Click for full-size image (plots_working.JPG)
36.9 KB29 views
Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 02:57 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Advertisement
Testar
Advertisement
Bintel
Advertisement