Go Back   IceInSpace > Equipment > ATM and DIY Projects

Reply
 
Thread Tools Rate Thread
  #1  
Old 25-10-2019, 07:56 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
Arduino Cloud Detector project

With the cloudy summer weather approaching, I decided I needed a new project. I've never really understood what Arduino micro controllers were all about so decided to investigate. A trip to Jaycar last weekend, a bag full of goodies and a few hours of youtube later I now have a basic weather station connected to the PC reporting the light, barometric pressure, relative humidity, temperature, sky temperature, dew point and rain every 5 seconds.

I was surprised at how easy it was to set up the electronics and write the Arduino code. The difficult part that I'll be embarking on next is how to display that information and potentially integrate that into Ascom.

I'm quite keen on the Grafana type visual interface however I have a lot of questions to set me on a productive path as I'm staring from zero knowledge so watch this space.

Images to come.

Last edited by peter_4059; 25-10-2019 at 09:51 PM.
Reply With Quote
  #2  
Old 26-10-2019, 03:44 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
Got it all installed in a box today. Here are some photos of the prototype, in the box and a screen shot of the com port monitor showing the output.

Next job is to work out how to write an ASCOM driver.
Attached Thumbnails
Click for full-size image (20191022_174153_1572064605937_resized.jpg)
88.7 KB167 views
Click for full-size image (20191022_174204_1572064604855_resized.jpg)
117.5 KB155 views
Click for full-size image (20191026_142226_1572064602009_resized.jpg)
95.1 KB154 views
Click for full-size image (20191026_142240_1572064602868_resized.jpg)
155.1 KB131 views
Click for full-size image (20191026_142255_1572064601307_resized.jpg)
148.8 KB147 views
Click for full-size image (20191026_142306_1572064600656_resized.jpg)
90.4 KB147 views
Click for full-size image (20191026_142321_1572064599726_resized.jpg)
123.1 KB158 views
Click for full-size image (ScreenShot.jpg)
195.2 KB178 views
Reply With Quote
  #3  
Old 26-10-2019, 03:55 PM
spiezzy
Registered User

spiezzy is offline
 
Join Date: Sep 2012
Location: Helensburgh NSW
Posts: 367
Hi Peter
well done what a project you have started I have never looked into Arduino Kits do you have any links to how this project all goes together
very interesting stuff
cheers Pete
Reply With Quote
  #4  
Old 26-10-2019, 04:27 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
Hi Pete,

I had zero knowledge of Arduino this time last week. I got the prototype up and running in eight hours so it is pretty simple given my coding experience (almost none).

