hudson

I like to take things apart. Sometimes they work when I'm done. I've been a member of NYC Resistor since 2010 and you can see more of my projects at trmm.net.

Future Crew

 Uncategorized  3 Responses »
Jun 212013
 

Last month we introduced Future Crew, and at the 2013 Interactive Show we finally unveiled the fully mostly operational game stations. There were five stations in the final design, and in keeping with the show’s “Digital Archaeology” theme, each was built from repurposed ancient hardware. The brains of each console was a Raspberry Pi (to connect to the network and draw OpenGL graphics) and some number of Teensy microcontrollers to interface with the real world. Of course, the source is available for you to build your own Future Crew stations!

Future Crew Game

A discarded video edit console and RF TV became the Timeline controller. Since the Pi can turn the composite video on-and-off, one of the modes glitches out the TV occasionally with real static! This one had some of the more imaginative tasks like “disable all blinking buttons” in addition to the normal tasks like “advance the timeline!”.

Future Crew Game

A rackmount data acquisition analog-digital converter and three NTSC TVs became the Blender control unit and Technobabble patch panel. The labels were printed on our large format plotter and then the BNC holes were cut on the laser cutter. The teensy++ firmware can handle arbitrary cross connects and even multi-way connections. This was one of the harder stations to play — there are eight switches, twenty verbs and twenty nouns. We ended up disabling all the verbs except “MODULATE” since it was much too difficult to find the right ones. As a todo item we plan to ramp up the difficulty as the game goes on.

Future Crew Game

A 1930′s Model 15 Teletype and some random video switcher served as the slowest output console. It’s amazing that the teletype functioned nearly perfectly for the entire eight hour show — perhaps the fresh quart of oil during the previous servicing helped keep it working. The source for this console is one of the simpler ones — it just prints to a file descriptor to write to the teletype.

Future Crew Game

One of the hardest consoles was made from a toy piano. Even with the song book, playing “Row Row Row Your Boat” under duress is not easy.

Dial James Bond!

And a last minute entry was a rotary phone. Quick! Get the President on the line! This time the handset just had a recorded loop, but future games will incorporate text to speech.

We have a whole list of things to fix and improvements to make before Makerfaire 2013. Stop by NYCR to play it during Craft Night on Thursdays and give us your suggestions!

 Posted by at 11:54 am

Space Rocks

 Uncategorized  3 Responses »
Jun 082013
 

Space Rocks on the oscillograph

Cathode ray oscillographs weren’t just used for reading tweets in the 1940′s, they were also used as vector displays for serious astronomical simulations and training systems like “Space Rocks”. You can play it at the 2013 NYC Resistor Interactive Show!

While the Delta-V of the simulator space craft was optimistic for its era, the basic acceleration, velocity and position model is reasonably accurate. If the ship passes too closely to one of the space rocks, it is destroyed and the simulation restarts. Once the ship runs out of fuel (measured in hexadecimal in the upper left corner since the CPU can’t perform a DIV/MOD operation fast enough to display decimal numbers), it is stranded and unable to continue its mission.

Space Rocks joystick interface

We were not able to locate an original controller, but the interface is similar enough to more modern analog joysticks that we could wire it in. Have your own vector display? spacerocks.c is the source for the Teensy to drive it.

 Posted by at 10:07 pm
Jun 062013
 

Model 15 rear view

The Teletype Corporation Model 15 “typebar page printer” is a beautiful piece of equipment from the 1930′s. While the interface has much in common with modern serial communication standards – start bits and stop bits, asynchronous clocking, idle-high conditions — in the teletype all of these are implemented purely mechanically. The mainshaft looks like something out of an automobile instead of a piece of computing. Just like a car, you have to keep it well oiled, check the gaps for proper clearances and be very wary of the spinning pieces while working on it.

The 5-bit Baudot words are clocked in synchronously with the mainshaft’s rotation rate at 45.5 baud (22 ms per bit). This slow speed is difficult to generate with modern computers and serial ports, so many users bit-bang the port with Heavy Metal, which itself requires somewhat older machines to run. The 5-bit word has only thirty two entries, which is insufficient to simultaneously represent the entirety of the twenty six letters A-Z, ten digits 0-9 and punctuation. Instead there is a reserved code to switch to Figures and another code to switch to Letters. Space, carriage return and line feed are present in both the Letter and Figure sets. The interface must track which rail is currently selected and insert the correct shift sequences on the fly.

In slow motion the holding magnet can be seen pulling the selector during one-bits and not attracting it during the zero-bits. Each bit is latched via the “sword” mechanisms onto one of the rails, which select one of the twenty-eight hammers. During the fifth bit an extra gear cocks the mechanism and a latch lets the hammer fly during the stop bit. The coils are designed for 60 mA, but have a very high inductance (on the order of 4 Henries according to John Nagel). Most approaches to interfacing with the system use a large 100 VDC power supply and a current limiting resistor (that must dissipate 6 W of power!).



