Solar-powered weather station

I suppose then it will be a while before we see them getting hands on and building another weather station or adding to the existing, or do you have other projects in mind?

I have some ideas in my mind and some 'spin-offs' (remote communications) from the weather station project that I've developed with Paul @zenofmud

One of my students wants to set-up a VPN so he can check the IP cameras at his home and see if the postman has delivered anything for him.

Here's a test circuit for the INA219 (voltage/current) sensor.
I've used a 330 ohm resistor to lightly 'load' the circuit.
Before tearing down the circuit and incorporating it into the weather station (i.e. to sense the solar panel's output voltage and the current flowing into the TP4056) a Fritzing layout was produced.

The Fritzing image was produced and sent to me by @zenofmud - thanks Paul.

Here are some screen-shots from the Wemos D1 Mini (running ESP Easy).

3 Likes

Was a bit confused with the circuit diagram at first. I thought you had wired it up strangly, then I read you text again and realised the 330R was just to test it.
Funny, I have an INA219 and not even got around to useing it yet. I also got hold of an INA3221, which is a 3 channel version.
However the 3 channels are not independent, they all run from a single supply.
As I will (eventually when I get round to it) have multiple sensors in different places, I will probably feed them from the INA3221 and be able to measure the current/voltage for at least 3 seperate sensor nodes.
Unfortunatly since coming home from work a few weeks ago, for some reason I just cannot get into it.
I need to crack on and get things sorted.
I now have a lightning sensor which I am having difficulty interfacing. I wanted to use it with an ESP8266 but there are no libraries, so need to run it from and Arduino and then link it the the RPi running Node-Red via some other meathod, maybe bluetooth.
I also need to re-do my particle sensor, I have some different code to try with a library, at the moment its running without a library and just straight code.
Catch you later
Martin

Hi Martin @Cathprotech,
I've written a tutorial guide for my IoT students on how to use the INA219 voltage/current sensing device.

Here's a hyperlink to it.

INA219 - voltage and current sensor

Hi Dave,

Looks good but I can only see one error and its a big one.... where is the 'Sun' thing you mention? Measure light levels from what?
Lol

Well, I'm back at work for around 28 days so cannot do anything and unfortunatly on my 5 weeks at home I was messing around with a lightning detector and didn't get much else done. I did connect a couple of small 6v 1w solar panels up to a Li-On charger via the INA219 and monitored that for a few days.
I noticed even in strong direct sunlight, the maximum current I could draw was just over 120mA at 4V (around 400mW) and that was from 2 panels connected in parallel.
It took 4 days to top-up a 2600mAh Li-On battery to full charge, starting from around 3.7 volts.
How is the project coming along Dave. Did your students manage to build the circuit with the INA219 and find the sun?
What sort of results did you get?

Cheers
Martin

Hi Martin,
Thanks for your continued interest in the WS project.

This week, one of my students put a breadboard (with a Wemos D1 Mini) together to monitor the readings (with a INA219) from a solar panel that they placed on a window sill. In bright sunlight at about 15:45 hrs the solar panel was giving out 6V. It was only lightly loaded with a 330 ohm resistor (so the current was only about 20mA).

The objective was to plot the readings on a dashboard (in a NR flow) using a graph and some gauges.

PS:
These were the experiments I did (whilst the school was on summer recess)...

  1. Charged the Li-Ion battery using a USB charger (so I started off with a fully charged battery).
  2. Tried different 'sleep' times for the Wemos (e.g. 30, 20, 15 and 10-minutes).
  3. Tried disconnecting the solar panel to see how long the WS would work.

Results for (2) indicated that with a 'sleep' time of 15-minutes the WS kept going even though some days there was little sun (here in the UK).

Results for (3) gave 2.5 to 3-days before the battery voltage was so low the Wemos gave up the ghost!!

One of my other students has been rigging up a second WiFi router in the Library area (as this room backs on to the external garden areas where we are planning on placing the WS). This involves talking with the IT Support people as the school's web-filter needs to be adjusted and a fixed IP allocated to a designated ethernet socket. This week we managed to get the Wemos to publish readings (via the new router) to BeeBotte-MQTT and for our Node-RED system (in the IoT Club room) to subscribe and receive the data.

[ I think BeeBotte might be hosted on AWS somewhere in the world?? ]

There is one week before half-term and then the focus will be on creating some demos with a Christmas flavour - flashing lights etc.. (so the WS will probably be put on the back-burner for a while).

PPS:
A friend of mine @zenofmud has also built a duplicate weather station and has been experimenting with solar panels, the INA219 and the TP4056 (Li-Ion battery-charging controller), so if he reads this he might share his experiences.

Kind regards, David.

2 Likes

Hi David,

I used one of these....

Solar%20Charger
I got it from Aliexpress for £1.22 delivered!

It is based on a CN3065 which is designed for charging Li-on batteries from solar panels. It seems to kick in at just over 4 volts and holds the solar panels at 4 volts, upping the current drain.

Although I made a nice set of graphs for voltage, current, power, etc. in Node-Red, I didn't save any of the results, but as mentioned earlier, I think the maximum peak power was about 400mW (120mA) draw from the solar panels. I did not measure the Li-on battery side of things so I don't know the supply current but I doubt the charger circuit takes much.

These cheap and cheerful solar panels from China that claim to be 1w at 6v are far from it. I tested a few a while ago and managed at best a 3rd of the rating.

I tried last year running 2 in series through a regulator to charge a single Li-on battery attached to my weather station. It worked fine for a few months but eventually ended badly.

I killed the battery completely and damaged my D1 mini. Although the D1 still works, it gets quite hot and draws double the current of my other D1 mini's.

However, it was an experiment and did give me some useful results. Luckily the battery was one of many from old laptop battery packs and D1 mini's aren’t exactly expensive, so it was a good experiment.

As I have solar panels on my roof, I know a little about MPPT (Maximum Power Point Tracking) for obtaining the best current / voltage from a solar panel. Unfortunately it’s not like connecting a battery charger to a battery, it requires a little more management, hence trying out this cheap little circuit with the CN3065 chip. So far it seems to control things quite well.

Be interested to know Paul's results with the TP4056's, I have a couple and could not get anything out of them at all when connected to my solar panels, even when they were connected in series to bump up the supply voltage.

Is your data available anywhere for people to view yet?

Cheers

Martin

Hi Martin,
If I get a chance this week, I'll put a heavier load on the INA219 and see how the solar panel holds up.
I suspect the internal resistance of the panel will affect its regulation.
It will probably give a similar output as yours (around the 120mA mark).

I didn't keep the results I obtained in the summer, but if I get time I might well repeat them now we have less hours of sunshine (and the sun is less strong) during the winter months (here in the UK).

Hi David (and others),

Sorry been busy at work (and still will be until about 20th November) for the last few weeks so not been checking here.
Any update on the school project, did you find any sunlight?

Thanks

Martin

All gone quiet David
Any updates

I'm hoping to finally get some time to get back on this myself @Cathprotech have you started building one?

What data would you like to see?

Hi to Martin and others...
Although it may have gone quiet on the WS front - my students have still been busy.

They want to undertake a 'group' project with a Christmas theme and this afternoon we came up with these ideas...

An ultrasonic distance detector that turns ON different coloured RGB strip-lights on a Christmas tree as you get nearer or maybe increases the brightness as you get nearer.

Christmas Music Machine
We've not tried playing music out of the 3.5mm audio socket on the RPi so this will be a learning curve.
They intend to use @zenofmud music-playing flow as a starting point (thanks to Paul).


music_control_new

Using some infrared detectors and 'playsound' in the browser.
This is a floorplan with a Christmas tree in the far-left corner.
The IR near the door welcomes you whilst the one near the tree is guarding it!!!

1 Like

@dynamicdave, around here we could be tempted to integrate Santa's Grotto with the weather station and announce the probability of a white Christmas. In your part of the world, maybe not.

Hi to Mike and others,
I've been playing around with various flows for the Christmas Music Machine and found it lends itself to being constructed as a Finite State Machine (FSM) - well actually two FSMs.

The following state-diagrams relate to the Music Controls shown above.

FSM1

FSM2

There are two hidden connections from the second FSM to the first to force the machine into the 'Stopped' state and then the 'Playing' state once the new track has been selected.

1 Like

@dynamicdave Dave, you should probably split the Music Machine off to a different thread.

Thanks Paul - will do.

Hi all,

I like the festive ideas.

I have returned home to a little disaster with my atmosphere monitor or rather the RPi.
When I tried to look at Node-Red on my network, I got nothing.
With Grafana I got a blank screen but the URL did change to /login
I could still connetc using SSH to my Pi but looks like something has gone terribly wrong and looks like I will have to start from scratch. With a bit of luck, I should be able to rescue my Node-Red flows but not sure about the Grafana layout. Not sure if my InfluxDB database will be in tact and if it can be used.
I was planning on re-vamping my whole system but didn't think it would be under these circumstances.
It seems every time I go away to work, something happens. (I blame the wife).

Anyway, good luck with the festive projects, hope you continue posting about them.

Martin

So, after my little problems I installed Raspbian Buster and the latest versions of Node-Red and Grafana.

Installed Mosquito and Influx dB, copied all my old databases and files, had a few problems with permissions and incompatible nodes, but the outcome is that its all up and running again.

Strangely it looks like I had been getting data up until the 12th November and it looks as though an update (or several updates) were implemented on the 12th Nov. which were incompatible.

Maybe we had a power cut and the RPi rebooted, implementing the updates at the same time.

So, how are the festive projects coming along. I take it that there are 3 groups, so did each group make there own or was it just settled for one project.

Although probably a little late for you now, but I have just taken delivery of an I2S Mono Amp. I haven't tested it yet but this would be ideal for your Rpi's as it not only decodes (if that’s the right word) digital audio but also has a built-in audio amp (3 Watt) so you just need to connect to a speaker. It is mono but you can choose if you want the left, right or both channels to the output.

I suppose if you had two modules you could set one for left, one for right and have stereo.
It was only a couple of £ so could be ideal for projects.

Looking forward to some updates on the current projects.