Bias Lighting On A Budget

Over the weekend I decided to pull out some of my cheap strip LEDs and put them to good use with a little bias lighting!

What is bias lighting?

Don’t feel bad, up until a few days ago I hadn’t heard of it either! Bias lighting is the effect that can be achieved by placing a light source behind your television. Surprisingly, this has been around for a very long time but is only now becoming more main stream with things like the Phillips Ambilight+Hue system, as well as more and more manufactures placing some form of lighting directly in the rear casing of TVs. But there’s no need to buy a $2000 TV just for some lights (average price of an Ambilight TV at time of writing).

How does bias lighting work?

Well the short form is, you place lights behind your TV and quality supposedly gets better. But what’s really going on?


Take a close look at the optical illusion above. If you look at the grey bar in the middle, you’ll probably notice that the right side looks darker than the left side. You might be surprised to find out that the bar is actually the exact same shade all the way through and does not change. Our eyes perceive the right side as a darker grey due to the lighter background. This is essentially one of the things bias lighting does. By placing lighting behind your TV, your contrast should appear much more dominant.

The other thing it helps with is eye strain. During light changes our eyes adjust to either allow or block light. Ever notice that when you wake up in the dark and look at something bright, it can be somewhat painful? This is because our eyes iris’ are fully open to allow in the most amount of light possible. By adding light very quickly, our eyes do not have time to adjust and too much light is let in (which can be painful). By adding a consistent light source behind your TV, the light changes are less stressful on the eyes making a more pleasant viewing experience.

K, I want it now!

The great news, its super cheap and easy to do it yourself.


I started with by taking my 40″ Dynex off the wall and laying it face down on the floor. If you like your TV, it’s probably a good idea to place something soft underneath so you don’t scratch the screen (this is my “cheap” TV so I didn’t care that much).

20150412_131330Next I took my strip LEDs (cool white of course) and stuck them to the back of my TV. I did actually measure, but of course I only measured once and one section didnt line up too nicely… luckily it wont be seen once back on the wall.

20150412_132621Now its just a matter of soldering the strip lighting together with some wire. In my case (see above) I don’t care a whole lot about the back of the TV so I chose to solder the lights after they were attached to the TV. If you aren’t a fast solderer or if you are worried about melting the plastic on the TV, I would suggest pulling the lights back up a little bit away from the plastic before soldering. Once you have them soldered, you of course want to test them before hanging the TV again. Using a simple 12v power supply directly to the LED lights should power them up.

20150412_135739Final step, rehang your TV and plug the LED lights in!


Does it really make a difference?

This is a trick question… beauty is in the eye of the beholder, and I’m certainly not a media expert. Personally, I do feel the blacks were blacker while watching a movie, but color wise I’m not so convinced that there was a major change. I did notice that my eyes did not feel as strained as compared to watching a movie in dark, which is a nice feeling when you’re just trying to relax. In the end, for the 30 minutes it took to complete and the $5 in supplies (thank you eBay) it’s totally worth it just for the “nerd factor” alone!


Setting up Raspbian on a Raspberry Pi

A while back I made a trade with a co-worker for an old netbook in exchange for a Raspberry Pi Model B+.  In case you haven’t heard of the Raspberry Pi (…what rock have you been hiding under!?!), its a small credit-card sized computer, originally designed as a low cost  and low power solution for schools to teach kids more about programming in languages such as Python. But because of its small platform and low cost, it quickly became very popular in the hacker community as well. My Raspberry Pi has just been sitting on the shelf for a little while now, I figured it was time to blow off the dust and power it up.


My OS of choice is of course Raspbian which is based off of Debian. I dont have any experience with NOOBs Installer yet and just opted for the Raspbian image (998MB) off the downloads section of Rasberry Pi Foundation website.


The image comes compressed in a zip archive, so youll need to unzip it once the download is finished and store the image somewhere easily accessible.

Loading The OS

