Jan 23, 2011

Feeling my way

During the Christmas vacation I built a mobile robot using the Boe-Bot structural base and adding the Arduino 'brain' on top. This permitted me to rapidly get to the collision avoidance systems. I wanted to build my own range sensors since I started using with Lego MindStorm RCX 2.0 in 2000. I was always impressed by those guys on the web who were building custom sensors and accessories for their MindStorm projects.

The plan was to build an infrared range sensor that would be contained in a 2x4 standard Lego brick. I started by gutting out the Lego brick and drilled two holes into it for the LED and the detector. When positioning the light, I made sure it was set further back than the IR detector to prevent the LED light to shine directly into the detector.

I used the same parts than the ones I used on the Boe-Bot but I modified the circuit to make it more compact. Then it was the origami process of fitting all the components inside the brick and welding everything (including two resistors).

Wire wise, both the light and the detector needed a ground (black), the detector needed a 5v feed (red) and both were connected to separate control pins on the Arduino (yellow for the LED and grey for the detector). I then glued a 2x4 Lego plate to close the sensor.

Here is the final product attached to a servo. In this configuration I was able to sweep left and right, covering a wider range with one sensor.

Jan 22, 2011

Arduino & Lego

I'm using Legos a lot to build quick prototypes (e.g. my robots). Now that I have an Arduino UNO, I had to find an easy way to mount the UNO board on any Lego constructions. I wanted this 'attachment' to be as light as possible. Here's what I did:

I did that by attaching Lego Technics parts to the UNO board with bolts and nuts.

This simple system enables me to configure the spacing between the Lego pins. This is done by sliding the back pins along the black bar and by rotating and/or sliding the front pins(with the grey bars).

Handmade Christmas

In September 2010 I took on a project that, as Christmas came closer, would prove itself bigger than I thought. At the time I was beginning to learn some basic stuff in electronics and I wanted to use those new skills to build something. But what? Then I remembered my wife's new found love for the whole Steam Punk genre and I decided to make her a steam punk 'something' for Christmas.

Initially, I was thinking of a simple device, with a couple of working buttons, connect to her computer using a USB cable. But my first design turned out to be impractical. The prototype was completely handmade using a Basic Stamp BS2 on-board chip to which I could add buttons and code to communicate with the computer.

It was working using an extra program, running on the computer, to listen to the communication port and, eventually, do something cool on the computer. That was not practical.

Taking a step back, I thought that sending some basic keyboard inputs would be plenty. For that, all I really needed was the guts of a working keyboard and hook that into a steam-punky looking shell. I sadly had to sacrificed a perfectly good keyboard, but it was done in a very humane way.

Then I found this very cool fire extinguisher from when-thing-where-build-to-last, made of brass.

For easy access, I cut the bottom off and I split the remaining cylinder lengthwise. That way, I could spread the metal enough that I could slide the bottom inside the main cylinder. The two part would be secured together by drilling holes trough both layers of metal and inserting screws. This system permitted me to take it apart if needed.

I then drilled all the holes for the switches, and broke two drill bits in the process.

The welding festival started by attaching all the keyboard connections to an PCB board. This would permit me to weld many wires to each of the keyboard original connections.

Wire cutting, wire striping, wire twisting, welding, welding, welding, testing and repeat 12 times. So it was, I welded all 12 switches to the board. There's a switch for the numbers 0 to 9 and one for the Shift key. The 12th switch was not used in the end.

During the drilling stage and the welding stage, I regretted having to do everything 12 times. This being my first electronic project, I grossly underestimated the multiplication effect of having so many components. But, Christmas was coming pretty fast and my wife, hearing all that noise, was probably anticipating the gift of all gifts. So, not counting the hours, I knew I had to finish this monster.

Final assembly began and I put everything together as fast as possible. I glued brass cupboard knobs (found at a flee market) on the switches using epoxy and I installed the pipes and gauges to get that steam punk look. In the last minutes I also added an electronic dice (those 7 little red lights) to make it more interactive. It went under the tree with only four days to spare before Christmas.

I present to you, The Steam Punk Keyboard-Extension/Electronic-Dice Device:

And here it is on here writing desk.