Search the Community
Showing results for tags 'esp32'.
Found 4 results
In this thread I will endeavour to build an MQTT system to read ambient weather conditions outside and in the observatory and control the roll-off-roof etc.
For quite some time now I've been working on a small weather station. The idea is to add automation to an obsy I'm building. The weather station as is measures temperature, humidity, pressure and presence of cloud. I also have the components to build a rain detector, but haven't implemented that yet. First the box: Made from vent covers and pieces of aluminium All put together With sensors. The IR sensor is in the far back (top of the housing) and the BME280 sensor is the free hanging red pcb. The other pcb holds a few pull-up resistors and a capacitor for the I2C wires. Insulation added to keep critters out. First I thought of using an Arduino to control and collect the data, but recently I started tinkering with ESP32 wifi boards. These are a lot faster and have more memory than Arduinos, and I wanted to use microPython. The ESP32 board is also smaller than an Arduino UNO (about the size of an Arduino nano) and has built in wifi, which means I just need power to the device. I uploaded the code to GitHub https://github.com/wberlo/indi_meteostation Output is as a HTML file (index.html) which presents data in a simple way. The INDI driver 'Weather Watcher' can read this file. For now, temperature is mapped to temperature (of course), and 'clouds' is mapped to 'forecast/Weather' in INDI. 'Clouds' is a parameter that varies from 0 to 1. I used the same criteria as the AAG Cloud Watcher device: if sky temperature is less than -8 degrees, the sky is assumed cloud free. For a sky temperature between -8 and 0 degrees, there is partial cloud, and for a sky temperature higher than 0 degrees, the sky is overcast. This seems very arbitrary, and I expect to have to adjust this piece of code later. Major update: The weather station now also reads and reports the SQM values from my wifi-SQM. See further down this thread for details.
I recently posted my design for a weather station in this section. https://stargazerslounge.com/topic/345153-indi-weather-station/ As I had bought several pressure/humidity sensors, as well as ir temperature sensors and ESP32 development boards, I wondered how small a weather monitor could get. The sensors are quite small, and so is the micro controller. Such a weather monitor wouldn't incorporate wind speed measurement nor a rain detector, since these take up more space. But otoh, there is seldom rain without clouds, so if you detect clouds, you should be safe. Here it is, a miniature (9.8 x 5.9 x 2.7 cm) weather monitor. The device has built in wifi, is powered from a micro usb contact and is compatible with the INDI Weather Watcher driver. The parts: (the mat underneath has a 1 inch grid pattern) BOM: plastic box 9.8 x 5.8 x 2.7 cm a piece of V-board, in my case with copper islands rather than strips ESP32 development board with male headers MLX90614 ir temperature sensor with I2C interface BME280 environmental sensor with I2C interface micro usb cable and power adapter, or a powerbank for wireless operation Assembly is really easy and involves drilling a hole in the box, soldering the components in place and wiring to the ESP. The finished monitor in place. As this is a box with a click lid, I used silicone to seal it. The holes on the sides and bottom are drilled at an angle to keep rain out. As I built it, the electronics will heat the BME slightly, and because it is mounted inside the casing, it will be slow to reach ambient temperature should this change abruptly. Adding more holes near the ESP would take the inside temperature down. Otoh, temperature readings don't have to be that accurate, and you could use the MLX ambient reading for more accuracy. Here's the INDI control panel for the weather monitor (Wind and rain are simulated, because I was testing the driver when I took the screen shot) Here is how it looks in Ekos scheduler. The red marker indicates that weather conditions are bad. In this case clouds = 100 %. If the tickbox next to "Weather" is checked, Ekos will allow weather conditions to control an imaging sequence. And in the ROR driver (I know it says Dome, but the ROR driver is derived from the dome driver, and it's still under development. Besides, this is the simulator driver.) The code for the esp is on my github page: https://github.com/wberlo/indi_meteostation You need the files: bme280.py mlx90614.py boot.py (replace the ssid and password with your own, or comment/uncomment lines to create an access point) main_mini.py (which you will have to rename to main.py before uploading to the esp board)
Just finished work on a sky quality meter with built in wifi. The device is based on the ambient light sensor TSL2591 and the wifi board ESP32. Communication between the two boards is through I2C. The device has a 40 degrees lens. The light sensor is programmable, which means you can set integration time (from 100 to 600 ms) and gain (from 1 to almost 5000, in 4 steps). I implemented automatic adjustment of these parameters to allow for the highest dynamic range (600M:1 accoring to the spec sheet). The device shows Sky readings as a web page. It is connected to a local wifi network, although it could also create its own access point. So far I haven't been able to calibrate the sqm yet, partly due to eternal cloud cover. But it should only require one parameter to be adjusted. The code is available on GitHub. Sky-Quality-Meter Here are som pictures. The components: The parts connected: The finished device: This is how output is presented: