Blog in a Box Paparazzi

wapi-512Happy Pi Day! I figured I better post something Raspberry Pi related today…

This weekend I played around with Blog in a Box which was recently released by our Tinker team at Automattic.

A quick and easy way of putting WordPress onto a Raspberry Pi.

BIAB ships with modules to use the Raspberry Pi camera and SenseHAT. I hadn’t used my Pi camera yet and had a fun idea to hack around with.

blog-in-a-box-ssh

The camera module allows you to take a photo on a schedule by setting a period of minutes, hours, or days between each photo. I wanted to have a little more fun, so I wired some other electronics up to a Raspberry Pi Zero and wrote a little Python program.

The first electronic element was a simple button. Press it and a picture is taken. Next up was a photocell (light sensor). When the room quickly changes from dark to light, it’ll take a picture. Since the Pi doesn’t have analog inputs, I went with a neat technique of measuring the sensor as a resistor used to ‘fill up’ a capacitor. The last element was an ultrasonic sensor I haven’t used yet either. It measures the distance to an object in front of it, so I’m kind of using it as a motion detector. Walk in front of the sensor and a picture is snapped. Due to mismatched voltages on the PI’s GPIO and the output signal of the rangefinder, I had to use some resistors to create a voltage divider circuit.

To create visual feedback I wired up an LED for each of these 3 components. When one of the components triggers a photo, the associated LED lights up until the process is complete.

I named it Blog in a Box Paparazzi. Of course the code and wiring info are available on GitHub. Should be easy to adjust if you have other sensors, buttons, switches, or whatever you want to trigger photos. Let me know if you try something different.

AdaBox002: Make Robot Friend

Adafruit’s 2nd AdaBox is everything needed to build a full functioning robot, controlled over Bluetooth via their Bluefruit app. When I got it a couple of months ago, I put it together and wrote a bunch of notes for improvements I wanted to make. I finally got around to spending some time on it. Adafruit’s learn guide and the associated […]

Solar Power

I saw last week’s Daily Post Photo Challenge was “Shadow”. We don’t get much sun in the winter, so I decided to flip the challenge on it’s head. A shadow is the enemy of solar power, right? A couple of months ago I had bought a bunch of electronics for a solar powered project idea. I don’t […]

Garage Temperature Sensor & Monitor

I’ve been working on this project here and there for a few weeks, with most of the early work being experimentation. Everything is now up and running and it’s “deployed to production” so to speak. This was my prototyping setup…

After wiring everything together and repurposing a cardboard box, here is a short video to show the final product.

A few notes on how it works:

  • The button toggles monitor mode. The LED inside the button indicates if Monitor mode is on/off.
  • When monitor mode is on and the desired temperature is reached, I get a notification.
  • I should have shown the knob, but all it does is adjust the LCD’s contrast.
  • The thing on the top left of the box is the sensor chip for reading temperature and humidity. Originally it was inside the box behind a little window there but it was picking up too much heat from the Pi and LCD in there.
  • The backlight color of the LCD is based on the measured temperature and updates each time new temperature is read. Anything 32° Farenheit and below is blue, 80° and above is red, and everything in between is based on where it falls within that 32-80 range. As you can see in the example, 48° is a lighter blue. A few degrees warmer and I think it would have started to look more green.
  • Outside temperature/humidity is pulled in from the Dark Sky data in my Home Assistant setup (which I’ll post about soon).
  • Data is sent to Home Assistant via MQTT.

home-assistant-garage.png

Really happy with how things turned out. The Pi  I wrote this in Python and it’s all available as home-assistant-temperature-monitor on GitHub if you want to make your own or use some of the code for your own project. There is also a list of all the components used.

Here are some pictures I took while assembling the enclosure/box.

Making sure the Pi and attached Hat fit right after drilling the holes. Seemed like there was so much room at this point.
img_8663
Everything soldered to the HAT. Amazingly I didn’t make any mistakes and everything worked on the first try. A good prototyping setup, having pictures of my final prototype, and keeping a list of where everything connected was invaluable.
The Raspberry Pi, Hat, LCD, USB cables to power and WiFi, and all of the other wiring jammed in! Reaching inside to get things screwed through the box wasn’t easy.
There is a lot more room in the other part of the box where the sensor, button, and knob are. Nice for the WiFi adapter and cable to come across and have some room.

Update: Adafruit released a new Learn guide that does some similar stuff to this project.

A New Hobby

My recent Raspberry Pi project combined with more and more interest in home automation led me down a road I didn’t expect. I find some of the home automation products out there limiting. What if I could mess around and build some of my own devices?

I’ve been thinking about putting some type of temperature sensor in the garage for a while. I heat the garage up in the winter for workouts quite often and never know when it’s warm enough. I’d found my first project! I’d need another Raspberry Pi and at least a temperature sensor. I didn’t really know much about extending the functionality of a Pi, other than I’d need to do some soldering and learn a more about electronics, circuits, etc. Enter AdaFruit. It’s a very cool company with an awesome store and a ton of resources to learn.

Adafruit was founded in 2005 by MIT hacker & engineer, Limor “Ladyada” Fried. Her goal was to create the best place online for learning electronics and making the best designed products for makers of all ages and skill levels. Adafruit has grown to over 50+ employees in the heart of NYC with a 50,000+ sq ft. factory. Adafruit has expanded offerings to include tools, equipment and electronics that Limor personally selects, tests and approves before going in to the Adafruit store.

I saw Ladyada’s Electronics Toolkit in their store, which looked like a great way to get started. My favorite item is the “solder sucker” even though I may never use it. Such a cool name.

ladyadas-electronics-toolkit

Then I came across AdaBox.

AdaBox is a quarterly subscription service from Adafruit, centered around products from the Adafruit ecosystem. Each AdaBox will contain a curated set of Adafruit products that will help you get started with do-it-yourself electronics.

Introducing AdaBox!

The second box is shipping out to subscribers soon, but I was too late to jump on board. Lucky for me, they had some AdaBox001 – Welcome to the Feather Ecosystem still in stock, so I ordered one.

adabox-1-contents

It has a wide variety of components. Should help so that I don’t start randomly buying items. I’m hoping to get in on the third subscription, which opens up on the 19th and I will pick up AdaBox002 when it’s available in the store.

Once everything arrived, I started playing around on my kitchen table. I quickly realized it wasn’t the ideal place. I needed a workstation. When I get into something new, I tend to go all-in, which I believe helps me stick with it. So I set a plan to put a second desk in my office and bought more stuff:

I’m excited and really happy with how everything came together.

electronics-workstation.jpg

I found these organizers for about $4 each at Walmart. They work really well for storing all of the tiny pieces.

organizers.jpg

I haven’t built anything yet, but I’m learning a lot and enjoying the process. My list of project ideas is growing and will keep me busy for as long as I want. As a bonus, I now have a standing desk in my office where I can get actual work-work done when I need a break from sitting.