electronics « My Site/Blog
Untitled Document

electronics

Smart Outlet

So this project has been on the backlog for quite some time now and I’ve finally been able to put in some work. The first reason it’s been hard to post things is because my day job keeps me quite busy, the second reason that this project, in particular, took so long is because I’m scared of mains. However, with that being said, it’s also one of the projects I’ve been eager to start.

In an age where technology is more advanced than ever, we’re still stuck with a lot of dumb devices. My phone can take 1080p video, browse the internet, and can even be used to pay for things, yet I can’t turn on a light or the AC without having to push a physical switch. Now those may seem like silly, even solved (Philips Hue) problems however, they touch on a larger issue, which is energy. I set out to solve two problems with this project: how we interact with it, and how to leverage new infrastructure to make those interactions more efficient.

IMG_0667I started with a standard outlet. Adding relays allowed for simple on/off control of devices that have hard power switches (ones that physically stay opened or closed). Current monitoring is provided by a ACS712 series chip. A Bluetooth module was added for wireless communication, as well as an RFID reader for additional interaction.

IMG_0664Once the infrastructure is there, a whole new level of automation can be reached. Lights and coffee that turn on in the morning (set from the time on your phone’s alarm), and turn off after you’ve left (phone drops off the list of Bluetooth devices in the area). If you’re worried your pet might get too hot during the day, you could schedule your AC to turn on periodically to keep your apartment cool. By gathering data on how much power your electronics draw over time, you could schedule energy intensive tasks to take advantage of off-peak pricing, or just create a bunch of interesting graphs.

This project is definitely in its early stages and it’s something I’d really like to put more time into. You can expect more updates and an in-depth write-up in the future.

Caught in the Rain

IMG_9449

Weather has never really been a concern of mine in the past. If I got caught out in the rain I usually just wait it out or run through until I could find shelter. However, when you’re commuting to work at an office building you really can’t show up late or soaking wet just because you didn’t know it was supposed to rain. This is where the motivation for this project comes from. Now those of you who are, perhaps, more collected might be wondering why I don’t just check my phone every morning like a normal person. Those of you, perhaps, do not realize the small miracles that must occur each morning for me to walk out the door, on time, with all the necessary belongings for the day.

I wanted something simple. I wanted to know weather (whether) or not the forecast called for rain during any of the hours of the day where I would most likely be walking outside (say 8-9 in the morning and 5:30-6:30 in the evening). I wanted to know as soon as I got up, in a very simple and intuitive way that even my morning grogginess couldn’t obscure.

This project gave me the perfect opportunity to use the Intel Galileo I’ve had sitting under my desk. While it definitely could have been done with an Arduino, the Galileo happens to have a built in ethernet jack and I didn’t have an ethernet shield lying around (or Arduino).

I started with the data. I needed easy access to some simple weather info which Yahoo happens to provide in xml. It’s pretty basic and doesn’t really offer the hourly data I wanted but, it’s a start. The Galileo is running a javascript environment called galileo-io which is based on the Johnny-Five Arduino framework (essentially javascript for the arduino). Getting the data I want is quite simple. In this case I’m only concerned with one value, the first instance of code in the yweather:forecase tag (the present forecast). Yahoo provides a simple guide which explains each code, making it easy to create a binary situation: rain/thunderstorms bad, everything else-whatever. I created a simple list of values that I could compare the given code to that, if matched, would indicate some sort of rain. Adding a simple delay() then allows me to have this GET request run every day, making sure that the Galileo will always have relevant data.

Pretty straight-forward so far, and the hardware side is no different. Having essentially narrowed this down to a two-case problem (rain or no rain) I could get away with having a single LED turning on or off. But that’s not really what I’m going for. My hope it to connect it to the audio controller that currently controls the LED strips in my room, in order create a much more immersive and dynamic visual (think flashing lights or gentle fades for thunderstorms and showers). I, unfortunately, don’t have access to my room right now but I’ll be sure to post an update once I have something more visually interesting to show.

How I learned to Stop Hating Hardware Design

Since I first started building custom pieces of hardware I’ve always been limited to a select few materials and design processes. Generally something already made would have to be cut down, sanded, or drilled with the only three power tools I own: a dremel, drill, and angle grinder. If I had to build it from scratch it most likely be made from Shapelock, before be cut down, sanded, or drilled. In the end you have a very labor intensive, not easily repeatable, struggle to build even the most simple objects (take a look at my scoring machine for example). Today that changed.

Our school has a FabLab with several different prototyping machines that are open to any students interested in learning how to use them. Among them is a laser cutter. I love this laser cutter. I took an online laser safety course a few months ago but never really pursued it further. In fact, yesterday was the first time I actually stepped foot inside the FabLab, and I’m glad I did. I was given a very brief overview of how to set up and use the basic features of the laser cutter, after that the attendant had me cut out a simple square with my initials rasterized in the middle and I was done.

I wasn’t really sure how one goes about designing something like a chassis from scratch but I went with my gut feelings, design preferences, and a general idea of what was good and what was bad. I sat down with a blank sheet of paper and slowly measured out the various dimensions I needed from different components until I had a decent 2D representation of each with appropriate measurements. I then drew a 10cm x 10cm square and slowly started drawing in components till I had something that looked like a halfway decent chassis. I went over to the Lab right after class and sat down in front of Solidworks with a very rough sketch and dimensions I wasn’t entirely sure of and started to draw my template. 20 minutes later I had something that resembled something made by someone who might know what they were doing so I stuck with it. I dug a 1/4″ piece of acrylic out of the scrap bin, measured out an area to make sure my design would fit, crossed my fingers and hit the print key. It took about a minute to cut out the entire piece and the whole time I was waiting for something to go wrong. Nothing did. I lifted the cover and gently removed my first machined chassis. I then ran back to my loft so I could check and see whether or not my measurements were accurate and parts would fit. To my great surprise, everything turned out better than expected. Take a look at some of the photos below:

IMG_8859

IMG_8860

IMG_8856

IMG_8857

The next update probably won’t be for a while. I have to run out to Home Depot to buy some fasteners to actually attach parts to the chassis as I have none. However, there is much more to come!