Announcement

Collapse
No announcement yet.

Long weekend DIY project - Nice 20$ Weather station - Temp-Hum-Press-Illum-UV index

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Long weekend DIY project - Nice 20$ Weather station - Temp-Hum-Press-Illum-UV index

    Did some research prior for a design that would ensure correct exposure for the Temp-Humidity-Pressure sensors and avoid greenhouse effect in the clear project box.
    This design ensures proper ventilation while offering protection from elements.
    Not much soldering required and fairly easy to assemble.
    Wifi/Tasmota based so you can install it as far as your wireless network range.
    If you like this project feel free to reach out for more details, I'll share links to parts and construction details.

    4 plastic bowls from the dollar store 2$
    Clear Waterproof Plastic Project Box 3$
    Wemos mini 3$
    I2C BME280 Temperature Humidity Pressure Sensor 2$
    I2C BH1750 light intensity illumination module 1$
    I2C VEML6070 UV light sensor 3$
    Dupont jumper wires 1$
    Old micro usb cell phone 5V power supply 0$
    Nuts & Bolts, Stainless/aluminum, other hardware 4$

    Total 19$

    Yann


    Click image for larger version  Name:	WEATHER STATION.jpg Views:	0 Size:	122.3 KB ID:	1466942



    Click image for larger version  Name:	2021-04-03 11.36.27.jpg Views:	0 Size:	63.1 KB ID:	1466944

    Click image for larger version  Name:	WS.PNG Views:	0 Size:	305.7 KB ID:	1466943

    #2
    Very nice Weather station!!!

    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

    HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      +1 nice....

      Comment


        #4
        Thanks for the feedback Pete/Devoir,

        The Wemos has enough ports to accomodate multiple peripherals especially I2C devices which can all be run from the same pair of ports.
        You can easily swap/replace peripherals if they fail or if you want to try something else.

        Pete you could add your AS3935 Lightning Detector to the unit
        I'll probably order one to test out as well.

        Weather is still quite cool up here but will be interesting to see how the components cope with direct sunlight later this summer.

        ​​​​​





        Comment


          #5
          Thank you . The AS3935 lighting detector ==> MQTT is still running here on an RPi in the attic and the RPi with SD Radio / NOAA satellite downloads even though I do not use these much these days.

          The old 1-Wire counter lightning sensor LD3-R2 Lightning Detector is also connected and is not directional but more sensitive than the AS3935 sensor.

          It would be nice to connect the 1-wire counter (lightning sensor) to an ESP chip for lightning detection.

          Installed the blitzortung plugin to Home Assistant. The newest version also shows a map in HA with lightning strikes and distance and direction now which I really like. The author though does not give you the option of using miles and all of the data is in kilometers.

          What would be nice would be to install the entire 1-wire library to one ESP chip for use of different 1-wire devices.

          I mean here that now maybe with the ESP32 4Mb play space this can be done??

          Have you ever seen the WeatherDuino Pro2 DIY'd weather station?

          I am still using the Davis Weather station but was thinking of building a WeatherDuino a few years ago.
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

          HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #6
            Looks like a very interesting project. Did you write the sketch yourself or is it available on some site. Are you sending the data directly to a db and then grafana or is it interfaced to Homeseer through some plugin then grafana

            Comment


              #7
              I believe 123qweasd is using mcsMQTT to populate InfluxDB for Grafana.

              Sketch is not needed when using Tasmota. Tasmota provides a higher level interface than C code typically used in Arduino IDE. All one needs to do is select the sensor and the GPIO port it is interfaced using a browser. All the details are handled behinds the scenes by Tasmota.

              Comment


                #8
                Pete
                Was not familiar with Weatherduino but will have a look as I'll try to add wind and rainfall to my station.

                Spudjr Michael McSharry
                ​​​​
                Correct. The first step is to flash the Wemos with Tasmota. This can't get easier: no soldering or Serial interface required. Just connect via micro usb and flash with "Tasmotizer".

                Sketch not required; Tasmota provides a pretty straight forward interface to manage compatible peripherals like the ones above. I2C peripherals need two "ports" (also called GPIO's) and they can be connected in parallel on the same 2 ports. (+ 3v3 and ground)

                The only soldering required is adding the I/O pins



                With the Wemos I recommend using the following GPIOs, starting with the most "trouble free" : 4,5,12,13,14,3,0

                So for this project gpio 4 and 5 are used.

                Tasmota broadcasts the data stream via MQTT so using mcsMQTT to populate InfluxDB for Grafana. You can then integrate everything in HS an HStouch

                most of this is well documented online but feel free to ask specific questions and Ill provide guidance.

                Yann



                ​​​

                Comment


                  #9
                  Links to components (pricing and availability can vary - multiple sources on Aliexpress, Banggood, Amazon, etc. All depends on your patience and budget )

                  Project box
                  https://a.aliexpress.com/_mLKGg9l

                  Wemos mini

                  https://a.aliexpress.com/_mMnQIHV

                  ​​​​​BME280

                  https://a.aliexpress.com/_mLKEjoJ

                  BH1750

                  https://a.aliexpress.com/_mMOfUWX

                  VEML6070
                  ​​​
                  https://a.aliexpress.com/_mLHgA8b

                  Dupont jumper wires

                  https://a.aliexpress.com/_mqxrVKx

                  Comment


                    #10
                    Just a note that the sensors used most likely require the Sensors build of Tasmota and not the standard build.

                    Also, I find it helpful to get a message when a given amount of a change has been made in the light level. To do this you apply a Rule in the device's Console menu once the device is flashed. Place the rule in the field labeled Enter command and then press Enter top apply the rule.

                    Rule for sending MQTT topic with LUX value on any LUX Change

                    I used a different sensor for light levels, the TSL2561. The below rules SHOULD work for the BH1750 as I just changed TSL2561 to BH1750. You may have to change the published MQTT message as well. That is the part after publish:

                    Code:
                    Rule1 on tele-BH1750#Illuminance do var1 %value% endon on BH1750#Illuminance>%var1% do backlog var1 %value%; publish stat/%topic%/SENSOR/LUX %value%; var2 %value%; endon on BH1750#Illuminance<%var2% do backlog var2 %value%; publish stat/%topic%/SENSOR/LUX %value%; var1 %value%; endon
                    Transmit sensor value only when a delta is reached

                    Send only when the sensor value changes by a certain amount. Change the values of 20 shown after add1 and sub1 to suite your needs

                    Code:
                    Rule1 ON BH1750#Illuminance>%var1% DO Backlog var1 %value%; publish stat/%topic%/SENSOR/LUX %value%; var2 %value%; add1 20; sub2 20 ENDON ON BH1750#Illuminance<%var2% DO Backlog var2 %value%; publish stat/%topic%/SENSOR/LUX %value%; var1 %value%; add1 20; sub2 20 ENDON
                    Turn the rule on
                    After submitting the rule, you need to turn it on, so key in:
                    Code:
                    Rule1 1
                    Changing it for other items.
                    Change the BH1750 to the sensor name and Illuminance to the value sent to use this rule for other items. You wil lalso need tto change the published MQTT topic to match So change it to BME280 and Temperature respectively, change the values of add1 and sub1 each to 5 and you will get a message on a 5 degree temperature change (Use appropriate value for your scale as you may not desire a 5 degree C change)
                    Karl S
                    HS4Pro on Windows 10
                    1070 Devices
                    56 Z-Wave Nodes
                    104 Events
                    HSTouch Clients: 3 Android, 1 iOS
                    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                    Comment


                      #11
                      For my LUX sensor I used TSL2591 which has a large dynamic range. The range makes it sensitive to minor variance of indoor lighting levels. For sunlight detection the gain being used indoors is too high. The source needed to be changed to select a low gain for outdoor dynamic range. The xsns_57_tsl2591.ino source had to be changed as shown below. If this becomes a popular sensor then the selection of the gain should become a user option rather than a developer option.

                      Click image for larger version

Name:	Capture1.PNG
Views:	666
Size:	30.0 KB
ID:	1467222

                      Click image for larger version

Name:	Capture2.PNG
Views:	675
Size:	53.9 KB
ID:	1467223

                      Comment


                        #12
                        Just a note that the sensors used most likely require the Sensors build of Tasmota and not the standard build.
                        Correct, forgot to mention it; thanks ksum
                        Thanks also for the rules templates;
                        however I tend to stay away from rules within Tasmota devices as I tend to forget about them and prefer to centralize events and actions directly in HS; however, I'm always interested to hear about other's use cases; can you elaborate on the benefits you see with doing this at the device level? Lowering the frequency of changes I guess but not sure what is the actual benefit as this is not CPU or DB intensive to my knowledge..


                        For my LUX sensor I used TSL2591 which has a large dynamic range.
                        I had also considered the TSL2591 but felt like the BH1750 would fit my requirements for the weather station.
                        looking back at my notes, here's what I had found:


                        the BH1750 measures the spectrum of visible light ( from 380 nm (violet) to 780 nm (red) )
                        The TSL2561 also measures infra red. It has two diodes, one for visible and infra red light and one for infra red light only.
                        BH1750 fits most requirements, whereas the TSL2561 offers a wider spectrum, more sensitivity and more accuracy.”

                        The BH1750 is supposed to measure up to
                        65535Lux but I started seeing some kind of plateau at 54612 so wondering if this is the actual maximum.
                        No big deal there, just means the sun is shining like it should =) and I can also rely on the VEML for UV details.



                        Click image for larger version  Name:	Capture.PNG Views:	0 Size:	263.7 KB ID:	1467289


                        For indoors light sensing, I use the ADPS9960 as I wanted to test the proximity and gesture features
                        (it actually works pretty well, I use it to trigger my electric fireplace by waving my hand in front of the sensor - The illumimnance sensor works as expected but I was disappointed that gesture could not be used at the same time, so I rely on the proximity feature to switch the fireplace on/off)

                        Comment


                          #13
                          Originally posted by 123qweasd View Post

                          Correct, forgot to mention it; thanks ksum
                          Thanks also for the rules templates;
                          however I tend to stay away from rules within Tasmota devices as I tend to forget about them and prefer to centralize events and actions directly in HS; however, I'm always interested to hear about other's use cases; can you elaborate on the benefits you see with doing this at the device level? Lowering the frequency of changes I guess but not sure what is the actual benefit as this not CPU or DB intensive to my knowledge.
                          My use is to enhance the notice coming from the sensor so it can act on it in a more timely fashion. I like to know when a sudden change in the light level had occurred. Especially on sensors inside. Goes back to my x10 days. I found that the light levels are not reported on changes in tasmota, but just during the update intervals. With this rule I can trigger a HomeSeer event when a light level jumps. Basically it becomes a "Hey! Something caused the light level to increase quickly." Reporting a reed switch change is also done by a rule. So my garage sensor tells me when the light level has changed in a large amount, and also when the garage door is open (reed switch). I will be making some units for bedrooms with reed switches for windows. Not all of our lights are controlled, so the light level change tells me one was turned on/off. And maybe to poll older z-wave units. I have not implemented the last bit, it just came to mind.

                          So we are of a similar mind on using HomeSeer for events whenever possible.
                          Last edited by ksum; April 5, 2021, 11:36 PM. Reason: Corrected typo
                          Karl S
                          HS4Pro on Windows 10
                          1070 Devices
                          56 Z-Wave Nodes
                          104 Events
                          HSTouch Clients: 3 Android, 1 iOS
                          Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                          Comment


                            #14
                            Makes perfect sense now, especially if you want to trigger something rapidly on a sudden light change. will probably add it to the set of rules.
                            Thanks for that.

                            Yann

                            Comment


                              #15
                              123qweased, quick question. Does the UV and light sensor work OK behind the clear plastic top of the case? Was thinking of maybe trying to cut a hole for the sensor with a waterproof seal around it somehow.

                              Following this thread with great interest. Thanks to all for all their input and what they are doing with the sensors. Seems the scope of this Wemos, sensors, mcsMQTT, HS3 is vast. Looking forward to my delivery so I can start playing.

                              Comment

                              Working...
                              X