A New Android Brain for Hera

Remember all that time I spent wiring up Hera? Fitting her with an accelerometer, configuring her internet access, all that jazz? Well it’s all been destroyed.

Three weeks in prototyping time is a long time and Hera was starting to become old and doddery, fortunately, unlike you’re confused little grand mother, when Hera gets to that stage, we can give her a brain transplant. Hell I gave her a brain after 20 years, I can bloody well replace it for a better one too… I know what you’re thinking but the fact is, Hera doesn’t need a heart nor courage, she is fearless and without emotion >:)

So what’s this new brain I’ve got her? Well I’m sure you already know after reading the title and seeing the photo at the top.

Yesterday, I invested in an HTC Wildfire, it’s my first Android phone and with a few downloads and some quick coding, I’ve now got Hera’s Ailerons (bits on the wings that control how much she rolls) being controlled by the phone. When it tilts, the Ailerons move to compensate. This is the same as what I had before but my gods, is it more precise?!

This was made especially easy by the Amarino Toolkit, a mixture of an Android app and an Arduino library. I’ll go into more technical details in a future post.

Tomorrow’s task is to write an Android App that will send the same data to Hera’s website along with GPS information too so you’ll be able to watch her travel… or sit on my desk.

Third Place for Hera

Well, Hera came third place, winning me £75 of Amazon vouchers. Second place went to “Mood Tunes,” a system that would play tunes from spotify depending on what mood your last tweet suggested you were in. Finally, 1st place went to the Twitter Controlled train set that my friends designed (see last post) which means they each won a trip to Yahoo’s Open Hack in Bucharest.

What now? Well I’m not going to talk about the future of Project Hera because, right now, Yahoo’s paid for a bar tab, right now we’re getting pissed ;]

Hera goes on show

Today’s the day. It’s Yahoo Hack Day, Dundee 2011 and we’re all setting up our work. Groups of Third Year students are all running around desperately getting final pieces of code written and adjusted in time for their presentations. I decided I didn’t want to have a mad rush on the day so was up to 3AM in the labs last night fixing a major bug on Hera’s new website.

The weather gadget collects the local weather around Hera using Yahoo’s YQL engine. Unfortunately, with a site that refreshes itself every second came a slight problem. Yahoo doesn’t look kindly on greedy people and after just a few hours, andybarratt.co.uk had been blocked. A mad rush of refactoring changed the code so that it would only query Yahoo for updates every ten minutes.

Meanwhile, Hera was recalibrated so that she would run off batteries. My problem is this, while in her prototype stage, Hera uses WiFi to get a connection, this will be changed to GPRS in the future for flight but for this presentation, it’s WiFi using an Arduino WiShield. My problem? The WiShield feasts on batteries! After several minutes of use, a standard 9V battery is drained enough to cause the Arduino to crash with no hope of powering up again. I suspect I’m going to have to do this presentation using a USB cable connected to her with an explanation that in future, she’ll have bulky lead acid battery on board.

Otherwise, we’re ready to go. Go check out what she’s up to on www.andybarratt.co.uk/hera

Hack Day is a competition, with prizes. So I am competing. Feet away from me are my friends, Jane Wilson, Ross Warren and James Bennet who have also gone down the arduino/models road with a twitter controlled train set. I suspect they’re my main competition today. That said, I’m aiming to place and after all, I’m just an individual, Hack Day is meant to be a group work thing but then, I’ve never been one for working in groups.

Teaching Hera to balance.

You know when you’re a kid, to learn how to walk, you have to learn how to stand, because to learn how to stand, you must master your own balance. The same applies to Hera.

My main goal right now is to be able to fly Hera manually by radio control, however for her to handle her own balance. The Ailerons on the wings control how much she rolls so with these controlled by the Arduino and and accelerometer secured inside her, Hera can now balance herself out simple by measuring how much she’s tilting and deciding which way to roll based on that.

The Yahoo Hackday is on Friday so I’m running out of time. I have decided not to use Twitter anymore but instead to create a website for her to send her data to. When you go to the website, you’ll see an illustration that demonstrates what Hera knows. Basically, it’ll show when she’s rolling or pitching. In the future, it would show her altitude, her location, her speed, everything. But right now, let’s keep things simple shall we?

Arduino wired cockpit.

Project Hera – Arduino Powered Unmanned Air Vehicle (UAV)

Project Hera Avatar

I’ve been getting some funny looks these past few days, these are usually due to weird whining noises coming from a large model airplane sitting on my desk in the labs.

The plane was bought for my brother when I was eight years old, fifteen years ago, it was already several years old and he never flew it. Always fascinated by it, I took it out of my mother’s attic a couple of years ago and brought it home with me to Dundee where it has resided under my bed since.

A couple of weeks ago I took it out and realised just how simple the mechanisms controlling the plane were. Inside, are four, simple, 180 degree servos, one for each controllable part: throttle, ailerons, rudder and elevator. Nothing was soldered, it could all just be unplugged and replugged however I liked. So I’ve plugged it into an Arduino.

Each servo has been mapped to a different pin on the Arduino and I’ve written functions with understandable names for each control (banking, pitch, yaw, throttle).

The plan is to have an accelerometer or giro (haven’t worked out which one yet). If the plane starts to roll left, it’ll automatically set the ailerons to bank right. If it starts to nose dive, it’ll set the elevator to climb. Next I’d have a compass, if the heading is due north and the plane starts turning, the rudder will be told to correct this. This should sort out a nice little autopilot/cruise control.

I’m doing much of this as my project for the Yahoo Hack Day that we have each year here at Dundee University’s School of Computing for third year students.

This happens to be an Internet Programming assignment so I’m throwing in tweeting. When the plane makes an adjustment, it’ll send a tweet to let us know, hopefully it’ll have GPS so it’ll also geotag them. See Project Hera’s Twitter Feed Here.

This poor plane is around twenty years old and has never been named so I have done her the honour of calling her Hera, after the Greek Goddess of women, marriage and most importantly, the sky and the starry heavens.

Hera is a twenty year old plane which through Arduino, is being given a new life.

Flirt and Save Lives

A few people have been asking me what arduino is. My response is this, arduino is anything.

An open source language combined with a low cost micro computer the technology called arduino which can be hooked up to sensors, lights, buzzers, speakers, other computers, mobile phones, internet connections and so much more. It comes in different forms such as basic chips and flexible boards that can be sewn into clothing.

There’s a workshop today at 2 in the user centre, queen mother building. So if you want to make a coat that flashes messages across you with your gruesome chat up lines, or if you want to make a rover that roams through disaster zones and monitors survivors vital signs, we hope to see you there. All ready I’m meeting people who have hooked up their sofa to inform twitter when they’ve sat down.

Make anything you want. Two hours is all it takes to get you started. See you there.