Date   

New OCS developments

Howard Dutton
 
Edited

I've been working on the OCS again over the past couple of weeks and have added more weather sensor support.

There is now support for Modern Device's "hot wire" type anemometer.
There is now support for using the TSL2591 as a Sky Quality Meter.

Both of these features had background graphing code already in place which should allow you to see the history of readings in addition to using them as for "safety monitoring" (making decisions about opening/closing the observatory roof.)

This screen shot isn't a full OCS, just the TSL2591/SQM running on a test setup (Mega2560 with W5100 Ethernet plugged in.)  Hopefully the math is somewhat close to correct in converting the sensor Lux into mpsas.


Re: New OCS developments

koal01
 

Hi Howard and members,
Thank you for creating a group for this project that deserves a wider audience !
My OCS setup is working now in my shelter. 
I'm using almost all sensors except SQM not supported yet but the IR sensor is absolutely magic as it gives a very accurate state of the sky.
In the screenshot below  the curve below helps me chosing the best IR sky temperature before a shooting for example.


Here's a screenshot taken this afternoon with 6 sensors connected to a SINGLE i2c interface (wow !) except the wind and rain sensor. I'm using the 8 wires of a single 10 meter ethernet cable fot this panel.


I'm also using the light feature switching my red spots from the web page at home, so confortable !
My next goals are to find a way of moving my shelter (on rails) upward and backward using the roof relays on the pcb.


Here is OCS pcb with the relays  for your 12 v and higher voltage equipments


Another very great job thank you Howard !


How the OCS works

Howard Dutton
 
Edited

Like OnStep the OCS an Arduino IDE based project, this one runs ONLY on the Arduino Mega2560.   This simplifies development and enhances reliability which I rate as being of great importance to this project.  To that end there is even industrial class Arduino Mega2560 hardware available if you want it.  The Mega2560 also fits the role here as MCU performance is not a big concern and we want lots of I/O.

So basic hardware for an OCS consists of a Mega2560 and a W5100 Ethernet shield.  Technically the OCS can run without its website, but that takes a lot of the coolness out of it!  To see the charts of weather sensor data you'll need a little micro sd card (with the Charts.js file) plugged into the W5100 sd slot and to enable this optional feature.

To configure you decide which panels you want active to customize to your particular application, all panels except the "Status Panel" are optional.  Most items within each panel are optional, you pick what is enabled and what isn't to customize to any situation.

For example if just getting started and all you have is the Sky Quality Meter you might turn everything else off:


If you buy a cheap 8 channel relay board from eBay you can use a jumper lead set to plug it right in then enable relay control in the OCS:



You can keep going on and on this way getting things working one step at a time so it doesn't become too much all at once. :)

The OCS panels are modular so new features can be added by following the same method.  For example I will probably add an IP interface to OnStep so the OCS can park the mount and verify success before closing the roof.  An option to take that task out of the hands of "less predictable" Windows/Linux machines is a good backup.  Another panel I'm considering adding is a weather info. forwarding panel that sends up temperature humidity and barometric pressure to OnStep.

The OCS weather sensor support is modular (everything is in the Weather.ino file), if a library exists for a given sensor even an novice programmer can usually add support for it.

There are also ASCOM Safety and Roof/Dome drivers available for very low cost (sorry, not free!)  I'll probably get around to adding the ASCOM switch driver at some point too.


More info. about the OCS is available on my site.


Re: New OCS developments

koal01
 
Edited

Hi Howard,
The sqm is implemented since yesterday, the screenshots below show the values taken from the TSL2591
Some consequences :
1- abnormal increase in the barometric pressure from approximatively 1025 to 1265 mb. 
I thought the component could be damaged but i flashed back the 1.4a version and this bug disappeared, the value was nearly 1025 mb again.
I removed physically the sqm in the 1.,4b version but the barometric pressure has the same behaviour
2- concerning the sqm. The values i noted today were around 2,5 mpsas at noon in a clear day and now (5.30 PM) it is around 9,3 and keep increasing.
I had some interrogations about the lens i'm using, it is a simple 1 € lens in tempered glass that we use for small flashlights bought from lightmalls.com.
So I removed the tsl from the pipe on which i glued the lens and tested it directly in direction of the blue sky but the values were approximately the same.
Is it good news i don't know but the lens has few consequences on the results.
Question : i'm new with the sqm but i red that the average is around 15 in suburbs to 22 mpsas in less exposed locations.
The values shown in my OCS are for this clear day from 2,3 mpsas during the day and over 15 in the night. At what time do we consider the sqm is good ? during the day ? the night ? yesterday the night was very clouded and the sqm was 17,7 mpsas...
Many questions around this new component but SO interesting !
Thank you !


the sqm without the lens 



the sqm inside the pipe with the lens


Re: New OCS developments

Howard Dutton
 

On Mon, Dec 30, 2019 at 08:51 AM, koal01 wrote:
1- abnormal increase in the barometric pressure from approximatively 1025 to 1265 mb. 
I thought the component could be damaged but i flashed back the 1.4a version and this bug disappeared, the value was nearly 1025 mb again.
I removed physically the sqm in the 1.4b version but the barometric pressure has the same behaviour
Strange.  I looked at the code and nothing jumps out as a cause for this.  I will keep an eye out for it.


Re: New OCS developments

Howard Dutton
 

On Mon, Dec 30, 2019 at 08:51 AM, koal01 wrote:
2- concerning the sqm. The values i noted today were around 2,5 mpsas at noon in a clear day and now (5.30 PM) it is around 9,3 and keep increasing.
Sounds normal.

I had some interrogations about the lens i'm using, it is a simple 1 € lens in tempered glass that we use for small flashlights bought from lightmalls.com.
So I removed the tsl from the pipe on which i glued the lens and tested it directly in direction of the blue sky but the values were approximately the same.
Is it good news i don't know but the lens has few consequences on the results.
As expected.

Question : i'm new with the sqm but i red that the average is around 15 in suburbs to 22 mpsas in less exposed locations.
The values shown in my OCS are for this clear day from 2,3 mpsas during the day and over 15 in the night. At what time do we consider the sqm is good ? during the day ? the night ? yesterday the night was very clouded and the sqm was 17,7 mpsas...
This is a first try at getting it working and I'm new to this also, we need to gather data and figure it out.
Well shielded from light my sensor showed expected mpsas values.
In a dimly lit room it also showed expected mpsas values.
I bright sunlight the sensor will saturate from what I understand.  That is, the mpsas minimum value has a limit > the actual level in bright sunlight.


Re: New OCS developments

Howard Dutton
 

This is an interesting data point, a full moon lit clear sky comes in at about 15.2 mpsas:

https://www.cloudynights.com/topic/623469-sqm-readings-during-full-moon/


Re: New OCS developments

Howard Dutton
 

On Tue, Dec 31, 2019 at 12:03 PM, Howard Dutton wrote:
This is an interesting data point, a full moon lit clear sky comes in at about 15.2 mpsas:

https://www.cloudynights.com/topic/623469-sqm-readings-during-full-moon/
Note that includes the brightness of the Moon itself (our sensor is "wide angle" like the SQM not the SQM-L.)


Re: New OCS developments

koal01
 

Very interesting this topic.
So our wide sqm in direction of the zenith is measuring almost all the sky and makes it difficult to measure skyglow caused by the moon as the sensor includes its brightness.
Unless if someone uses a  specific "lens" as Tony Flanders is explaining in his post 5.
I find it interesting data that anyone  knows the sqm of his location in full and new moon.
I'll do a try when the moon is at horizon in the days coming.
2 nights ago i was shooting in Orion keeping an eye on the sqm wich was around 19.4 mpsas at midnight in slitht haze conditions and a moon at 24 %
It is for the moment my best reading !

Koal01


Re: New OCS developments

Howard Dutton
 

On Mon, Dec 30, 2019 at 08:51 AM, koal01 wrote:
1- abnormal increase in the barometric pressure from approximatively 1025 to 1265 mb. 
I thought the component could be damaged but i flashed back the 1.4a version and this bug disappeared, the value was nearly 1025 mb again.
I removed physically the sqm in the 1.,4b version but the barometric pressure has the same behaviour
Just updated the OCS to version 1.4d at my observatory.  Operating in imperial units there was no "shift" in pressure from the sensor which reads 30.00in. at the moment vs. NWS online area weather site says 29.98 in.

