The Octatrack is an upcoming multichannel sampler/looper device from Elektron, makers of the Machinedrum. It’s good to see someone looking after the hole in the market left by the departure of Electrix and its marvelous Repeater, which is the cornerstone of my live-PA DJ rig.
August 5, 2010
August 4, 2010
The Dropout’s Guide to Antenna Design looks like a great reference for people like me who know almost nothing about antennas. I have been learning a lot about digital electronics over the last year or so but I am a total ignoramus when it comes to analog signal processing.
The first batch of Xbee modules I ordered had wire antennas; when Adam ordered his, he picked one with an external antenna. I think this is a better choice for long range, so I ordered a little SMA connector and am going to solder it on to my existing device.
July 23, 2010
IT’S MY BIRTHDAY!!
Yep. Sure is. That is what this day is, among many other things. Carry on!
July 22, 2010
learning about manufacturing economics
I spent a couple hours making a spreadsheet last night. This might not sound like much for someone who has been using computers since the early ’80s, but it is in fact the first spreadsheet I have ever made (unless you count all the copies of the “invoice” template I’ve used for contract billing). I wanted to figure out how much it would cost to build a rhythm robot, as a function of the size of the production run. It’s an interesting curve: there are steady price breaks at 10, 25, 50 units, then a big drop at 100 – but almost no improvement at 200. I didn’t track price breaks larger than that, because it’s difficult to imagine producing, selling, and shipping that many items without making a full-time job of it, but it might be interesting to do the math anyway just to see how the production would work out.
Next I need to estimate what the “demand curve” for this product might be: how many units could I sell at each possible price? Once I have that information, I can join the two functions and figure out whether there is any range of prices at which I could profitably sell rhythm robots.
Of course there are always more complications around the corner. I’d still need to figure out how much it would cost to advertise, how much to factor in for assembly time, and then there’s the whole terrifying nightmare of taxes and lawyers and incorporation, which might just kill the whole thing… I’m not actually sure there is a real business here, or that I really want to pursue it even if there is. Regardless, I’ve never done this kind of analysis before, and it’s an interesting learning process.
July 21, 2010
I was never particularly interested in the whole Holga camera thing, but this Holga-D digital camera project hits almost all the right design notes. It has a simple geometry, minimal interface, and generally looks like something I’d love to cart around. It’s just a concept so far, but it’s a good one; I hope they produce it.
There’s actually an old Kodak TLR in my project drawer waiting to be turned into a digital camera. The project has never ranked very high on my to-do list, but someday I want to pull out the film holder and mount a CCD in its place, with an SD card holder, a microcontroller, and a battery pack hidden somewhere in the volume. I wouldn’t bother with a viewfinder, a flash, autofocus, or any of that: the goal is to create a simple, manual camera that just happens to take digital pictures.
July 19, 2010
The MCP4725 is a cheap, simple 12-bit DAC chip. It works on a single supply, both 3.3V and 5V are fine, and has an I2C interface that runs at 100K, 400K, or 3.4M. Sounds like a pretty solid performer to me.
postscript: here’s the MCP4921, a very similar chip with a SPI interface.
It was a fun weekend, alright: Ava and I spent Saturday hiking up to Pratt Lake and back. We got started late in the day, so we didn’t hike all the way around to the far end of the lake where the trail ends, but we had a nice little picnic on a sunny rock with a great view. It was a beautiful Alpine Lakes Wilderness trail – all ferns and salal in the understory, little streams running across the trail every so often, some nice waterfalls, firm steady earth underfoot.
We were pretty tired when we got back – it’s a twelve-mile round trip – so we didn’t end up going to Dawn’s birthday picnic after all. We picked up a couple of chirashi bowls from Hana and sat on the front porch watching the cars and the sky. I lasted a little longer than Ava did, and walked a few blocks over to Gary & Jaime & Nell’s housewarming – they are neighbors now!
I felt like my set went pretty well Friday night. I had no time to prepare, so I had to just jump in and wing it, but my style is designed to incorporate a lot of improvisation so it worked out alright. I got some pretty solid grooves going, and there were some wobbly bits but only one outright trainwreck (which I could have avoided had I brought the rhythm robot – oh well).
My current sewing project is a handbag; it’s a gift for my sister Joanna, which I’d hoped to have ready for her birthday. I ended up designing a somewhat more complex object than I’d originally made time for, which is good in terms of it being a nice present, but it does mean it’s going to be a couple weeks late. I’d hoped to spend some time finishing it this past weekend but did not succeed; maybe I’ll get it done on Wednesday, which I’ve set aside for sewing this week.
Other projects under way: now that the bloom lights are finished, my focus for electronic work is the walkie-textie. Adam has bought a set of parts for a second prototype, and once we get both devices wired up we’ll do some range tests and see how practical this system can be as a wide-area mesh network. I’ve also been doing some design work on the intelligent juggling balls; I have no idea whether any of what I’m doing will end up in the final product, but I’ve never done electronics CAD before, and this is a great excuse to learn some new skills.
The Maple board I ordered arrived today. I don’t have any immediate projects for it, but I would like to expand my design comfort zone to include higher-powered microcontrollers, and the STM Cortex-M3 seems like a great place to start. I think the first thing I try with it will probably be a percussion synthesizer device, as a companion to the rhythm robot.
This very nice little graphic shows the relationship between Arduino pins and the ATMega328/ATMega168, plus a schematic for the minimum possible arduino clone.
July 16, 2010
Performance tonight
I will be performing tonight as part of a semi-weekly club night called Tryst, at the Little Red Studio in South Lake Union. Tryst has has drawn some of Seattle’s best DJs, and I am excited about the opportunity to play. I’ll be doing a live-PA set in the downtempo room starting at 12 AM… love to see you there :-)
Guerrilla guide to CNC machining and resin casting:
Several years ago, I took a leap of faith, and decided to learn all there is to benchtop CNC manufacturing, the hard way. I spent a good amount of money to set things up without any sort of an assurance it would actually work the way I hoped, then went through months on trial-and-error experiments with dozens of different materials and processes. It was well worth it, to be sure: today, I can use this awesome tool with confidence, and get results I’m often proud of. I do not see a reason why the learning curve needs to be as punishing for others – and for this reason, I decided to put together this document. My hope is that it will help you decide whether CNC milling is right for you, and give you the head start needed if the answer is “yes”.
July 15, 2010
Newbie guide to Eagle and PCB manufacture, walking you through the steps involved in getting an Arduino plug-in “shield” made.
July 14, 2010
There’s been an interesting trend toward “open-source hardware” over the last few years, as the growth of the quick-turn manufacturing industry, the increasing power of cheap microcontrollers, and the wide accessibility of CAM devices like laser cutters have run into a hobbyist culture long familiar with open-source software and creative commons licensing. You can’t clone hardware for nearly zero cost, like you can with software, but it is increasingly easy to see hardware as a physical representation of some digitally-encoded design. As the capital investment required to manufacture such a design continues to drop, and more people gain access to such processes, it makes increasing sense to start sharing around the knowledge necessary to design and build one’s own devices.
In this context, the newly proposed Open Source Hardware License is particularly interesting, as an attempt to do for hardware something like the OSI did when it first standardized the term “open source”. There are already a number of small shops selling both kits and assembled devices for which they also freely publish the schematics and firmware source; the Arduino has become the most popular microcontroller platform in the hobbyist community in no small part because of the vast array of completely legal clones which have jumped on the bandwagon.
I’ve been toying with the idea of commercializing the rhythm robot, possibly as a kit, or perhaps a fully assembled device like you might find in Guitar Center. Now I’m thinking: what if I added a USB port for a programming interface, published the schematics, and gave away the firmware? Most people would probably just play with it as-is, but people who were really interested could dig in and customize it, or even build their own variations. How cool would that be?
I took Holly M.’s yoga class on Sunday, and my thigh muscles are still distinctly sore. I continue to believe that this form of exercise is going to be good for me, but like many other things that are good for a person, it is neither easy nor comfortable. It’s hard to pin down, though; I feel solidly wrung out afterward, but without feeling like I’ve actually done much of anything: there are no weights, no treadmills, nothing to lift or push or strain against; there is just a lot of stretching and positioning, and yet somehow it’s a lot of work.
Ava’s response is totally different: she loves it, she loves the way it makes her feel, and she goes several times a week with no apparent consequences. I’m sure that most of that is just because she has accustomed herself to it, but she seems to genuinely get a lot of pleasure out of it; where for me it is more like preventative maintenance for my body. It feels good to know I am taking care of myself, but I don’t get the same direct enjoyment she does.
July 12, 2010
One of the great things about writing firmware is that sometimes, the bug really is in the hardware.
July 9, 2010
Barry & Maja’s Wedding
I spent the weekend out on John & Holly M.’s property in Eastern Washington, where Barry & Maja threw a big weekend-long party for their wedding. It was really nice. You can tell how much love and respect their friends have for them by the immense amount of work that went into the whole production. All the cooking, decoration, performance, music, and the rest of it was done by volunteers, and the result was the most gorgeous, friendly, and satisfying music festival type event I’ve ever attended.
Michael H. did the ceremony, and every word of it had clearly been thought out and meant from the heart; it was completely consistent with the kind of people Barry & Maja are.
The weather was good, and the sunset Sunday after the ceremony was unbelievably spectacular – wispy clouds breaking up, swirling, reforming at ten times the normal rate, glowing from inside as the sun sank beneath the horizon. Then we stayed up all night, with music and bonfires and costumes, and lots and lots of colorful LED lights.
I got a lot of compliments on the path lanterns and bloom lights, and many people asked me to let them know next time so they could help out! It was really satisfying to see all of the lights together. It has meant a lot to me to do this project, and being able to surprise everyone with something beautiful and unique made me feel like I have finally gotten my creative mojo back. I felt really good, like I was part of it all again. I’ve missed it.
Sparkfun just linked to Ponoko, a laser-cutting service with an impressive array of materials on offer: in addition to the usual acrylic, delrin, and plywood, they offer felt, leather, bamboo, a variety of veneers, and even cork! (Oddly, their FAQ page talks about metal cutting, but their materials page does not list any metals.) Quickturn manufacturing shops have been around for a good while now but this one is more like a meta-shop: Ponoko runs account management, billing, and the web front-end, and farms the actual fabrication out to one of several “hubs.”
The success of the rhythm robot project got me really excited about making DJ gear, and I have ideas for half a dozen additional devices, along with some vague plans for possible future commercialization. Two of the gadgets need to do a lot of audio processing: one is a specialized percussion synthesizer, and the other is a multiband/multichannel compressor. I’ve been reading up on filters, oscillators, op-amps, and the like, and I think both of these projects could reasonably be done with a simple microcontroller driving an array of analog audio hardware, but I keep coming back to the fact that I’m basically a software guy building hardware in my free time. I don’t really want to spend weeks soldering up RC networks: especially not when I could just get a faster processor and do it all in code, which is cheap and easy to fix. So, I’m looking into 32-bit microcontrollers, and the most interesting line so far seems to be the ARM Cortex-M3.
Here are a few Arduino-style dev boards based on the ARM Cortex-M3:
- Maple: 72 MHz, general USB, IDE based on Arduino, $50
- Cortino: several models, 36-72 MHz, serial USB, no IDE (use gcc), $40-$70
- ARMmite Pro: 60 MHz, no USB, Coridium IDE, $30
July 7, 2010
Here are some LED indicator rings like the ones on the Nord Lead 3. The really terrific thing about this design, using LEDs instead of a physical indicator, is that you can change parameters in software without leaving a knob pointing in the wrong direction.
July 6, 2010
Creating simple sound gadgets using basic logic circuits: oscillators, arpeggiators, envelope generators, and the like, using nothing but a hex inverter, a binary counter, and an 8-channel multiplexer.
July 3, 2010
June 27, 2010
Done with the bloom lights!
I got cracking on the bloom light firmware Friday evening, thinking with my usual optimism that I’d be done by one or two. Things happened, and there were problems, and I solved them, and it was 5:30 AM when I finally went to bed.
The part I’m happiest with is the HSV-to-hexachrome algorithm. HSV (and HSL) are basically alternate representations for what is fundamentally an RGB color space, and all the descriptions and code samples available discuss the conversion from HSV to RGB and back. The bloom lights do include red, green, and blue channels, but they also have orange, yellow, and purple. I was sure that there was some way to generalize the transformation so I could use six channels instead of three, but I found no references to anyone having done such a thing before, and certainly no code samples or theoretical explanations that might help me understand how it might be done.
I ended up starting from scratch and working out a general way to map a color in the HSV space onto an arbitrary point on the color spectrum, yielding a power level. (This differs from the standard algorithm’s approach, which computes three values, then assigns them to either R, G, or B depending on the hue position.) Transforming HSV to ROYGBV is simply a matter of computing this formula once per channel – this would work just as well for RYGB or any other combination of wavelengths.
Given this platform, the animation algorithm computes a series of evolving waveforms; the architecture is of course reminiscent of Starfish (or more precisely its animation-oriented descendant Cuttlefish). Each light’s activity level ebbs and flows; it’ll make subtle shifts, building up to a frenzy of activity, then settle back down again into some new state.
There was a fair bit of additional finish work to do, which I tackled in small bursts between other errands, and I finally dropped off the completed bloom lights at ten last night. It feels great to have them done – and it’s not even July! I usually spend July and August in a frenzy of activity, trying to finish up whatever my year’s big art project is going to be… but this year, since I’m skipping Burning Man, I’m done early. I wonder what a normal summer is like?
p.s. Sorry, I don’t have any pictures. I was in too much of a rush. I’ll have some pictures after next weekend, since they’ll be on display as part of Eva’s flowers project at Barry & Maja’s wedding.
I mentioned I’d been looking into AC light dimming. Here’s a Velleman kit that offers DC voltage-controlled dimming. The input is 0-10V, so I’d have to rig up an op-amp to drive it from a microcontroller, but that shouldn’t be too hard. One feature I very particularly like is the inclusion of an opto-isolator, so there is no direct electrical connection between the controller and the AC line power.
June 25, 2010
It’s twelve years old, but this Evaluation of Modern Sound Synthesis Methods from Helsinki University is admirably complete. The math is a little thick for my taste, but perhaps I’ll be able to dig through some of it.
June 24, 2010
I spent several hours last night working on the firmware for the bloom lights. I quickly ran into a strange, frustrating problem: every attempt at smooth animation rapidly became choppy, lights flickering and stuttering. I found some demo programs for the TLC5940 LED-controller chips, and they ran perfectly. I disabled one of the two chips, driving only 16 channels, and that ran perfectly. I dug through the driver, wrote a simple bit-bang replacement, quickly ran into the same problem: what??
Several hours of debugging later, the problem turned out to be purely analog. The bloom light has 120 LEDs divided into 30 channels, each drawing 20 milliamps: that is, 600 milliamps altogether. The control circuit runs at 5V, regulated down from 12V by an LM7805. And…. the power supply is a plain ol’ wall-wart, rated for 1 amp. So I’m just drawing more power than it wants to supply, and the voltage is dropping, and havoc ensues.
Ok. New 4-amp 12V supply on the way. Ridiculous LED illumination will be mine! Muahahaha.
[p.s.: 4-amp supply applied. Smooth, beautiful LED fading resulted. Yeah!]
June 21, 2010
I decided to decorate my new desk. It has a dark grey metal screen around the back, and I thought it would look cool to shine some LEDs up there. I got half a dozen red LEDs, standard 5mm type, a 150-ohm resistor for each, an Arduino pro mini, and a tiny plastic housing. A little soldering and wiring later, and I had my gadget. I’ve spaced the LEDs evenly along the back of my desk, held on to the metal screen with binder clips. There is enough ambient light here that they don’t illuminate the screen quite as much as I’d hoped, but they still look cool, and it’s probably better not to make them too distracting anyway.
The first comment I got was “Looks cool! Next step RGB!”, which snapped my ego just a tiny little bit. No, really, I wanted to say, I could do full 24-bit color if I wanted to! Really! I’ve done it before! This whole “warm steady red” thing was an artistic choice! Er. Oh well, I like it.
// six-way LED fader for arduino
struct light_t {
int pin;
unsigned long startTime;
unsigned long period;
};
static const int kLights = 6;
static light_t light[kLights] = {
{3, 0, 0},
{5, 0, 0},
{6, 0, 0},
{9, 0, 0},
{10, 0, 0},
{11, 0, 0}
};
const int kMinPeriod = 4000;
const int kMaxPeriod = 32000;
unsigned long randomPeriod()
{
return random(kMinPeriod, kMaxPeriod);
}
float curve(float val)
{
// The apparent LED brightness should follow something like
// a bell curve: starting at zero, swelling up to 1.0 at
// the halfway point, then diminishing back to 0. We'll do
// this by mapping the input range over 2Ï€, then inverting
// a cosine wave and compressing it into our output range.
float curvemap = (1.0 - cos(val * 6.2831853071796)) / 2.0;
// Gamma-correct the value: optimal curve would be 2.2, but
// we can much more cheaply calculate ^2
return curvemap * curvemap;
}
void setup()
{
// Analog pin 0 is not connected to anything, so it will
// return some unpredictable noise. We will sample its
// starting value as our PRNG seed, guaranteeing that
// we get a different animation sequence each power-up.
randomSeed(analogRead(0));
// Pick a random starting period for each light.
for (int i = 0; i < kLights; i++) {
light[i].period = randomPeriod();
}
}
void loop()
{
unsigned long time = millis();
for (int i = 0; i < kLights; i++) {
// Subtract the current time from the start time, then use
// the sine to get the brightness appropriate to this point in
// the cycle. We do only half-cycles, the positive part.
unsigned long elapsedMillis = time - light[i].startTime;
float elapsed = (elapsedMillis * 1.0) / light[i].period;
int level = curve(elapsed) * 255;
analogWrite(light[i].pin, level);
if (elapsedMillis >= light[i].period) {
// Once we've finished the cycle, reset: pick a new, random
// period length, and start it up now.
light[i].startTime = time;
light[i].period = randomPeriod();
}
}
}
June 20, 2010
Whew! I finished electronics work on the second bloom light. It took just about all day, but it’s great to see it running. Remaining work: drill mounting holes and insert bolts, drill hole for power socket and glue the socket in behind, silicone-seal the diffuser onto the main mounting plate, drill holes for housing bolts and fix the sandwiches together.
Oh, yeah – I still have to write some firmware.
June 17, 2010
“The Day of the Flying Fish: globalization and the making of modern sushi.” Nice short primer on the origins of my favorite meal, suggesting that sushi snobs are missing the point.
June 15, 2010
The bloom lights are coming along well, though the amount of actual construction work involved is kind of wearing me out. I’ve finished the electrical work on the first of the pair, and while I haven’t written any of the actual firmware yet, I set up a little random flicker demo which shows that the lighting effect at least basically works. It’s a little less bright than I’d hoped, but that might actually turn out to be a good thing – it’ll be displayed in low-light environments, and it’s meant to be looked at, not to illuminate its surroundings. The diffuser system works really well: it looks cool, the light has a strong sense of motion, and you can’t see any of the wires or the circuit board while the effect is running.
I recorded a little video last night, which I will try to embed here later. The actual animation will be far less spasmodic than what you see here – smooth shifts, throbbing pulses, and slow fades are more what I have in mind.
June 10, 2010
Most of my lighting projects involve low-voltage LEDs and lasers, but every now and then it’s nice to be able to control AC devices at line voltage. Here is a thorough explanation of light dimmer circuits, with schematics. Looks like the right solution for µC control might be a power MOSFET and a zero-crossing interrupt: the µC can turn power on at the zero crossing, set a timer, then turn power off any time in the next 8 milliseconds, depending on desired brightness level.
June 8, 2010
June 7, 2010
Today I start my new job at Synapse, a product-development engineering firm downtown. I’ll be writing firmware for embedded controllers, teaming up with electrical and mechanical engineers to design gadgets. This is a significant change of career direction for me, and I’m looking forward to it.
Embedded programming offers a lot of the same sense of freedom I felt back in the ’80s when I was first learning to code, and programmers were in control of the entire machine. Modern software development is far more abstract – it’s more about manipulating the gargantuan stacks of libraries that do all the actual work, fitting your design into the constraints of the operating system, the network, and the rest of the software coexisting on the machine. You can do far more, of course, by building on top of all that existing code: but it lacks some of the old elemental zest.
Microcontrollers also have a lot of the same constraints that were so much fun to push through on those old computers: slow clock rates, small memory spaces, limited I/O capabilities. The ATmega328 chips I use for most of my hobby projects have a 16 MHz clock, 32K of flash memory, and 2K of RAM – and yet this is luxurious compared to, say, an MSP430. Creativity thrives on constraints, they say, and it is true that the most thoroughly satisfying few weeks on the Groovik’s Cube project last year came when I figured out just how close the color timing was going to come to the controller’s performance limit.
It’s a smallish company – looks like fifty or sixty people – and so far everyone I’ve met has been smart and enthusiastic. The office is an entire floor of a big old building – high ceilings, ornate facade, tall concrete pillars, wire runs hung from the ceiling, and a quiet hum of conversation.
I don’t know what I’m going to be working on yet, but I can’t wait to start.