Teletype Model 15 USB interface board

Both the high voltage and the custom baud rate issues are a bit cumbersome, so I thought there must be a better way. USB ports will output about 5 W, so I figured that would be close enough to drive the magnet if I could produce sufficiently high voltage. Using Adafruit’s boost converter calculator, I came up with some rough numbers and built a circuit that handles both the slow baud rate and voltage required to interface with the teletype. It shows up as a normal USB serial port and handles the 7-bit ASCII to 5-bit Baudot translation, including tracking which of the two rails is selected, outputs the bits at the correct baud rate, and runs the PWM charge pump to generate the high voltage with the inductor. A second MOSFET is used to switch the high voltage through the current loop, allowing the holding magnet to turn on and off.

It’s fully self-contained, fits in an Altoids tin and works with any software you want to run on the interface computer. If you want to run it with a Raspberry Pi, be sure to use a powered hub to avoid overloading the Pi’s weak USB power circuitry. The schematics and source code are posted to 45baud.net and you can see it in action as part of Future Crew at the digital archeology themed 2013 NYC Resistor Interactive Party.

 Posted by at 7:53 pm
May 272013
 

Oscillograph tweet reader

It’s a little known fact that during the 1940′s the premier Twitter client was a cathode ray oscillograph vector display, such as this DuMont Labs 208B. The 15×12 character resolution was perfect for a 140 character tweet. This one has been restored, connected to the aethernet and configured to search for “I”, turning it into a time travelling view into the twitter-sphere’s narcissism. You can see it in action in this short video, or play with it in person at the 2013 NYC Resistor Interactive Party in June.

Asteroids vector font

If the font looks familiar, that’s because it was inspired by the Asteroids video game, with additional characters for the rest of the ASCII subset. The source code is available asteroids-font.c for your own oscilloscope or vector display hacking. Depending on the bandwidth of your scope and the speed of the cathode ray tube, you might need to set CONFIG_SLOW_SCOPE to give the beam time to catch up with the image.

 Posted by at 10:25 pm
May 232013
 

Building "Future Crew" console #1

Do you enjoy playing Space Team, but find that you want tactile controls? Or like the Artemis Bridge Simulator, but think it is too serious? Do you love pushing buttons, turning knobs and shouting at each other? Then you’ll really have fun playing Future Crew at the NYCR Interactive Party!

Future Crew push button panel construction

Since the theme of the party is “Digital Archeology”, all of the control stations are being built from repurposed dead hardware. There’s a patch panel, push buttons, strobe lights, more push buttons, quadrature knobs, oscilloscopes, and maybe even a teletype to keep score.

Future Crew display console

Each console will have a Raspberry Pi with Wifi to talk to the other consoles, some number of Teensys to talk to the real world, and some sort of glitchy way to communicate to the operator (like an NTSC TV or a Minitel). If things don’t work right, that’s part of the fun. And, of course the source code will be available for you to build your own Future Crew Consoles.

Tickets for the party are on sale now!

 Posted by at 8:12 pm
May 122013
 

Robot sunbeam

As a followup to our reverse engineering and configuration of 6DOF PUMA robot arms, we’ve updated our controller source code to have full closed form inverse kinematics support. The math is based on A Geometric Approach in Solving the Inverse Kinematics of PUMA Robots, by Lee and Ziegler (1983). Due to the configuration of prismatic and rotational joints in the PUMA arms, it is possible to derive a two part direct trigonometric solutions to the IK problem for this type of arm.

PUMA 560 joint diagram

The IK solution uses the DH Parameters to compute the three joint angles for the major axes (the rotation around the stalk, the upper-arm angle, and the fore-arm angle) such that the center of the spherical joint will be placed at a given XYZ position. There are two binary additional binary parameters for this configuration: RIGHT/LEFT controls the orientation of the arm on the right or left side of the stalk, and OVER/UNDER for the configuration of the elbow pointing up or down. See figure 5 in the paper for a diagram of the four possible combinations of these two parameters.

PUMA wrist diagram

Once the first three theta angles are known, the second phase of the IK solution computes the last three wrist joint angles given the third binary parameter UP/DOWN, and three vectors: the “approach vector” a[] that points in the direction of the tool, the “sliding vector” s[] that points in the direction of the grasping joint, and the “normal vector” n[] that points towards the top of the tool. Figure 4 from the paper shows the relationship of these three vectors in the hand coordinate system.

This video shows the IK iterating between two points (in RIGHT and OVER mode) and generating a piecewise linear path that holds the tool (a cheap pen) mostly level on a constant heading aligned with the X axis. It is a little jerky since the motor controllers don’t have a way to chain commands between points and my calibration on the joint lengths and angles isn’t perfect. Also note that the wrist joints are cross-coupled and require proportional adjustments based on the other joints positions, so the code has some fudge factors to try to account for this behaviour. There are also some corner cases to be sorted out when the “best” joint angles switch quadrants, which will swing the tool around in a circle.

