Linear Timelapse Robot v1

Just in case anyone is following me via RSS, I just posted a new static page about my latest electronics project, a prototype motion control robot for making timelapse movies.

HD44780 LCD Interface lib for Teensy++ 2.0

Just a quick post to announce that I’ve posted a new project page to the static part of my site: Teensy++ Interface Library for HD44780-Based LCDs

It’s about a recently completed electronics hobby project.

 

My Latest Profile Picture: What’s Inside

I’ve recently updated my social media profiles with a new profile picture / avatar, receiving positive response and some curiosity. This is the image, at a high resolution:

My Profile Picture

This is a picture of me wearing a picture of me. Read on to find out how this was done.

In 2010 the Electronic Arts Capture Lab had an open house, where employees from the rest of the studio could go by for demos of their equipment.  See the video in the above link for examples of what we saw.

One thing they demonstrated was the facial capture rig they used to create high-resolution 3D models of actors’ faces. You can see the rig and part of the process between 0:09 and 0:17 in the video at the above link.  It’s a rig containing a lot of digital cameras arranged spherically around the subject, and set up to fire in synchrony along with strategically placed flashes.  Specialized software then takes all those photographs and correlates the features visible in them to deduce a textured, 3D digital model of the subject. This is one example of the science of photogrammetry. There is a longer discussion of this process in this thread post.

My colleague David Dixon and I had the idea to use these digitized models of our heads to construct actual physical models of our heads, at a larger-than-life scale, and wear them as Halloween costumes.

David, being the 3D editing wizard among the two of us, simplified the models from thousands of polygons down to dozens.  Here are before (top) and after (bottom) screenshots of my model showing his work. Note the bottom one uses a corrected version of the skin texture (which I unfortunately lost the high-resolution version of) which explains the differences in skin tone and detail.

headscan_composite

You can see the original model had quite a bit of surface noise to be cleaned up, including what looks like fractures in my cheeks but are probably registration errors.

We then imported the simplified model into Tamasoft PepaKura, which segmented it into flattenable pieces and added glue tabs, resulting in many pages of fragments that looked like this:

SoleilPaperCraft_005 - Copy

We had these printed on stiff paper at Staples, then spent hours gluing them together.

Here’s what mine looked like from a few angles the morning I finished it (I worked overnight to finish it in time):

d20101029_0001_02_05_07_composite01

And here are David and I showing them off at the office later that day:

d20101101_0003_edit01

For the profile picture image, I set up a mini studio in my apartment and had my visiting parents help me fit my suit jacket over the shoulders of the model (since I can’t see anything when I’m wearing it) and operate the camera for me.  I then digitally emphasized the edges between the polygons and removed the background and replaced it, appropriately, with one of the iconic Max Headroom backgrounds.

So there you have it: A long, technical and involved but creative and fun project that lets me wear an oversized 3D photo of my head over top of my real head.

Only took me 20 years…

The latest addition to my mad science lab: A device programmer.

d20130413_0001

 

There’s a lot of history behind this purchase.

Back when I was taking Electronics Engineering Technology in Toronto, twenty years ago, we had to do a sort of “mini-thesis” project in our final year.  I really wanted to make an EPROM programmer for my project, because having one would enable me to incorporate stored-program components like microprocessors into my electronics hobby projects, and I couldn’t afford to buy one.

The instructor (hi, Darrell!) said this project wasn’t complex enough and would only be worth a ‘C’ grade at best, so I was forced to choose something else.  But I’ve been wanting a device programmer ever since.

Lately I’ve been having a hankering to dust off the hobby and do some projects, and being able to use programmable devices is necessary for many of the projects I have in mind.  I thought about making my own again, but I decided to check and see if prices on commercial models had got a little more reasonable.  While I place value on doing stuff myself, making my own is now less interesting than the things I can do once I have one, so I’m willing to sacrifice some nerd cred in order to get to the good stuff faster.

Prices haven’t improved (most professional models are still in the thousands of dollars) but there are some cheap alternatives available now.  I looked at what could be had from local dealers and from eBay, and I was tempted by these things called Willem programmers.  They typically plug into a PC’s serial or parallel port, though some models now support USB, and they’re super cheap.

Unfortunately upon doing some research, I found that buying a Willem looked risky.  Willems started out as a hobbyist design, which got picked up and mutated by others.  There are now dozens of different models, many of which do not come with documentation or with functioning software – the Willem name has become so fragmented that there is even a visual identification guide to try to help people figure out which one they’ve got, so they can try to make it go. There are also some unscrupulous dealers doing things like naming their products “True Willem Programmer” to make it sound more credible than it is (“True” is part of the name, not a description).

So I could go cheap and buy a Willem and risk having to spend a lot of time hunting down software, or maybe even reverse-engineering the thing to write my own, or I could drop a little more on a prosumer model.  I settled on the Wellon VP-290 pictured above after reading some favorable reviews on hobbyist websites, and a brand new one set me back less than $200.  It has an impressive list of supported devices, which more than covers my needs.

I haven’t actually burned any devices with it yet – I haven’t decided on my next project, let alone written the firmware.  But I did test the programmer by reading out the contents of some old EPROMs I had sitting around, and while the software workflow isn’t slick, it’s good enough.  I think this will prove to be a fruitful purchase.

So: I’m letting out a long sigh after twenty years of holding out.  I had a lot of emotional investment in making my own device programmer – that initial rejection of the project idea got my hackles up and I never forgot it.  But time heals all markets, and I’ve finally put it to rest and enabled myself to move on to bigger and better projects.

More C# syntactic sugar

First up, the “??” uperator. You’ll probably suspect that this is related to the ?= ternary operator, and you’d be right. The ?? operator is called the null-coalescing operator. Not a very meaningful name, but here’s what it does.

1
foo = bar ?? baz;

is equivalent to:

1
foo = (bar != null) ? bar : baz;

and also to this, which I usually write because I find the ternary operator ugly:

1
2
3
4
5
foo = bar;
if (foo == null)
{
    foo = baz;
}

Also discovered recently: extension methods. Not having private access is a bit of a drawback, though I can certainly understand why that is. It amounts to a convenient way to write helper code for awkward APIs.

Next Page »