Create a weather forecasting station using a Feather S2 and an OLED

At the moment, I am waiting for the second version of my PCB for the PicoPicorder. In a departure from my regular making, I decided to buy a Feather S2 from Pimoroni. This is a Feather-format board with built-in WiFI that comes with CircuitPython pre-installed (although I believe you can install MicroPython if you want to – but in the end, I stuck with CircuitPython). If you want to know more about the Feather S2, take a look at this website.

But what to do with it?

My step-daughter has recently started a (very) local waitressing job whilst waiting to find her dream job (we hope!). Until today, this was all very outside-based, due to COVID restrictions in the UK. WIth today’s slight relaxation of restrictions, she’ll be indoors some of the time, but they’re (very sensibly) keeping the outside area. I decided, therefore, that she needed a way of knowing what the weather was going to be like for upcoming shifts.

I also bought a FeatherWing OLED at the same time so decided to use that as the readout for a weather forecasting station. I decided that I didn’t just want to sandwich the two together (because that would give me quite a tall profile and I wanted something flatter. This meant either a PCB or a piece of stripboard. I will be going for the latter eventually, but first of all I decided to breadboard the two boards (as you can see in the image above). This involved soldering male headers to both boards, which was fairly easy (once I’d got used to my new varifocals!)

After sorting out the circuit, I wrote some code that would allow me to:

  • Select a location to forecast the weather for (because I wanted it to be multi-user, so added in my parents’ home town and the in-laws’ home town). (Button A on the OLED).
  • Retrieve a forecast from the OpenWeatherMap.org API (which I’d previously signed up for, on their Free tier). (Button B).
  • Display the current weather and the next 5 forecast weather readings. (Button C).

All my code is on GitHub if you’d like to take a look. Feel free to re-use and adapt if you’d like to. The API returns JSON, and there’s some conversion functions in there to get the data into a more manageable (smaller) packet. There’s probably a more efficient way to use the displayio library, but I wanted to get the code done in a day. I learned loads about Python, loops especially, doing this!

Here is a video demo of the device as it currently is on the breadboard. As you can imagine, it won’t take much to convert this to a stripboard version! I will then add a 3D printed box to put it in.

Let me know what you think of the project – and if you can think of any additional bells and whistles I can add!

Find the current location of the International Space Station and display it on an e-ink display with a Raspberry Pi

Graeme over at Raspberry Connect has created this nifty little project using a Raspberry Pi Zero W and a small e-ink display from SeeedStudio.

Using an open API, he grabs the position of the ISS and then plots it as a red dot on a world map (with a red trail to show its path). He also works out which geographical location the ISS is currently over and displays that as well, along with how far away that is from his current UK-based location.

It’s a great project, especially for kids learning where places are on the Earth and who have an appreciation of Space-type… things.

Graeme has documented the entire project over on his blog and it is well worth a look.

 

Sending and receiving messages from the grandkids with the Raspberry Pi-powered Yayagram

Spain-based Manu, who you can find on Twitter, needed to help his 96-year old grandmother communicate with her grandchildren. She is hard-of-hearing and not very tech-savvy, so having her use a mobile phone is a bit of a non-starter. To solve the problem, Manu built the Yayagram (Yaya means ‘Granny’ in Castilian) which uses a Raspberry Pi to communicate with the Telegram service.

The contraption is a box (as pictured) which connects Manu’s granny, via a jack cable, to her grandchildren and allows her to send voice messages to them by pressing and holding the red button. His granny, therefore, need only connect the jack cable to the appropriate grandchild’s port (or to the ‘send all’ port), record a message using the inbuilt microphone, release the button and away the message goes.

The grandchildren receive the message and can also send a reply (or an initial message) which gets printed out by the Yayagram using a thermal printer. Inside the box is a Raspberry Pi 4, connected up to all the peripherals and indicator LEDs over USB and GPIO.

Manu has found that the Yayagram has made his grandmother more independent, and, of course, more communicative with her family, especially in the times of COVID-19 restrictions.

You can read slightly more about the project, and see more photos, over on this Twitter thread.

Manu, his grandmother and the Yayagram

Make your own Ghostbuster PKE Meter prop using a Raspberry Pi and SenseHAT

Starscream205 on Instructables has written up this great handheld, battery-powered project. It is a PKE Meter, popularised in the movie (and cartoon) Ghostbusters. Made out of Raspberry Pi 3B+, a SenseHAT, a night-vision camera (with IR lights) and a 3.5″ low-resolution monitor, the PKE Meter is, of course, “just” a prop, but it looks cool and takes pictures at the click of a button. The 3D-printed case makes it look the part! With a little bit more work using the SenseHAT’s sensors and the feed from the camera, you could take it even further if you wanted to.

You can read all about it on Instructables.

Guest post – Building a custom Raspberry Pi Pico-powered WiFi temperature sensor using MQTT and CircuitPython

David Booth is here with another guest post. This time a custom temperature sensor using a Raspberry Pi Pico and a self-designed PCB.

Overview

A custom, low power temperature sensor powered by a Raspberry Pi Pico with an LCD display and WiFi connectivity for integration into an MQTT home automation hub.

Specifications

For a number of years now, I’ve been wanting to monitor room temperatures across my house to assess the effect of multiple heating sources and insulation efficiency. Best practice would dictate that I have multiple sensors running in parallel to get data points that are relative to one another. For multiple sensors to be running constantly, I’d prefer it to be low powered and low cost to maximise the number of units I can have in the setup. For ease of setup, it would be preferable for each unit to be wireless to allow temperature data collection to be performed in a single location and for each unit to only require a power connection.

Prototyping

1. In the early days

Since the Pico came about, it became the obvious choice over a Pi Zero due to its low power consumption and the fact that it didn’t matter if the device lost power at any time. Stage one was to learn how to integrate the Pico with a screen and a temperature sensor. The Pico Omnibus from Pimoroni with dual expansion board pins meant I could start by adding a dedicated Pico Display and still have easy access to the GPIO pins for connecting other boards. At the time of launch, there were no Pico add-on boards with temperature sensors that I could find so I chose a BMP280 temperature/humidity I2C sensor due to its low cost and small size.

The first working prototype stored the average temperature over an hour and displayed this as a graph for a 24 hour period.

2. Temporal progress

To further the project, the next stage was to make the Pico able to wirelessly transmit the data to some sort of hub. I already have an MQTT broker for my custom Raspberry Pi-powered network doorbell and automated LED porch lights so it made sense to link the two systems together.

When designing, the Pico was new so there were no dedicated WiFi systems with documentation on how to connect them together. That was until Les Pounder from Tom’s Hardware did a great writeup on how to use the AirLift WiFi Featherwing with the Pico. Coincidentally, I had already bought an AirLift with the intention to “mesh” it with the Pico. This, however, came with the caveat that I would need to swap from the default Raspberry Pi MicroPython firmware to CircuitPython firmware. Thinking this was going to be a nightmare, I was happy to find out it was painless and actually made development much easier. With CircuitPython, the Pico was now accessible as a USB storage device so I could edit the files directly on the Pico using a standard text editor of my choice (not forced into using something like Thonny). It also had the added benefit that the Pico auto-reloaded my code when the source code files were modified. I just had to remember to copy over the Adafruit CircuitPython packages necessary to interact with the ESP32 SPI WiFi module and BMP280 temperature sensor.

The only downside I found was that the Adafruit CircuitPython packages for the Pico Display worked differently to the Pimoroni MicroPython packages and were less helpful when it came to example code. I should be clear: it did have a few examples, but they were for static display of information, not changeable, constantly-updated data like I’d need. It therefore took a bit of “experimenting” to port my code over to the new style.

3. Moving away from the “breadboard”

The prototype was now operational but was a mess of wires connecting the WiFi and temperature sensor to the Pico as neither module fitted onto the Pimoroni Pico Omnibus board and I had to use jumper wires to get to this stage.

Wanting to make a custom PCB to neaten everything up, I started with a piece of stripboard and soldered the header pins necessary to house the four boards how I wanted them, but after soldering ninety three header pins and still having to then solder twenty seven additional wires (in a specific order) on the back to connect everything up, I realised it was just as easy (and probably quicker) to draw up a PCB in KiCad and get it fabricated.

Having used KiCad previously to design Raspberry Pi HATs for my Pi Wars entry over the last few years, I found this fairly easy. The board design would be basic: some header pins and traces to link them together based on my rats nest of wires. I had this designed in an hour or two. Knowing that the PCB fabricator wouldn’t care what shape the board was, I decided that it would not be a simple rectangle. Hence why I chose to add mount holes on “wings” which jut out to give it a distinctive look.

Another consideration for board design was that it would be using WiFi. I knew that adding a ground plane would potentially reduce the wireless signal (it creates a basic Faraday Cage) so I skipped that step.

4. Fabrication and the results

Following the JLCPCB, it was a simple case of exporting the gerber files and sending them to JLCPCB for fabrication. The cost of fabrication was a touch over £15 for five boards which they fabricated and delivered in a little under two weeks.

The first thing I did was to solder on header pins and then I plugged in the four boards.

Surprisingly, my design worked first time (there’s normally something I forget to link together or add).

Mounting to the wall was easy with the four pre-drilled mounting holes in the design. I found that orientation is the key as the temperature sensor reads a degree or so higher if it is oriented directly above the Pico and the screen. Simply rotating the whole thing so the temp sensor is on the bottom resolves this and the screen can be rotated in-code so it reads the right way up.

Overall, I am very happy with the design and will start assembling multiple boards ready for deployment. All that remains is to add a process in the MQTT hub to collect the temperature readings and display them on an internal web page.

Code and PCB files

For anyone interested in replicating the project, here is a link to my Github repository which contains the source code and KiCad PCB files.

Plant moisture detector uses a Raspberry Pi Pico for a low-cost, easy to implement project – the 3D-printed enclosure is an added bonus

Spencer Organ recently went to the virtual Preston Raspberry Jam which had a gardening theme to talk about his project – a Raspberry Pi Pico watering can. You can see the innards above. Costing under £15, the project helps to monitor a single plant (in Spencer’s case a Sweetpea plant) and tell you the soil moisture level. The level is displayed  as a nice graph on a cheap SSD and the whole thing is powered by a Raspberry Pi Pico. A 3D-printed enclosure in the shape of a watering can keeps the whole thing tidy.

You can find details, including how to reproduce it, on Spencer’s Maker Cupboard blog.

You can watch Spencer talk about his project by going to this YouTube video – open up the full description of the video and then click to skip directly to his talk.