Wednesday, July 31, 2013

"Vacation"

So, there hasn't been alot of updates lately, I (Anton) took some vacation  from the project. There is alot of fun stuff to do with 3D-printers and I wanted to take some time for a small project on the side. This is the start of a rover-like vehicle. There aren't any tracks yet, as I haven't really figured out the best way to do them. But the idea is to take two of these, connect them with a center module with a battery and a arduino nano with a bluetooth dongle.


And it can drive!


Stay tuned for some updates on our Hexacopter!

Monday, July 22, 2013

Camera!

Hurray! Today we recieved our new camera for the Raspberry Pi (Many thanks to them!). 



Out of the box and connected it gave us this image. There seems to be some issue where the raspberry pi hangs when taking the picture but there has been alot of tinkering with files and drivers in the raspberry pi so a clean install should probably fix it.


The new chassis for the hexacopter is soon done. We decided to make it 2 color, orange and white so that we get a front and a rear on it. I must say orange looks really neat.


We are now sitting on a big pile of plastic that just needs assembly.



Tuesday, July 16, 2013

Batteries

The holder for the batteries are finished! This just screws into place under the hexacopter.




Another breakdown, our oldest 3D-printer just suffered from a PSU (Power Supply Unit) that broke. It was a old one, and a replacement shouldn't be much of a problem to find. Luckily the newest 3D-printer is going strong today.

=========== ADDITION BY JENS ===========

I must say that Anton did not disappoint in actualizing my vision for the battery bracket. Below is an image of the CAD sketch, I sense a certain resemblance!


Good vibrations!

So yesterday pretty much everyone went on vacation. So until Alexander shows up later this week, I'm all alone printing the remaining parts for revision two of the hexacopter. The printer felt it was ok to go on vacation to, it jammed it's nozzle pretty bad. Luckily we have spares so it was just 15 minutes to get it up and running again. In the quest of saving the old nozzle, Viktor that shares lab/office with us came up with a brilliant idea. A bath of acetone and some vibrations should get the old nozzle all cleaned out.



Fun things aside, this is a part of our new landing gear, and some of the plastics needed to attach them. Progress in the making!


Friday, July 12, 2013

Testing, testing

We are making steady progress with the new chassis, as you can see below. About halfway there to be able to mount the electronics and motors.
New parts! Woho!

The full status report of the chassis is as follows:

[CAD percentage/Printed/Total]

[100/4/6] Arms
[100/1/1] Centerpiece, lower
[100/0/6] Motor mounts
[100/0/6] Slanted arms
[100/0/1] Centerpiece, upper
[80/3] Landing gear
[0/0/1] Raspberry pi box
[90/1/1] Camera gimbal
[80/0/1] Battery bracket
[80/0/1] Sonar casing

So, as you can see, we have quite a bit of printing to do. Good thing is that since most of the parts have been designed already, we can simply start the printer and while it carries about it's business we can engorge ourselves in other tasks, with the occasional eye thrown towards the printer (Called Hilda btw) to see that she's not up to any mischief.

We've also set up a testing rig for balancing the propellers and the motors, so hopefully this will reduce the vibrations in the chassi and limit the unscrewing of bolts, blur in pictures and breakage of parts. Hopefully.
Test rig. All calculations point towards the vice being an accurate representation of the finished hexa. 
Really, I promise.

We've been looking in to the sonars for a while now and after a lot of googling, everything seemed to point towards MaxBotix. So, yesterday we placed an order at http://www.maxbotix.org. We've had a bit of correspondance with them prior to this order and I must say that they are really helpful! Also turns out that they have a educational discount which we could use. This was very fortunate, because still within the borders of our budget we were able to order 5 pieces of the MB1240 XL-MaxSonar®-EZ4™ and one of the MB1200 XL-MaxSonar®-EZ0™. We figure we will probably use the EZ4 in all directions since they have the most tolerance against prop noise and have the furthest reach. However this comes with a cost, since they have quite a narrow field of view which could possibly cause problems. We felt obliged to test more than one solution so we also ordered one of the EZ0 which has the widest field of view but in return the lowest noise tolerance. So, we'll test these and see if the EZ0 can function properly, and in that case we will probably order three more.
So, if you're in the mood for ultrasonic sensors or would simply like to keep track of what MaxBotix is up to, they've recently started a facebook page that you can like. 
MaxBotix Facebook page

Thursday, July 11, 2013

The new centerpiece


A good 8 hours of printing was done yesterday, fingers crossed the entire time. We needed a new centerpiece for revision 2 of the hexacopter and it's a big print! It's the by far the biggest print on the entire hexacopter. It was also the longest print we've done on our new Mendel, a 3D-printer from RepRapPro. It came out really nice, no warping or anything bad related to the long print time.

The new centerpiece, this is where all the electronics goes.

Wednesday, July 10, 2013

The Gimbal

The recipe:

1 x 3D-printer (A reprappro mendel in our case)
2 x standard 9g servos or similar (we used servos with metal gears)
1 x Raspberry pi camera module


Part of the task of making a system for acquiring photos and video from a flying vehicle is the need to compensate for the vehicle's motion. A great way of compensating for this is to make a device that if our vehicle rolls right, this rolls the camera to the left to compensate and keep the camera steady and horizontal in reference to the ground. For different applications you want to compensate for different maneuvers, roll, tilt and yaw. What we want on our hexacopter is only to compensate for roll and tilt. This keeps our camera level with the horizon (parallel to the ground) and this is just what we need. The rest we can compensate for in software post-processing. The idea is simple, 1 servo per axis of rotation, using the inverted gyro signals from the APM (the chip that controlls the hexacopter) and feeding these to the appropriate servo.


We got a raspberry camera module which is lightweight and really small, we want to shockproof our gimbal a bit so we went for some beefier servos with metal gears. You could probably do this with a standard 9g blue servo, they are almost the same dimensions, depending on manufacturer.


The whole system consists of 2-4 parts. One arm from the first servo to the second, making them perpendicular in the z-axis, something to attach the first servo to our frame and something to attach the camera to the second servo. With the little CAD-experience i have I came up with the following design.




This is the main part, all you need more then this is a box for your camera and something that attaches your gimbal to the frame. It turned out really small and simple, takes about 1.5h total to print without the bit that attaches to the frame and the camera mount. The camera mount will be made when we get the camera so we see that it fits. The almost finished product looks like this, where you attach your camera to the bottom servo (pointing down towards the ground in our case) and the top servo attaches to the frame.


Aaaaand, she's gone

So, yesterday was eventful. Took the copter out for a stroll in the morning breeze and before you knew it she slammed headfirst in to a brick wall. Literally. One of the motor mounts cracked, five out of six arms snapped and we lost four propellers. The top junction was torn to pieces as you can see below. After picking up the pieces and heading inside we quickly stated that all of the electronics survived. And there was much rejoicing, yaay yaay.

Sad copter.

After spending most of the day supergluing the chassi back into a state that looked not quite as mangled (I actually think that we should be able to fly again) we quickly started printing version 2 of the chassi.

This collision gave us a few valuable insights:
1. The sockets used in rev1 cannot withstand the kind of strain we are putting upon them (This we already knew, rev2 has had this flaw fixed since long)
2. Layer orientation when printing is of the UTMOST importance regarding durability of joints and how/if it breaks.
3. It is important to be able to rotate around your own axis so that you know which end of the copter is forward. 
4. Nothing gets you working on a new design as efficiently as when the old one breaks.

We have started printing the arms for the new revision, the new sockets are looking really promising! They fit very snugly and the sockets passed the inoffial ArchQuad durability test. This test consists of two people, each equipped with a pair of pliers, grabbing one end of the piece each and bending it downward (or upward, according to preference) and seeing if it breaks. It did not.

Printing away. It's slightly cross-eyed but nevertheless happy to see you!

The new arm with improved sockets. Also a wee bit slimmer.

New arm with socket ends attached. One could hardly guess that this isn't one single piece.



Monday, July 8, 2013

We have liftoff!

So, this morning we installed all of the parts that arrived late last week. Flashed the ESC:s, charged the batteries and mounted everything on the copter and out we went!

A pretty windy day in the north of Sweden, sorry for the rather lacking sound quality.
Test run 1:

First time ever the hexa left the ground. However briefly.

Dubious results, as one can see. As the pilots choose to see it, the hexa did a backflip out of shear joy. It could also be slightly related to the fact that one of the motor controls made the motor spin the wrong way so it constantly tried to compensate and compensating only made things worse. The navigation system was also configured slightly wrong. So, back into the workshop and adjust these minor flaws, and back out again. This time, in addition we tried to find a place with slightly less wind.

A slightly more stable flight.

This time things went better. In this video, Erik is the pilot. He swung by to watch the ascent and just like that got to be in charge of it. The watchful observer will probably note that some (most) of the landing gear is missing. By this time we had had a couple of hard landings (Due to the wind, of course!) but slowly getting the hang of it! This also showed a couple of weaknesses in the design, which we choose to see as a very good thing at the prototype stage.






Friday, July 5, 2013

Delivery!


Here we go! The batteries and the new ESC's have arrived, so on monday we will hopefully mount everything on the hexa and around the middle of the week, all fingers crossed, we will have liftoff!

New batteries and ESC's!

We will keep you posted!

Thursday, July 4, 2013

Raspberry Pi Camera Module

Wow, great news.

Earlier today i emailed Liz at http://www.raspberrypi.org/ and told her about our project and that the camera that they have developed would suit us perfectly and she thought it sounded very interesting. She has agreed to send one of their office cameras to us for the hardware cost. I just got an email from her colleague Emma saying that they will post it tomorrow.

I'm at a loss for words, this is really amazing!

An enormous thank you to raspberrypi.org, we will be sure to update the blog frequently and we assure you that the camera will be put to good use!

//Jens

Up to speed

So, since we have been working on this project for about three weeks already, we quite a few things to share. Brace yourselves, it will be a very long post indeed.
It will probably be simplest to take them as they are divided within the project:

I want to add: When we move from early test stage to something actually useful in this project, everything will be publicly available.
So all the CAD files, all the code and all the conclusions will be free for everyone to use, contribute to and study.

- Project management (Jens)
Time spent mostly keeping in touch with external resources and making sure everything goes according to plan. A lot of the time has been supporting the other members and making sure that they have what they need in order to be able to continue in their work with as few speedbumps as possible. With that comes the task of ordering supplies and making sure that the budget is kept.

- Interface (Albin)
Using DroidPlanner (OpenSource Android app for UAV managing) and changing it to fit our every need he aims to make the planning of the mission as simple as possible without losing any crucial options. Not an easy task. The software communicates through a telemetry module at 433Mhz, connected to the phone's USB port. However, not all phones are able to provide power for the telemetry module, so a custom OTG-cable (USB->micro USB) with external power had to be constructed.
OTG cable with external power supply.

- 3D reconstruction (Alexander)
Our first idea was to try and use a Kinect or equivalent in order to get a reading of the terrain. It was however noted pretty quickly that this is not an option outdoors. This since the the Kinect uses an IR-cloud of points in order to recieve a matrix containing depth data, but IR-spectra is fully saturated already. In order words, it's like shining a flashlight during a really sunny day, nothing much happens.
It was then decided that we use fotogrammetry (a lot of input and help with this (and not only this) has come from Jonas Bohlin and Mattias Nyström at SLU) and hence cooperate closely with Anton in the camera part of the project.

On hold until Alexander returns from Skåne.

- GPS and proximity detection (Emma)
The first tests with the GPS (We are using a u-blox lea-6h) were very discouraging since the error was around or above 5m. The GPS coordinate is used in order to help the 3D-reconstruction so that the software knows where the picture was taken. Here we got some help from the russians, though. They have during the last few years launched satellite after satellite in order to construct their own version of GPS, named GLONASS (Globalnaja navigatsionnaja sputnikovaja sistema), which we swedes can freeride on. So, said and done; the GPS module was reflashed into a GLONASS module, and after taking a stroll it was confirmed that the coordinates were more or less spot on.
We are thinking of using the MB1240 XL-MaxSonar®-EZ4™ for proximity detection in +x, -x, +y, -y direction, but some further research has to be done in this area.

- Magnetometer (Erik)
In order to find out if the motors affected the magnetometers an oscilloscope was brought (courtesy of the University) in and an analog magnetometer used. After building an amplifier circuit and still seeing no output on the oscilloscope the test was rendered inconclusive and we decided not to trust the analog version. We took a leap of faith and ordered digital magnetometers. We hence ordered 2 units MicroMag 3-Axis Magnetometer (together with an Arduino mini) from SparkFun.

- Camera (Anton)
A lot of research has gone into this part of the project, since it is the base for a lot of the collected data. It was pretty obvious that we would need a Raspberry Pi that would act brain and to which the magnetometer and GPS would send their data to be recorded. This gave a lot of options as far as interfaces goes. We have USB, I2C and also the option to buy a CMOS camera module and connect it to an Arduino with a processing shield. A small program was constructed for the USB webcam we had borrowed (Logitech C910), but the Pi could not power two of them. A USB hub with external power supply was brought in as temporary solution while we ordered USB extension cables which could be modded for external power. This was simply done as such: Cut the cable in two, solder the data cables (white and green) back together. Solder the ground back together with an external ground lead that goes to minus pole of external battery. Cut the +5v (red wire) of the male end and insulate it. Solder an external lead that goes to plus pole of external battery onto the red wire coming from the female end of the USB. Done!
USB cable with external power.

The FPS however was not great, we got around 4fps with one camera. According to the Pi community this camera has some compatibility issues, which was apparent since errors appeared on each initialization of the camera (even if it then proceeded to take pictures). Apparently this camera hogs ALL the USB bandwidth, so two cameras is not an option, and even with one, the USB of the Pi is not enough to allow for 1080p streaming. There is also a Raspberry Pi Camera Module that would suit us perfectly, but it is on backorder in every shop imaginable and estimated time of delivery is around 10 weeks, which is not an option.

Recently got the servos ordered though, so now a draft for a pan-tilt mount (So that the camera is always looking straight down) is being done in CAD.

- Construction (Jens and Anton)
Since Krister (one of the administrators of the master program in engineering physics) is very involved and keen that the students have access to relevant technology and want us to be cutting edge, he has through different channels acquired a few 3D-printers that we are free to use in this project. 

3D-printing one of the motor mounts.

This has been a tremendous help for the construction. Since we are used to running simulations of things, there was no reason why this would be an exception. All the simulations made are done in COMSOL multiphysics in order to try strain during rotation and flexing.
Example of a simulation with rotational stress in order to determine weak points.

So, we started printing. This is slow business, so we spent the better part of two weeks printing the prototype. Anton serviced the 3D-printers and Jens made most of the CAD sketches for the upcoming parts. 
One of the arms between motor mount and centerpiece.

Two complete arms including motors.

Centerpiece (this took about 7½ hours to print!)

Landing gears.

So, the final prototype now looks like this:

ArchCopter v1.0

We have a slight problem in order to get liftoff however. Full of optimism, we ordered 6 ESC:s (motor controllers, Turnigy AE-30A btw), but according to various forums we were strongly recommended to flash them in order to improve stability and battery time. This did not look easy at first look, and seemed to require a lot of extra equipment, until we stumbled across OlliW's guide, where all you need is an Arduino (which everyone has lying around, right?) Strongly recommend it:

BUT! Make sure you have the right firmware selected. Something we did not double check and hence we fried one of the ESC:s. So, we are now waiting for delivery of another (And yes, we learned from our mistakes and order two so we now have one spare)

We have also built a box where all the electronics (APM2.5 used for navigation, Orange RX for radio control and the corresponding telemetry module that matches Albins) sit snugly that will be mounted within the temple-like body of the copter (for protection).
Electronics box
We have, in spite of our troubles with the ESC:s been able to run a simple motor test:

Motor test 1.


I've tried covering everything in an appropriate amount of detail, but if you feel that there is anything missing, feel free to post here or email at ArchCopter@gmail.com

Introduction

Hi everyone!

This blog is started today, 2013-07-04 (a little late admittedly), to document our project; the ArchCopter.

So; who are we, what is the ArchCopter?

First things first:

I, who am writing this, is called Jens Walker. I'm the project supervisor for the ArchCopter project. I'm currently studying towards a masters degree in engineering physics and a bachelors degree in computer science, in parallel, at Umeå University. This reflects farely well my major interests in life; mechanics and electronics. I've completed 3 out of my 5 years so far. But enough about that.

So, what is ArchCopter you ask?

Short story:
An autonomous flying platform (i.e. a Hexacopter) for collecting data relevant to archeologists. (ARCHeologists, hexaCOPTER, get it? heh.)

Long story:
It all started this spring, when I was talking to one of the Vice Director of Master´s Programme in Engineering Physics and biggest sources of inspiration in the department of Physics, Krister Wiklund. Apparently a colleague of his, Klas Markström who works at the department of Mathematics and Mathematical statistics had gotten in contact with an archeologist, Phil Buckland, who had gotten interested in using a more high-tech approach for their line of work. Klas, who had gotten wind of  a quadrocopter that me and a few friends were building in our spare time, gave this as a possible platform for photography and perhaps other interesting sets of data aswell. Said and done, Klas talked to Krister, who talked to me, and the project was born.
As the spring progressed, we agreed to organize it as a project that could be included into my masters degree. However we both quickly reached the conclusion that this project would require more than my sole efforts if it was to be realized within a reasonable timeframe. We split the project into six different parts and I went on a recruiting spree (Think: Ocean's Eleven) and before long the team of master's students was assembled:

Jens Walker, Masters programme in engineering physics year 3 - Project supervision and construction
Anton Bahrd, Masters programme in engineering physics year 2 - Construction and camera system
Emma Zäll, Masters programme in engineering physics year 3 - GPS and proximity detection
Erik Löfgren, Masters programme in engineering physics year 3 - Magnetometers
Alexander Olsson, Masters programme in engineering physics year 2 - 3D reconstruction of topology
Albin Hübsch, Masters programme in interaction design year 2 - Interface

And so, as the spring term ended we started working on the project and here you can follow our progress!