3D printed Weather station + OH + HABPanel :D

Have taken the month of December off I find myself catching up on all the important things like cleaning out the washing machine drain (thanks SWAMBO) and building more “important” stuff for the home automation… :smiley:

While I am using the OpenWeatherMap widget and data from them, I want to know what it actually is in my garden. Not somewhere in town near me where the feed is taken from :slight_smile:

The 3D-printed Weather Station


(Original files compliments of Open Green Energy

.

The guts

.

HABPanel main view

The Wemos goes into deep sleep (with the various sensors running it uses 60uA) for 5 minutes.
It then wakes itself up (using a peak of 200mA for roughly 2 seconds)
Using mqtt, it publishes a heat beat, the temp, humidity and battery voltage/percent.
It then goes back to sleep again.

Battery and power consumption:
The battery was @4.1V last night when I first powered it up. In total there are 3 18650s which add up to a measured 6.6Ah.
The maths currently suggests that the batteries will last 60 days with no sunlight. Where I have positioned it in the garden it should get a few hours of bright sun but, being December in the UK, it will only get dull light.
Still, if I find myself running at a net-loss, I can change the update to wake one every 10 minutes and then get around 110-120 days.
I also have some issue with my wifi (Ubiquiti) which, for a few months now, things take up to 3 seconds to logon. It used to be around 300ms. When I solve that my power-on time will reduce a lot!

Trending
I have the trending icon which works like so:
Temperature delta for the last rolling 3 hours, constrained from -5 to 5.
Delta is scaled by colour - green to red.

Anyway, that kept me busy today. Need to work out what to do for the rest of the month :slight_smile:

C

10 Likes

Hi @CDriver
I see you are in the UK
Would you consider printing and selling another station for a fellow openHABer?

1 Like

No problem. :slight_smile:
Send me details.

C

i would have bought on lol. but i am from South africa. shiping would kill me and might get it in spare parts. i will have to invest in a 3d printer.

Nice Job. looks good.

Fellow saffa here :slight_smile:

“Invest” in a printer. There’s all sorts of things that you suddenly need to print :smiley:

1 Like

5 hours later, we’re at 70%

Beautiful

Replace the sensor with DHT11 and put some BMP pressure sensor

I plan on that. They’re on their way from China at the moment. I had some spare dht11 but did not realise they’re only goodbye to zero Celsius.
For temp now I’m using the dallas 1-wire jobbie which is goodbye to minus silly. (colder than the UK…)

Yes I prefer 1wire dallas too. Better resolution, well calibrated. Around 15 in my bus

1 Like

thats a good looking habpanel

any chance you can share your code for the wemos
and tips on getting your habpanel to look that good mine is rough

Yes I read that and while its not a bad instuctable it does not mention Mqtt or openhab in fact one of the comments on it is that someone would like a mqtt implementation

The OP has clearly changed or possibly wirtten a custom image himself as he is also using a different sensor as well. unless I missed a git repo or fork in the page

while I could probably cludge something together the OP seems to have a decent grasp of it and if willing I would like to see the code. so I can see what was changed and learn from it if I can and generally avoid reinventing the wheel

following it further I found a link to his github on his second version of this weather station

1 Like

Is there no wrong temperature measurement beacause of the batterys or voltage regulator/step-up/step-down? I think they will get warm, when they are getting charged?

Is a single BMP280 also usable for good and real measurement? Will it last long outside or is this a inside-only sensor?

Its not going to be much with that small of a solar cell the temp increase is going to be pretty small particularly with 6.6 ah in there

I can’t see the electronics warming anything up. There is ample ventilation, the esp is asleep for 5 minutes (60uA with all the peripherals) and awake for 4-5 seconds (200ish mA). Nothing there is going to warm up.
The solar panel will push in a few 100mAs over the course of the day. It too won’t generate any heat.

I’ll post my code up on github later today. It’s mine and not a fork of his at all as I did not have his sensors nor did his have the mqtt or OTA code update.

One thing I would change about this, I would steepen the angle of the solar panel. In the UK winter, it gets a glancing blow from the sun (when it does shine). If I had another 10 degrees or so I think I would be better.
Sadly, where it is not, it only gets morning sun and no direct sun during the day. The battery is going backwards and I am running at a net loss on a sunny day. On a cloudy day it’s just no-charge so will eventually run out.

I will move location or upload a new 10 minute sleep :slight_smile:

Battery since I put it outside and started logging.

I’ll be honest, this is going down quicker than I thought. Will check it out tomorrow again.

Interesting report, Crispin. I have a similar setup, except the brains of the instrument are a Moteino, so communications are on 900MHz RFM69HC radios back to our house, where a relay converts that signal to MQTT.

I use a solar panel which can provide about 2 watts in full sun. The Moteino is awake for a fraction of a second, every 8 seconds. I’m using various modules to watch the battery level and charge the battery. Those modules don’t sleep, so I am using more power than required if meteorology was the only objective. Typically it recharges from the overnight drainage in a few hours.

Here’s a recent diurnal cycle: https://docs.google.com/presentation/d/1EYVSn0Vy6yZRT8KObnLWuYmBgGE-2-E6Q5jwiwWlnEo/edit?usp=sharing

Interesting Bill.

The one I think I put on mine is a 5.5V @ 120mA which is .66W.

I found the problem though!

The basis of the code is to wake up, get sensor data, send it to MQTT and go to sleep.
This worked but I could never update it remotely as timing would be impossible. I therefor put in a function to subscribe to a wake_timeout topic in mqtt. Should the value be ON then it stayed awake for 60 seconds. This would allow you to send a stay_awake command, wait for up to 5 minutes while it slept and then you have a 60 second window to accept a software update.

I published a “retain” message for the wake and the weather station would update that to OFF once it’s acknowledged it.
What I did not know was that if I publish a retain, any subsequent publish also has to be a retain. Any subscriber waking up would get the last retained message which was ON.
The weather station then stayed on for 5 + 60 seconds every 5 minutes. This is why the battery drained so fast.

I’ve now refactored it to use a different library (MQTTPubSub) which allows you to publish retained messages.

A few other improvements to the startup also shaved off some seconds so my whole startup is now 2-3 seconds.

Battery is now at 61% (3.67V) so I’ll see if it makes some gains over the coming days and heads back towards 90% which I will be happy with.

edit to add some images

Press the Update button and it sends the message. The label is then updated to say “Waiting for response”

And when it does wake up, it shows you the countdown before sleeping again


(Ignore the values for now :slight_smile: )

C