Archive

Posts Tagged ‘arduino’

Becoming a Maker

May 10th, 2012 No comments

I love creating things, and always have. But for most of my life, the things I made were very abstract and had little or no physical substance. Since I was a kid, it’s been in the world of software, and to a lesser extent, writing. I have also created visual art for years, on and off, much of it photography. And over the years I helped to host a number of Burning Man theme camps and regional events; in other words, making experiences. Plus there’s the talk I recently gave, which was an intense month-long creative project prior to giving the presentation itself at BIL.

There’s very little physicality to any of that. I’m not entirely sure why, but that’s how it always was for me. But this has begun to change. Increasingly I want to create tangible things. Actual things, sophisticated things that can interact with the world dynamically. Things that are amazing.

I first saw this incredible robotic rickshaw at Burning Man 2002. No idea who made it.

I’m drawn towards the crux of creativity where art and engineering are one: techne, as the ancient Greeks put it. For example, I’m inspired by Lindsay’s robotic giraffe. It is a brilliant, beautiful creation that is so much more than a sculpture–and so much more than a mere robot. Another (much more humble) example of techne is my Purkyně hallucination machine. It is engineering that creates an artistic experience; in this case a machine that paints images and patterns onto your visual perception from nothing more than blinking white lights.

I love this stuff. To me, engineering and art should never have been divorced from one another as they normally are today. It’s all of a piece in my mind. And I’m not alone; there are others out there who create techne. A whole subculture, actually. They’re called makers.

Makers are nothing new; there have always been people who like to create things in the broadest sense, for all kinds of reasons… woodworkers, blacksmiths or sculptors; engineers, tinkerers or hackers. But there are more recent developments that have drawn me in. The advent of extremely cheap physical computing was the first attractor. I could take my long experience in software and begin to apply it to sensing and affecting the physical world. And spend little more than $30 to get started… that’s revolutionary.

I taught myself to program the Arduino, and over time, learned some basic electronics and taught myself how to solder electronic components together. In this way I began to let software out of its magical virtual box, extending it to touch the world. And it was good. Really good.

I found all kinds of articles online written by makers describing different projects. I kept dreaming up new things to create. I read one book after another. But I began to run into some hard limits. You can only get so far with software and electronics by themselves. Things aren’t made out of computers, they are controlled by computers. You need to be able to bend metal. Cut wood or acrylic. Print plastic. Paint and engrave surfaces. I couldn’t really do any of this, not for real, and I wasn’t seeing myself spending six figures building a truly universal workshop where I could.

But Heather, as usual, found the perfect solution. She discovered Makerplace, a 14,000 sq. ft. facility for makers in San Diego. The idea is that they offer a collection of powerful (and very expensive) industrial machinery that you can use whenever you like, for anything you want, once you join and become a member. We went to their grand opening and took the tour of the facility.

The Makerplace woodworking shop.

It’s impressive. There’s a metal shop, a wood shop, ventilated paint booth and a welding bay. There have a CNC mill, a CNC router, a sand blaster, drill presses, bandsaws and a 3D printer. They have a room full of industrial sewing and embroidering machines, an electronics room and another room with industrial laser cutters. There’s a vinyl printer, a silk screener and a PCB mill. Just tons of stuff. Pretty much any major piece of equipment you’d need to make… anything. Any kind of engineering or art you can dream up.

Walking around Makerplace and looking at all the tools and machines really got me thinking about all the projects I could take on… it seemed limitless. So I decided to join. It’s a little expensive, but I reckon that if I use it at least 8 hours a month, it’s worth it.

This world calls for constant learning. There’s always something new to learn. Heather got me a subscription to Make and even bought me a couple books on woodworking. (Could she be more supportive?) Makerplace has a mandatory orientation class–mostly to make sure you can turn the machines on or off and not cut off any body parts–and offers specialized classes for each of their more advanced pieces of equipment. So far I’ve taken the laser cutter class and I’m signed up for the MIG and TIG welding classes next week. Heather and I are also taking the Arduino/electronics series they’re doing in conjunction with FabLab. We’re also going to Maker Faire in a couple weeks too. It’ll be our first time, and I’m really looking forward to it.

So what’s come of all this? Well, in the past month since then I took on my long-postponed project to create a portable, collapsible outdoor bar for parties and events. I designed and built the entire thing from scratch, and once I’ve painted it I’ll probably do a show-and-tell in a future post. Having access to a true wood shop made it so much easier, so much faster and gave me much better final results. And I’m currently pimping my custom industrial trike for Elysium (also to be shown later, once I’m done.) This involves welding, sanding, bending, painting, chrome accessorizing–and a new electronically controlled cold cathode lighting system. I have a dozen other project ideas I’ll take on once I have the necessary skills and time. This is gonna be fun.

The New ARM Sweet Spot

January 9th, 2012 No comments

The release of Raspberry Pi is just around the corner. This computer, produced by the charitable foundation of the same name, is the size of a credit card and comes in at just $25 ($35 for the beefier version that will be available first). Yet it is a full-on personal computer, a 32-bit Linux machine based on the ARM processor architecture. It can even run Java, my language of choice. Take a look at this incredible thing.

The Raspberry Pi: a 32-bit ARM processor; USB, HDMI, RCA video and audio jacks; and an SD card reader for storage. All in a credit-card sized package that weighs 40 grams.

Plug in a keyboard and a TV and the Raspberry Pi becomes a traditional personal computer. That’s very cool, considering the mind-blowing price point, but I’m more interested in it as a physical computing platform.

To date I’ve focused my explorations in physical computing on Arduino, as I’ve mentioned in previous posts. Interestingly, the Arduino platform is also moving to 32-bit ARM from the existing 8-bit ATmega328 chip. They have a new board, also coming soon, called the Arduino Due. It’s also expected to maintain the $30-or-so price point of previous Arduinos.

The upcoming Arduino Due, also sporting a 32-bit ARM processor, USB and along the edges, dozens of GPIO pins.

Both of these computers are open source; that is, anyone can download the hardware specs and software and make their own clone. (Here, by the way, is another instance of the open model coming to life.) Both are ARM-based and are about the same size and price. Yet the two are not quite equivalent, because they represent different computer design philosophies. The Raspberry Pi is like a very tiny PC, whereas the Arduino is more of a prototyping platform, essentially a microcontroller with no operating system. It’s the kind of computer that would be embedded in a car or a washing machine. That means it two things: it has had (up to now anyway) a very weak but cheap processor; and that it has built-in general purpose IO (GPIO). Think of GPIO as all the pins that allow the Arduino to flash LEDs, drive motors or read sensors. Without it, physical computing is impossible.

Unfortunately, Raspberry Pi does not have integrated GPIO the way the Arduino does. Fortunately, a guy named Gert van Loo is creating an add-on GPIO expansion board for it known as the Gertboard. Combine the two and you have a full physical computing hardware platform. I predict it won’t be long before there’s a 2nd generation Raspberry Pi, or a clone, that unites and miniaturizes both into a single package. It’s an obvious move, especially considering the motivation of the foundation, which is to stimulate engineering creativity in education.

And it isn’t just the Arduino Due and Raspberry Pi; there’s a whole swarm of tiny, cheap ARM-based computers headed our way or already here. Some are Arduino clones or spinoffs, like the LeafLabs MapleOlimex OLIMEXINO-STM32, Xduino and Netduino. Others aren’t Arduino-related but are still ARM-based controller boards, like the Technologic TS-7500 and the Chumby board. Some are Raspberry Pi-style personal computers, like the FXI Cotton Candy and the BeagleBoard. This broad technical convergence indicates the ARM processor architecture looks set to define a new sweet spot of physical computing, much as Intel did to personal computing in the 80s with the x86 architecture. Why? Two reasons. One, because in terms of bang for the buck, ARM is virtually unbeatable; two, because it requires so little electricity to run, which is crucial for battery-powered applications. Both of these qualities are of paramount importance in this corner of computing. Effectively, through ARM, Arduino and its friends are expanding the microcontroller into the same spot into which the Raspberry Pi and its friends are shrinking the personal computer. I think this is a very important development that blurs the line between these two forms of computing and will explode the creative possibilities of both. It’s the advent of what could be termed nanocomputing* after the quite similar homebrew microcomputer revolution of the 70s.

