Thursday, December 11, 2008

A Respectable Firmware and Router

After delving more into the newer firmware and router Jonathan and Devon were using I felt really bad about using the processing router and older firmware. So I went through and converted the new firmware over to be compatible with the shield, and also have some instructions on using the python router.

For the Octinct use this software:
To get the python router running on windows, you need to do the following:

  1. Install Python 2.6 (I don't believe all the libraries are 3.0 compatible)
  2. Install SimpleOSC (I used v0.2.5)
  3. Install pyserial (I used 2.4)
  4. Install pywin32 (There is a version for python 2.6)
  5. Download Devon Jones Python router (see above)
  6. Edit SerialTinct.py and designate the correct comport windows users can use a value like "com17"
  7. From the command line run "python SerialTinct.py"
  8. Pat yourself on the back
To install SimpleOSC read the readme.txt that is included with it, the rest of the binaries should install the libraries for you.

If you look in the firmware you will see a serial string case for setting RGB values, which then are used by led, row, column commands of the monome protocol. You can use this to start writing RGB apps without needing to modify the firmware.

osc.sendMsg(prefix + "/rgb",[255,0,0],"127.0.0.1",8080)

The above will set the working color for R,G,B respectively. The value specified is multiplied by 16 to achieve the brightness value the 5940 is fed.

Tuesday, December 9, 2008

Octinct Overview


octinct running boiingg from dr unsped on Vimeo.

Checkout all the Vimeo Videos and my Flickr feed and read the comments, they have very useful information in them.

The Octinct, from a hardware standpoint is an interesting beast. An Octinct consists of 4 'Tinct' buttonpads. Each buttonpad consists of an integrated tlc5940 16-channel 4096 step led pwm driver, each led on the buttonpad is driven by its own channel, and they are not multiplexed. The tlc5940 is capable of sourcing 150ma per channel, but for our purposes we use 20ma max, this current is set with a resistor on the 5940/buttonpad. The Tinct's connection to the outside world is either via a 24-pin idc cables, or a row of headers. The headers are generally only used for troubleshooting or breadboarding, both contain the same types of pins and are connected to each other.

Like the sparkfun rgb buttonpads (the tinct uses sparkfun rgb buttonpad membranes), header pins are provided for column/row decoding of buttonpresses , while diodes provide descrete buttonpresses. The idc connector allows the buttonpads to be tied together without the nasty cabling/wiring that you might be famliar with on an arduino, however at the cost of redundant wiring.


The 5940 communicates with the arduino via spi, and when connected as an Octinct the 5940's are chained together, one output going to anothers input. This is done on the arduino side, as all Tinct buttonpads are identical. The 5940's are not by nature rgb, they are considered grayscale drivers, so 3 transistors are located on the buttonpad allowing each color channel to be activated or deactivated, for the sake of the 5940 only a single color channel should be activated at any given time.


The Octinct controller bridges the Tinct buttonpads together, routing spi data as appropriate. It also incorporates 2 shift registers like the arduinome/monome to decode the buttonpresses. Because 2 of the Tinct boards are rotated on the Octinct, the button column/row pinout to each idc connector changes quite a bit. The Octinct controller houses the 12 transistor base resistors, controlling the amount of current used to turn on/off a color channel. The heavy version also has a breakout connector for applying outside regulated current should you chose to run your Octinct on current beyond the arduino's onboard regulator.


Putting it all together you have a control shield that sits on top of an arduino, from there 4 idc cables attach to 4 Tinct buttonpads ... which gives you ... drumroll an Octinct (let's just say the Oct means 8 rows/columns).

Octinct Building Considerations

The Octinct is not what i would characterize as a refined product much as the Arduinome. Instead it is a reasonably thought out development platform for an RGB monome or similar device. As such there are some caveats:

Buttonpad capacitor decoupling

The current buttonpad design does not incorporate a bypass capacitor, which is something I feel as neccessary for consistent and proper function. More info about retrofitting bypass capacitors onto the buttonpads can be found on my flickr feed.


Backwards transistor silkscreen on buttonpad

The base is fine being in the middle, but the transistors on the buttonpads need to be rotated 180 degrees or 'backwards', essentially you are swapping the collector and the emitter.

Lack of established RGB protocol


Currently the Octinct firmware simply changes colors based on led on/off events. Cycling through the colors, while this is very pretty it is not very useful. I have no plans on developing a RGB protocol so I leave it up to you and the Arduinome team to do what you do best.

Power considerations

Even though the Octinct mux's the color channels it is still capable of drawing 320ma per panel, or 1.2amps for all 4 panels. This is well above the 500ma onboard regulator of the arduino, and definitely above the 100ma max of the usb spec. What I have done to get around this use 4.7k resistors on the iset of buttonpads, this gives you less than 100ma per board at full brightness, the downside is that the buttons are not near thier theoretical max brightness. The led's are probably pushing 5-6ma vs. the 20ma+ (because they are mux'ed) they could handle.

This is partly why the heavy version of the Octinct was developed, it has a 2-pin 3.5mm screw terminal allowing you to power the arduino and Octinct off of a higher amperage power source. The screw terminal isn't some magical voltage regulator though and clean regulated power needs to be provided through this terminal not just some wall wart. Also make sure and remove the arduino ext/usb power jumper so that you don't damage anything.



I should mention that while I have tested external power sources using the screw terminals I have not tried currents in excess of 500ma, it should work fine ... should being the operative word!

If you do decide to try a high current version (greater than the onboard regulator) you may want to look into beefing up the gnd and vcc lines on the buttonpads, the traces are fairly thin, primarily the idc to 5940 could use some beefing up.

Transistor base resistors

While the buttonpad would be more efficient with mosfets it has transistors, the interesting thing about transistors is that they have a gain ratio, and require more current to turn on, as the current they are turning on increases. This means if your octinct is running ~300ma off the onboard regulator the transistors may only need a couple ma to turn on, however if it's cranking 1.2amp or more, the efficiency goes down as well as the current goes up. This means you may need 7-8ma or more to turn on the transistors. This poses a couple of considerations.

First each color pin on the arduino is driving 4 transistors, and each pin is only rated at about 40ma. Multiply 8ma by 4 and you can see we are starting to push the limits of this design. It should probably be redesigned with better power isolation and mosfets however I leave that up to someone else.

Second if you choose a higher current for the transistor bases but don't need it, you end up using more current overall, this may be a problem if you intend to run off the onboard regulator only. You will need to verify that you power usuage is inline with ratings. My recommendations are the following:

  1. Reduced brightness Octinct running off of onboard regulator, use 4.7k resistors on the shield for the bases. This should be good up to the 400ma or so you would want to pull from this configuration.
  2. Max brightness Octinct running off of external power supply, use 1.5k resistors on the shield for the bases. This should be good for up to 1.2amp.
  3. Be prepared to swap out resistors if you are playing with high amperage operation as I have not tested this fully.
Mounting buttonpads

The buttonpads do not share all of the same mounting holes as the sparkfun pads, namely it is missing the mounting holes on the interior of the board. I suggest, as I have done myself to use XNDR's arduinome mounting method where the edges of the pcb are trimmed and the boards are retained as a group.


Long term durability

Since there are things that are not optimal about the design it is unclear if long term operation will stress any of the components out. Technically mux'ing color channels and sourcing them through a constant current driver like the 5940 should be ok, but it is certainly not the application intent of such a chip. Since the different led elements have different forward voltages the 5940 is readjusting to each led cycle to maintain a constant current. The ramifications of this over the long haul I can't really speculate.

The Octinct Package

Missing until now has been pieces of the Octinct puzzle, my control shield along with Jonathan's graciously allowing the buttonpads to be open sourced in an arduinome/monome style license.


Without further adieu my control shield:
Other Octinct files by Guberman:
Other Octinct files by Devon Jones:
  • Octinct Python Router (much faster and efficient, also has much improved and commented version of firmware, however i have not tested the hardware with it myself.)
I should add,

I'm using the older firmware and the old processing router in my examples.

The updated firmware and python router are much much better, the newer firmware has wonderful commenting. The firmware in the 'old' folder on evilsoft's site, and the 'old' firmware I'm using differ in a few ways:
  1. The port manipulation for the transistor bases have had some ports changed due to a mistake when creating the shield, i was assuming the analog ports were numbered incrementally and not decrementally, so I modified the firmware to account for this.
  2. The led remap has been changed
If you try migrating to the newer firmware which you should, you will most likely have to repeat these changes.

The Octinct is free for non-commercial purposes, with the understanding that you will have the pcb's made domestically wherever that may be in the spirit of monome.org

The Octinct "Controller" is Born

Devon was in the same boat I was, wanting a controller to replace the spaghetti mess of a breadboard that the Octinct required. For his 2nd pcb he did a very good job of creating an arduino shield that would connect all of the buttonpads together ... but had one small problem. Remember those expensize specialized idc connectors required to breadboard an Octinct, well the pinout on the socket side is different than a standard idc cable. This resulted in shield pcb's that would have to be rewired by hand, a daunting task of 96 wires.

Meanwhile Devon had his own reduction in free time with new employment, so I figured I would give a crack at it.

My having more spare time rather than better technical expertise resulted in the creation of a functionally correct Ocinct contoller shield, one version without a ground plane and limited to about 500ma, the other with heavy traces and a ground plane that would be able to handle 1.2amps or higher. The idea was that if the board had to be reworked it would be easier to troubleshoot on the 'light' shield. You can see the result in my flickr feed.

The Octinct Story

Originally Developed by Jonathan Guberman during the time I was working on the arduino monome project, the Tinct was a 4x4 fully pwm adjustable color buttonpad designed to be compatible with the monome serial protocol. Eventually Jonathan designed a PCB and wrote a custom router and firmware. Once he had the software working properly the proof of concept was the end of his desire to continue the project (not to mention serious school obligations).

Devon Jones breadboarded his Octinct as well and wrote a better performing router in python, all the meanwhile my Ocinct remained in a drawer soldered up but never functional due to my desire not the breadboard it. The Octinct uses 24-pin IDC cables which are fairly difficult to integrate into a breadboard unless you purchase specialized cables. The original intention was that Jonathan would eventually create a control board that would tie all the boards together, however it never developed. Similarly at the time the wishes of the buttonpads creator were that the buttonpads to remain closed source.

After the popularity the arduinome recieved I thought it was time to revisit the Octinct as something the monome community may have actual interest in.

Arduinome Shield

What would essentially be my first electronics project, I chose to try and clone the monome 40h kit offered by monome.org. Reasons for choosing this: 1) it's very cool 2) you can't buy them unless your lucky 3) the arduino firmware is very similar to the atmel setup the 40h logic kit uses.

The shield is mainly a max7221 and shift register breakout, the shield plus the arduino is designed to replace the 40h logic kit. Differences in usb to serial hardware resulted in the Arduinome team writing a better firmware and software router. It now enjoys even a Wikipedia entry where you can find out more information: http://en.wikipedia.org/wiki/Arduinome


Originally laid out on a breadboard, using the ladyada boarduino as the mcu of choice the arduino monome was made functional enough to run basic monome patches and used the standard monome serial application for osc message routing.

You can see the 1st arduino monome shield I created next to the latest blue 'special edition' of which 128 were made and are in the process of being sent around the world.

Ultimately it is the hardware side of things that interests me the mode, so an initial pcb for an arduino shield was developed. Little has changed from this initial design except the change from a pull down to pull up connection on the resistor array.


You can download the following files if you wish to make your own copy of the arduino monome shield: