[!] The blog has moved [!]

The blog has moved to http://carlitoscontraptions.com/.

You will be redirected to the new URL in 5 s. Sorry for the inconvenience.

December 31, 2008

Breadboard Bench

I found a nice breadboard in McGill's garbage a while ago and decided to convert it into an electronics bench. My main goal was to have a powerful power supply with regulated outputs combined with a breadboard and some useful connectors so I can build circuit prototypes easily. Also, I needed a new bench power supply since mine was lost in the Lunar Excavator shipment.

  • A nice breadboard found in the garbage
  • A computer power supply
  • An ATX motherboard power connector
  • Two LEDs with resistors for current limiting
  • A switch
  • Some cables

Putting it Together

I wanted to build a modular system so I can replace the pieces easily, especially the power supply (since it comes from an old computer and may not work for very long).

I connected a switch and two LEDs (actually, my switch comes with an integrated light so I used only one LED) to the PS ON, 5V SB, and PWR OK pins so I can have an indicator of the power supply (PS) being plugged-in (D1) and another for the PS being turned ON (D2). The diagram below illustrates the connections.

I also connected the 12, 5, 3.3, 0, -5, and -12 V lines to the bottom-left banana connectors in order to have easy access to the power lines. Now, I can connect any ATX power supply to the box and it will work, which makes replacing a defective power supply very easy.

After making the electrical connections, the switch and LED(s) have to be mounted to the box by drilling appropriate holes.

This was a fairly easy build, with the only difficult part being to find the appropriate materials in the garbage.

I may add a USB hub or some USB connectors as well in order to have more ways of connecting things to the box.

December 16, 2008

Big Pot

I found a big potentiometer in McGill's garbage (universities' garbage is pretty good). When I found it, it was very dirty and its body was badly bent. Fortunately, I managed to put it back together and now it is shiny and fully functional (as shiny and functional as a pot can be).

Some Specs:
It is a 400 Ohms potentiometer made out of an array of thin metal hexagons and a contact point that moves along them. The number of hexagons in between one end of the array and the moving contact is proportional to the potentiometer's resistance. It is roughly 50 cm long and I bet it can handle lots of current.

Basement Cleanup

I finally cleaned up my basement/workshop and put some order into my tools and materials. My main source for materials in general is the garbage as the faithful readers may already know. Too bad I was too late for the Hacked Gadgets Workbench Contest.

My new soldering space
I also got some new tools a while ago. Note the precision screw driver holder made out of a plastic jar cap and the screw driver stand made out of a piece of wood I found in the garbage.
I also got some new measuring tools that are extremely useful (and make me extremely happy).
Some of my electronics parts:

Brass Sponge

I came around many electronics stores selling brass sponges as soldering iron tip cleaners. I thought that using a brass sponge was a good idea but was not ready to pay between 5$ and 12$ for a sponge. Instead, I got two brass sponges at the groceries store for around 1.9$ and used an old metal cover from a jam jar to make my own. The result is a very useful soldering sponge.

If you are wondering what are the advantages with respect to the more conventional wet sponge, I can enumerate three:
  1. It does not inflict such a great thermal shock on the iron tip. Thus, putting it trough less stress.
  2. It does not produce fumes since the tip temperature doesn't change as much and there is no water vapour.
  3. It does not require water. Having water around electronics can sometimes be a bit of a hazard.

October 31, 2008

Tony's LEDs

I received many questions about the circuits driving the LEDs in many of my projects, especially for the Iron Man's repulsor.

LEDs are pretty neat devices. You make some current flow forward through it and you get some light as a result. Nevertheless, since they are diodes, they can allow an infinite amount of current to flow (which in practice means a lot of current) and this can be problematic since, as any electrical device, it cannot handle that much current. In order to prevent them to pass too much current, a current limiting circuit is required (usually implemented as a resistor in series).

When you buy an LED, you (should) get two very important parameters, the voltage drop across them (say, V_LED), and the maximum continuous current (I_LED).

So, for the trivial case where we have a battery (V_bat) in series with a resistor (R) and an LED, the value of R must obey the following inequation:
If you decide to place many (say, n) LEDs in series, the inequation becomes:
Finally, if the LEDs are in parallel (as is the case for the repulsor), the inequation becomes:
This result can be obtained by applying Ohm's law (V= RI) to the circuits described above. The proof is of course let as an exercise for the reader ;) .
This page has a very nice LED calculator which makes life really easy when calculating resistor values: alan-parekh.com/led_resistor_calculator.html

WARNING: the repulsor circuit may cause the LEDs to fail sooner or later. I'll post an update as soon as I have one. Thanks to Tim for the hint.

For those interested in the repulsor circuit, below you can find a diagram describing it. It is the same as the circuit with many LEDs in parallel but with a potentiometer added to regulate the light intensity. The only requisite for the potentiometer is to be large enough to attain the dimmest light according to your needs.

September 01, 2008

Eee PC 1000 + Ubuntu + KDE 4.1

My computer finally died. After close to ten years of faithful service, my computer catastrophically failed one last time (this doesn't necessarily mean I won't try to fix it). Anyways, this pushed me to finally buy another computer after many years of searching around.

I chose to buy an Asus Eee PC 1000; I could not be happier with my buy.

The obligatory Eee PC specs:
  • 1.6 GH Intel Atom CPU
  • 1 GB RAM
  • 40 GB SDD (8 + 32)
  • 10 in LCD
  • SDD card reader
  • Multi-touch touchpad
  • Shiny black body
  • WiFi draft n
The solid storage is great. It gives the peace of mind that I require to be able to take the laptop everywhere on my bike or in my backpack (I jump around a lot). I have currently formatted both disks with ext3 partitions mounted with the realtime option. I know about the life expectancy concerns but I have not found any reference that says that my SDD drives will die prematurely if I use the ext3 filesystem instead of ext2. Also, the ext3 filesystem is more robust and it doesn't corrupt files if it is not checked often or if the computer is turned off abruptly.

I installed Kubuntu by creating a live USB stick using UNetbootin and then setting the USB stick as the primary device in the BIOS. The Eee PC then boots with the USB key and Kubuntu can be installed normally. For more info about installing Ubuntu please refer to this page.

In order to have the WiFi adapter and the wired Network card working, I used the kernel packages from Array.org.

The battery life is awesome. It is much longer than in conventional laptops, even with the processor working at full speed, the LCD at full brightness and the WiFi adapter enabled. Also, the keyboard is very nice and not too small. It is really easy to get used to it. For more info about the Eee PC performance, please watch the following video:

The touchpad is very good and the multitouch feature works very well. It is hard to go back to normal touchpads. Nevertheless, a mouse is much faster and precise, so I decided to buy a mouse: the Logitech VX Nano.

Needless to say, the VX Nano is wonderful and a perfect match for the Eee PC. They have both been carefully designed with particular attention to detail and quality. They come with carrying cases and are very sturdy and good looking.

It is obvious that I'm happy with my two new toys.

Finally, KDE 4.1 is simply perfect. It is beautiful, fast, and very well thought. In short: the perfect software for the perfect hardware.

August 20, 2008

Hospital Garbage

I found a little stool lying around in the garbage lately and decided to give it a new life. It turns out the stool comes from some kind of hospital and is actually pretty old.

In order to refurbish the stool, I simply applied a coat of anti rust spray paint, oiled the screw holding the seat, and put in some new rubber feet. My grandmother, who was visiting (from Argentina) was kind enough to make a new cushion for it.

This build was really simple but resulted in a nice, modern looking stool for almost no cost.

Lunar Excavator

I was lucky enough to help my friend Stephen and his team to build a lunar excavator to participate in the Regolith Excavation Challenge, sponsored by NASA.

We put lots of efforts and many hours to get the robot done in time and we managed to get it running before it had to be shipped to California (from McGill University in Montreal).

Unfortunately, despite the awesomeness of the lunar excavator and the fact that it was going to completely own the challenge, the UPS shipment went wrong and the robot could net get to the competition on time. Now the fight with UPS has begun to get a full reimbursement (~2000$) and the robot back.

UPS incompetence aside, I worked in putting all the electronics system together in the electrical box. This meant, I had to build two boards: one for the power management (transforming the provided 24V into a 12 and 5V in order to power the many devices and turning the latter ON and OFF), and one for the logic (interfacing the main computer with the various motor controllers and sensors).

This task was done using perfboards and lots of solder since we did not have enough time to consider designing and fabricating proper PCBs with nice places for all the components.

Note the nice (and very classy) wood finish of the electrical box interior as shown in the picture.

I will not give away any details about the excavator since it will compete next year, provided there is another Regolith Challenge.

I'm Popular (Science)

My compact keychain is featured in the August edition of the Popular Science magazine. Needless to say, I'm very happy about this.

Granted, it is a small article but it is still impressive to see how far blog posts can go.

July 23, 2008

I'm looking for a job

Now that I am a bachelor of engineering (actually I graduated two months ago), I would really like to find an engineering job.

I'm looking for a job where I could gain experience and become a professional engineer. Ideally, I would like to work with robots or toys, but working with any kind of control system (my specialization) would be definitely awesome. It would also be nice if I was asked to actually build prototypes, for instance, and perform some manual job besides programing and designing.

I won't bother you anymore with my wishes. Thank you very much for reading. Soon, I'll post a new project.

June 28, 2008

I am Iron Man

When I saw the new Iron Man movie, I instantly knew I had to build some part of the suit (I like to wear gadgets). Luckily for me, I found an old hard drive that had just the pieces I needed for building a repulsor-like LED flashlight.

(This picture comes from IDontLikeYouInThatWay.com)


To build a very powerful LED flashlight mounted on my hand palm that would turn on and produce brighter light as I move my hand back (and the angle between my hand and my arm decreases and gets roughly to 90°). Also, the flashlight should be comfortable, allow my hand to move freely, be very sturdy, and of course look as much as possible like the repulsor Tony Starks wears on the picture above.

For those who have not guessed yet, this is what I was building.

  • An old (aluminum) heat sink (from a broken computer monitor I believe)
  • A long and thin aluminum piece from a copy machine
  • A street cleaner brush bristle (like the one used to build a Bogota Rake)
  • An aluminum disk and a thick aluminum ring (they were the holder and separator for the plates on a very old hard drive)
  • 6 5 mm and one 10 mm ultra bright LEDs
  • A linear potentiometer (from an old sound system equalizer)
  • A switch
  • An old laptop battery
  • Some cable, some female and male headers, heat shrink tubbing, a paperclip, a plastic cable tie, and lots of love.
How to do it

Since my materials are pretty specific and it is quite unlikely that some reader may get the exact same set of materials, I won't give a detailed description of how it is built, but rather how I did some of the key parts of this contraption.

Shaping and shining the metal:
Since the heat sinks and the other peace of metal I found were not flat (they had many 90° bends) I hammered them on a piece of thick steel until they became perfectly flat. Then, they were sanded with a fine sand paper and polisher until they where nice and shiny with some tell wool (the kind used for cleaning). I always sand and rub the metal along the same direction so it gets a consistent brushed look .

I bent the metal with my hand and worked the bends with a heavy steel rod so they are round and smooth instead of straight edges.

Linking the hand and wrist pieces:
The wrist and hand pieces are linked together bu a street cleaner brush bristle. The bristle is bent in a "Z" shape and goes into a hole at center top of the hand piece. The other end of the bristle is slightly bent upwards (so it doesn't go into my arm when I move my hand) and goes trough a wire tie loop on the top of the wrist. A paperclip is soldered into this end and is connected to the linear potentiometer. The I heated and Inserted the clip into the plastic potentiometer tab, this creates a nice and strong link. The paperclip provides flexibility and allows the and to move beyond the range of motion of the potentiometer.

I'm very proud of this link since it is flexible, robust, and is rather easy to build.


I used seven LEDs connected in parallel (since they have roughly the same voltage and current needs). They fit nicely into the seven holes in my metal disk. In order to avoid the LED leads to short when in contact with the metal, I applied a thick layer of transparent nail polish to the metal plate previous to inserting the LEDs. The nail polish works very well as an insulator and is, for all practical purposes, invisible.

The LEDs are connected in series to the potentiometer which in turn is connected to a regular resistor. The regular resistor is used to limit the current and set the appropriate voltage for the LEDs and the potentiometer determines the light intensity. You can determine the appropriate value for the resistor by using this LED calculator.

I hope you enjoyed the information and you like the end result.

Below is a video of the repulsor beam. I know it lacks the repulsive action but still, I think it looks nice. Enjoy.

June 20, 2008

Inverted Pendulum

My friend David and I implemented an inverted pendulum controller for the Quanser cart in th Control and Robotics Lab. The controller was implemented using Simulink and Matlab, which makes the tasks much simpler than dealing with microcontrollers and C.

We implemented many kinds of controllers, but the best turned out to be the full state feedback controller where we get to control the position and velocity of both the cart and the rod. The controller block diagram is shown below.

Below you can find the slides for a presentation giving a quick overview of this subject and a video demonstration featuring David as the presenter.

May 29, 2008

Floppy Note Pad

Inspired by this commercial product, my girlfriend and I did a small craft with her elementary school class (she is a teacher).

The main goal of this activity was to have the children make something useful by themselves by using everyday household materials and (what normally would be considered as) garbage.

Materials (per child)
  1. Print the note pad paper model that is available in PDF or SVG. Make sure this is printed at the original scale. You may need to modify it to fit the margins of your printer.
  2. Take all the paper sheets and stack them while making sure they are well aligned together. Put the printed model on top of the stack and fasten everything with paper clips.
  3. Cut along the model lines. This should result in 48 small paper squares.
  4. Pierce the holes as shown in the model on every sheet.
  5. Bind the two floppy disks and the paper by using one (or more) pipe cleaner(s).
  6. Admire your creation!
Note: It turns out that the children are quite happy with their note pad and they even use it for taking notes (even if nobody prescribed them to do so).

May 27, 2008

Big Buck Bunny

I finally got the pre-ordered Big Buck Bunny DVD from the Peach Open Movie Project. All the files from the movie are under the CC license and it was done using the very excellent Blender.
As a follow-up to the successful project Orange’s “Elephants Dream”, the Blender Foundation initiated another open movie project. Again a small team (7) of the best 3D artists and developers in the Blender community have been invited to come together to work in Amsterdam from October 2007 until April 2008 on completing a short 3D animation movie. [...]
The Blender Foundation and Blender community have been the main financiers for Peach. As for the previous open movie, a pre-sale campaign to purchase the DVD set in advance will be organized.
- The Peach Open Movie
Now, I'm keeping an eye open for the Apricot Open Game project.

May 21, 2008

What am I building?

I started building a contraption but I had to stop since I accidentally burned seven LEDs at once. Now, I have to wait until I get the new LEDs I ordered before I can finish. Meanwhile, you can try to guess what it is that I'm building.

My brother was kind enough to be the cameraman for this video.

May 07, 2008

Home Automation

Here is some information about a home automation system my team and I did some time ago. This was done for the Embedded Systems class and require two Altera UP1 FPGA boards, two computers and two USB-to-TTL wires.
- The nice picture above was done by Frank (see below) -

Although at the beginning of the project we were really motivated to do a robust and optimal design that could set an example on how to do home automation and that could be shared with everybody, the project quickly degenerated and the general design approach became: "We don't care of how inelegant, inefficient or completely surrealist the system is as long as it works". The main reason for this radical change was the implacable deadline that got closer and closer, and the usual lack of time Electrical Engineering students suffer from.

The system consists of a PC that takes high level decisions for the control of lighting, heating and power consumption in general for a house. This decisions are serially sent to an FPGA board that take some lower level decisions (such as debouncing switches, counting time, etc) and controls trough a very large number of IO pins (~90) the actual house hardware.

Since this is a small project, we do not have the actual house or its hardware, so we resorted to simulate it using a second FPGA board and another computer. The second computer controls the house status (temperature in each room, level of room light, motion in the rooms, status of the TV, etc) and offers an inteface so the user can turn on lights, move in a room, set the desired room temperature, turn on the microwave oven, etc. All this information is serially sent to the second FPGA board which then adjusts its pins status to mimic the house hardware.

- The GUI and the Java program was done by Yev and Ritvik -

All the coding was done in Java and VHDL and since it is not very well organized or useful to anybody else, I won't be posting it. Nevertheless, the documents describing this project are very nicely done (all modesty aside) and give a clear description of what we did. Here you have: the SRS, the SDD, and the STC (not the final version). Please keep in mind that this documents are not published under the CC license, they have full copyright.Above you can see my friend Frank, he's the leader of the group (transformed from the norm by the nuclear goop).

Just so you know, the project went well and allowed us to learn a lot. We even ended up having a very good mark, so everybody should be (and is) happy.

If you are wondering what did I do in the project (I'm sure you are): I did the serial communication protocol in Java.

May 02, 2008

ATmega168 Parallel Programmer

I own a few Rev. C Bare Bones Boards witch came with ATmega168 chips burned with the old Arduino bootloader (NG). I wanted to upgrade them to the newer (Diecimilia) bootloader so I built a parallel programmer following the instructions in the Arduino website and using parts I found in the garbage (as usual).

  • Two 470 Ohms resistors
  • One 220 Ohms resistor
  • Some wire
  • A female header at least 3x2
  • A ferrite core (not required but looks cool)
  • Some heat shrink (it could be replaced by some electrical tape)
  • A male parallel port connector (DB-25)
Programmer Schematics
(this is a vectorized version of the original schematics on the arduino site)


I got a DB-25 connector from an extension parallel port of a PC I found in the garbage. First, I removed the original cable that came with it and I soldered the programmer's resistors to the back of the DB-25 and connected them to new wires. Then, I covered the resistors and cable connections with a piece of heat shrink tubing.

The new wires where terminated in a 4x2 female header (even though there are only 5 wires). The wires and female headers come from an old computer (they connected the power buttons and the case LEDs to the motherboard). I cut the header to size from a larger header (form the same old computer) and I used an extra row to mark it with a white pin cap so I could easily remember where the #1 pin is located.

Finally, I added a ferrite core and twisted the cables in order to reduce noise and cross-talk. I don't think this is really required but it looks nice.

March 17, 2008

Engineering Bling

Finally, I got the ultimate (engineering) bling: The Iron Ring.

Needless to say, I'm happy. Also, since this means that now that I'm an engineer (only morally, not legally), I should post some nice complex projects instead of the simple things I normally blog about.

Below you can enjoy a few pictures of my homies (David and Cynthia) and I.

Note the (rather clever) use of gangster slang to denote how "fresh" we have become now that we have the ring ;)