The next step is to stick your SD card into your reader, I’m using a laptop with a built in reader (but a USB reader should be the same) and an 8GB SD card.

I will be using a utility called Win32 Disk Imager which I have used before, but conveniently this is what the Raspberry Pi Foundation also recommends.


Once downloaded, you’ll have to run the installer and do all the boring stuff… accept the license agreement, pick an installation directory and so on. To make it easier, make sure you check the box that places an icon on your desktop.

Important: To start Win32DiskImager, make sure you right click the icon and select “Run as administrator“. The software requires elevation to run and simply will not work properly if you don’t do this.


With the software now open, click the folder icon and browse to the directory where you saved the Raspbian image file. Select your Device as well (make sure you pick the correct drive, otherwise you will overwrite whatever is on that drive). When you’re ready to go, click the Write button and let the software do its thing.

 Power It Up


So we got the SD card loaded with the OS, pop that sucker into the Raspberry Pi and plug in your USB keyboard, ethernet cable, HDMI to your monitor or TV, and connect it to power.


Right away you should see Raspbian start to boot up on your screen. If you’ve never used a Linux distro before, this may look new to you, but its all normal ;)


Once loaded, the Pi will automatically start its first time configuaration. Highlight “Expand Filesystem” and hit enter. This is going to ensure that we are using the full size of the SD card. Next you’ll also want to change the password. Scroll down to “Change User Password” and follow the prompts to enter the new password (the default user is “pi“).


Next lets enable SSH for remote access to the Pi. Scroll to “Advanced Options” and hit enter. Then scroll until you have “SSH” highlighted and hit enter again to enable it. Select “Back”  at the bottom, and “Finish” to reboot the Pi.


When the Pi boots back up, look for a line that says “Your IP Address“, were going to need this to SSH into it. If you already disconnectd your monitor at this point, you can of course get the IP from your router DHCP client list, or by scanning with Wireshark.

SSHing into the Pi

If you’ve made it to this point, you should be able to unplug the monitor and keyboard from your Pi and put it anywhere you want. If you’re on Windows like I am, you will also need an SSH client. I recommend PuTTy.


To connect with PuTTy simply enter the IP address of the Pi that you wrote down earlier, and select SSH (Port 22) and hit “Open“.

putty-rsa-key-rasbianSince this is your first time connecting to the Raspberry Pi, you should see a security alert dialog explaining that the RSA2 key does not match what is stored on the computer. This is normal for the first time connecting, so click “Yes“.


Enter you username (default is “pi“) along with the password you set up during the installation configuration, and you’re now SSHd into your Pi. From this point, its up to you what to do with your Pi, but before getting too ahead of yourself I would recommend making sure everything is up to date by running the following command:



Bypass Installer Lockout on PC5010 (DSC)

I have a co-worker that picked up an old DSC PC5010 alarm panel (for free, you can’t go wrong right…) and since I had fun writing about the Honeywell Lynx Touch Backdoor, I figured I’d give this a go and see what happens. The problem… the panel had installer lockout enabled.


You can tell when a panel has installer lockout enabled because you will hear a distinct 8-10 clicks from a relay when the panel is initially powered up (see video directly below). When the panel is locked out like that it blocks the ability to default the panel back to factory (even by hard wire reset), so unless you have the installer code, you’re SOL…

My panel is locked out, am I really SOL?

Maybe not. We actually have a tool at my workplace called “The Instant Unlocker” with the sole purpose to unlock panels. It consists of a device you place on top of the microcontroller on your panel which will allow it to “decode the installer code” and unlock your panel. The problem? This device isn’t cheap ($170USD for the starter kit) PLUS you need to purchase “unlock charges” at $35 per unlock (sheesh, everyone has their hands in your pockets these days)! So scratch, I’m too cheap to pay that much!

So what is option two?