All the parts I used are from Jarcar. The part numbers are:
XC3902 - Arduino starter kit (this contains the Arduino Uno, the breadboard and some hookup wires
The sensors are:
XC-3704 - Non contact IRsensor module
XC-4446 - Photosensitive LDR sensor module
XC-4603 - Rain sensor
XC-4520 - Temperature and Humidity sensor module
XC-3702 - Barometric Pressure sensor module

Once you have the parts you need to install the Arduino IDE software on the PC you intend to use to program the Arduino Uno.

You then connect the Uno to the PC via USB and start t write the code.

There are Adafruit libraries for some of the modules I used (IR module, Barometric pressure module and the Temp/Humidity module). These get downloaded and linked into the Arduino IDE environment.

The ones I used were :
Adafruit_MLX90614.h
Adafruit_Sensor.h
Adafruit_BMP085.h

The Arduino code is a form of C I think.

I've attached my code in the text file if you want to see what it looks like however I'm a novice so there might be much better coding practices than this.

Enjoy.

Peter
Attached Files
File Type: txt code.txt (3.6 KB, 122 views)

Last edited by peter_4059; 26-10-2019 at 06:38 PM.
Reply With Quote
  #5  
Old 26-10-2019, 04:32 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
Impressive start Peter. Watching with interest!
Reply With Quote
  #6  
Old 26-10-2019, 04: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
Cheers Rob. That was the easy part. I'm now trying to learn how to write the Ascom driver. I'd also like to create a pc dashboard with the data trended however I think there is a lot more to that. I've been looking at a product called Grafana that looks quite good but haven't worked out how all the bits fit together yet.
Reply With Quote
  #7  
Old 26-10-2019, 06:55 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
Be interested how you go with the ASCOM. I've never bothered to go off and research what's involved - must be some example code somewhere.

What would you write it in?
Reply With Quote
  #8  
Old 26-10-2019, 07:00 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'm currently thinking VB but could do C# if necessary. There are plenty of youtube videos and github code - the trick is finding the one that is going to be helpful.
Reply With Quote
  #9  
Old 27-10-2019, 07: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
I've got it all properly installed outside now and had a good opportunity to test this evening with heavy cloud rolling in. I think I've got the detection setting dialled in now so will be focusing on trying to write an ascom driver and/or a decent pc interface.
Attached Thumbnails
Click for full-size image (191027_fullcloud.jpg)
250.2 KB112 views
Reply With Quote
  #10  
Old 27-10-2019, 10:06 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
How does it detect the clouds Peter - the IR sensor, by temp difference?
Reply With Quote
  #11  
Old 28-10-2019, 09:04 AM
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
Yes that's correct Rob. It calculates the difference between ambient and sky temp (IR measurement) and you build a model of the temp difference for clear and cloudy. Last night was first proper cloudy night so I was able to observe the temp difference change as the clouds rolled in and then calibrate the model. Next step is to work on the pc end interface.
Reply With Quote
  #12  
Old 28-10-2019, 09:18 AM
troypiggo's Avatar
troypiggo (Troy)
Bust Duster

troypiggo is offline
 
Join Date: Nov 2008
Location: Brisbane, Australia
Posts: 4,846
Very cool project. Can't wait til you start mass production of these.
Reply With Quote
  #13  
Old 30-10-2019, 07:53 AM
codemonkey's Avatar
codemonkey (Lee)
Lee "Wormsy" Borsboom

codemonkey is offline
 
Join Date: Jul 2013
Location: Kilcoy, QLD
Posts: 2,058
Very cool, Peter. I'll need something like this once I get around to motorizing my ROR. I haven't decided whether to DIY like you have, or buy something off the shelf. I may end up doing the latter... I'm wary about risking very expensive equipment by trying to save a few bucks.
Reply With Quote
  #14  
Old 30-10-2019, 09:43 AM
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
Lee,

It would be interesting to look inside some of the commercial detectors. I wouldn't be surprised to find an Arduino in many of them. The detectors in the images all look like the MLX IR sensor I'm using. The tricky part is the code. I'm currently using a simple straight line correlation but might change that if I observe a different relationship over time. In any case I'm not automating a roof, I don't have expensive equipment and I just want feedback of the sky conditions when I'm sitting inside the house.

Last edited by peter_4059; 30-10-2019 at 07:02 PM.
Reply With Quote
  #15  
Old 31-10-2019, 11:50 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
One step closer...got my desktop app drafted up this evening in Processing. Not exactly how I hope the end product will look but it is a steep learning curve and any small win is good as far as I'm concerned. This one is using random number generators. Tomorrow night should see it getting real time data....
Attached Thumbnails
Click for full-size image (Processing.JPG)
56.1 KB128 views
Reply With Quote
  #16  
Old 01-11-2019, 08:50 PM
codemonkey's Avatar
codemonkey (Lee)
Lee "Wormsy" Borsboom

codemonkey is offline
 
Join Date: Jul 2013
Location: Kilcoy, QLD
Posts: 2,058
Quote:
Originally Posted by peter_4059 View Post
Lee,

It would be interesting to look inside some of the commercial detectors. I wouldn't be surprised to find an Arduino in many of them. The detectors in the images all look like the MLX IR sensor I'm using. The tricky part is the code. I'm currently using a simple straight line correlation but might change that if I observe a different relationship over time. In any case I'm not automating a roof, I don't have expensive equipment and I just want feedback of the sky conditions when I'm sitting inside the house.
Oh I wouldn't be surprised in the least to see an Arduino in commercial products, nor am I trying to detract from your project in any way. I'm giving serious thought to doing the same.

My main concern is that in all but the most trivial of applications, there's bugs. Theoretically a commercial product will have been tested more thoroughly and be in use by many more people so it may be less likely to have catastrophic bugs. The flip side to that is, if there is a bug, you're beholden to the manufacturer to fix it.

Anyway, I think this is a great project and it looks like yours is coming along very well. Great work, Peter!
Reply With Quote
  #17  
Old 02-11-2019, 06:35 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 codemonkey View Post
Theoretically a commercial product will have been tested more thoroughly and be in use by many more people so it may be less likely to have catastrophic bugs.
That might be true and I'm no codemonkey but I have managed to get it working today

Pretty happy with myself
Attached Thumbnails
Click for full-size image (working.JPG)
85.8 KB136 views
Reply With Quote
  #18  
Old 03-11-2019, 12:01 AM
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
Liking the $170 home cooked option...

http://www.iceinspace.com.au/forum/s...d.php?t=178729
Reply With Quote
  #19  
Old 03-11-2019, 08:32 AM
multiweb's Avatar
multiweb (Marc)
ze frogginator

multiweb is offline
 
Join Date: Oct 2007
Location: Sydney
Posts: 22,062
Quote:
Originally Posted by peter_4059 View Post
That might be true and I'm no codemonkey but I have managed to get it working today

Pretty happy with myself
Impressive. but... where's the crownies temp gauge?
Reply With Quote
  #20  
Old 03-11-2019, 03:51 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,716
Quote:
Originally Posted by multiweb View Post
Impressive. but... where's the crownies temp gauge?
Mon dieu! How coud he leave out such a thing!
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 12:44 AM.

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