Hackaday Prize Entry: Powering A Pi From A Battery

Knocking a microcontroller into sleep mode and waking it up on demand or in intervals is common practice in many low power applications, enabling devices to stay in operation for years on a single coin cell battery. Since there are tons of applications where you might want to do similar things with a Raspberry Pi, [Patrick Van Oosterwijck] created the LiFePO4wered/Pi. The module that snaps on to eight GPIO pins of a Pi, extending it by a long life LiFePO4 battery, a charging regulator, and a proper power management. Obviously, it also makes a great UPS.

lifepo_pcbs[Patrick] realized this project by expanding his already available and equally useful LiFePO4wered/USB charging regulator module by a low power MSP430G2131 microcontroller and a load switch. A daemon on the Raspberry Pi speaks to the module over I2C, allowing you to schedule a wake-up timer, let your Pi autoboot after a power outage or just read out the current battery voltage through a command line tool. Once the Pi is safely shut down, the microcontroller will also go to sleep, resulting in a standby current of 8 uA for the whole system. Together with the 500 mAh LiFePo4 cell, that’s theoretically low enough to send your Pi-ncess into a seven-year-long sleep.

LiFePO4wered/Pi is not only good for sleeping, though. [Patrick’s] runtime tests show, that the 500 mAh cell will power a Raspberry Pi Zero and a WiFi dongle for about two hours. Because the Raspberry Pi and many USB peripherals won’t complain when only 3.2 V are present on the VBUS, [Patrick] was able to squeeze out even more runtime by dismissing the boost converter from the design and driving the Pi directly from the battery voltage. If that worries you, you can either read a detailed explanation on why that works so well or just have a look at the more compliant 5 V version.

lifepo_time_laps_cameraEventually, [Patrick] used his module to create a Raspberry Pi time-lapse camera. A little script lets the Pi take a picture on boot up, set a wake-up timer and go back to sleep again. Safely enclosed in a waterproof electric box and deployed into the wild, the camera took 120 pictures on a single charge.

We’re sure the module will find it’s way into many cool projects and we’re counting the hours until we can get one in [Patrick’s] tindie store. Until then, enjoy the time-lapse video:

The HackadayPrize2016 is Sponsored by:

 

Minimal MQTT: Building A Broker

In this short series, we’re going to get you set up with a completely DIY home automation system using MQTT. Why? Because it’s just about the easiest thing under the sun, and it’s something that many of you out there will be able to do with material on-hand: a Raspberry Pi as a server and an ESP8266 node as a sensor client. Expanding out to something more complicated is left as an exercise to the motivated reader, or can be simply left to mission creep.

We’ll do this in four baby steps. Each one should take you only fifteen minutes and is completely self-contained. There’s a bunch more that you can learn and explore, but we’re going to get you a taste of the power with the absolute minimal hassle.

In this installment, we’re going to build a broker on a Raspberry Pi, which is the hub of your MQTT network. Next time, we’ll get an ESP8266 up and running and start logging some data. After that, we’ll do some back-end scripting in Python to make the data speak, and in the last installment, we’ll explore some of the useful frills and fancy bits. Let’s get started!

Continue reading “Minimal MQTT: Building A Broker”

Raspberry Pi Balloon Goes Too High, Goes Boom, But Survives

Some people like to get high on a Wednesday afternoon. [Kevin Hubbard] of Black Mesa Labs likes to get really high. Even higher than intended: last month, he flew a helium balloon powered by a Raspberry Pi to 103,000 feet. It was only supposed to go to 90,000, but a fault in the code for the controller meant that it went higher, burst and plunged to the ground. All thanks to an extra hash mark in his code.

Continue reading “Raspberry Pi Balloon Goes Too High, Goes Boom, But Survives”

K.I.S.S. Pi Sprinkler – Just Keep The Plants Alive

A good first step in a project is knowing what you want to do. [Ben Fino] made it clear that his Raspberry Pi Sprinkler control system for his wife’s garden had one goal: keep the plants alive. The resulting project is doing just that and no more.

The circuitry, and plumbing, is straightforward and explained well in the Instructable. All the electronics consists of is the Pi and a MOSFET to take the 3.3v GPIO to 5v to control a relay. The valve controlling the water requires 28v AC which necessitated the relay to control it. There are also three LEDs: one is for power, one to indicate when the valve is opened, and one is an extra for some future purpose.

