Cool Engineering

Info on some cool engineering projects

Saturday, September 22, 2007

Learning to Fly

I spent the morning teaching a good mate and his dad to fly (model aircraft that is). Being fresh in my mind I thought I'd share some tips to try and make RC flying easier - particularly for the beginner.
1) Have an experienced instructor along with you
2) Fly in an area with plenty of open space - most of my crashes have been because I have been confined to an area which was too small
3) Fly high - don't start out low level flying it is too hazardous and doesn't allow you time to react - try to fly between 50-150m
4) Have a second person as a spotter in case you loose sight of the plane momentarily (this is an emergency thing)
5) Take off into wind, land into wind
6) Don't fly in front of the sun - it will blind you and you will loose sight of the plane
7) Don't fly until you have tested all the controls on the ground - ensure they are not reversed! and that you are comfortable with the configuration. (I have throttle on left stick, rudder and elevator on right stick) - If I had ailerons, these would displace the rudder on the right stick
8) Do a range test on the ground - do the controls work from 20m with the aerial fully down (not extended)?
9) Wear a hat and sunglasses
10) Don't take on the wind - if it is too windy (more than a light breeze for inexperienced pilots) save your plane for a less windy day
11) Stay away from trees - they are not friendly to planes (as a side issue a weight with fishing line then tied to a heavy rope generally works for getting them down).

Friday, September 21, 2007

More robots on the way

Having recently brought a couple of robotics books and subscribed to Elector, I have whetted by appetite at doing a vehicle based robotics project (having designed UAV's and submarines). I guess after the vehicle there still is boats, hovercraft and choppers, but while I'm on to vehicles, I have two different designs I want to create.
1) A basic line following robot (using a couple of IR LED/reciever pairs will follow a black line of electrical tape of a white surface). This will be more of a proof on concept - small scale project, just to get into the swing of control systems again. I envisage using a PID control algorithm to keep things on track.
2) A larger more robust robot fitted with a xy adjustable video camera - transmitting to a remote location. Hopefully I will be able to experiment with inertial navigation (augmented with the GPS module from our UAV) and will have a bit more expertise in mechanical construction designing driver mechanisms. I'd be nice to also have an adjustable height camera (can extend up to look over barriers) and possibly some sort of audio link (so I can communicate with people the robot sees). I'll also be a good excuse to get the welder out and build something cool.

Thursday, September 20, 2007

Does Richard Dawkins exist?

I recently came across a very amusing little parable regarding the existence of Richard Dawkins. It takes a hyper-sceptical approach to the existence of this 'so called Richard Dawkins figure', with the 'scientist' being interviewed doing an exceptionally good takeoff both of Dawkins voice and his arguments. I strange side point to this is a book 'The Dawkins Delusion' is mentioned as part of the parody, and this book now exists - I'm currently reading it. It was written by and Oxford professor as an answer to many of Dawkins ridiculous tirades against religion.

Sunday, September 16, 2007

XY Servo control

After taking a look at some of the video of defconbots and a guy who has mounted an x-y head controlled camera on his model plane - and uses it to fly, I thought I should get into the action.
One place I would particularly like to use this is on the aft camera on the ROV - allowing surface controlled panning and tilting so we can see what is around. Basically two servos are used (one for each axis) and a laser is used in my experimentation (my miniature video camera is currently refusing to behave). At this stage this is just a proof of concept design that will be adapted for bigger and better things.


Thursday, September 13, 2007

Mini Heli - a marvel of micro engineering

