Sunday, September 25, 2011

DIY UAV On The Cheap

Who cares about the Bears or Packers and who cares that Herman Cain is the hottest search today on Google Trends? (excuse the experimentation with keywords) Lets talk about UAV's (unmanned aerial vehicles) since I know everyone is more interested in this topic than what's on Google Trends anyway, or not. 





I'm in the middle of a DIY UAV journey myself at the moment. I have everything I need, except the ability to fly a 4 channel RC airplane. :) I completely totaled one about 10 years ago. It ended up a pile of dust on the runway. So I took a step back and decided it would be better (and cheaper) to start out with a $30 Air Hogs Aero Ace from Walmart. Well the Aero Ace is really fun to fly and I would recommend one to anyone who sucks as bad as me at flying RC aircraft, but they are a little too easy to fly and I think that's left me with a false sense of accomplishment. I mean the thing only has two channels (one for speed and one for steering) and it's aggressively stable to the point of being uncrashable and even if you do manage to crash it (which I have), it's made from bullet proof (exaggeration) foam and is indestructible (unless you let a 3 year old get a hold of it and they rip it in half). With this in mind I purchased a USB controller (on ebay) to use with the free FMS flight simulator to get a better feel for what it's like to fly a faster 4 channel plane and get used to the whole flying toward oneself dilemma. I think I feel pretty comfortable with that now. My plane is all ready to go now and I even installed the FMS copilot to make learning a little easier. Now I just have to make the leap and risk the possibility of totaling another plane.

The nice thing about it these days, is that RC airplanes have become incredibly cheap and the risk of totaling a plane isn't that big of a deal anymore. Foam planes don't break so easy and are easy to fix, not to mention a lot cheaper. And electric is just so much nicer than fuel with a lot less hassle. My point in writing this, is to share the information I have gained from searching for the absolute cheapest way to learn to fly RC airplanes while having an end goal of building your own UAV. Some people that wish to build a UAV may already know how to fly, so in their case, they might have an option of a cooler plane like the  SkyFun from hobbyking.com. The rest of us should probably stick with somewhat uncool yet still kinda cool trainer aircraft. Anything that flies is at least a little cool!

I went with the Ardupilot UAV platform since it is the cheapest and simplest to use with lots of updates and support. There are many configurations to go with, but I'm just looking for the cheapest so I will only briefly address the upgrade possibilities. The sky is the limit here (pun intended). I went with the Hawk Sky from nitroplanes.com, but I would probably go with the Hobbyking Bixler now if I didn't already have the Hawk Sky. I think the Bixler is new out this summer, or at least new to the HobbyKing USA Warehouse. Here's a comparison of all the EasyStar clones. The Hawk Sky comes with a useless radio system, whereas with the Bixler, you can get the ARF so you can select your own radio system and don't have to pay for useless gear. I replaced my Hawk Sky's Dynam 4 channel radio system with a Fly-Sky 2.4G 6 channel system. I recommend the Fly-Sky over the Hobby King version just because the Fly-Sky version comes with the USB cable whereas the Hobby King version from the USA Warehouse does not include the cable. For some reason Hobby King doesn't even sell the cable separately through the USA Warehouse.

To build your own UAV, here is the bare minimum you will need for a complete system.
  1. An RC aircraft completely ready to fly with a 6 channel radio. The Bixler will also require an ESC and a 3 cell Lipo battery.
  2. ArduPilot UAV Controller board with pinheaders and cables to connect everything together.
  3. GPS module. I choose the MediaTek from the diydrones store because it's so much cheaper than the others. It comes with a 5 cm cable which isn't very long so you may need to get a longer one which the diydrones store also carries.
  4. Flight Stabilization. There are a couple of options. Either the FMS Copilot or the ArduIMU. I went with the FMS Copilot because I found it on Ebay for $45 shipped and it's just a whole lot more straight forward and easy to use, especially as a trainer for a new pilot. If you have to pay regular price for the FMS Copilot (about $70 after shipping), then the ArduIMU might be worth paying a little extra for since it's a lot more powerful asset on a UAV. If you order it at the same time as the GPS, then shipping probably wouldn't be any more than you would already pay.
  5. FTDI cable for programming the ardupilot board and possibly the GPS module. You can get one from the diydrones store or Sparkfun.You might be able to get by with a cheap USB to TTL converter from Ebay for a few dollars, but I'm not sure since they generally don't have the CTS pin and I'm not sure if that's required. They do have an RTS pin though.
 Here is the Ardupilot online manual. It's not necessary, but a keychain camera from Ebay is a fun addition and they only cost around $7. Here is a picture I found of a similar UAV setup with all the same elements as mine. It was found on this site.This setup is just the bare minimum to get someone going. There are a few upgrades that this system can use. An ArduIMU would be good if you didn't start out with that or you could add a Z axis sensor with the FMS Copilot. The FMS Copilot sensors can also be directly connected to the Ardupilot board with the right firmware addition installed. Another possible upgrade would be the ArduPilot Shield (or this) which can measure airspeed. Beyond this, you would need the Ardupilot Mega board to have enough input and output pins to do much else. When you're at that point it might be time to start thinking about that second UAV. :)



Saturday, September 24, 2011

Robotic Music

If anyone out there is interested in the science behind getting music to play on pretty much any robot or machine (using the motors or any other device that emits an audible sound from vibration), I have posted my notes here on CNCZone.com for the process I came up with to play music using the stepper motors on my 4 axis CNC milling machine.

Here is a video of the results in action.

Make your own EVC to VGA adapter


