Cool Engineering

Info on some cool engineering projects

Sunday, February 18, 2007

Tilt based mouse replacement

Over a recent online discussion with Wade - we formulated a brilliant plan for combating RSI (something we coders can suffer from at times). Basically the plan is to use a 2-axis accelerometer as a tilt meter (which works well if you are fairly stationary as it responds primarily to gravity). This would be connected through some wireless interface (possibly BlueTooth) back to the computer (although the initial prototype will probably be wired). As you tilt your head forward and back, the mouse cursor would move forward and back - likewise with side to side. I'm very pleased with this idea and hope to show it off at work soon (along with my other half-dozen projects that haven’t quite gotten off the ground yet).
Besides normal day to day use, I think this would work particularly well for first-person games.

Friday, February 16, 2007

Hysteresis

Hysteresis is a term used to describe (in electronic control systems at least) the control descison being dependent on past history, accounting for a reaction time to changes induced by the controlled equipment. An example in point is a temperature controller I'm currently planning out. It is to be to ensure electronic equipment is kept reasonably cool - using a fan driven by a microprocessor which uses a small IC temperature sensor to determine when the fan needs to be run and when it can be turned off.

A simple way to do this would be as follows (shown in pseudo code):


if (temp > 40) then
   fan = ON;
else
   fan = OFF;
end if;

Though this would work and is very simple it had a rather undesirable affect. That being that the temperature will tend to oscillated around the 40 mark with the fan continually being turned on and off. The alternative accounting for hysteresis would look something like this:

fan = OFF;

while(1){
   if (temp > 40) then
      fan = ON;
   else
      if (temp < 35) then
         fan = OFF;
      end if;
   end if;
}

In this example the fan won't turn on until the temperature reaches 40, but won't turn back off again until it drops below 35. This dampens oscillations and recognises the non-instantaneous nature of the temperature with reference to changes in airflow.

It should be noted that this is a very simple control algorithm, but should provide reasonable operation. More sophisticated algorithms such as the PID's used in my UAV project allow much better control allowing varying rates of change (rather than simply off and on).

Part of the reason this project has come about is that our DVD player recently overheated, causing several electrolytic capacitors to explode. The area where the new DVD will be is still fairly hot, particularly during Australian summers (which often get up to 40degress C). Hopefully soon I'll have some schematics up - the target device at this stage will be a PIC 16F88 (the one with the inbuilt ADC).


Wednesday, February 14, 2007

An interesting and viable approach to GPS photo tagging

During research for this project I came across this product. Basically all it does it take a GPS sample every 15 seconds and store this in memory - date and time stamped based on the GPS time. When connected to the computer some cleaver software compares the time when each photo was taken to the GPS measurements at that point and inserts the relevant GPS data. I'm thinking this is quite a viable alternative and since I already have most of the hardware this is the path I'm looking at travelling along.

The plan in short:
- An AT-Mega128 will be used to read in GPS data from my GPS receiver at say 10 second intervals. It will strip off most of the unneeded stuff - just keeping the time/date stamp, the lat, long and alt.
- The micro will then write this data to an SD memory card though a DOSonChip interface
- I will probably use some cleaver perl scripts to parse the photos and correlate their time taken with the GPS logs. From there the script will insert the relevant GPS data into the Exif header of the jpeg files.
- One further enhancement would be to make the GPS unit nice an compact and mount it on the hot shoe of the camera. That way each time the camera takes a picture, GPS data could be logged onto the SD card. The same scripts would be used to match up this GPS data with the specific photographs. Though this approach may be more elegant - it seems to be less practical (extra stuff hanging off the camera - and wouldn't be adaptable - ie. if I wanted to use it onboard one of my aircraft) so possibly I will go for the first option, but add some additional trigger points which could be wired to a wireless transceiver at a later stage.

Digital Rebel!


Digital Rebel!

I recently purchased the Canon 400D (or US name – Digital Rebel XTi – which sounds heaps cooler). I took this on a hike to cradle mountain and it turned out some stunner photographs (like the photo of Barn Bluff shown right)

Having said that there are two things I’m looking at making to supplement it.

- A remote shutter control (either wired – very easy, or wireless – a little pricier). This seems pretty simple from some schematics shown around on the web and should mean that I won’t introduce ‘shakes’ to the camera when taking pictures.

- Some method of tagging GPS coordinates with the camera. I recently saw on the Nikon DSLR cameras which had a ‘shoe’ the GPS could mount on to perform this function – as yet it doesn’t seem Canon offer this functionality. One method would be to remove the memory card (CF in this case) and plug it into a writer each time the GPS tags are to be added – this wouldn’t be too hard, but is more than a tad inconvenient. Another method would be to interface a microcontroller with the USB interface. One problem here is the 400D doesn’t seem to allow Windows to mount the memory card directly, but rather uses a WIA protocol, which on the outset seems to be mainly one 1 – Doh!

Possibly I will just have to do it in software back on the computer for now – an activity which seems to be gaining in popularity.

Tuesday, February 13, 2007

How many satellites can you see?

During our engineering project Wade and I noted that our GPS receiver was capable of tracking up to 12 satellites simultaneously, as compared to some GPS receivers which could track up to 20. In most of our field tests the best we achieved was about half a dozen (at the time read from my Magellan 315 - not directly from the receiver). Well on top of Cradle Mountain (~1550m AMSL) I was consistently receiving data from 9 different satellites - not bad! Possibly we could do a little better on a mountain range closer to the equator.

Finally a cool use for my GPS

I have had my GPS (Magellan 315) for over 4 years now, and have realistically hardly used it (and never had to rely on it) in that time. It has gone on every camping/hiking trip (including Cradle Mt) and has been cool to compare Speedo measurements - but other than that the usage has been somewhat trivial.

That is until I was introduced to Geocaching. Basically one signs up at http://www.geocaching.com/

After signing in you type in your postcode and see what hidden caches are in your local area. You punch in the long and lat into your GPS and find the secret cache.

So far I have found one - out of two trips (The first trip being successful - the second turning up nothing).

One word of warning I figured out the hard way - ensure the GPS Datum is set to WGS84 - otherwise you can be hundreds of metres out.

Google Maps (www.maps.google.com) is also your friend - simply pasting in the coordinates (eg. S 37° 42.893 E 145° 08.879) will take you to the surrounding area with a map.