Categories
Uncategorized

Because, 3D Printer…

Because when you’ve got a 3D printer… You might as well print things…

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

3D Printing

Also… OpenSCAD.

Categories
Uncategorized

In Advance of Troubleshooting

Teensy

I’m working on a new exhibit that will be using an Arduino (actually, a Teensy++ 2.0) to talk to an application running on a PC via serial data. The Teensy will be sending one byte to control the application’s behavior. This is an upgrade from an older version where the Teensy just sent keystrokes to the application. The nice thing about sending keystrokes is that it was very easy for anyone to troubleshoot because they could just open Notepad and press some buttons to see if they were sending any output. The bad part was that if a normally closed switch was open, it would just stream characters to the computer, which could make things hard to troubleshoot for some people.

ATMTester

To deal with the troubleshooting issue (which will eventually come up, as it always does) and make it easy for non-technical people to view a serial data stream, I wrote a simple application in Processing that reads the byte and displays the value, along with the status of each physical control of the exhibit.

ATMTester

The exhibit should always have the Teensy plugged into COM3 on the PC, but again, once something leaves the shop we never know what strange things might happen. When the application starts up it will present a dialog showing the COM ports, and asking you to select the correct one. If you select the wrong one it will just display nothing. This should be enough to help troubleshoot things via phone or email.

The trickiest part was the code to choose the COM port. (I know, we don’t call them “COM ports” on Mac OS X, and yes, the application works fine on Mac OS X, that’s another thing I love about Processing.) The code for choosing the COM port came from this forum thread How to let the user select COM (serial) port within a sketch?.

I did have to install Java to get the application to run, but it looks and functions like any other Windows application. Here’s hoping this all works and never has to be used, but is there just in case…

Categories
Uncategorized

DIY Power Strip?

Power Strip

This is my current power strip situation… Things are tight, tighter than I’d like, and there’s a lot of power strip being wasted. There are three wall warts, and one of them is horizontal while two are vertical. Originally all three were vertical, but I switched one out because there just wasn’t room due to wall warts often take up two outlets because of their width. (I’ve also got a height issue since this is going in a cabinet.)

Power Strips

There are many options for power strips. Sometimes the outlets are vertical, sometimes they are horizontal, or a combination of the two, or some weird twisting rotating thing. For a custom thing, like three wall warts, often the existing solutions aren’t very good. (Especially when space is limited.)

Power Connector

I mentioned that in an ideal world I could just design my own power strip, and then a friend of mine said “Hey, just get these and make your own case!” And then I thought, “Hmmm, maybe that’s not a bad idea!”

But I’m still trying to figure out if it is a bad idea. I don’t know that I could build a surge suppressing power strip for less than the cost of buying one, but maybe that doesn’t matter. Could I design and build something that would be a better fit for what I need. Now, if I were to build a power strip and stick it into a museum exhibit and then ship the exhibit to someone, would that be a bad idea? Maybe… I can see a customer looking at it and questioning the professionalism (and safety) of it. Would a 3D printed power strip pass muster? It seems some power strips are made from ABS, but they typically say “ABS Fire Retardant Plastic Casing”, which may not be the same as 3D printer filament. This could all go terribly wrong, right?

What are your thoughts on a DIY power strip?

Categories
Uncategorized

Click Whir Squee

Click Whir Squee

Occasionally I show up at Milwaukee Makerspace with no clear idea of what might happen when I’m there. This piece, titled “Click Whir Squee” is the result of one such visit. Another member brought in a box of old computer hardware, including a Hewlett Packard Colorado T100E Tape Backup Drive. Being a fan of old technology (1997 is old, right?) I opened up the drive to take a look inside. I also powered it on and stuck a tape in it. The drive came to life and unspooled the tape and made a lot of spinning motor and tape loading sounds. Not everyone knows what these things sound like. It brought back some memories. (At my first job in the tech industry I had to load daily backup tapes into two tape drives. I remember the sound fondly.)

I somehow decided I should mount the tape drive to a piece of wood for display, so I went to the Wood Shop and started cutting up some scrap wood I found. Steve showed up to do some training, so I sat in on that for a bit so I could use the compound miter saw and the band saw. I had all the pieces cut by the end of the evening and knew how I was going to mount it.

I ended up taking all the pieces home and assembling it in my basement workshop. I manage to only split one piece of wood. Just a minor split, but a reminder to slow down when working with wood. The rest of the assembly went very smooth.

Click Whir Squee

