Everyone changing their profile picture is getting a hilarious lesson on compression algorithms. Some of the artifacts I’ve seen on this equal sign are hilariously terrible. Facebook should anticipate this trend of profile picture “copy of a copy of a…” I doubt anyone would care if it just replaced whatever jacked up version you found and tried to use with a hq original.

via Facebook

I just donated to the Heart Walk. Do the Same!

Going to run in their 5k. Please donate to buy me blankets and hand-warmers after the run, j/k :) http://social.heart.org/iRk2GtR

Arduino/Android 4 Zone Speaker Selector

Here’s my write-up of an Arduino project that will enable speaker zone switching across your home WiFi network from your Android smartphone. A networked 4-zone speaker setup using Android as a remote control. Here are the instructions and code you need to do it too!

Watch the demo to see if it’ll do what you need (Youtube)

Speaker Selector – Overview

In theory, we have an impedance protector that is switched via relay rather than giant buttons. The relays are controlled by our smartphone, which is hitting the Arduino server. Simple!

This provides the 4 big resistors to add 4 speaker zones to your powered second zone (or first zone, even). The watts delivered to a speaker varies based on how many speakers you have turned on, because there are resistors that get turned on/off to keep your receiver/amplifier from frying (impedance protection). I’m starting to question whether I should have gone with 8 zones!
OSD 4-Zone Speaker Selector Image

Update 4/30/2015: This 4 zone device has been working great under pretty consistent use for well over a year now.

Parts List:


Making the speaker selector work over the Internet

The Sainsmart relay module is great… it really simplifies the construction of this whole thing. It is marketed as being Arduino compatible, but really anything with low voltage driver output would work, and it really speeds up connecting the relays.

For four zones, it turns out you need 8 relays (4 left speakers & 4 right speakers). Soldering is no longer the suggested method to implement this, just clever wiring in order to put the relays in the middle of each speaker circuit. You’ll want to route the positive wire for each speaker through the relays, and no changes to the negative are needed.

Here is my original version (solder-method) all hooked up:
Picture of the relay wiring

And the whole system:
Picture of the wired up system
(The breadboard just has a 315MHz transmitter, see my last blog post to find out why. The entire breadboard is completely optional for this project.)

I added the code to my Arduino webserver, which will handle requests at /speakerStatus to see which are active, and /speaker?zone=&state=<0/1> to turn a zone on/off.

Speaking of the Arduino, I used the Ethernet model rather than buying an Ethernet shield separately. I couldn’t find anyone still selling that, so I linked to the Arduino Uno and the Ethernet shield.

Take a look at the Arduino server code on Bitbucket here!

Android App Speaker Selector

Along with all that, there is a great Android/IPhone app that will request those URLs for you with toggle buttons. Code for that is also in the above repo. In addition to the basic functionality – querying status and updating the zones, a long-press on a button will allow you to rename any zone, remove unused zones, etc. See more about that here.


Modernizing the audio receiver

To complete my houses audio setup, I bought a web-enabled receiver for my Pandora/Spotify playing. I timed it right and got a good deal on an end-of run of 2012 model for this receiver… this is the current version: Onkyo TX-NR535 5.2-Channel Network A/V Receiver

Of course it comes with an Android/iPhone app for remote control, to make this entire system complete! I’d say that Onkyo’s app for Android is pretty good, with a nice selection of internet radio options, Spotify being the one that sold it for me.

Bottom line… I can be in the basement and turn on my workout music without running upstairs to change any settings.

This Isn’t the Petition Response You’re Looking For | We the People: Your Voice in Our Government

That White House petition to build a Death Star got a response…


Android/Arduino RF Outlets Selector


Here’s a great little project I implemented with Arduino and Android – switching outlets from my smart phone!



I started with off the shelf RF Wireless Outlets. At $6 per outlet, they are a complete steal. I got lucky and found all 4 channels of these wireless/RF outlets at a local Big Lots. I’ve seen them at Home Depot too. And of course they’re available on Amazon. Compare that pricing to one unit of the Belkin WeMo Switch
Big Lots Outlets



Parts List:

All the code is on Bitbucket. There is also a simple remote control Android / IPhone application available in the Google Play and ITunes stores. (Better looking than in the video, too!)

In the last year or so, there may be better options than Arduino for the brain, but that code rewrite will have to wait until another day. This is what the circuit looks like… very simple, just hook up the 4 pins of the transmitter to the correct place and you will be ready to load the code onto the Arduino!
Completed Circuit

The Arduino can hook up to your router via the Ethernet shield, and when it’s turned on will be running a web server at the URL: {IP address}/outlet?outlet={outlet}&channel={channel}&state={state}

And of course the Android and IPhone app comes with a UI added to those URLs, so you can click a toggle button for all the outlets, rename them, etc. See more about the App here.

I based the code on a cool outlet project that was pretty mature, called RC Switch, but in Europe the RF protocols and outlets are a bit different. There was also a reference from Instructables, but those RF on/off timings didn’t match my outlets. If you don’t have luck with my code as-is, modify the pulse length timings to match what is found here. There may be more variants that look the same, as a lot of these outlet modules look the same but are rebranded.

Reverse Engineering / Troubleshooting

Hopefully during the project you can implement it in a straight-forward way, but if the same protocol does not control the relays, read on to how I troubleshot this project originally…
To figure out the problem above, I used the Arduino as a logic analyzer to figure out what exactly wasn’t working, and that was probably the most fun part of the project. I soldered leads onto the stock wireless remote to spy on the signal that was being transmitted, and saw the digital signal graph on my TV screen. Amazing! As a programmer, I forget sometimes that there is electricity flowing through everything and changing direction every few nanoseconds.

This Arduino logic analyzer is a great open-source code project, and saved me big time here. It has 500 kHz max resolution, but since there is only 1kb of RAM, you’re limited to 1024 samples. That resolution was actually so good, that the first few times I thought it wasn’t working… I was zoomed in too far and didn’t see any transitions. As soon as I zoomed out to 1 kHz, I saw everything! And 20 kHz was finally the sweet spot to measure the timings accurately.

This is how I instrumented the remote control for use with the logic analyzer. I soldered many jumpers onto the circuit — only 2 carried the signal I wanted. The orange wire, and the right-most white wire both had the correct waveform — though the white one was inverted. I also provided power from the Arduino, since the remote had a 12V battery, some traces might have been carrying too much juice for the Arduino!
Wireless Remote instrumented

Feel free to provide critique or suggestions!

I can control an LED from my LAN now. No biggie. Next steps is to use this RF transmitter to send out on/off commands for these $6 Big Lots wireless outlets. And then… THE WORLD. I mean, an Android app. Anyone else have smart house technology?

via Facebook

North Korean satellite ‘tumbling out of control,’ US officials say

Trying to understand where they found their science-hating ‘officials’ to quote in this article?


“The officials said that it is indeed some kind of space vehicle, but they still haven’t been able to determine exactly what the satellite is supposed to do.”

Song Reader

Beck’s new album… is… sheet music…?

For About $20, Cardboard Bicycle Could ‘Change The World,’ Inventor Says : NPR


The video at the bottom of the story is great, highly recommended.

Hope he succeeds to mass produce it. I’d buy one!

Red State, Blue City: How the Urban-Rural Divide is Splitting America

I saw quite a few election maps that used a distorted map (as in the thumbail) to show population density, but my favorite is the version in this article which uses bar graphs.


Which one do you like?