The future can look a little bleak at times. Predictions of global catastrophe caused by climate change or nuclear war are commonplace. Both oil and water shortages are predicted to become greater problems as time passes.

Even ignoring this stampede of elephants in the room, the prospect of continuing threats from terrorism, economic meltdown, or even the dawn of a true artificial intelligence can leave one feeling somewhat overwhelmed. Not to mention zombies.

What can you do against these looming monoliths of a future unknown?

1. Prepare!

This article will cover a few simple ways a Raspberry Pi or similar microcontroller can help you survive an apocalypse.

Too dramatic? Totally understandable, but these ideas are also useful to know regardless of your opinion on what is to come. All of the following would work perfectly for remote locations, or for projects in countries where the infrastructure isn't as solid.

If you are totally new to the Raspberry Pi, this guide should be a great primer to get you started.

The first thing to determine when making a preparation plan is what will be important in a survival situation. Today we will focus on:

  • Power
  • Water
  • Food
  • Light
  • Security
  • Quality of Life

All of these things either are directly linked with a technology filled post future, or feed back into systems that will help you stay on top of any long term survival situation.

2. Power

Having a stable long term power source that is renewable is essential for everything else in this list. Not only will you rely on it for lighting and any other survival tech, but it will power your Pi, and therefore one of your survival assets.

Battery Up

One can never have enough batteries.

A good steady alternate power source is a great thing to have no matter your current situation. Even in much less catastrophic circumstances such as a power outage in your neighborhood, the ability to spark up some light, get a few tunes playing, and perhaps even get a retro gaming tournament going to wait it out is a real bonus.

There are two kinds of batteries to consider here. Smaller power banks which can operate remotely, and a larger battery bank for charging and bulk storage.

For the former, there are already a huge array of options to choose from. Modern cellphones and tablets take more energy than ever. As we have covered before, Pokemon go is single-handedly responsible for many people buying into portable power, and the RAVPower unit we recommended still looks like the best bang for your buck in terms of a solid long lasting 5V power bank.

Another route to go down is to buy a solar bank. These battery banks have the benefit of having a solar panel built in to them so that they can charge themselves over time. Unfortunately, none of these chargers are quite efficient enough to provide power indefinitely under load, as even in perfect light conditions the charge times are slow.

Despite this fact, a rugged, weatherproof and shockproof power source is a great asset. At the time of writing, this unit [Broken URL Removed] combines a 12,000 mAh capacity with it's own solar charging and rugged casing.

If the Sun Is Still There, Use It!

Instructables user koff1979 created a solar-powered 12V setup for their Raspberry Pi using simple parts.

An advantage of the above setup is that it can be used to charge any 5V power banks you have lying around too. Having several batteries of different types constantly charging is key to not getting left in the dark.

While this setup will likely keep your Pi up and running, it might be worth investing in something bigger if you have the space. Instructables user Jonathanrjpereira has created a larger scale 12V solar power system and documented how you can do it to.

Image Credit: Jonathanrjpereira via Instructables.com

To take this one step further, you can harness the power of the wind. John Showic put together a great in-depth article on running a Raspberry Pi on both solar and wind power, running various tests to get the optimum setup -- including confusing pedestrians by using his car to test power generation!

Image Credit: John C. Showic via www.raspberry-pi-geek.com

Pedal to the Metal

But what if the sun isn't shining? What if it's night time, the weather is still, and you need power? Then you need to work for it! Pedal power is another way to create energy in all situations and Adafruit's K-Tor pedal powered generator is a portable and compact solution. It can power devices directly, or charge up 12V batteries -- though you'll need to do a lot of pedaling to manage that. Given that it's likely that being fit and healthy are going to be pretty important for survival, this one seems like a good idea to get sooner rather than later!

Image Credit: www.adafruit.com

3. Water

Next on our list of essentials is water. Sadly, there is no way in the world a Raspberry Pi could produce water for you, but it can help in monitoring supply.

Keith Hekker's guide outlines a way to monitor water levels using an ultrasonic distance sensor.

Image Credit: Keith Hekker via www.khekker.blogspot.de

While this setup is designed to report to a web-server, the same code could be easily modified to sound an alarm or light up an LED when the water level falls below a certain level.

In a similar vein, the folks at Adafruit used a flow valve to determine how much liquid is coming out of a keg -- root beer in this case, though it may be a perfect way to keep track of the all important beer you have put aside for when you really will need it the most.