I still don't have the SQM or anemometer set up but the holidays are over so hopefully soon I can finish this stuff off.


Re: New OCS developments

Howard Dutton
 

A nice change in the OCS 1.4d was switching to a more modular structure in the Weather.ino file.

Now, each weather sensor type has prototypes for initialization and query functions.  This allows the user to implement support for each weather sensor at one clearly marked location in the code.


Re: New OCS developments

koal01
 

Hi Howard,
Yes there have been important improvements in the weather panel these last weeks.
No more drift in the barometrice pressure since the last update. Great !
Sometimes the cold and frozen nights are disturbing the IR sensor (it seems sqm is less annoyed by the freeze). I've ordered a 5V/1 watt little heater from Aliexpress, i'll try to stick it around the IR to see if it can help to protect it better.
May i report a bug in sqm graph, the curve is not visible and outside the limit of the table.

Thanks !!!
Koal01


Re: New OCS developments

Howard Dutton
 

On Wed, Jan 8, 2020 at 10:59 AM, koal01 wrote:
Sometimes the cold and frozen nights are disturbing the IR sensor (it seems sqm is less annoyed by the freeze). I've ordered a 5V/1 watt little heater from Aliexpress, i'll try to stick it around the IR to see if it can help to protect it better.
Please report how that works... I was afraid of "skewing" the IR sensor.

May i report a bug in sqm graph, the curve is not visible and outside the limit of the table.
I noticed that too, just didn't get back around to doing something about it.  The fix is on GitHub now though.


Building my SQM

Howard Dutton
 

I'm 3D printing the fixture for my SQM right now.  If this works out I'll post the design and stl files.

This is for the Adafruit TSL2591 sensor which sets into the four cut-outs.  A weak slightly convex lens I have (surplus shed) fills the recess nearest the top and will be RTV'd into place.  The lens will be flush with the top so water shouldn't pool at the edges.  I'm printing this in HIPS filament which has worked out for me in the past.  I will then spray paint for some added UV protection to help keep the plastic from breaking down.  The hole in the center is sized for 1/2" NPS pipe which allows using cheap PVC plumbing parts to make/modify a support to mount this on the observatory side as I did for my cloud sensor.


Re: New OCS developments

koal01
 

Since yesterday when updated to version 1.4d it seems the graph displays straight lines again.
You solved this problem a few weeks ago, a slight regression in the code ? may be the correction for the sqm graph will solve the problem in all the graphs.


Re: New OCS developments

Howard Dutton
 

On Thu, Jan 9, 2020 at 08:32 AM, koal01 wrote:
Since yesterday when updated to version 1.4d it seems the graph displays straight lines again.
You solved this problem a few weeks ago, a slight regression in the code ?
I coded nothing to solve this problem and I've never seen it on my hardware.

may be the correction for the sqm graph will solve the problem in all the graphs.
No reason to believe that.

Is sensor data still correct on the "overview" / index page?


Re: New OCS developments

Howard Dutton
 

On Thu, Jan 9, 2020 at 08:53 AM, Howard Dutton wrote:
On Thu, Jan 9, 2020 at 08:32 AM, koal01 wrote:
Since yesterday when updated to version 1.4d it seems the graph displays straight lines again.
You solved this problem a few weeks ago, a slight regression in the code ?
I coded nothing to solve this problem and I've never seen it on my hardware.
I thought the other issue likely had to do with Chart.js

This seems different.


Re: New OCS developments

koal01
 

Certainly Yesterday’s log file is corrupted. I’ll update the new version and erase this file on the sdcard  if necessary.

Koal01


Re: New OCS developments

Howard Dutton
 

On Thu, Jan 9, 2020 at 09:32 AM, koal01 wrote:
Certainly Yesterday’s log file is corrupted. I’ll update the new version and erase this file on the sdcard  if necessary.
Corrupted how?

If you have the file please post.


Re: New OCS developments

Howard Dutton
 

Just a note... if a weather log file does get corrupted there will be a new one tomorrow.

1 - 20 of 528