Saturday, September 4, 2010

A few months ago, my brother suggested that we should build together a Quadcopter.

He showed me a few videos and I automatically fell in love.

This was the very first video I saw about it and perhaps the main source of inspiration.

What you see there is a helicopter with 4 rotors. It uses sonar sensors to measure the distance from the floor, infrared sensors to measure the distance from objects directly to the sides, and much more. It has two modes of operation: acrobatic mode and autonomous mode. The former allows control using a RC transmitter and the latter uses only a microcontroller for autonomous flight.

I'm somewhat experienced with microcontrollers, having designed and built devices with them for a few projects for academic purposes.

Perhaps the first issue I ran into when getting into this was the amount of investment required to put one of these babies above ground level: time and money. But taking it slow, my brother and I have managed to acquire quite some of the electronic components as of today, including all the sensors, GPS, telemetry devices, and the microcontroller itself.

I have a friend who will be helping me with the frame of the Quadcopter, which is yet to be designed and built.

I've designed a block diagram to visualize the whole system. Here's how it looks so far:

Click the image to see it in full size.

In the following posts I will be talking about the Quadcopter and the parts you see in the diagram.

This cheat sheet shows how to read the tolerance, maximum operating voltage and capacitance in ceramic capacitors, provides a conversion table for capacitance. Just look up the codes for the tolerance and max. voltage in the corresponding table.

In addition, I've included a drawing of an electrolytic capacitor for comparison. They are certainly not drawn to scale.

Wednesday, July 21, 2010

A computer running Linux with at least one available USB port. I'll use Ubuntu in this tutorial because that's the one I've got. Don't use USB powered USB Hubs, since these may not be able to provide enough power for the USB XBee Adapter. You'll need two available USB ports if you are planning to configure and test the XBees simultaneously.

You will need at least two (2) XBee modules Series 1 for any project.

You will need at least one USB XBee Adapter. You can buy them either from SparkFun Electronics or Adafruit Industries. My personal suggestion is that you get two and not one, so that you can configure and test them simultaneously (you can have the X-CTU utility open many times). Assemble the USB XBee Adapter if it doesn't come fully assembled.
I got myself the Adafruit version (manufactured by Parallax).

You will need at least one USB A To Mini-B Cable. You'll need it to connect the USB XBee Explorer with your computer. Get two if you are planning to configure and test them simultaneously.

You will need the FTDI Virtual COM Port drivers.
Up-to-date linux kernels (2.6.9 or greater) have FTDI support built-in.
If that's not the case, get the Virtual COM Port drivers from this link and proceed to install them.

Download and install Wine. Here's a guide for Ubuntu, or just type sudo apt-get install wine on the command line.

Download and install the X-CTU Configuration & Utility software from this link. Make sure Wine is installed before attempting this step.

Obtain the firmware versions for your XBee modules.If you fail to do this step, you will have problems trying to read the XBee module settings and firmware using the X-CTU software. These firmware versions go in the update folder in ~/.wine/drive_c/Program\ Files/Digi/XCTU.
You can get them in a couple of ways:

Download the firmware versions for your XBee modules from this link.
Extract it in ~/.wine/drive_c/Program\ Files/Digi/XCTU.

Download, install and run X-CTU in Windows (could be inside a Virtual Box).
Go to Modem Configuration and click in Download new versions (it make take a while).
After it's done downloading, open the X-CTU installation folder in Program Files\Digi\XCTU, and compress the update folder located inside.
Transfer the compressed file to ~/.wine/drive_c/Program Files/Digi/XCTU and extract it.

If it asks permissions to overwrite any files, just agree to every file.

Running X-CTU on Linux and testing the XBee module and the USB XBee adapter

If you have already added the COM ports to Wine, skip the next step.

Wine allows us to map serial interfaces to COM ports easily.
Wine reads COM ports from the "dosdevices" folder, which is located in ~/.wine in Ubuntu.
In Ubuntu, the USB serial ports will appear as /dev/ttyUSB0 for the first one, /dev/ttyUSB1 for the second, and so on.
Open up the terminal, and create a soft link to the ttyUSB0 like this:
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM4If you are going to connect two USB XBee adapters, you might want to add COM5 too.ln -s /dev/ttyUSB1 ~/.wine/dosdevices/COM5Make sure you type COM in upper case otherwise Wine won't recognize it as a serial port. (Thanks Tyler for pointing this out)
This will map the first USB serial port to COM4 and the second to COM5. Remember this, as we will need to type it in later.

You will only need to do this step ONCE, as the soft link will persist.

Insert the XBee module into the USB XBee adapter correctly, if you haven't already.

Connect the USB cable from the USB XBee Adapter to the USB port on your computer.

The USB XBee Adapter power leds should light up.

Open up X-CTU using Wine. In Ubuntu, it will be installed in ~/.wine/drive_c/Program\ Files/Digi/XCTU.cd ~/.wine/drive_c/Program Files/Digi/XCTUwine X-CTU.exe

In the X-CTU software, go to PC Settings > User Com Ports.

In the "Add User Com Port" field type COM4 and hit the Add button.
Repeat steps 7 and 8 to add more COM ports.
You will have to do steps 7 and 8 every time you open the X-CTU, a minor nuisance, in my opinion.

Select the previously added COM port in the list above by clicking it. It should appear as User (COM4).

Hit the Test / Query button to test communication with the XBee module.

