Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Weather Station Ideas


Gina

Recommended Posts

Thanks folks 😀  Gives me plenty to read and think about.  I will look into MQTT but first I'll get the simpler web server approach working to check I can get the ESP32 working.

Link to comment
Share on other sites

Do you mean web server or web service? Running a web service on the ESP32 would be a good solution as it can be accessed over the wifi from any other networked device easily. Almost like a one-way MQTT :)

 

Link to comment
Share on other sites

The requirements for the ESP for the outside and obsy measurements are only 2 wires as they are I2C devices and both can run on the same port.  The ESP8266-12E could handle this easily.  But will ESP-NOW work with one ESP32 and one ESP8266?

Link to comment
Share on other sites

I'm amazed at the range of ESP-NOW - 165 metres!  Think that's for ESP32,  ESP8266 seems to be 140m.  Still a lot!

Edited by Gina
Link to comment
Share on other sites

Looks like ESP-NOW would be fun to look at but not necessarily the easiest solution - I'm not sure you will be able to serve your web page over it, I'd probably get it all working over wifi initially as there is plenty of reference code out there already to get you up and running with a proof of concept.

I'll going to look into ESP-NOW a bit more but I haven't seen anything about how it plays with Wifi and Bluetooth in the mix also as it seems to be using the same spectrum but might be employing a different way transmission.

 

  • Like 1
Link to comment
Share on other sites

ESP-Now does look rather complicated and I have another idea.  The two sensor ESPs are not that far apart and a serial wired connection would be quite feasible I think.  Not difficult to program either.

There's also the possibility of having independent ESPs, both communicating with indoors over WiFi.

Edited by Gina
  • Like 1
Link to comment
Share on other sites

13 minutes ago, Gina said:

ESP-Now does look rather complicated and I have another idea.  The two sensor ESPs are not that far apart and a serial wired connection would be quite feasible I think.  Not difficult to program either.

There's also the possibility of having independent ESP, both communicating with indoors over WiFi.

You might have already mentioned but I may have forgotten.... Is the reason for not using one device because of availability of IO pins ?

I think when I did mine I worked through the sensors individually to prove them working then tried to make the code modular for each sensor and then added them all together, after that it just grew as I added bits on or swapped out sensors... there's always that journey when a sensor you thought was right can't survive the environment! LOL 

 

Link to comment
Share on other sites

The sensors will be around 10ft apart.  The observatory is 15ft x 8ft with the scope room 8 x 8 and the warm room 8 x 7.  In the photo below we are looking at the NW corner.  The wind sensors are attached to the SW corner of the warm room and I plan to place a Stevenson screen around the middle of the north wall, near the post for the ASC, with I2C connections going through the wall into the scope room where I plan to sense temperature and humidity.

209064731_WndSensorsPosition03.png.a77f555f62d720ad2638d4103c868722.png

Link to comment
Share on other sites

That's not too different to my setup, wind speed & direction over a flat 5 core cable plus rain bucket (bell/speaker cable) is on a scaffold pole and the ESP plus temperature and humidity in my Stephenson screen about same distance away.   I did consider i2c over a longer distance but I found it not that reliable once over 20 cm or so though with some passive components I suspect you could extend that.

  • Thanks 1
Link to comment
Share on other sites

As I see it, there are two functions of a weather station.

  1. To provide current information about the weather outside and in the observatory.
  2. To provide a record of the weather over a period.

I shall concentrate on the first initially and should not be too difficult, the second may come later purely for interest but will be much more difficult. 

Link to comment
Share on other sites

I currently have version 1.8.10 of the Arduino IDE, the latest is 1.8.13 but info online says later than 1.8.5 is alright for programing the ESP32 so guess I don't need to upgrade.  I'll try it...

Link to comment
Share on other sites

31 minutes ago, Gina said:

I currently have version 1.8.10 of the Arduino IDE, the latest is 1.8.13 but info online says later than 1.8.5 is alright for programing the ESP32 so guess I don't need to upgrade.  I'll try it...

1.8.10 is where I'm at too.  I have had issues in teh past where I've had to rewrite code after Arduino updates so I don't make the jump now unless I really have to! :) 

  • Thanks 1
Link to comment
Share on other sites

Hmm...  Problem...  Following instructions HERE I get as far as uploading the WiFiScan sketch, it compiles OK but the Upload stage fails to connect with the following report :-

Quote

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Arduino: 1.8.10 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

Sketch uses 623662 bytes (47%) of program storage space. Maximum is 1310720 bytes.
Global variables use 38744 bytes (11%) of dynamic memory, leaving 288936 bytes for local variables. Maximum is 327680 bytes.
python /home/gina/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --chip esp32 --port /dev/ttyS0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/gina/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools/partitions/boot_app0.bin 0x1000 /home/gina/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /tmp/arduino_build_656170/WiFiScan.ino.bin 0x8000 /tmp/arduino_build_656170/WiFiScan.ino.partitions.bin
esptool.py v2.6
Serial port /dev/ttyS0
Connecting........_____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch
_

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

 

Link to comment
Share on other sites

1 minute ago, Gina said:

Hmm...  Problem...  Following instructions HERE I get as far as uploading the WiFiScan sketch, it compiles OK but the Upload stage fails to connect with the following report :-

 

I'm not sure which ESP32 you are using but you may have to press a button when powering up to put set the boot mode to be able to programme it. (I think your ESP8266 board had a programme button and reset button on it?)

  • Thanks 1
Link to comment
Share on other sites

1 minute ago, Gina said:

That was it - Done Uploading!   Great - thanks.  onwards and upwards...

One of the first things I do now is ensure I have OTA coded - not that I have any buttons to press with the ones I use, but it is quicker to get the code on teh device with OTA programming.

Link to comment
Share on other sites

Over-The-Air

If you look in the examples you will see an example sketch which shows how you can then load you new code 'over the air' to the device.  It's much quicker than USB/Serial - means unless you have a really big problem, you can update the device remotely as long as it's on the local network.

 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.