Jan 05

How to Build a BlinkM Clone

The original BlinkM was the first in a series of I2C controlled RGB LEDs from ThingM. It’s easy to integrate into projects and control with anything that supports I2C. At its base level it is an ATtiny45 and a Piranha RGB LED. For anyone who wants a simple, elegantly packaged component I would highly recommend that you buy one of these. I am more of a do it yourselfer so I decided to build my own out of parts I had laying around.


Here are materials I used in my project:

  • ATtiny chip (I’ll be using the ATtiny85 but an ATtiny45 will work too)
  • RGB LED with a Common Cathode
  • 3 resistors
  • Jumper cables

This project is very tolerant to variation and you can really do it however you see fit. If you don’t have an RGB LED and want to use individual LEDs that will work. If you have a common anode LED instead of a common cathode LED you will need to use a different firmware package but it’ll work as well. The point is to have fun and learn.

Firmware upload

The firmware for the BlinkM is currently closed source. The reason for this is that the patent for controlling RGB LEDs over I2C is owned by Phillips/NXP. ThingM has licensed these patents to produce their line of BlinkM products. You’ll notice that the license for the BlinkM firmware states that it is for personal use only, not for internal business purposes or for commercial gain. Keep this in mind if you would like to produce a product using this technology.

Because this is closed source it led to the development of an open source alternative: CyzRgb. This firmware is fairly similar to the BlinkM firmware with some additions (like a logarithmic curve for more accurate colors) and some subtractions (it only has 1 script as opposed to the 18 BlinkM has). Some people have noted it’s buggier but if you want to make something that is physically different from the BlinkM (like using a common Anode LED) you will need to use it.

ThingM offers a simple way to upload the firmware through which is called the ReflashBlinkM. This program can be used with the ArduinoISP and can be used to load raw ATtiny chips with their firmware. To do this you’ll need to setup the Arduino ISP wiring as described in the Run Arduino Code on an ATtiny article. Once it’s all connected then start the ReflashBlinkM program:

  1. Select the BlinkM firmware to use (if you are using CyzRgb, select custom and pick the .HEX file from their binary zip file)
  2. Click ArduinoISP on Arduino
  3. Select the port your Arduino is currently on
  4. Click Reflash

ReflashBlinkM using ArduinoISP

It will show the progress in the text at the bottom. When it says “Reflashing Done!” you now are ready to use your ATTiny as a BlinkM.

NOTE: This worked for me when using my UNO but not with my Leonardo.


Now that you have an ATtiny programed with the BlinkM (or CyzRgb) firmware it’s time to build the rest of the circuit around it. It’s important to make sure the correct colors are attached to each pin. This circuit can run on 5v or 3.3v.

ATTiny blinkm clone wiring


Now that it’s all hooked up it’s time to test it out. When you first power up a newly flashed BlinkM it will run a default script which flashes through white, red, green, blue and off then starts again.

ThingM offers a package of example code which includes a handful of sketches for controlling it with Arduino. I found it easier to just extract the whole zip file to my Arduino Sketch folder. The all-in-one sketch for controlling everything the BlinkM does is BlinkMTester. With it you can use the serial monitor in ArduinoIDE to view a menu of options. If you are using ArduinoIDE 1.0.2 this will not work, it functions properly on version 1.0.3. If you are using a Leonardo you need to send “?” to get the menu to show up.

BlinkMTester Arduino Sketch Menu

Next Steps

This is an easy component to work with on its own or to integrate into existing products. I created mine as an exploration of the product but I foresee it having functionality in future projects where a diagnostic light is needed. In addition, since it works over I2C it’s compatible with a variety of development boards including the Raspberry Pi.

Nov 23

Gift Ideas for the Maker in Your Life

For anyone who has a maker in their life you know it can be hard to find a gift for us, especially if you are not a maker yourself. I’ve put together a couple ideas for this holiday season. Below you will find gift ideas for people who are just getting started and some for more experienced makers.

Gifts for Beginners

  • SparkFun Inventor’s Kit for Arduino – This is the kit that started it all for me. It’s great for anyone who wants to get started in the maker world
  • Subscription to Make Magazine – Make Magazine is full of project ideas and news from the maker world
  • Adafruit Tool Kit – Having the right tool for the job makes all the difference. This kit includes all the necessary instruments to get anyone started with DIY electronics

Gifts for Intermediate Makers

  • Arduino Due – This is the latest board from Arduino and it’s still in short supply so check Sparkfun, Adafruit and MakerShed
  • Arduino Micro – This miniature version of the Arduino is great for smaller projects (for those of you reading this on December 24th it’s also available in-store at Radio Shack)
  • Raspberry Pi – This credit card sized computer packs a punch and is hacker friendly
  • Tackle Box – Over time makers collect a lot of parts, sensors and wires. A tackle box is great to help organize all of their supplies. The Plano 7771 is the one I use and it’s been great but it is pretty big, Plano makes a smaller version that would also work well

Gift Certificates

Normally I wouldn’t recommend gift cards because they are impersonal, however many times a project will call for a specific part that you may not anticipate needing. For times like this it’s good for a maker to have a credit available at their favorite website to fill in the necessary parts they need. I would recommend a Sparkfun, Adafuit, MakerShed or HobbyKing Gift Certificate as an additional gift or stocking stuffer.