Option two involved 3 names I stumbled on throughout forums. Apparently there is was only 3 people at one point (not including DSC themselves) that were capable of unlocking these panels. These days, I could only find 1 of those 3 people with an “active” website (I use the term “active” lightly, the site is hosted on a subfolder and looked like it was made in the early 90s). That being said, the site has a HUGE amount of electronic security information on it, which is just awesome, feel free to check it out here. They charge $20 per board to unlock, which is reasonable. My problem with this place (aside from the outdated website) is they won’t do just 1 board, and have a MOQ of multiple boards to do unlocks for you.

OK so are you going to tell me how or what?

I’m sorry, I know I get carried away sometimes. The great news is, there’s an alternative to bypass installer lockout on the PC5010 (and possibly others) for FREE. Yes. FREE. All you need is a small piece of wire, and an IC clip.


The PC5010 has a microcontroller made for DSC alarm panels (DSC R333200666V202). Now finding a pin out for that chip was near impossible. Though I stumbled upon some information that pin 25 on that IC is a data pin. Someone else claimed that grounding that data pin on power up will make the panel think that its brand new. To my understanding, this works by blocking the microcontroller from being able to read the EEPROM data on power up, therefore reverting to a “like new” state in which its not locked out and the installer code is reset to default (5010). I figured the panel was no good as it sits, so might as well give it a try.

The process is simple. Connect your IC clip to pin 25 on the DSC micro controller chip, and connect the other end into any of the common ports by your zones.


Power up the panel (if it works, you should NOT hear the installer lockout clicking). Enter installer mode using the default code (*8 5010). Disconnect the IC clip to allow the chip to write to the EEPROM again and change your installer code by entering 006 (for section 006 obviously) and typing your new installer code. You can confirm this worked by powering down the panel, when powering it back up, try your NEW installer code to get into programming.

Note the panel will still have installer lockout enabled at this point, you CAN disable it… I just did not have a manual handy to know which section its in (section 991 I THINK, but correct me in the comments if I’m wrong)

Here’s a full uncut video showing that this does indeed work.

Installing Android Studio

In one of my older posts, Getting started with the Android SDK, I made a mention of Android Studio and how it would be replacing the Eclipse ADT plugin. Well sometime since then, it looks like the switchover has indeed happened and its time for me to ditch Eclipse take a leap into Android Studio.

Downloading Android Studio

Now that there is only one option to choose from, Google has streamlined the download process significantly since my last post.


Simply head over to the Android Developer page, and click Download Android Studio. Do your usual reading of the license agreement (you all do that, right?), accept, and you should be downloading all 800MB of Android Studio goodness!

Installing Android Studio

Like I said, they’ve streamlined this process quite significantly. No more extracting, no more renaming folders, and no more copying files around into different folders. Its a single executable file. Double click, and BAM, you’re on your way! The installer is supposed to walk you through downloading JDK now as well, which was not the case before. I don’t have any experience on that part though… I already had JDK from the previous installation of Eclipse and ADT.