Here is a tutorial I created several years ago just for the heck of it. I happened to need the info myself and figured I would share what I found. I had it on a different site, but then shut down that site, so now I'll just post this info here in case one or two people actually happen to need this info. I know it's not going to be useful to very many people. I spent a lot of time on it so I may as well make it available. 


I don't know if I mention it in this tutorial since I haven't reread it, but the HP workstation I had was configured for a higher than mainstream frequency monitor. So not your typical 60 Hz or whatever. There is a way to set it for a regular monitor, but it's pretty hard to do without a monitor that works with it in the first place (which I didn't have). I got my monitor to work once but then had to restart and lost the settings and never got it working again. Maybe someone else will know more about how to do this. So I didn't get much use out of my cable. I just got fed up with it and gave the workstation and my home built adapter to my brother.


Oct. 2007

Make your own EVC to VGA adapter.

click image for full size
I recently purchased an HP Visualize C180 Workstation at a second hand store for $10. At first glance the video out looked like DVI. But come to find out after trying to plug in a standard DVI/VGA adapter, the DVI plug is much smaller. After some searching I found out that it is in fact an EVC (enhanced video connector) plug. (dvi/evc comparison)
EVC is a pretty cool concept that never took off. EVC combines Video, Audio, Parallel, USB, and Firewire all into one socket. It was meant to reduce the clutter of cables. You could have a monitor with a single cable connected to the computer and all the IO ports you need right on the monitor.  (evc concept)
I didn't have to search much to find out that EVC to VGA adapters aren't cheap, at least $40. Well I didn't want to spend $40 more on a $10 computer. I found an EVC to dual VGA splitter on ebay for around $9 after shipping.


click image for full size

This cable is not compatible with the standard EVC pinouts, but that can be changed. (evc pinouts) (vga pinouts) I was unable to find out exactly what this splitter is actually for, maybe for a special video card with dual VGA out, but that information is irrelevant to my needs. The part number is 05E911 made by Molex and they can be readily found on ebay. HINT: most people selling them on ebay think they are DVI to VGA adapters and they are advertised as such. The best way to tell is that EVC has 3 rows of 10 pins and not 3 rows of 8 like DVI. (dvi)

click image for full size


click image for full size

Here is a table that shows which pins are wired together. Each plug has it's own column and the rows show which pins are connected. The "correct VGA" column shows the correct way to connect a VGA plug to the EVC plug. (evc/vga adapter)
EVCVGA 1 (blue)VGA 2 (black)Correct VGA (wire color)
11
214
36
410 (brown)
513 (white)
614 (red)
7
8
955
1099
11
12
13
142
15
16
17
18
1915
20
2113
223
238
2414
2575 (orange)
2612 (green)
271015 (black)
28129 (yellow)
2915
3012
C111 (red shielded wire, center wire)
C222 (green shielded wire, center wire)
C33
C4133 (blue shielded wire, center wire)
C56,7,8,106,7,8 (shielding to shielded wires)
Required items to get started:
    - Molex part# 05E911 EVC to dual VGA adapter.
    - Knife
    - Pliers
    - Soldering Iron
    - Solder
All the work will be done on the back of the EVC plug, so we need to open it up. Begin by working a thin object (knife) in between the plastic and the metal on the front of the EVC plug as show in the picture.
click image for full size
Remember what you learned in Boy Scouts, don't go cutting toward yourself or your neighbor for that matter. Safety First!
The plastic housing is glued on each side to a metal housing which is soldered to the back of the EVC plug. You need to work the knife in between and side to side to break the bond. I found that it makes it easier if you twist the blade and pry the plastic away from the metal rather than cutting it.
click image for full size
After all the glued surfaces are separated, hold onto the plastic housing with one hand and use the other hand and push the cord into the housing and the EVC plug and metal housing should pop out as shown below.
click image for full size
Take a pair of pliers and squeeze the crimped end of the metal housing as shown below. We are trying to loosen the crimp on the wires so they can be slid through.
click image for full size
The metal housing is soldered with two small beads of solder, one on each side. I found that it would be easier to cut the solder rather than melt it. Solder wick might work as well but I didn't have any at the time.
click image for full size
Use a pair of pliers and grab onto the flange on each side and twist gently to break the remaining solder. Use this same method to work the EVC plug out of the metal housing. Make sure to feed the cord through the crimped end of the metal housing as you work the EVC plug out the other end.
click image for full size
Below are images of both sides of the EVC plug just after the metal housing is removed. As shown in the table above, this wiring scheme is completely useless to us. Desolder all the wires from the back of the EVC plug. Technically you could leave the 2 good solder points connected, but I didn't because I like how the "VGA 2" wires have shrink tubing on the shielding whereas the "VGA 1" wires were a mess. The finished product will only have one VGA out so you will have to choose which one to use and put the leftover in your parts bin for future use, or give it to a geek friend for Christmas. :-)
click image for full size
click image for full size
After you have removed all the wires and decided which VGA you are going to use, turn right back around and solder the VGA of choice back onto the EVC plug the correct way and there you have it. Below are some pictures of the way it should look when you are finished. Make sure you check and double check your work.
click image for full size
click image for full size
Now just reassemble in reverse order. Make sure to resolder the metal housing to the EVC plug and use a little glue between the metal housing and the plastic housing. That way it wont pull apart when you are unplugging it from your computer. Also recrimp the back of the metal housing around the cord to provide strain relief.  I guess before you solder, glue, and crimp it back together, you might want to test it out and see if it works. Otherwise it could be fun taking it back apart to fix it if it doesn't work.
click image for full size
The picture above is of the finished product. Now if when you follow these instructions on this page and anything gets damaged, remember I'm not responsible. If your $50,000 Workstation sits before you in flames, take heart. Get out your video camera and record the fun, then post it on youtube for us all to enjoy!