Oct 14

Turn an Android Smartphone into an IP Camera

Smartphones have become ubiquitous. According to a recent Nielson study earlier this year half of all mobile phones in the US are smartphones. Sometimes it’s easy to forget that these small machines in our pockets are essentially miniature computers with GPS, Camera, Microphone, Wifi, Bluetooth, accelerometers and a built in touchscreen.

In the past getting a new phone meant either throwing your old one in a drawer or recycling it because there was no other use for it; however this is no longer the case.  For anyone who’s recently upgraded from one smartphone to another the question of what to do with the old phone is full of possibilities. One of the options is to use it as an internet connected camera. There are several programs out there for this purpose but the best one I’ve found is IP Webcam. With this free app your smartphone can become a surveillance camera.

Set a Static IP

I find that setting a static IP on the phone works better than relying on DHCP where the phone’s IP may change over time. Here’s how to get started:

  • Go to Settings
  • Open Wireless & network settings
  • Open Wi-Fi settings
  • Hit the menu button and select Advanced
  • Check the box for “Use static IP” and fill in the information for your home network.

Install IP Webcam

You can find IP Webcam in the Play store here: IP Webcam

When you first open the app it gives you several options on how you can set up your webcam. These settings will greatly impact how fast the video feed is and the quality. One thing to note is that the higher the quality of the picture is, the lower the frames per second. The performance you get is dependent on the phone you’re using.

Setting Options

Resolution and Quality – These two are going to have the biggest impact to the output pictures. Resolution is the size of the image the camera takes and quality is the level of JPG compression. It’s all about finding a good balance. I prefer larger images of slightly lower quality so I’ve set the resolution to the highest the camera will go and quality at 50%.

Orientation – Landscape is the default and will work well in most instances, however some narrow areas (like a hallway) might be better covered by a portrait shot.

Prevent Going to Sleep – Many phones will slow everything down when the screen is off to preserve the battery, this results in much lower frames per second. I recommend enabling the option to prevent it from going to sleep.

Stream on device Boot – This option sets IP Webcam to start up when the phone turns on.

Login/Password – You can password protect access to the web based GUI and video stream on the phone; this is important if you decide you want to make the feed available from outside your house.

Port – This is the port that the web based GUI uses. By default is it 8080, this should be fine.

Starting and Viewing

Once you have set the options you’d like, go to the bottom of the list and hit “Start Server”. This will enable the camera and the web GUI. The app will display the web address to access it at the bottom of the screen. When you open this website in a browser it gives you many options to access both the video and audio streams as well as the option to take a full sized picture.

Next Steps

It’s possible to view your camera remotely if you setup your router to port forward 8080 to your smartphone’s IP address. If you choose to do this I would highly recommend enabling the login/password setting.

If you want to take it a step further, setting up ZoneMinder is a great way to add features and functionality. ZoneMinder is a Linux based program that can capture and monitor video streams from USB or IP based cameras. You can configure it to monitor the video stream from your phone and detect motion detection and recording. It has the option to email you with pictures if a motion event happens and it can even run on the Raspberry Pi.

This is just one of many possible uses for an old smartphone. For more projects like this subscribe to our RSS feeds. If you have any other ideas or have done something similar with your old smartphones please let us know in the comments.

Oct 01

Arduino DUE Announcement

I made the trip to New York last weekend for The World Maker Faire. In the past this event has produced some big announcements from the Arduino team so understandably I spent a lot of time around the Arduino events. I was not disappointed, there were several exciting announcements out of the event that I’m really looking forward to.

The biggest announcement is something I’ve been waiting for since September of last year: The Arduino DUE! It’s expected to hit stores on October 22nd and is going to be around $50. As expected it has a 32bit ARM processor and the footprint resembles the Arduino Mega. This is major change in hardware from existing Arduino boards so questions of compatibility were asked several times. Thankfully Massimo Banzo assured the crowd that compatibility was a key concern when developing the DUE. It is compatible with the physical R3 layout published last year and the software team did a lot of work under the hood of the IDE to make sure that the user has the same experience regardless of the hardware used. This all adds up to an existing element of interoperability where you can swap shields, libraries or the Arduino board and with existing sketches be able to compile and upload seamlessly.

The Arduino DUE also has some really cool new features that will be a lot of fun to experiment with:

  • The DUE has a USB On-The-Go port allowing USB devices (like mice, keyboards, USB flash drives, etc) to be used directly with the Arduino. This opens huge possibilities for affordable and interesting add-ons for inputs and outputs. Later in the day Massimo did a simple demo of using a mouse as an input for a synthesizer type device. Using these devices will require libraries so don’t expect everything to work out of the box but the community will certainly step in and expand the field once the DUE comes out.
  • Multi-tasking is an option on the DUE. As expected the increased horse power of the ARM processor allows for running multiple tasks. Essentially you create multiple loops and run them at the same time. There are a few caveats though: it is cooperative multitasking meaning that the different threads need to take turns on the processor and the library is still experimental but they expect it to be developed quickly.
  • It supports CAN bus which is the protocol that subsystems within cars use to communicate. Expect to see some exiting instrument cluster replacement based on Arduino.

For more of the technical specs here is the flier they were handing out: ArdunioDUE

Also to hear about this and some of the other new stuff out of the Arduino camp you can check out the full session here: