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.

Nov 2, 2010

Android is smoking

This is my first Android development test using the NDK and OpenGL-ES. I quickly adapted some simulation code I found on the web and rewrote the rendering layer to make it compatible with OpenGl-ES. I also fixed a couple of bottlenecks to make it run faster. Here's a video of the result.



So far I like working with the Android NDK and OpenGL-ES although I'm not a big fan of the Eclipse IDE (development environment). Now I'm going to start a shippable project to really get the feel for this new platform.

Snow balling

I admit I'm still buying Legos and a vast majority of those are Lego Technics and Mindstorm that I use for prototypes and robots. But, from time to time like any 37 year old kid, I get a kit simply because it looks cool. Hence I have the Lego X-Wing.

This magnificent piece of design dating from the back-when-lucas-was-good era was siting on my work desk and my son, playing with it, said “Dad, can you make the ladder to climb in?”. Any reason to get my Legos out is a good reason, so Voila!



My son was happy but, like any good geek would, he had the obvious thought; what about the cane gizmo to get R2 in and out of the ship? The clouds parted and a ray of light beamed down on me. I was so ready for his demand... maybe I was too ready.
Not only did I built it but I made a working version using Lego Mindstorm motors and the remote control.



The rotation is powered with gears and the up-down motion is done with a pneumatic piston and a switch to select up or down (directing the air flow to the top or bottom of the piston). This extra manual step will come back to haunt me latter.
After watching my son playing with the crane for a bit, it was apparent that it's reach had to be improved. After all, I could still plug a third motor to the system. Some minutes latter version 2 was alive.



The base is resting on gliding 'skis' and stays in place because two of them are sitting in a groove. One side of the groove serves also as the row of teeth used by a gear (attached to the crane base) to pull or push the whole system. This gear is using a pulley system and so it just slips if the kids reach the end of the tracks (no grinding gears). The pneumatic switch had to be repositioned so that it would not jerk the whole assembly every time it's used (that switch is a real pain). Finally. the arm of the crane was also lengthened.
The kids (and I) played with that version for days. I added a weight in the back to prevent the 'gliding gear' to skip. This is the final version of this design:




In conclusion
The main problem with this crane is the pneumatic switch. All the other movements are made with the remote and the switch make the experience of using the crane awkward.

A second important point is to make it error proof. The pneumatic piston system and the pulley system permit the errors in the crane manipulation without breaking anything. On the other hand, the direct gears that are used to rotate the crane can skip, grind or break if something goes wrong. Also the tubing for the piston prevents the crane from doing a continuous rotation and could rip of. (We had a terrible accident where Han Solo was thrown across the flight deck...)

So the next project will be a new crane with a completely different design that can lift heavier loads and where all the controls are done using the remote. This system will also be error proof by using systems like:
* Pulleys
* Slip gears
* Automatic reverse

“Gentleman, we can rebuild it. We have the technology. [...]”