About 3 months ago one of the engineers from work brought in his miniature helicopter and drew quite a crowd in the office. A couple of weeks later we each had our own (thanks to eBay ~$20) and have had heaps of fun. They are quite resilient and simple to repair (I've been doing a fair bit of that). This week another engineer brought his 'combat helicopters' in. These each have an infrared transmitter and reciever, where the goal is to 'shoot' the other chopper out of the sky. When a chopper registers a 'hit' the engine stops and it falls to the ground. So far I have 3 kills and have only been shot down once. This was originally an idea we had for our final year engineering project - using planes. We had a couple of things working against us - only one plane, and only one pilot - the UAV project turned out to be somewhat more practical.


Wednesday, September 12, 2007

Batch script: date/timestamped backup

One of the early batch scripts I wrote was to backup whole folders. This was particularly used during my Computer Science Honours research - where I wanted to ensure that multiple regular backups were made - particularly of documents and reports.
The script extracts time and date data from the 'Date /t' and 'Time /t' DOS commands, rearranges the order to have a date/time stamped folder that can be sequentially ordered, and then copies everything of a particular directory or directory into this new directory. Using the command line functions on WinRAR similar functionality is possible, with compression and fewer lines of code. WinRAR isn't free (although it continues to let you run it after the trial has expired), but provides good command line support. Since I can't currently find the WinRAR batch files I wrote I have provided the standard batch file below:

@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C)
@For /F "tokens=1,2,3 delims=: " %%A in ('Time /t') do @(
Set Hour=%%A
Set Minute=%%B
Set TOD=%%C)
SET DateStamp=%YEAR%-%Month%-%Day%
SET TimeStamp=%Hour%.%Minute% %TOD%
cd backup
mkdir "Backup(%DateStamp%- %TimeStamp%)"
xcopy C:\Checkout\Project\*.* c:\backup\"Backup(%DateStamp%- %TimeStamp%)" /E

An example folder created by this script was: "Backup(2007-09-12 - 09.59 PM)"

Friday, September 07, 2007

DOS isn't completely useless

This is somewhat in response to a Linux supporter friend of mine that said a fresh install of Windows was "completely useless". Having used Linux off and on - the issue here is getting a fresh install of Linux - fairly simple with a fresh install of Ubuntu (though the wireless card still doesn't work which he admitted to being a Linux-centric issue), but it used to be an enormous pain with older versions - I wasted several weekends getting my old Linux box setup.
Back to Windows then. A couple of years ago I got into writing DOS batch files - mainly for doing backups and the like - and when coupled with something like WinRAR they can provide automated, date/time stamped, compressed backup. Since hard drive space isn't a huge issue at work I have set scripts to make a copy of all my important folders date and time stamped. We do use code versioning, but on a couple of occasions doing this has really got me out of a mess - forgot to check something in, or a PDF or Word doc which doesn't respond well to binary diffs. I will post that code soon, but first I wanted to show a really simple FTP uploader. It requires nothing more than a standard Windows build. It's not very secure (passwords are stored in plain text - though in FTP they are transmitted in plain text anyway). It is very functional though as when created as an icon on the Windows desktop - when a item is dragged and dropped onto this icon it will initiate the script and automatically upload the file.
Below is the script:

@echo off
> c:\script.txt echo open
>> c:\script.txt echo username
>> c:\script.txt echo password
>> c:\script.txt echo cd Uploads
>> c:\script.txt echo send %1
>> c:\script.txt echo bye
ftp -s:c:\script.txt
del c:\script.txt

The script creates another file to execute (script.txt) which is deleted when the script terminates. You replace the username and password for the ftp username and password. "cd Uploads" refers to the destination directory - eg. cd Upload/Robert/pictures. "%1" refers to the command line argument supplied to the script from the drag and drop function.
Very simple and functional. I personally use this for uploading sermons from church onto the Church website where some cleverly crafted PHP interprets the sermon names and displays them to the screen - all without me having to manually FTP in - marvellous.

Thursday, September 06, 2007

Propellers formed

Using a Stanley knife and a file I recently took to some 4.5" model aeroplane propellers to make them more suitable for ROV work. Because they density of water is much high than that of air long propellers would create significant drag on the motors which according the ROV boards I have been frequenting at least will cause them to die prematurely.
2cm was removed from each blade of the propellers - turning them into 2.9" or 7.4cm propellers.
Minor differences in the thrust produced by each propeller will be handled in software - where PID stabilization algorithms - coupled with a gyro should be able to even out the thrust produced by each propeller - individually driving each one through a PWM controlled H-Bridge.