4. Food

Another point to consider after a major event is how to feed ourselves. No matter how much food is put aside as a buffer, the long term plan is always to create sustainable ways to grow your own produce.

The Raspberry Pi is a great tool for automation, and Chris Hannam used it to great effect to create a monitoring system to counter his bad luck growing chillies.

Image Credit: Chris Hannam via blog.serverdensity.com

This level of automation goes a long way to ensuring that anything you are growing will get what it needs, and with a small amount of modification could be designed to notify you of thirsty plants, before you lose your future lunch!

In a different but equally cool approach, Instructables user darkstar1 created a self contained Raspberry Pi controlled aeroponics system which uses a pond fogger to keep plants hydrated.

Image Credit: darkstar1 via instructables.com

Having something like this ready along with some plant nutrient is a great way to ensure you can grow things almost anywhere. Aeroponic setups require less water than many other setups, and this DIY version is a perfect small and inexpensive project.

5. Light

We already know that LED bulbs give great illumination at a much lower energy cost, but what other options are there if the power goes out? Outside of the obvious things like wind up torches and candles, what are the more DIY options?

Using a solar setup with 60 Ah battery, similar to the one mentioned earlier, you can power a 5m 12V LED strip rated at two amps for around 30 hours. Of course, there is not going to be much need for light to be on during daylight hours -- and this is something you can automate with your Pi.

The Raspberry Pi Foundation has a great tutorial on light dependent resistors (LDRs), and the simple circuit they describe will give a value based on the amount of light the LDR is receiving. While the tutorial only covers how to get a value reading from the LDR, you could easily take it a little further and use this value to trigger your lighting when it gets dark.

Image Credit: www.raspberrypi.org

The trigger would be a simple relay circuit attached to the same Raspberry Pi. To learn how to set up the relay side of this circuit, check out our guide.

6. Security

Whatever the future holds, home security is paramount. Whether the world outside is falling apart or not, we all like to feel safe in our homes. Millions are spent each year on home security systems, despite concerns about the weaknesses modern security systems can fall foul of.

There are many options for DIY home security systems, but for a simple low powered solution that is hard to exploit, a reed switch is perfect.

Reed switches are magnetically activated switches, that change their state as soon as their magnet moves away. They are cheap, very low powered, and can be installed on any door, window, or even cat-flap in case you are worried about particularly small intruders.

While our article on a door-activated switch was made for fun, the exact same principle can be used to create a reliable low powered alarm system for entry points in your home.

Even if you have secured all of your doors and windows, there may be places you simply don't want other people to be at certain times. This is where motion sensors can come in. Once again, there are many professional units on the market, but if you need something low powered and cheap you can build yourself, then the circuit from this project is perfect. This article is a bit of good natured halloween pranking, but the principles in it are simple and solid ways to ensure you know if anyone, or anything, is sneaking up on you.

Living It Up!

Whether you are truly setting up for a post-world scenario, or are just trying to make small self contained projects for a more off-grid lifestyle, you need the little things in life to keep you going.

For some that might be relaxing and watching one of your favorite shows, or maybe you prefer to kick back with a little retro gaming?

Some of you may be a little more focused however, and wish to continue improving your knowledge regardless of the situation. There are many great resources both online and offline for people wishing to learn more about their Pi. To get more involved with the programming side, it's worth stocking up on Python learning materials now (or since you can equally install node.js onto a Pi, why not Javascript?).

Make It Your Own

Some of these ideas may seem a little far fetched if things really do go wrong, but DIY technology you understand and can repair should be central to your preparations. These examples only cover a few bases and scenarios, but your imagination really is the limit. Taking hobby projects and ideas and turning them into useful life enhancing devices is a wonderful feeling -- whether it is done in a sense of preparation or not.

As with many things in life, if you understand ways to automate small things you will have more time to devote to larger more pressing matters. Whether those consist of fending off raiders in a post world Mad Max situation, or simply using self contained solutions in your daily life to cut down on your carbon footprint, it is well worth looking into these projects and expanding your practical understanding of the technologies involved.

It's fun to learn, and it's practical. Be safe out there folks.

Have you made any plans for a post-apocalyptic world? Are you a practical post-world inventor or do you specialize in Zombie Ballistas? Let us know about your Raspberry Pi apocalypse plans and inventions in the comments section below!

Image Credit: Rashevskyi Viacheslav via Shutterstock.com