The intriguing part is the use of weather data from the web to determine if it’s rained recently. Python scripts provided by [Ben’s] friend [Mark Veillette] use a weather site API to get the rainfall data. The main script is set to run once every 24 hours. [Ben] set his system to water unless the previous day had sufficient rain. How much rain and the number of look-back days is programmable.

What a great application of the KISS principle: keep it simple, stupid – except for that third LED without a purpose.

Don’t Take Photos Of Your Arduino 101 Either, It’s Light Sensitive

Wafer level chips are cheap and very tiny, but as [Kevin Darrah] shows, vulnerable to bright light without the protective plastic casings standard on other chip packages.

We covered a similar phenomenon when the Raspberry Pi 2 came out. A user was taking photos of his Pi to document a project. Whenever his camera flash went off, it would reset the board.

[Kevin] got a new Arduino 101 board into his lab. The board has a processor from Intel, an accelerometer, and Bluetooth Low Energy out of the box while staying within the same relative price bracket as the Atmel versions. He was admiring the board, when he noticed that one of the components glittered under the light. Curious, he pulled open the schematic for the board, and found that it was the chip that switched power between the barrel jack and the USB. Not only that, it was a wafer level package.

So, he got out his camera and a laser. Sure enough, both would cause the power to drop off for as long as the package was exposed to the strong light. The Raspberry Pi foundation later wrote about this phenomenon in more detail. They say it won’t affect normal use, but if you’re going to expose your device to high energy light, simply put it inside a case or cover the chip with tape, Sugru, or a non-conductive paint to shield it.

EDIT: [Kevin] also tested it under the sun and found conditions in which it would reset. Videos after the break.

Continue reading “Don’t Take Photos Of Your Arduino 101 Either, It’s Light Sensitive”

An Open Source Lead Tester

If you’ve ever needed an example of colossal failure of government actors, you need only to look at Flint, Michigan’s water crisis. After the city of Flint changed water supplies from Detroit to the Flint river, city officials failed to add the correct corrosion inhibitors. This meant that lead dissolved into the water, thousands of children were exposed to lead in drinking water, a government coverup ensued, [Erin Brockovich] showed up, the foreman of the Flint water plant was found dead, and the City Hall office containing the water records was broken into.

Perhaps inspired by Flint, [Matthew] is working on an Open Source Lead Tester for his entry into the 2016 Hackaday Prize.

[Matthew]’s lead tester doesn’t test the water directly. Instead, it uses a photodiode and RGB LED to look at the color of a lead test strip. These results are recorded, and with a bit of a software backend, an entire city can be mapped for lead contamination in a few days with just a few of these devices.

One problem [Matthew] has run into is the fact the Pi does not have analog to digital conversion, making reading a photodiode a little harder than just plugging a single part into a pin header and watching an analog value rise and fall. That really shouldn’t be a problem – ADCs are cheap, especially if you only need a single channel of analog input with low resolution. [Matthew] is also looking into using the Pi webcam for measuring the lead test strip. There are a lot of decisions to make, but any functional device that comes out of this project will be very useful in normal, functioning governments. And hopefully in Flint, Michigan too.

The HackadayPrize2016 is Sponsored by:

Connect All Your IoT Through Your Pi 3

If you’re playing Hackaday Buzzword Bingo, today is your lucky day! Because not only does this article contain “Pi 3” and “IoT”, but we’re just about to type “ESP8266” and “home automation”. Check to see if you haven’t filled a row or something…

Seriously, though. If you’re running a home device network, and like us you’re running it totally insecurely, you might want to firewall that stuff off from the greater Interwebs at least, and probably any computers that you care about as well. The simplest way to do so is to keep your devices on their own WiFi network. That shiny Pi 3 you just bought has WiFi, and doesn’t use so much power that you’d mind leaving it on all the time.

Even if you’re not a Linux networking guru, [Phil Martin]’s tutorial on setting up the Raspberry Pi 3 as a WiFi access point should make it easy for you to use your Pi 3 as the hub of your IoT system’s WiFi. He even shows you how to configure it to forward your IoT network’s packets out to the real world over wired Ethernet, but if you can also use the Pi 3 as your central server, this may not even be necessary. Most of the IoT services that you’d want are available for the Pi.

Those who do want to open up to the world, you can easily set up a very strict firewall on the Pi that won’t interfere with your home’s normal WiFi. Here’s a quick guide to setting up iptables on the Pi, but using even friendlier software like Shorewall should also get the job done.

Still haven’t filled up your bingo card yet? “Arduino!”