Cheers Troy. I've now completed the bulk of what I was hoping to do with this. VB has provided a lot of extra flexibility that was difficult to do in Processing so it was worth the effort.
Here are my near final screen shots (all still using dummy random numbers for testing).
Last edited by peter_4059; 17-01-2020 at 10:05 PM.
Put the finishing touches on this tonight. I've added the ability to log some basic data to a text file that will help me refine my cloud model. I've also compiled my first version into an exe file and it works
Kudos again Peter for a great project.
I think you'd be well over Boltwood if charging labour by now?
Cheers Rob. That might be so however it was all about learning Arduino, Java and Visual Basic rather than trying to do it cheaper than a Boltwood. I also think this does a lot more than the Boltwood does.
Cheers Rob. That might be so however it was all about learning Arduino, Java and Visual Basic rather than trying to do it cheaper than a Boltwood. I also think this does a lot more than the Boltwood does.
And you can improve it, repair it, etc as you need as time goes by
Code now transferred to the observatory PC and all hooked up to the real sensors tonight. Log file and Obs Conditions text file both working as is connection to SGP Observing conditions.
Now I will focus on collecting data to refine the cloud model.
Last edited by peter_4059; 17-01-2020 at 10:07 PM.
I'm wanting to embark on a similar thing, as I need to automate more so I can get some sleep at night, and close the observatory if there is bad weather.
I'm looking to build something like yours, but you also changed a lot of things along the way. Have you "settled in" on the final hardware items?
Also, where did you find the boltwood one-liner specification?
I have a cheap-ish eBay weather station, and I think I can potentially use some of it's sensors (particularly wind speed and direction) to feed in.
Depending on the pricing of the parts though, it might end up cheaper to buy an AAG device. Not sure yet!
I've stopped adding hardware and completed my coding on this project for now. I'm now focusing on collecting data to see if I can improve my cloud model further.
The document you found on the Boltwood device shows the format for the one-line file. The column positions and number formatting are important for the ascom driver to work properly. There is some test apps included with the ascom driver that create a dummy file that you can use to see the actual format of the data.
In terms of hardware items I'd suggest with the benefit of hindsight, the MLX is definitely needed. That sensor has ambient and sky temperature outputs and that is sufficient to replicate the Boltwood methodology (this is also described in that PDF you found).
I was trying to improve the prediction of cloud as I observed simple temperature difference was not particularly accurate. My model needs relative humidity in addition to sky and ambient temperature. I'd recommend bypassing the DHT for humidity as they don't have a great reputation and go for a better sensor. I went for an Adafruit SHT31.
If you want light sensing, I'd go straight for something like the TSL2591 as the LDR was much too insensitive apart from detecting daylight vs night.
If you want more info on my approach, I'd be happy to share what I've done.
I've included a couple of plots below. The first one is ambient-sky temp vs observed cloud fraction. This is the Boltwood approach. You select two deltaT's - one for clear and one for partially cloudy. Based on my observations they would be -18 degC and -11 degC. The problem with this approach is there are plenty of data points where the deltaT would suggest there is cloud when in reality it appeared to be clear.
The second plot is my current model of observed cloud vs predicted cloud. Again not perfect but I'm still collecting a data set and each iteration is improving my R^2.
Thanks for all the feedback. I’ll start collating the parts list and see how far I get.
Your last point interests me. How are you correlating the cloud cover (actual) vs readings? By visual observation?
Have you thought of doing a correlated image acquisition analysis from a camera and the readings from the sensor? I’d be interested to see the specs on the FOV of the sky sensor and see if it could be mapped to an image taken at the same time.
Thanks for all the feedback. I’ll start collating the parts list and see how far I get.
Your last point interests me. How are you correlating the cloud cover (actual) vs readings? By visual observation?
Have you thought of doing a correlated image acquisition analysis from a camera and the readings from the sensor? I’d be interested to see the specs on the FOV of the sky sensor and see if it could be mapped to an image taken at the same time.
Rob
Rob,
I'm using visual feedback to collect the actual cloud cover. I've built a data logging function in my app to collect the raw model input parameters from the sensors together with a manual cloud cover input and write that to a CSV file. The actual model development is in Excel.
Cloud cover percentage is a bit subjective visually and I assume this would also be a challenge using a camera image.
The IR sky temperature sensor that I'm using is a Jaycar XC-3704. You can download the datasheet from their webpage link:
I've been getting the occasional error in my VB version of this project. The exception text says:
************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOper ationException(ExceptionResource resource)
at System.Collections.Generic.List`1.E numerator.MoveNextRare()
at System.Collections.Generic.List`1.E numerator.MoveNext()
at System.Windows.Forms.DataVisualizat ion.Charting.ChartTypes.LineChart.P rocessChartType(Boolean selection, ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
at System.Windows.Forms.DataVisualizat ion.Charting.ChartTypes.LineChart.P aint(ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
at System.Windows.Forms.DataVisualizat ion.Charting.ChartArea.Paint(ChartG raphics graph)
at System.Windows.Forms.DataVisualizat ion.Charting.ChartPicture.Paint(Gra phics graph, Boolean paintTopLevelElementOnly)
at System.Windows.Forms.DataVisualizat ion.Charting.Chart.OnPaint(PaintEve ntArgs e)
at System.Windows.Forms.Control.PaintW ithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPain t(Message& m)
at System.Windows.Forms.Control.WndPro c(Message& m)
at System.Windows.Forms.Control.Contro lNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.Contro lNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.C allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Just wondering if anyone has experience that could lead me to a quick resolution?
I had seen that thread before and I suspect that is the cause of the problem however everything I've tried to do to fix that problem so far has not worked. I've decided to start a new thread in the software and computers forum to see if anyone with more programming experience will chime in.
I'm calling a major breakthrough on this project. Raki has come to the rescue with some thread-safe VB code that has addressed the chart update error and has also allowed me to modify other parts of the code that were a bit sus so now it is working without obvious dodgy workarounds.
I must admit I'm pretty satisfied with the project and I've learned a lot about Arduinos, Java and VB.net.
Still more work to do on the cloud model but that will be something I'll do over 12 months.
Happy to share if anyone is interested in building their own cloud detector/weather station.