Replies: 6 comments 6 replies
-
@Alex-developer, thoughts? |
Beta Was this translation helpful? Give feedback.
-
Ranous I have moved this discussion to the modules repo It probably should still be experimental. I did compare it against my Primaluce Eagle 4 and 5 and got different results but have never gone back and looked at how to correct the code. I don't have a Unihedron meter :-(. I don't recall where the formula came from but I will check as it should have some attribution. Totally agree that it should average readings over a period of time, I am adding this to a few of the modules at the moment to help with transitions between states. If you are happy to share the formula you found that would be great or feel free to do a PR for the module Thanks Alex |
Beta Was this translation helpful? Give feedback.
-
@Alex-developer, if @ranous were to make improvements to the module (hint, hint) I assume we would incorporate them into the release and credit him? |
Beta Was this translation helpful? Give feedback.
-
Ok, I'm back from traveling and resuming this project again. I'm happy to contribute my changes to the module back. I'm still trying to tune the numbers. The thing I'm working on now is temperature compensation. It's clear from my measurements that the sensor loses sensitivity as the temperature decreases, leading to an extra increase to the SQM calculation. I'm still trying to nail down the coefficient to use. I need a clear night, as my data is pretty noisy due to hazy clouds moving through the field when taking measurements. My sensor and my SQM meter have different field of views, so I need to make sure they're measuring the same thing, and the variations of brightness due to the clouds moving though is throwing everything off. I might have a clear night tonight to try again. In order for me to implement temp compensation, allsky_light needs the current temp. I was hoping to access the variables from other modules (allsky_temp in this case), but that doesn't seem available from allsky_shared. For now I'm stealing the read_extra_data function from allksy_publishdata, which extracts all the variables from the module datafiles. I'd suggest adding this to the shared module as I think this is not an uncommon occurance, where one module can use the data from another. The allsky_dewheater module is a good example. No need for the code to read the sensor which is already in allsky_temp and can automatically take advantage of any additional sensors added to allsky_temp over time. |
Beta Was this translation helpful? Give feedback.
-
Hello, what is the variable in the overlay module to activate the TSL2591 measurement? |
Beta Was this translation helpful? Give feedback.
-
I ported over this ESP32 based TSL2591 SQM meter to support Raspberry Pi: https://github.com/chvvkumar/PiSQM/tree/main Unfortunately, I don't have a SQM meter to compare the results but eyeballing results from the past week, the values I am getting seem to correlate my sky conditions (i.e. about 16-18 mag/arcsec^2 on overcast nights leaning towards the lower end on snow covered nights where more light reflects back on to the clouds). If you have an SQM meter, could you see how far off this is from an actual meter? |
Beta Was this translation helpful? Give feedback.
-
I decided to add a TSL2591 sensor to my allsky cam and calculate the SQM value. The value calculated by the allsky_light module is fairly far off from the readings I get from my Unihedron SQM meter. Anyone have better luck with that module, or is it still considered experimental?
Digging into the code, I think the problem is the formula calculating the SQM from the lux reading returned by the sensor. It looks like the formula was taken from some other open source project. That formula has issues. Looks like they baked in a correction factor, most likely to compensate for issues in their system. I tracked down the correct formula for calculating the SQM from lux, and if I use it, I get me pretty close my SQM meter. I added a correction factor to the modules configuration so the user can supply their own scaling correction factor.
The main reason for needing a correction factor is to compensate for light loss due to any lens or filter you might be using. BTW, I've seen a IR cut filter used in some homebrew SQM meter build that use the TSL2591. This isn't necessary with that sensor as it has two sensors, one of which measures the IR component, and it's removed from the lux calculation, so the filter only serves to provide additional light loss to the system.
The other factor that can effect the lux reading is the temperature. According to the TSL2591 datasheet, the value can be effected by the temperature, and you should have a scaling factor based on the temperature delta from some base temperature. I'm uncertain at this point if that is a significant factor or not. There are SQM implementations that take it into account, as does the Unihedron meter. I'll check my results over time as the temperature changes and see if it drifts off from the Unihedron meter's results. If it looks like it's useful, I can add code to optionally read an environment variable from the allsky_temp or other modules that write out the ambient temperature and factor that in.
Another best practice I've seen in SQM implementation is they average several readings together, smoothing out the variances from individual readings.
Beta Was this translation helpful? Give feedback.
All reactions