Solar-powered weather station

Hi Bob,
That's a very good point you made.
The board mentioned and illustrated in Topic-1 or Stage-1 has indeed got this battery protection device.
The board used in this project has three chips.
The large one on the left-hand-side is the Li-Ion charging controller, the one at bottom-right is a dual channel N-MOSFET and the one at top-right is the DW01V (battery protecion IC).

Fair-weather experiment.

For the last three weeks we have been doing an experiment to see how long the Li-Ion battery will power the Wemos. We started off with a 'deepsleep' time of 20-mins for the first week, then 15-mins and now it's been ticking along at 10-minute intervals for nearly a week.

All the hardware is housed in a cardboard box (as we won't have access to the school's laser cutting machine to make Stage-6 until September) so the project is only put outside when the weather is dry.
We do however keep the project running (24 * 7) even if it is indoors.

Please note: other types of cardboard boxes are available!!!

Always fun to do this type of experimentation. Have you run it with radio only switched off? I forget which mode that is now, but seem to recall significant power savings could also be made in this mode, while still allowing sensor input. Then, every x period, fire up the wifi and send your data packets, back to Node Red naturally. :laughing:

Great fun indeed.

Yes - that's what we have been doing. Putting the Wemos D1 Mini into 'deepsleep' for a long period of time.
We measured the current the Wemos takes during normal operation to be 170mA and when it goes into 'deepsleep' it goes down to 0.2mA. Quite a saving.

We are using ESP Easy as the firmware and have written some 'rules' so when the Wemos wakes up it takes some measurements and send the data via MQTT to Node-RED and optionally also send the information to ThingSpeak.

Stage-2 has been documented.
There is a link at the top of this thread.

1 Like

Such great fun being a student these days. The closest I got was taking the valves out of a television.

I've just posted a link (at the top of this thread) to the write-up for...

"Putting the Wemos D1 Mini into 'deepsleep' to conserve the battery's charge".

I hope you enjoy reading about Stage 2 of this project - hopefully more to come.

1 Like

I've just posted a link (at the top of this thread) to the write-up for...

" Switching on/off ancillary devices (e.g. BME280 and ADS1115 modules) to conserve energy".

I hope you enjoy reading about Stage 3 of this project - hopefully more to come.

1 Like

I've just posted a link (at the top of this thread) to the write-up for...

"Measuring and reporting air temperature, humidity and pressure and sending this data to the 'Cloud' "

I hope you enjoy reading about Stage 4 of this project - hopefully more to come.

1 Like

Hi David,

I have just come across your post and found it very interesting.
I myself have tinkered with all sorts of sensors, micro controllers for while now and more recently Node-Red, InfluxDB and Grafana.
This is a great project that can be expanded as I have found myself, adding other sensors, databases and graphing and with the amount of cheap sensors, it won't cost a fortune.

There is so much to learn with this, electronics, programming, remote access, data capturing and data bases, environment, IOT, etc, this list goes on.

Would the data from the weather station be available to the public. I noticed you mentioned Thingspeak which I am familiar with but I don't know BeeBotte.

Is this just one student, a group or whole class?

By the way, what is that brown lump thing in the box behind the breadboard?


@Cathprotech Martin...haven't you ever seen a weather rock? :rofl:

1 Like

So, they have already extended the sensors :wink:

Hi Martin,
It's one student's project - however I've given him a fair amount of help.
He's tackled the project in stages and has used some of the work he did with me last year.

The brown lump is a 'stone' (very low-tech) to stop the cardboard box being blown away by the wind.

I'll check if the ThingSpeak channel is 'public' or just 'private'.

We selected 'Beebotte' as it's a cloud-based MQTT broker. This means the student can get readings from the weather station at home as well as at school. Things have moved on a bit in the last two weeks as I've created an experimental MySQL database on my ISP (which gives global private access).

Over the summer holidays I've been storing the readings in a MySQL dB and playing around with a NR-flow to extract different sets of readings and graph them on the Dashboard.
i.e. doing some homework so I can give him another couple of stages to tackle in September onwards.