You’ll want to make sure you install all the components (Android Studio, Android SDK, and Android Virtual Device. Follow the rest of the prompts and you’ll be on your way.


Opening Android Studio for the first time

When you open Android Studio for the first time, there is additional configuration that it takes you through. The first will be whether or not you want to import existing Android Studio projects. If you’re just getting started then likely you’ll have nothing to import.


Next it will start to download the latest version of the SDK Tools, unzipping them, along with any additional components needed. The nice thing about this again was that its all streamlined… once it started going, it required little to no interaction from me… sweet!

Welcome to Android Studio


That’s it! Start a new project, or import projects from your old Eclipse workspace. Hopefully I will make some time to play around with it soon and post on my findings!

Temperature Sensing with DHT11 on Arduino

Ahhh temperature sensing, something so simple yet can be integrated into so many different projects. How about a temperature controlled RGB LED? Or perhaps an Arduino controlled thermostat? Heck, even a full blown weather station! Your imagination is the limit.

There are a few different choices when it comes to temperature sensing such as a completely water proof analog temperature probe to digital sensors. I will be focusing on the DHT11 which is a very affordable (~$1) digital temperature and humidity sensor. Its good for sensing 20% to 80% humidity within 5% accuracy, and 0c to 50c within 2% accuracy, which is more than enough for any indoor projects. If you want something a little more capable and accurate, the DHT22 is another option for digital sensors.



The DHT11 has 4 pins in total as seen above (with 0.1″ spacing – perfect for breadboards). VCC, a Data pin, and Ground. Pin 3 is not used.


Wiring it up is fairly straight forward. Start by connecting VCC on the DHT11 to VCC on your Arduino, and Ground to GND. Next connect the DHT11 data pin to pin 10 on the Arduino. Lastly, we need a 10k (Brown Black Orange) resistor in parallel to the DHT11 connected between the VCC and Data pins. This is our pull up resistor.

Now its just a matter of uploading our sketch and checking the output in the serial monitor

Now, with a little heavy breathing on the sensor, we should be able to see it change every few seconds (specifically the humidity… its a little harder to breath temperature changes), but they both will work!


Serial console with Arduino Pro Mini

As I was doing some debugging in the serial console with my Arduino Uno R3, something occurred to me… The serial console is absolutely invaluable for debugging, yet in my first Arduino post (Getting started with Arduino) I did not even mention it at all.

If you’re using the Arduino Uno or Duemilanove for example, the serial console is fairly straight forward as you just use the same USB cable you use to program with. These boards differ from the Pro Mini as they already have a Serial to USB converter on board.

However, when working with the much more affordable Pro Mini, there is no built in Serial to USB, so things get a little more interesting.

First things first, lets create a simple sketch that will setup the serial console with Arduino, and send a message to the serial console

Next, you’ll need to get your hands on a couple of things.


  • USB to TTL Adapter
  • Set of 4 female to female “dupont” cables

Both of these can be found on eBay for dirt cheap if you don’t already have them.

The Arduino as well as the USB adapter should have their pin out silk screened on to their boards, and should look like this

arduino-to-usbttl-pinoutDepending on which Pro Mini you have, you’ll want to wire them together using the correct voltage (3.3v or 5.0v are both available on the USB TTL adapter). In my case I have a 5v Arduino Pro Mini, so I will tie VCC to 5.0v, and GND to GND. If you have the 3.3v version of the Pro Mini, then you need to tie VCC with 3.3v instead. The data wires need to “cross-over”, so the RX connects to TX, and TX to RX. This way, when the Arduino is transmitting the USB TTL adapter is receiving, and vise versa. All said and done, you should have something that looks like this.


Still with me? Awesome! Now plug everything in and upload your sketch to your Arduino using your USBasp programmer, (hopefully you’re using Codebender) select your com port/speed and click “Open Serial Monitor”. With any amount of luck, you should see some text printing in your serial console!



Build your own Arduino starter kit

I have a friend that keeps asking me about micro controllers and costs associated with getting started. He has no prior programming experience, and doesn’t own a soldering iron. By the sounds of it, he’s a little on the fence (rightfully so) and isn’t sure whether he should try it or not. Totally understandable when starting with something new. So I figured hey, lets break it all down and see just what it would take to build your own Arduino starter kit!

Before I get into the actual costs I just want to point out that while previous programming experience is handy when it comes to Arduino, its not at all necessary! The Arduino community is literally huge (250k+ members worldwide, 2 million posts) which means finding a sketch and wiring examples that do exactly what you want it to do (at least when you are first getting started) is going to be very easy. My recommendation when starting out is to concentrate on small projects with the thousands of ready made examples (blinking, fading, controlling, etc.). This will allow you to familiarize yourself with the platform (uploading, debugging, etc.). Once you have a solid base is when the real fun begins and you can let your imagination run wild!

Its also important to remember that Rome was not built in a day. You will at some point be stuck in a position where you have to get your hands dirty and start customizing the code yourself. And while I am by no means an expert on the subject, I consider myself a problem solver so by all means leave your messages or questions in the comments and I will definitely try to help out as much as possible!

Build your own Arduino starter kit costs

This list is just my personal recommendation. Feel free to customize it, or add/remove as you wish (or leave suggestions in the comments). My goal is to keep the kit under $20CAD ($15.87USD… man, our dollar sucks right now), so my prices will be based mostly off eBay. You of course can purchase from wherever you like, but prices will vary obviously.

Arduino Pro Mini ($2.77)
This is the Arduino board itself, the heart of all your projects. It has the atmega328 chip, comes in 5v (16Mhz) or 3.3v (8Mhz) versions, and at this price its almost cheaper than buying the atmega328 chip by itself!

USBasp Programmer ($2.24)
The Arduino Pro Mini doesn’t contain on board USB circuitry, so we need an external programmer to upload the sketches.

USB to TTL Adapter ($1.03)
Without on board USB, we also need something to debug through serial, so a USB to TTL adapter becomes necessary for debugging and communicating through serial

Assorted LED Pack – 100pcs ($1.25)
No project would be complete without some sort of flashing lights. You can find packs of 100 assorted colors of 3mm LEDs for cheap, usually containing 20 of each color (Red, Green, Blue, Yellow, and white)

Assorted Resistor Pack – 600pcs ($3.62)
Resistors are tricky… you never know what values you will need until you know what voltage you’re working with and what the limitations are of the devices you plan on using them with. Best bang for your buck is to buy a kit of assorted. You can find kits that contain 20 resistors of 30 different values.

Male 40 pin Headers – 10pcs ($0.99)
They come in handy making your own “adapters”, for example an easy to use programmer cable.  Some devices need headers soldered on before you can use them as well, so its safe to grab a couple of these since you’ll need them sooner or later.

Mini Breadboard ($0.99)
You’ll need somewhere to start wiring up your projects. Since the Arduino Pro Mini is so tiny, a mini breadboard will usually cut it for small beginner projects, but it will only cut it for so long so a full sized breadboard should be on your “not so beginners” parts list.

Breadboard Wires  (40pcs M to M – $1.74, 40pcs F to F $1.42)
You could have every part in the world, but unless you have wires to connect everything together you wont make it very far. Male to Male are the more important ones, but Female to Female have their uses as well.

PN2222A Switching Transistors – 10pcs ($1.25)
The Arduinos do have current limitations. About 20mA per output, and 200mA total. If you draw too much current from an output pin, or from all the pins combined, you risk blowing up the whole board. Transistors (and MOSFETS) will let you draw higher amounts of current directly from a power supply while only using a small amount of current from an output pin to control it. The PN2222A is a general purpose transistor that can handle up to 40v and 600mA, so its a good place to start for low current applications (eg. LEDs).

Character LCD HD44780 ($2.51)
An LCD is cool to start learning with. They are super easy to wire up, and I mean come on… its a friggin’ LCD! It doesn’t hurt to have one in your starter kit for their affordable price.

And there you have it, it’s simply that easy to build your own Arduino starter kit – a very basic starter kit – that will have you flashing or fading LEDs, building very basic LED cubes, and writing to LCD screens in no time. For a grand total of $19.81, you’ve got nothing to loose!! Sweet!

PWM control with Arduino

Just a real quick snippet today. If you followed along my first Arduino post (Getting started with Arduino) then you should already have a simple blinking LED on Pin 10 (or pin of your choice). I wanted to take that just a step further and use PWM (Pulse Width Modulation) for a fade in / fade out effect.

PWM uses a pulsing digital signal (high/low) to simulate the effect of an analog signal. If you really want to learn the technical details of PWM, head on over to the Arduino page –

arduino-blink-wiringThe best part, no hardware changes! Simply upload this new sketch with the breadboard layout in the original post (below, in case you missed it)

Tracking Down Unknown Network Devices

This is going to be a short and sweet post, but it touches on something I had to deal with just the other day.

I was going through my router, which I do on a regular basis, to check what unknown network devices were showing up in the network list. In my case I usually do this for two reasons. The first is to name all my devices in the router itself and typically assign it a static IP. The second is for pure security. I want to know what devices are on my network, and who the device belongs to.

The particular unknown network device that I noticed, and could not identify was named “GainSpand48cb6“. I usually take pride in naming my devices, so GainSpan was not something that I had setup. I made the assumption that the d48cb6 was the last 6 digits in the mac address, which I confirmed by looking at the device info more deeply.

unknown network device gainspand


Now, the second issue was that the device was offline, so I could not ping it, or do any traffic sniffing on it to see what it was doing. The next step was to just start searching. I started with a reverse mac address look-up, which tells me the mac is registered to a company called GainSpan Corp. Sometimes a simple mac look up will tell you everything you need to know, but when I follow the trail further GainSpan is just the company that makes the wifi radio in the device, darn… had to dig deeper.

As I kept digging, I eventually found something that caught my eye… a post containing Fitbit in the title.



The culprit turned out to be my Fitbit Aria scale, which DOES connect over wifi, but for some reason it did not occur to me.

Oh well, at least I know for next time and can share with everyone else who might have one of these scales, that the hostname shows up as GainSpan in your network device list.

Getting started with Arduino

Well its been so beautiful outside here lately *sarcasm alert* (averaging -40 degrees Celsius…) I decided now might be a good time to dust off my Arduino boards.


First off, if you have any experience with Arduino micro controllers, this post probably wont be for you. Its been many… many years since I have done any work with them (ahem… high school). I need to build my own skill set back up, so this is a recap for myself, and for those who might be just starting out (or looking to start out) with Arduino boards.

Second off, if you’ve ever used or are still using the Arduino IDE… scrap that. I came across a web app: Codebender which is basically a much better version of the IDE entirely through your browser. It features a fancy editor with syntax highlighting, much better error reporting (in my opinion), a cloud based compiler, and a built in serial monitor. It has all the features of the Arduino IDE, but adds loads more.


I have several different types of Arduino boards (Pro Mini, Uno R3, Duemilanove, and some mini knock-offs that don’t work worth crap – dswy_robot), but I will probably spend most of my time with the Pro Minis. They are amazingly cheap so if you blow up a board, you’re only out a couple dollars instead of $20-$30…sweet!

arduin-pro-miniWhat You’ll Need

  • Arduino Pro Mini (or Arduino of your choice)
  • USBasp programmer (assuming you’re using the Pro Mini)
  • An LED
  • A resistor, 470 ohm is fairly safe when working with LEDs
  • Male header, or bread board wires

Getting Your Programmer Ready

Before we jump into it, we need to make a cable to connect the Arduino up to the USBasp programmer. Your programmer should have come with a ribbon cable, so its just a matter of connecting those pins up to the proper pins on the Arduino with some breadboard wires. You can use bread board wires to go from the 10 pin connector to your breadboard, or you can cut one end off completely and solder it to a header. It takes a few minutes longer to make the cable, but trust me, you’ll save time in the long run when you need to switch breadboards


Make sure you are oriented correctly, Pin 1 on your ribbon cable is the blue wire in the image above. When you’re all done, ideally you want to end up with a cable like this:



Make It Blinky Blink!

Alright, so lets get our LED wired up

arduino-blink-wiringVery simple. the anode (longer wire) of the LED connects to pin 10 on the Arduino, and the cathode (shorter wire, typically with flat side on LED) connects up to our resistor. Depending on your LED you can use a smaller resistor, I was using a very bright blue LED so I decided to go with a 470 ohm to dim a down just a touch.

Next we need to upload the sketch to the Arduino using the USBasp, so plug everything in, connect the programmer up to your computer, head over to Codebender, and upload this sketch.

With any amount of luck, you should end up with an LED that blinks every half a second