The code isn’t super clean and can use some refactoring to move the DH parameters into a config file, but hopefully you’ll enjoy the human readable code compared to the machine generated ikfast output.

 Posted by at 2:21 pm
Apr 232013
 


A year ago Super Awesome Sylvia demoed MarioChron for the Adafruit MonoChron dekstop clock kit. It’s really neat — once per minute Mario hits the box and receives a coin, so his score is equal to the time. Now thanks to the GPL license on the code, you can carry it on your wrist with the port of MarioChron to the Pebble Smart Watch:
MarioChron, Pebble edition

You can install the prebuilt mario.pbw binary and the source is available for further hacking. Here’s a short video of Mario’s coin collecting action (the jump height has since been fixed in the source code).

The code is a straightforward port that reuses almost all of the original logic. The only change is to rearrange the screen slightly from the MonoChron’s 128×64 LCD to the Pebble’s 168×144. This involved translating the glcdClearDot() and glcdSetDot() calls to 2×2 rectangles using the Pebble’s graphics_fill_rect() functions. Unfortunately the e-paper display on the Pebble is designed for mostly static images, and updating it at 10 Hz for the animation draws far more power than a once-per-minute clock face. This means that this watch face consumes lots of power and the Pebble only lasts part of one day instead of an entire week. Perhaps optimizing the redraws instead of redrawing the entire screen would let it last longer.

Want to learn how to write your own watches for the Pebble? Sign up for the May 18 Pebble programming class at NYCR or come to the hackathon after!

 Posted by at 8:46 pm
Apr 162013
 

Pebble Polar Map

What time is it? It’s time to #MakeAwesomeHappen and learn to program the new Pebble Smart Watch! We’ll be teaching a three hour class on 18 May on how to write custom watch faces that work with the official Pebble SDK. The programming environment is low-level C, with no memory protection, and no emulator nor a debugger, so you’ll need to be fairly comfortable with writing embedded code or at least not afraid to debug with printf()*. If you’ve programmed a device like an Arduino you should be ok with the class. Tickets for the class are on sale for $125. The hackathon afterwards is free!

Pebble wordsquare watch

If you haven’t heard of it, Pebble was the wildly successfull kickstarter project that pre-sold over 80,000 watches. The watch has a 144×168 transreflective e-paper display, an ARM M3, Bluetooth, an accelerometer and lots of potential. MyPebbleFaces has a few hundred ideas for fun projects and many people have already programmed their dream watch faces.

Pebble class at NYC Resistor

After the class, we’ll be holding an all-night hackathon to write some new watches. Developers from Team Pebble will be here to hack with us and help answer any deep questions about the API. The hackathon is open to everyone with a Pebble and is a great chance to meet other wearable wrist-watch computing enthusiasts in New York. If you don’t have your Pebble yet or don’t want to risk your prized wristwatch, we’ll have a limited quantity of factory seconds that might not be waterproof, might have glue bubbles, or discoloured bezels or other QC issues available for $75. Tickets for the class and hackable watches are available here!

 Posted by at 9:28 pm
Feb 232013
 

Raspberry Pi's for sale

Raspberry Pi Model B (512 MB with wired Ethernet) boards are now available in the NYC Resistor vending machine! You can take one home during Craft Night on Thursdays or Laser Night on Mondays. Ask a NYCR member for help with purchasing these awesome embedded Linux boards if you don’t have nine $5 bills on hand since the vending machine doesn’t accept $10 or $20 bills.

 Posted by at 7:22 pm
Jan 212013
 

Timesquare assembly animated GIF

Have you ever wanted to wear an Arduino on your wrist and tell the time with a giant LED matrix? Then you’ll love this three hour class at NYC Resistor that I’ll be teaching on February 9th. During the class you can learn how to solder through-hole components as we put together the Adafruit Timesquare DIY watch kit, and afterwards we will extend the watch firmware to add a new feature to the watch.

This class is a great introduction to soldering and some advanced embedded programming techniques. The coin-cell powered Timesquare watch isn’t exactly a normal Arduino and is very CPU limited, so techniques for limiting power consumption, waking up from deep sleep with interrupt handlers, low voltage brownout detection and some inline AVR assembly will be discussed. If you just want to learn to solder and have a very stylish wristwatch, you don’t have to stay for the walkthrough of the firmware.

TIMESQUARE Watch Kit

Included in the class price for every student is a pre-programmed Adafruit Timesquare watch kit and an FTDI cable for re-programming it (a $49 value). You’ll need to bring your own laptop with the Arduino IDE installed to flash new firmware onto the device if you are staying for the advanced portion of the class.

Click here to buy tickets at eventbrite!

 Posted by at 9:03 pm