Graph of Wemos input and output voltage (that should be +3V3). You can see the charge on the battery had dropped to a very low level (no sunshine as it was kept indoors as it had rained for a few days!!).

Graph of air temperatue - you can see when I took the cardboard box out into the garden.

Cheers from David.

Well, it looks like Paul was right about the weather rock then, but your serves a different purpose!

Looking at your graphs, it appears you took the box outside just in time to charge the battery and you got a good dose of sunlight to top it up too.
What are you using for the graphs, its not the stock Thingspeak graph, so I assume you taking the data and producing your own.

I have recently been pointed to InfluxDB and Grafana, I must admit that both are very easy to use (after the initial shock).
I use MySQL at work and must say that InfluxDB is much easier and more useful for this type of data recording and integrating it with Grafana is fairly straight forward too.

What about adding an INA219 to measure the charge / discharge current? I tried with the ADS1115 and shunt resistors but found it to be too noisy for measuring low currents. An INA219 will give you voltage and current readings. Adding small sections gradually could keep you student from losing interest.


Hi Martin,
Thanks for your continued interest in this project.

You're spot-on with your observations from the graphs. I've since modified the NR-flow to check the Li-Ion battery voltage and send a message ( via the 'telegram' node ) to my mobile phone if the value drops below +3.5V

I've used a MySQL database to store the weather station readings and modified the Node-RED flow created by Csongor Varga to produce a semi-dynamic graphing facility. (i.e. you can select one dataset then overlay another and another.). Checkout his excellent series of Youtube videos.

I might re-visit InfuxDB and Grafana (which I have running on one of my RPi(s) ).

I like the idea of using the INA219 - I'll give that some thought.

I've built a second weather station (WS) and so has my friend Paul @zenofmud who is located in Boston, USA. Between us we have developed a NR-flow whereby we can control all our weather stations. (e.g. I can stop Paul's WS from going into 'deepsleep', perform some readings, then put it back to sleep remotely from the UK - great fun.)

I think that MySQL is possibly more useful to teach to people as they are more likely to come across SQL in general IT. However, there is no doubt that InfluxDB is far more useful for timeseries data. In terms of teaching though, one to keep for more advanced students possibly?

I love the idea of you setting up networks of weather sensors around the world - maybe with other schools? Though I would check to see if such networks maybe already exist. While it would be nice for a school to form a relationship with some other schools worldwide, it would also be great for students to participate in worldwide weather recording. It might give them a real sense of the possibilities of IoT and IT.

Hi Julian,
Thanks for your input and the suggestion about linking-up the weather stations with other schools.
I'll certainly suggest that to the IT and Computing staff at the school where I tutor the IoT Club.

Hi Martin,
Thanks for the heads-up on the INA219.
I've ordered a set of these devices from China.

Hi Dave,

Not sure if your using the school budget or your own personal pennies, but either way, the benefits of these additions / sensors far out way the cost. The knowledge and experience gained for the price of a school meal basically.

I have thought about approaching my son's school with similar ideas, but worried I would bite off more than I can chew and would not want to let anyone down.
I also work away from home (as I am at the moment) so I don't have access to my own system to experiment with either.

It's nice to help with some ideas even though I am very new to this myself, funny enough, I gained a lot of information from Julian's post, he has been most helpful.


Hi Martin,
It's been my money for the last 2-years. I retired from being a computer science lecturer (teaching microelectronics and computing) 3-years ago. I approached one of the local senior schools in my area and for some reason they bit my hand off to set-up and run their (after school) IoT Club.

It's been great fun with the groups of students who have attended the Club. A couple of them (including the guy who has been working on the weather station) have been with me for the whole 3-years and want to carry on next year.

Let me know if you do decide to offer your expertise to your son's school as I have a larger number of tutorials and projects (I've created during the last 3-years) that I could share with you.


1 Like

That's a kind offer Dave, but I was thinking more of advising the school IT / DT teacher, not actually teaching myself.
I was trying to explain to a colleague here, how to use Node-Red to check 'Fortnite' (the game) stats and display them as simple text on the dashboard, and my explanation was just a jumbled mess!
I may have put him off rather than encourage him.