History does not repeat itself, but it does rhyme.

– Mark Twain

The beauty of using Raspberry Pi as a platform is that it really functions as an ordinary computer. You can write email, play video games or hit Google on it. Most importantly to me, you can write and debug code in virtually any mainstream language on it. This gets away from the traditional microcontroller-style “compile on one machine, run on another” dance that Arduino imposes, with feature-barren languages designed to produce code for weak chips. With Raspberry Pi, I can code and debug on the very machine. That’s much less of a pain in the ass; I don’t have to do crude debugging with serial communication back to my Mac. Since it can execute Java bytecode in a 32-bit JVM, I can code in Java if I choose. I should be able to use Java for direct GPIO communication, eliminating the need to write in the specialized Processing language, as you do for Arduino. That means I get object oriented programming semantics, garbage collection and access to the vast ecosystem of third party code, the three aspects of Java I appreciate the most. None of this has really been available in the physical computing space up to now. With it, I can write software of much greater complexity and sophistication, with less work, that’s easier to maintain.

For physical computing applications, I want to write and debug code directly on the hardware and I’d prefer to write Java code in a full-fledged operating system like Linux. By combining Raspberry Pi with the Gertboard, it looks like I can have it all. Courtesy of the new ARM-enabled nexus of computing.

* Though the term implies nanotechnology, which isn’t particularly relevant to the level of platform architecture. Still, I like the term.

It Senses When It Moves

November 17th, 2011 No comments

I’ve been tinkering with Arduino again. For the past few days I’ve been reading the O’Reilly Arduino Cookbook and it rekindled my creativity. My latest accomplishment: creating an object that senses its own motion and when it moves, a light blinks. In other words, I bought this quarter-sized triple-axis accelerometer breakout board; practiced soldering to the point where I could solder a 6-pin header to its six tightly packed through-holes; created a 3.3V circuit on a breadboard connecting the three X/Y/Z outs to three analog pins on the Arduino; added an LED indicator on a separate 5V circuit to a digital pin; and then drove the whole thing with this code:

const int ledPin = 12; // digital output pin to the LED
const int xPin = 0;    // analog input pins from the accelerometer
const int yPin = 1;
const int zPin = 2;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  int xValue; // fresh values from accelerometer
  int yValue;
  int zValue;

  static int prevXValue; // values from the last execution of the loop
  static int prevYValue;
  static int prevZValue;

  xValue = analogRead(xPin);
  yValue = analogRead(yPin);
  zValue = analogRead(zPin);

  // do the new values equal the old ones?
  // (with a little sensor margin of error.)
  if(!(withinRange(xValue, prevXValue, 2) ||
    withinRange(yValue, prevYValue, 2) ||
    withinRange(zValue, prevZValue, 2))) blink();

  delay(100);

  prevXValue = xValue;
  prevYValue = yValue;
  prevZValue = zValue;
}

void blink() {
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(10);                    // wait 10ms
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(10);                    // wait 10ms again
}

// To add tolerance to sensor reading comparisons.
boolean withinRange(int a, int b, int width) {
  if(a >= (b - width) && a <= (b + width))
    return true;
  else
    return false;
}

And voila:



See, it blinks when it moves.

If you move this assemblage of bits and bobs in any way, the LED will blink. It knows when it moves and lets you know. Since this senses the real world and responds to it, this is the first thing I’ve made that really constitutes physical computing.

Aside from the soldering practice, I started on this project last night, worked on it for ~15 minutes, and finished it this morning before breakfast. Yeah, it’s simple, kid’s stuff really. But this kind of kit just didn’t exist when I was ten, at least not this easy to work with and not for the price of a dinner. (I wish it did!) Regardless, this device is a milestone for me, and something I plan to build upon for a future project.