Wait a couple of seconds. It should output a window displaying the Modem type and Modem firmware version of the XBee module. For me it was type XBP24 and firmware version 10E6 because I have the XBee Pro 2.4 GHz Series 1 model.
If you failed to select the COM port in the list, it will tell you that it was unable to open the com port.

And there you go, you have established communication between the X-CTU and the XBee module.

EDIT: Made some corrections that Tyler pointed out in the comments.

Thanks for reading! And don't forget to share your thoughts in the comments!

Saturday, July 17, 2010

With a lot of tools it's easy to run out of storage. That's why I decided on getting a 72"H x 36"W x 18"D storage cabinet with 5 shelves.

I did not buy the cabinet myself... but here's a link to one I found on the internet. This one was a gift for me of one of my aunts.

To the left is the image of how it looks in real life.

The handle has no security locking mechanism, so I had to buy a hasp and staple, plus a combination lock from Truper. This is by no means thief proof, but it will keep the hands of the common passerby off my stuff.

This cabinet came with no wheels and moving it was a two-man job. I then added wheels to it.

Here's the first shelf (from top to bottom). Here I'm keeping the Dremel Work Station with Dremel itself, the Iluminaded Magnifier & Desk Lamp, a Duracraft Fan, a vise from PanaVise, the screwdriver bits of the Denali Cordless Screwdriver, and in that black box back there, the Black & Decker Drill.

The second shelf is the one that will be easiest to access while standing straight. Here I've got: the Kawasaki Heat Gun, different sorts of tape, assorted capacitors, LEDs, transistors, sockets, relays, etc., spray paint, lubricants (silicon & multi-purpose), rubber cement, a cable dispenser (which also has solder wire), a multimeter and a graphic calculator.

This is the third shelf, here you can see the soldering iron with its base and my Denali Toolkit bag. There's also a box with sorted resistors, a plastic storage cabinet that contains lots of screws, nails, washers, etc., and another plastic storage box that contains USB cables, AC adapters, SATA cables, ASDL filters, phone cables, etc.

The soldering iron goes in the second shelf, not the third... I left it there by mistake.

As you can see I've organized almost everything from mostly used and relevancy, from top to bottom.

I learned the hard way that leaving the your tools in the outdoors (even if it's below a roof and inside a metallic storage cabinet) has serious consequences... specially if you live near the equador. Some of my tools are getting rusty and moldy due to the high air humidity.

There's not much I can do because this cabinet does not fit anywhere else around the house... the best solution I can think of right now is getting a dehumidifier or lots of silica gel pouches.

Friday, July 16, 2010

I'm on a budget, so I had to spend my money wisely on the right tools that will help me get the job done and that will also last long enough.

I'm the kind of guy who likes to etch his own PCBs, so I needed a tool to make the pin holes for the electrical components, and this need led me to the Dremel 300. It came with 24 accesories that I'm slowly finding use to. In the electronics lab where I used to take classes, we had a work station to use the Dremel, and it was as easy as pulling a lever to make those pin holes straight. That led me to finding necessary the Dremel 220 Work Station. The Dremel 300 came D.O.A., but I shipped it to the Dremel facilities with my proof of purchase, and they returned it back fixed at no extra cost to me.

Sometimes you need a strong and steady hand to hold your PCB when drilling or soldering, and since I had already seen a vise at the electronics lab, I knew what I had to get. The PanaVise 301 was my choice: it is heavy and has nice grip.

But in my case, I don't care! I removed a motherboard, power supply and drives from a computer case in just a few minutes, a task that would have taken me about 3 times that with a simple screwdriver.

It comes with a wall charger that you can hang on the wall with two screws. It's not very powerful, but will get the job done in most cases... but you wouldn't want it to be too powerful either, right?

This is the kit I got so that I didn't have to go buying all the standard tools separately. From the image you can see what the Denali 115-Piece Tool Kit is all about. The carrying bag is pretty handy. The two things that I found missing here are the mini/small pliers used in electronics and the precision screwdrivers, so I had to get those separately.

For the tough holes, I got the Black & Decker DR550 Drill, it's quite powerful when in use, and sounds like a turbine because of the design used to take the heat out of it.

It's hard to desolder boards without the right tool, so I got the Kawasaki 840015 Heat Gun, which does the job nicely. It's packed with a few jets for scraping and the like, as well as scraper handle. You can also use this baby with shrinking tubes... it is indeed a bit big for such task but it just works.

To strip wires, I bought the Irwin Self-Adjusting Wire Stripper, which I found a bit pricey for what it does but in the end it was a good decision. No longer I have cut wires while trying to strip it with pliers. You can adjust the length of the wire that you want exposed with this tool.

Since this is the very first post, I believe it would proper to start by introducing myself.

My name is Ricardo Arturo Cabral and I'm an electronics engineer and a software developer.

I was born in June of 1988; lived for the most part of my life in Santo Domingo, Dominican Republic and about two years in Miami, Florida.

Ever since I was a little kid I've always enjoyed building things, to understand how things really worked from the inside out. This motivation led me to gain a deep interest in programming and electronics.

Being an autodidact, I taught myself programming, and developed my skills through practice (Oh, those sleepless nights). Did I mention that I really enjoy programming as much as playing a game?

I graduated from the "Instituto Tecnológico de Santo Domingo INTEC" at the age of 21 in Electronics Engineering and Communications.

I'm currently working full-time for WIND Telecom (a telecommunications company based in Dominican Republic).