Since the majority of fun with this drive is the startup sequence, I decided it should continually turn on, do its thing, then turn off, and keep repeating that. I’ve been playing with ATtiny85 chips lately, so I put one into service to trigger a 5 volt relay (which I also grabbed from Milwaukee Makerspace) and put the following Arduino code on it.


/*
 * TapeDriver.ino
 */

int relayPin = 3;
int onTime = 70000;
int offTime = 15000;

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

void loop() {
   digitalWrite(relayPin, LOW);
   delay(onTime);
   digitalWrite(relayPin, HIGH);
   delay(offTime);
}

Yes, this is pretty much a glorified blink sketch. Sometimes the simplest things are exactly what you need. (Astute readers will see that the device will be on for 70 seconds, and then off for 15 seconds, and repeat indefinitely.)

Click Whir Squee

To power the ATtiny85 and the relay I found a Samsung phone charger on the Hack Rack at Milwaukee Makerspace. It even had a long cord, which was quite useful. You can also see one of the tapes that this machine uses. Now, if you really want to find some contrasts, consider that the modern day phone charger pictured here was used to charge a phone that probably had 8GB (or more) of solid state storage. The tape next to it could store 400MB of data (or 800MB of compressed data.) I should have included a MicroSD card which can store 8GB of data that I routinely buy for about $6 USD.

Click Whir Squee

Click Whir Squee

Since I removed the case there was no indication of what this thing was. I felt I should have something that told a bit of the story. I chose to mount the beige power pack, with “Hewlett Packard” emblazoned on it prominently.

Click Whir Squee

Oh, and while the whir of the motor is quite satisfying, we can do better. There is a wooden arm to which you can affix a small piece of material with a binder clip, which will then be activated when the primary motor spins. Fans of baseball cards and bicycle spokes, this one is for you! I call it the “Annoy-o-tron” mode. (Look, if you’re going to use an ATtiny in an Annoy-o-tron, at least be original, right?) I’ve experimented with paper, vinyl, and plastic, but finally settled on a piece from an anti-static bag which some electronics were shipped to me in. It seemed fitting.

Click Whir Squee

Click Whir Squee

Click Whir Squee

Gallery owners and curators take note! This piece is ready to be mounted to a wall, and needs just two outlets to power it. It’s pretty much guaranteed to amuse some visitors while annoying other visitors. Art isn’t always about being pretty.

Enjoy the video below which allows you to experience this wonderful piece over the Internet while in the comfort of your own home (probably while wearing pajamas.)

Categories
Uncategorized

Processing PhotoBooth v3

Simple Photobooth

It’s become a tradition around here to update my simple photo booth using Processing when a new version of Processing comes out. I’m not sure Processing 3.x is final yet, but I’m using it, and it’s got all sorts of good stuff. (You probably remember Processing PhotoBooth v2 and Processing PhotoBooth, which are both deprecated now, but see them to know what I’m talking about.)

One of the things new in Processing is the fullScreen() function, which gets rid of the whole “figure out the size of the display” issue, by just saying “run at full screen”!

There’s also a new thing called settings() which can appear before setup(), but I won’t get into that…

Here’s some code!

/**
 * PhotoBoothV3.pde
 */
 
import processing.video.*;
Capture cam;

void settings() {
  fullScreen();
}

void setup() {
  colorMode(RGB);
  String[] cameras = Capture.list();
  if (cameras.length == 0) {
    exit();
  } else {
    cam = new Capture(this, cameras[0]);
    cam.start();
  }   
  noSmooth();
  background(0);
}

void draw() {
  if (cam.available()) {
    cam.read();
    image(cam, 0, 0);
  }
} 

void keyPressed() {
    if (key == ' ') {  // space bar
       saveFrame("Picture-######.jpg");
    }
}

And hey, once again you’ve got a simplistic photo booth application. Congratulate yourself by purchasing this lovely button for it. (Or get this “bare” button and build your own damn case.)

Now, I don’t know if the fullScreen() thing has a bug, or if it’s my setup, but here’s what I’m seeing. I typically run my display at 1440×900 using QuickRes, which is a non-standard setup. When I ran the sketch it seemed to display at 1280×720 in the upper-left corner. My guess is that the camera is only capturing 1280×720, so the sketch only fills that amount of the display, no matter what the resolution is. I’ve tested it at higher resolutions and get the same thing. If I set the display to 1280×800 it’s all good.

This is most likely not a bug, but a “thing to be aware of” in the future…

Besides all that, the most exciting thing about Processing lately is that there is finally an official version that runs on the Raspberry Pi! This is super-awesome and has great potential for artists and others who do exhibits and installations. I’ve already got a few ideas in the works. ;)