a TiM Moodlight

dscn1798_26318788455_oA couple of weeks ago, I noticed a pair of old, first version TiM boards lying around at my local maker space, Maker’s Asylum and decided to put them to use by building a MoodLight. We love crazy names at WyoLum, and TiM is “The Intelligent Matrix”. We even tried building a controller for it called TiNA but it didn’t work out 🙂

dscn1788_26252600171_oTiM (The intelligent Matrix) is an array of 8×16 individually addressable 5050-WS2811 RGB “smart” pixels.  It is essentially 8 rows of 16 LED’s but with a very flexible connection scheme that allows you to control the whole array (128 LEDs) with a single pin or up to 10 boards (1280 pixels) chained together using 8 input pins. TiM boards can be linked together to create larger matrices. Stacking can be done in the vertical and horizontal orientations, and the pitch between individual LEDs is maintained when boards are stacked. Here’s the TiM User Guide.

dscn1793_26226395382_oI had two boards on hand, which I joined together to form a 16×16 matrix of 256 LEDs. TiM boards need an external controller, and I used an Arduino Clone that I designed for use at the Maker’s Asylum called MAPone (Maker’s Asylum Project #1). MoodLights require some form of user interaction, and I decided to use one push button (digital input) and one potentiometer (analog input). The whole thing is powered by a 5V wall wart.

dscn1799_26292824886_oFor the software, I tried some code I found on the web, but none of it did what I wanted – change modes by pressing the button, and change colors using the potentiometer. I can’t code if my life depended on it, so I chucked the problem at my go-to guys – Justin and Kevin. Justin is quick, like the Energizer bunny, and threw back code at me on the rebound. But it required using four potentiometer’s to control the colors. Since the HW was already wired up, I waited to see Kevin came up with something different, which he did. Nice code which allowed different modes to be selected by a button press. The first mode is the standard Rainbow colors from Adafruit’s StrandTest. Then, there’s a color changing mode, Breathing LEDs, Connection Machine (which looks something like Conway’s Game of Life), and finally a scrolling Text mode. This is enough to start with, and I’m sure if anyone at the Asylum wants to hack and dig in to the code, there’s a lot for them to play around with.

dscn1805_26363162042_oI designed the enclosure in OpenOffice Draw. A laser cut piece of MDF that wraps around the TiM PCB using some “living hinge” bends. I tried some junked 3mm MDF first, but the material was kinda bad – some parts cut well, while other areas were left with a charred and burnt top layer, so I had to scrap that. Next, I tried 5mm MDF that way lying around, and while it cut well, it was a tad thicker than I preferred and the hinges were stiffer being designed for thinner 3mm MDF. Anyhow, it worked and I was keen on just finishing this off. I also cut an additional square piece of 2mm white polypropylene sheet for the front diffuser. Most of the electronics was stuck in place using generous globs of hot glue. I added some hand drawn graphics to wrap it off, and left it at the asylum. Let’s see how they mount it up.

Here’s a video walk through of the MoodLight.

EDIT : Here’s a better walk through of the code by Kevin Osborn

MoodLight for TiM (The Intelligent Matrix)

This slideshow requires JavaScript.

WyoLum goes to MakerFest 2014 at Ahmedabad, India

The first week of January had me and Samata Mahidharia driving down to Ahmedabad, about 550 kms North of Mumbai. We were on our way to attend MakerFest 2014, organized by the awesome folks at Motwani Jadeja Family Foundation, at the uber-cool design school – National Institute of Design.

WyoLum gave away 40 of our BADGEr – e-paper conference badges for Makers attending the Maker Fest. We didn’t have time to program all the BADGEr’s , but the Makers were kicked to be able to take them away and get hacking. I took a few pictures.

I gave a talk about the Maker Movement – talking about how the Maker revolution is bringing us back to our Maker roots, using my personal experiences as examples.

Samata and me did an Origami Workshop. The initial plan was to limit attendance to 20 people in a classroom. Eventually, a much larger number of people turned up, and the organizers asked it we could accommodate all. Seeing as how enthusiastic everyone was, we just couldn’t refuse, and moved our workshop to the main stage of the open grounds. It was wonderful to be surrounded by almost 50-60 folks – from little kids to grown ups, eager to learn some folding. Due to the large crowd, and also that no one had a good flat folding surface in front of them, we cut down the original plan of folding about 6-7 models in an hour to a more manageable 3 simple models. Eventually, I think everyone managed to fold the models – a tumbling toy, a cawing Crow and a Swan.

The most exciting event for Samata and Me was to team up with Albie Brown and run a MakerFest Treasure Hunt. Up for grabs was a bag full of goodies, including a WyoLum BADGEr, a BeagleBoneBlack and other cool stuff.

Visitors to the Fest were handed over a “Guide for Hunters

This explained how the hunt worked. On the back of the sheet was a list of 100 words, numbered 00 – 99. Only five of these were relevant to the final solution of the puzzle, the remaining 95 being duds. Hunters were asked to stroll through the booths at Makerfest 2014, where they had to find, and solve, five mini puzzles.

The starting “hint” was that there were a few logos on the clue sheet that indicated which booths are presenting challenges. In no particular order the five booths were:

  • Education for Design (e4d)
  • Microsoft Research
  • WyoLum
  • FabLab
  • Printajoy
  • E4D is working towards bringing education to everyone. Beginning with a handful of Centres in southern India, they are building a higher educational model focused on reaching the masses, rather than building universities. They seek to minimize infrastructure and costs, while taking full advantage of freely available online educational resources. Their activities also include education for blind persons. Their clue was – What is the name of this code spelled backwards? This hint was written in braille on a piece of a can and the can was glued to a stick of bamboo. Puzzlers had to translate the braille and answer the question to solve the clue. The answer was “elliarb

    Microsoft Research is working on conductive ink printers made from regular Ink Jet Printers, but using special cartridges filled with ink made from Silver nano-particles. These printers, along with a range of sticker adhesive elements, allows designers to quickly fabricate prototypes. Their clue was – “What am I made of? (Hint: they sometimes call me 47)” and the answer was “Ag” (the symbol for silver).

    WyoLum put up one of their ClockTHREEjr with a code written next to the clock – C1F8D1H1N9G6. Reading off rows and columns (C1, F8 etc) gave them the word “Patang” which translates in to English as “Kite

    The MJFF donated a $140,000 Fablab from MIT to the maker community in Ahmedabad. The Fablab is a set of digital fabrication equipment and software to help makers transform their imagination into products. The Fablab is housed at the prestigious CEPT University Ahmedabad and will be open to the public at select hours every day. At the Fab Lab booth the manager told puzzlers to press print. They had to figure out how to use the vinyl cutter and print a document that was concealed by coloring all components black so the text was invisible. The machine then cut out the word “Replicate” in sticker form and the puzzlers had to pull off the sticker to reveal the answer.

    Printajoy is a photo printing service for Instagram photos – a “Print button for your Instagrams” India’s first affordable, online printing solution that converts your Instagram photos into beautiful lifetime memories! Their clue was – “There is something hidden underneath every Smile”. Then under the deck of business cards (which said smile on the front) there was one card with a label with the word “Memories” stuck to it.

    If you solved all five puzzles you ended up with five answers and five two digit numbers. Several teams kept asking us to check if they’d got all the right words, but we just encouraged them to continue going.

    At 3:30 we revealed the final clue. Albie wrote out the clue on a white board, and held it up for everyone to see

    _ _ _ _ _FEST

    The first alphabet taken from each our five answers, when placed in the right order formed the word MAKER. Almost everyone filled in the blank with “MAKER” but were flummoxed when we encouraged them to keep going since the hunt was not yet done. The smart winning team realized very quickly that the numbers still have not been used. “MAKER” indicated the order in which to use the 10 digits, which gave a phone number. When they called the number, they won!!! The winning team called the phone number within a minute of our releasing the final clue. Not just that, they even followed Albie who ran behind the stage when he picked up the phone they had dialed, and told Albie – “Turn around and look here – I’m the guy calling you”

    In the middle of the Maker Fest grounds, we set up a pop-up Maker Space where the makers got together and started building and showing off stuff to visitors, and encouraging them to join in. There was a lot of Arduino, flexible sticker circuits, wearable electronics, PVC pipe Lamp shades and other stuff going on. Samata even stitched a quick Dress from an old Saree and sewed a string of LED’s around the neck. Apparently she did a Ramp Walk with the LED dress in the auditorium, but I wasn’t around to witness the awesomeness !

    I set up a PolarGraph drawing robot. I had received the kit a few days before heading off for MakerFest, and had no time to get it working. At the Makerspace, I tried setting it up, and even managed to get one trial print. But I was constantly being interrupted by eager visitors asking me what it was, and ended up spending all my time telling them what it was supposed to do. I even managed to show it off to Mr. Sam Pitroda

    At the end of the second day, the MakerFest was wrapped up with a Panel Discussion featuring a bunch of Makers – Angad Daryani – a young Maker from Mumbai , Spandana Cheruvu – another young maker , Anand Gandhi – Ship of Theseus film maker , Freeman Murray from Jaaga Bangalore, Anna Waldman-Brown curator of MakerFest 2014 , Myself, Vaibhav Chabbra – from the EyeNetra team and also running Makers Asylum in Mumbai, Ankit Daftary – from the Arduino India team, Bangalore , and Kshitij Marwah from MIT Media Labs

    Thanks to everyone who participated! We had a great time putting it all together! We met some amazing Makers from all of India. Some of them we knew via Facebook or Twitter or Google, but meeting them in person was wonderful. And we made a lot of new friends ! All in all, this years MakerFest was a blast and we look forward to next year’s MakerFest.

    ShapeOko desktop CNC mill build

    When my WyoLum buddy in Boston, Kevin Osborn, built his “CNC AlaMode“, I just had to make one for myself too. Here’s how my build progressed.

    I ordered the Mechanical Kit from Inventables with Dual Y-Axis motor upgrade– without any motors or electronics. For good measure, I also added in two lengths of MakerSlide, hoping to extend the axes at a later date. Being on the other side of the globe has its disadvantages, and it took almost two months after ordering the kit before I could lay my hands on it in April.

    There were a few small bits and pieces missing, but nothing that I couldn’t replace from my local collection of hardware.


    The mechanical assembly seemed straightforward. But first order of business was tapping all the MakerSlides with a 5mm tap. The full kits come with the slides already tapped, but the Mechanical only kits need to be tapped. This is not something that can be rushed, even though it was a hefty 5mm tap in an open-ended hole – one slip of concentration, and it is highly likely you’ll end up snapping a tap inside the hole.


    Aluminum is a pretty “sticky” material, so make sure you lubricate the taps with cutting fluid while tapping. In between tapping the holes – so I wouldn’t get bored and snap a bit – I simultaneously went about assembling some of the other parts.


    I did the initial assembly, but could not proceed further until I could manage to buy the stepper motors locally – which were out of stock.


    Meanwhile, I moved my attention to assembling the electronics. The computer for the ShapeOko would be a Raspberry-Pi, the microcontroller would be our very own AlaMode – an Arduino clone board, and the GRBLShield from Synthetos would drive the Motors.



    My plan was to put together a control box to house all the electronics. Here’s the full BoM :





    Once the motors arrived, I was able to complete the rest of the build quickly. One of the changes I made was to move the Y-axis drive pulleys on the outside. I had to move the Y-axis motors further away from the mounting brackets by about 20mm to accommodate the change. This extended the X-axis range by almost 40mm.


    To do the initial “pen writing” trials, I made an aluminum block to allow mounting various types. My very first trial of the “ShapeOko” hello world was a mirror image. Turned out the dual Y-axis motors were running in reverse. I flipped a coil connection on both the motors, and the second trial was correct. I made a few more trials, using different pens, and printing some geometric patterns to check for any obvious errors in the right angles, circles and dimensions.


    Once the pen trials were done, I mounted the 300W, 48V DC spindle with ER-11 collet, that I got off eBay.

    300W Spindle

    Raspberry-Pi Setup
    I’m not much of a software guy, so I mostly followed the nice set of instructions on the Adafruit Learning System – to install the OS and utilities on the SD Card. It’s important to set up SSH and also remote control using VNC or similar. This allows you to log in to the Raspberry-pi from a remote computer.

    Next step would be to set up the AlaMode on the Raspberry-Pi. Detailed instructions are available at this link : AlaMode User Guide – http://goo.gl/DtQy3

    Once Alamode setup is complete, it’s time to flash “GRBL” on the AlaMode. I downloaded the HEX file for GRBL Version v0.8c – http://bit.ly/SSdCJE – and flashed it on the AlaMode using XLoader. My Linux-Fu was not strong enough to figure out how to flash the HEX code directly from the Raspberry-Pi to the AlaMode.


    The final piece in the software chain was a means of sending a G-code file from the Raspberry-Pi to the ShapeOko. Initially, I tried “Universal G-Code Sender (https://github.com/winder/Universal-G-Code-Sender)”, but that runs on Java.


    Unfortunately, running UGCS slowed down my Raspberry-Pi to a crawl. The reason, it seems was that the Adafruit Occidentalis can only handle soft-float operations. The regular Raspbian OS can handle hard-float operation, and thus runs Java code more efficiently / faster. While trying to improve the situation, my luck ran out, and I ended up messing up the OS. Took me a fair bit of trial and error (and lots of hair-pulling) to get the Ras-Pi running correctly again.

    At which point I decided it was just not worth the effort to continue using Java on the Raspberry-Pi, and I looked around for better options. Luckily, I found an awesome G-Code sender specifically written for GRBL, called GRBLController, by Zapmaker. There were some initial issues, like not being able to set up the Alamode port (TTYS0), etc. But a couple of exchanges with the author, and he quickly sorted it all out. We sent an AlaMode to Zapmaker for him to test it out – you can read his blog report on the Alamode.


    One of the first jobs I cut on the ShapeOko was a circular ring illuminator PCB which uses 12 LED’s to light up the cutting area under the spindle.

    Photos here and here



    PCB Milling Video

    Next on my list of things to do is

    • Fixing end-stop / homing limit switches.
    • Make schematic for the control panel I built, and post it in my next blog post.
    • Describe the process for milling PCB’s on the ShapeOko

    p.u.l.s.e. – fader control for Motorcycle parking Lamp

    My brother is a Mechanical Engineer who loves his KTM Duke 200 bike. He asked me to build this circuit : http://sunbizhosting.co.uk/~spiral/blog/?p=227 for a ‘heartbeat’ lamp controller for the parking light. A Neutral Detect (ND) signal controls the lamp pulsing. When ND is HIGH, the Lamp is fully lit. When ND goes LOW, the lamp starts pulsing.

    I’m not familiar with PIC microcontrollers, and didn’t want to dabble in “C” code. I’d be comfortable with an Arduino, but even the smallest ATMega seemed too big (and overkill) for this simple requirement. How about an ATTiny ? A bit of Googling, and I found this excellent resource for running the Arduino environment on the ATTiny : http://hlt.media.mit.edu/?p=1695

    Time to churn out a circuit. I selected the ATTiny45 which has 6 I/O pins, with two of them being PWM, and three Analog. The schematic and board layout (in KiCad) can be found on the wyolum code repository at Google Code. The idea was to have a board that plugs in to the existing lamp socket. The board size is about the same as a T10 lamp. A new socket is wired to the p.u.l.s.e. board which then attaches to the lamp. A third wire from the p.u.l.s.e board goes to the Neutral Detect (ND) signal in the bike. This makes the installation clean and simple.

    3D render of the p.u.l.s.e. board

    3D render of the p.u.l.s.e. board

    3D render of the p.u.l.s.e. board

    The 6 way header is ICSP for programming the ATTiny.

    p.u.l.s.e boards

    p.u.l.s.e. boards

    p.u.l.s.e. boards

    Assembled p.u.l.s.e board

    Assembled p.u.l.s.e board

    Assembled p.u.l.s.e board

    Green wire is for ND signal. Red and Black go to a Lamp socket. The p.u.l.s.e board plugs in to the original lamp socket.

    Now for the Important bits – getting Arduino to run on the ATTiny. These are the steps :

    PHASE I – Get the ATTiny boards.txt files
    1. Download ATtiny hardware description files for the Arduino environment from here : https://github.com/damellis/attiny/zipball/Arduino1
    2. Create a sub-folder called “


    ” in the Arduino sketchbook folder (find its location from preferences dialog in Arduino IDE)
    3. Copy attiny folder from inside the downloaded .zip to the hardware folder. You should end up with folder structure like

    Documents > Arduino > hardware > attiny

    that contains the file boards.txt and another folder called variants.
    4. Restart the Arduino IDE.
    5. You should see ATtiny entries in the



    PHASE II – Hook up the ATTiny to the Programmer (Arduino Duemilenove)
    6. I used an Arduino Duemilenove board as the Programmer. There are other options (see the original post).
    7. Plug the ATTiny in to a prototyping board, and link up wires between the Arduino and the ATTiny as follows :

    ATTiny <-> Arduino
    Pin 1, RESET <-> Digital Pin 10, SS
    Pin 2, NC <-> x
    Pin 3, NC <-> x
    Pin 4, GND <-> GND
    Pin 5, MOSI <-> Digital Pin 11, MOSI
    Pin 6, MISO <-> Digital Pin 12, MISO
    Pin 7, SCK <-> Digital Pin 13, SCK
    Pin 8, VCC <-> 5V

    8. Load


    sketch in to the Arduino IDE. This sketch can be found under the examples menu.
    9. For ARDUINO 1.0, find the line in the

    heartbeat() function

    which says


    and change it to


    10. Download this modified ArduinoISP sketch to the Arduino Duemilenove board.
    11. Connect a 10uF, 16V electrolytic capacitor on the Arduino Board, between the RESET and GND pins. [+] of cap. goes to RESET and [-] of cap. goes to GND.

    PHASE III – Change Fuses on ATtiny and burn Arduino Bootloader
    12. ATtiny runs at 1MHz by default, out of the box. To make it compatible with Arduino IDE, it needs to run at 8MHz.
    13. Select the 8MHz option for your selected ATtiny chip (“ATtiny45, internal 8MHz” in my case) from the


    14. Select

    TOOLS > PROGRAMMER > Arduino as ISP

    15. Select


    16. That’s it – done. You can now load Arduino sketches in to the ATtiny, using the same connections that you have already set up.
    17. For the ATtiny45, the Port definitions are as follows :

    ATtiny45 Pin No <-> Arduino Pin No
    Pin 1, <-> PB5
    Pin 2, <-> Pin 3, Analog Input 3 (PB3)
    Pin 3, <-> Pin 2, Analog Input 2 (PB2)
    Pin 4, <-> GND
    Pin 5, <-> Pin 0, PWM (PB0)
    Pin 6, <-> Pin 1, PWM (PB1)
    Pin 7, <-> Pin 2, Analog Input 1 (PB2)
    Pin 8, <-> VCC

    For the other ATtiny chips, the table will be different. Check the ATtiny datasheet for details.

    18. After Bootloader is burnt to the ATtiny, you can load the BLINK sketch to verify if it all works well. Change Pin 13 to Pin 0 before uploading the sketch, and you should get the blinking LED between PB 0 and GND of ATtiny (Pins 5 and 4)

    Connections between Duemilenove Board and p.u.l.s.e for burning bootloader and downloading sketches (note the 10uF capacitor between RESET and GND of Duemilenove)

    Connections - Duemilenove to ATtiny

    Connections – Duemilenove to ATtiny

    EDIT :
    Video of p.u.l.s.e

    Another video after installation in the Bike