×

INDI Library v1.9.2 Released (14 Sep 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones.

Weather radio don't want connect

  • Posts: 14
  • Thank you received: 2

Replied by Mark on topic Rain sensor

I have this for the luminance sensor. I'm working on some code to control this at the moment. Here's an image - on the left is the TLS2591 with a 15 degree lens and an acrylic dome and the dew heater ring, right is the rain resistance sensor, and bottom right is the MLX cloud sensor.
The following user(s) said Thank You: Gunter
9 months 3 weeks ago #65382
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 858
  • Thank you received: 258

Replied by Wolfgang Reissenberger on topic Rain sensor

Looks great!

In case you want a simple solution for protecting your cloud sensor - here comes mine:

Using an acrylic dome did not work for me, since it is shielding IR too heavily. But the thin foil of a noodle package works fine :-)

Cheers
Wolfgang
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | ASI 1600mm pro + 6200mm pro | KStars/INDI on Raspberry Pi 4/Intel NUC
Last edit: 9 months 3 weeks ago by Wolfgang Reissenberger.
9 months 3 weeks ago #65399
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic Rain sensor

Wolfgang,

Thats a good trick with the pasta wrapping. I drilled my perspex and superglued the MLX90616 to the hole, this lasted about 2 years then water got in.
More recently I tried to close around the hole with clear nail polish. I was using the TSL under the perspex without a lens.
I am disappointed about water leaks which have ruined my weather station and I am thinking about my next build.
Regarding the light sensor for the SQM function, is a lens necessary? do you think the lens or the perspex would absorb radiation that the light sensor
needs as the acrylic dome might be a problem.
Do you use one arduino for the MLX and TSL and another arduino for your other sensors - wind, BME280, RG-11 and display panel?
Are you powering the MLX and TSL box with a rechargable battery?

Hi Mark, thanks for your posts.
The box and heater seems to be like the one from allskyoptics - www.allskyoptics.com/
I am working on my skycam at present and have opted for the PVC pipe approach after Thomas Jacquin - github.com/thomasjacquin
First light outside was runed by condensation and then frost on the dome


I thought about a method for heating the dome and tried an astrozap dewstrip

Other options would be an internal heater like
- allskyoptics resistors ring shown above - www.dewcontrol.com/Dew_Heater_Module_All...099125_19045496.aspx
- As per Gunter's suggestion, chain of six 25 Ohm resistors at 12 V - skyandtelescope.org/astronomy-equipment/diy-dew-heater/
- NiChrome wire, as is found in the dew strips, not sure if I could steal some from an old toaster!

I just twiddled the knob on the astrozap dew controller, but fancier methods of control are possible;
- www.instructables.com/Raspberry-Pi-Dew-H...-for-All-sky-Camera/
- A very nice pst on stargazers lounge stargazerslounge.com/topic/362725-raspbe...ll-sky-camera-build/

Keep up the great work, at least my skycam has not leaked, yet!
9 months 3 weeks ago #65429
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic Rain sensor

Another heater option a cctv heater described in parts list for the croatian meteor cam m.aliexpress.com/item/32809593987.html?t...ail2mobilesitedetail
9 months 3 weeks ago #65431

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
Yeah, it's the dewcontrol.com resistor heater ring that I have - I'm also in the process of building an allsky camera so picked one up for the SQM box at the same time as they're quite cheap and pretty.

So far I haven't needed to cover the cloud sensor. The component should be fine as it's stated it's sealed. I drilled the ABS box and surrounded it in gorilla clear silicone to make the box watertight - we'll see if it lasts. I've also seen people buy the raw component instead of the mounted version, and using a cable gland to house it which is a pretty cool idea.

As far as other sensors go, might help to describe my current setup so far (I'll probably post more detail with pictures when everything's completed):

* I have a Watson weather station which is a common cheap one with humidity, temp, rainfall, wind. Communicates with an inside unit which is USB connected to a raspberry pi (weatherstationpi) running weewx which captures the data.
* I have a Weather Radio SQM consisting of lum sensor, cloud sensor, water sensor, DHT sensor, dew heater. An arduino uno runs Weather Radio and I have some extra code which calculates the dew point from the DHT sensor and turns on or off the dew heater via a relay (I'll do a pull request on that soon). I've also got a lightning detector on order from bangood to add next :)
* The SQM uses XBee wireless units to send its data to weatherstationpi where I've built a weewx service which adds it to the Watson station data (another pull request when I've cleaned it up so that the weewx integration can run as either a weather station driver or a secondary service adding data)
* weatherstationpi runs indi_weatherradio permanently and when my scope comes online for an observing session (astropi) it connects as a distributed indi network
* weatherstationpi is running the weewx_mqtt extension which publishes all the combined weather data over MQTT
* On another pi Telegraf catches the MQTT stream and pumps it into an Influx time series database
* Grafana is used to create a dashboard for the whole setup
* My allsky camera pulls the weather station data from MQTT to know whether to turn it's own dew heater on and a weewx skin generates a plain text file which is included on the allsky image as the red overlay showing sky quality and cloud cover percentage.

Here's a shot of the dashboard from when I was debugging (don't look at the data too closely).

-Mark

9 months 3 weeks ago #65440
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 77
  • Thank you received: 2

Replied by Gunter on topic Rain sensor

Hi there,

just for the records, there is another GitHub project by hdiessner.


github.com/hdiessner/Allskycam-heating
The following user(s) said Thank You: Adrian
9 months 3 weeks ago #65469

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16
I am having some trouble with my new build.

I have bought the anenometer and it works nicely on my protoboard with the other sensors, BME280, TSL2591 and MLX90614.

I used the sketches from cactus.io to check the anenometer and they read nicely.

My oled is an SH1106, which works nicely with u8g2, so no luck until I get an SSD1306

With version 1.10 and 1.11 from github I can't compile the sketch without #def USE_OLED due to some missing preprocessser directives
in the ino, there is also a typo in the JsonDocument declaration at the start of getSensorData, see patch


My three I2C sensors read nicely with weatherradio unless I use the anenometer.

I thought this might be due to my hardware setup so I wrote another script and the anenometer works (vane and windspeed) with the sensors
so I am trying to figure out where the problem is.

In weatherradio if I run the anenometer on its own
{
"Davis Anemometer": {
"init": true,
"direction": 60,
"avg speed": 4.924791,
"min speed": 0.252556,
"max speed": 11.95702,
"rotations": 130
}
}

If I add an I2C sensor (BME280)
Weather Radio V 1.10 (should say 1.11)
{
"Davis Anemometer": {
"init": true,
"direction": 98,
"avg speed": 0,
"min speed": 0,
"max speed": 0,
"rotations": 0
},
"BME280": {
"init": true,
"Temp": 16.58,
".2793
}
}
Woops what is that ".2793 ????

Worse with 2 sensors BME and MLX
Weather Radio V 1.10
{
"Davis Anemometer": {
"init": true,
"direction": 104,
"avg speed": 0,
"min speed": 0,
"max speed": 0,
"rotations": 0
},
"BME280": {
"init": true,
"Temp": 16.49,
8.42871
},
"MLX90614": {

}
}
Woops strange character before 8.4

With three sensors
Weather Radio V 1.10
{
"Davis Anemometer": {
"init": true,
"direction": 105,
"avg speed": 0,
"min speed": 0,
⸮⸮W⸮U⸮
⸮⸮7U⸮]Ul"Timing": 1
}
}

An example output with my test script

BME280
T = 16.48 *C
P = 1028.22 hPa
H = 48.18 %

MLX90614
Ambient T = 16.35 *C
Object T = 16.23 *C

TSL2591
[ 33511 ms ] IR: 213 Full: 13960074 Visible: 906 Lux: 2.526531

DAVIS VANE
424 149 SE

DAVIS WIND
60 45.00

{
"BME280": {
"init": true,
"Temp": 16.48,
"Pres": 1028.209,
"Hum": 48.17773
},
"MLX90614": {
"init": true,
"T amb": 16.31,
"T obj": 16.32999
},
"TSL2591": {
"init": true,
"Lux": 2.440772,
"Visible": 874,
"IR": 205,
"Gain": 32,
"Timing": 1
}
}

Not sure if any you have seen this. Are any of you using the anenometer with the i2c sensors connected to the same arduino?

My RG-11 has arrived, but I won't start with that until I have figured this out.

Kind regards

Adrian
9 months 2 weeks ago #65660
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 858
  • Thank you received: 258
Adrian,
many thanks for reporting this. Version 1.11 is currently unstable and under development, so better not use it in production. I applied your patch, so syntactically everything should be fine.

For the rest, I need to create an appropriate test bread board. Indeed, in my private environment I have one separate Arduino running only the Davis Wind sensor. But this is only due to my installation, since the wind vane sits on the roof top and the weather station is in the garden in a separate installation.

Btw: the INDI service for the rain sensor isn't ready yet, I am currently working on in and am planning to release it with V 1.11.

Cheers
Wolfgang
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | ASI 1600mm pro + 6200mm pro | KStars/INDI on Raspberry Pi 4/Intel NUC
The following user(s) said Thank You: Adrian
9 months 2 weeks ago #65673

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
Adrian, I've been trying to diagnose similar issues as I've been adding in my dew heater code. I haven't solved this but my thoughts are that it could be:

1. Hardware problem - I'm not that neat with my soldering etc and the problems sometimes seem intermittent so I wonder whether it's just something particularly on the i2c bus. I've been gradually redoing my setup, but not sure whether this is the problem.

2. JsonDocument issue - I've been trying to understand JsonDocument to understand whether enough space is being allocated because of string usage and whether we're hitting the memory limit of StaticJsonDocument as more sensors are added. It's a confusing library, but I think the answer here is it's okay.

3. Code problems - I've been through the code in detail, whilst there are some issues in the new update like the missing preprocessor lines you identified, and some missing allocation of space in JsonDocuments, everything looks fine and practically I see similar problems with older versions of the code. So I don't think it's anything that's been recently added.

4. Memory limits of the microcontroller - I notice you're using an Uno same as me. My dew heater code is including math.h as does the Davis library, and I've wondered whether that means there's just not enough left with an Uno when it comes round to allocating memory for the Json strings.

It's been very difficult to narrow it down as it's not particularly repeatable and removing code in various places seems to fix the issue. My guess is it's probably memory, but I'm not an experienced C programmer. It's good to know though that it's not just me :)

-Mark
The following user(s) said Thank You: Adrian
9 months 2 weeks ago #65674

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16
Wolfgang and Mark,

I suspect a memory problem. With three I2C sensors and the Davis sensor
Sketch uses 23780 bytes (73%) of program storage space. Maximum is 32256 bytes.
Global variables use 961 bytes (46%) of dynamic memory, leaving 1087 bytes for local variables. Maximum is 2048 byte

This is why it works when I use the Davis on its own, and not when I add more sensors.

I don't understand the Static Json docsize declaration size based upon JSON_OBJECT_SIZE (will have to read up on it), it
can't know what the lenght of the variables are and what strings they will hold, right!
The script creates this then serializes this into a string which is returned.

My w json serialized string is 313 bytes long!
{"Davis Anemometer":{"init":true,"direction":96,"avg speed":0,"min speed":0,"max speed":0,"rotations":0},"BME280":{"init":true,"Temp":12.25,"Pres":1024.765,"Hum":52.88281},"MLX90614":{"init":true,"T amb":12.45001,"T obj":12.91},"TSL2591":{"init":true,"Lux":2.062501,"Visible":799,"IR":211,"Gain":32,"Timing":1}

If I type p I get strange results, but with w it can look right if I fiddle with the docSize.
Weather Radio V 1.10
{"Davis Anemometer":{"init":true,"direction":96,"avg speed":0,"min speed":0,"max speed":0,"rotations":0},"BME280":{"init":true,"Temp":12.25,"Pres":1024.765,"Hum":52.88281},"MLX90614":{"init":true,"T amb":12.45001,"T obj":12.91},"TSL2591":{"init":true,"Lux":2.062501,"Visible":799,"IR":211,"Gain":32,"Timing":1}}
{
  "Davis Anemometer": {
    "init": true,
    "direction": 96,
    "avg speed": 0,
    "min speed": 0,
    "max speed": 0,
    "rotations": 0
  },
  "BME280": {
    "init": true,
    "Temp": 12.25,
    "Pres": 1024.765,
    "Hum": 52.88281
  },
  "MLX90614": {
    "init": true,
    "T amb":
    "Visible": 799,
    "IR"iming": 1
  }
}
Again note that the last line in pretty is taking the start of the IR for the MLX sensor and ending it with the last field of the TSL sensor.

My impression is lack of memory on the microcontroller.

Adrian
9 months 2 weeks ago #65700

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16
Seems docSize needs to include the json part and the string storage.

github.com/bblanchon/ArduinoJson/issues/151

For my 313 byte serial output the doc size is calculated as 152 so it is unlikely to be able to hold the information.
Weather Radio V 1.10
152 <=== Serial.println(docSize)
{
  "Davis Anemometer": {
    "init": true,
    "direction": 87,
    "avg speed": 0,
    "min speed": 0,
    "max speed": 0,
    "rotations": 0
  },
  "BME280": {
    "init": true,
    "Temp": 14.42,
    "Pres": 1024.433,
    "Hum": 50.88184
  },
  "MLX90614": {
    "init": true,
    "T amb": 14.82999,
    "T obj": 14.19
  },
  "TSL2591":<Rni
  }
}
9 months 2 weeks ago #65704

Please Log in or Create an account to join the conversation.

  • Posts: 858
  • Thank you received: 258
Ah, interesting, that issue may explain it. I had the same problem with getCurrentConfig()
String getCurrentConfig() {
  const int docSize = JSON_OBJECT_SIZE(7) + // max 7 configurations
                      JSON_OBJECT_SIZE(2) + // DHT sensors
                      JSON_OBJECT_SIZE(3) + // Davis Anemometer
                      JSON_OBJECT_SIZE(1) + // Water sensor
                      JSON_OBJECT_SIZE(2) + // Rain Sensor
                      JSON_OBJECT_SIZE(3) + // WiFi parameters
                      JSON_OBJECT_SIZE(1) + // Arduino
                      JSON_OBJECT_SIZE(3) + // OTA
                      JSON_OBJECT_SIZE(2);  // buffer
  StaticJsonDocument <docSize> doc;
...
As you can see, I simply added an additional buffer of JSON_OBJECT_SIZE(2) - I found it out by trial and error...

Wolfgang
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | ASI 1600mm pro + 6200mm pro | KStars/INDI on Raspberry Pi 4/Intel NUC
9 months 2 weeks ago #65710

Please Log in or Create an account to join the conversation.

Time to create page: 1.226 seconds