University Projects



Duration - 7 months

This project was for my undergraduate dissertiation in year 3. The goal was to capture 3D position information of a moving target, while pointing a laser or camera at it. This involved extensive research, design, building, programming, tuning, and testing. The long term goal is for a derivative of this project to study dragonflies in flight, as they move too fast for a person to keep them in frame.

Initially, some already existing systems with similar goals were researched, such as here. From my research, the overall arrangement and mode of operation was decided. A stereo camera pair would be used for 3D position measurements of the target, and a galvanometer mirror pair would be used to point a laser or camera. I ended up using a laser almost exclusively because it was easier to evaluate system performance at the end. Conveniently, a pair of cameras and a laser were already availble, as my supervisor had them already. The main challenge with the hardware side of the project was the control of the galvos. Firstly, a galvo kit was purchased from ebay, costing around £50. This contained a power supply, galvo drivers, and the galvos themselves. To control them, the galvo drivers required a bipolar analogue signal. This was done using an Arduino Due and its analogue outputs, with a set of op-amps. The completed circuitry and op amp schematic are shown below. This circuitry maps the analogue output from the arduino to the required range for driving the galvos. The Arduino is to be instructed where to point the galvos based on data from the main control computer, simply using a USB connection.

ip


ip
Once the circuitry was confirmed to work, the overall structure was designed and built. The CAD is shown here:

ip
The main structure is made of 40x40 aluminium extrusion with a plywood sheet to hold the components. The actual built device:

ip

The hardest and most time consuming part of this project was the software. The main software was written in Python, with the software on the Arduino in C. To make the cameras work in Python, the library Harvesters was used. The libary OpenCV was also used extensively, mainly for camera calibration and identifying the target in each image. The galvos were calibrated by aiming the laser at a grid of points, and then triangulating the 3D position of the laser dot on the wall. From this, a look up table between required angle and galvo input could be generated. Using this information, the laser could then be aimed at the target in real time.

Here is the device tracking a quadcopter (with a big red dot attached because at the time I wasn't aware of how to track more generic objects):



Overall the project was very successful, earning exceptional marks. Note this brief description doesn't give much detail, and simply doesn't put across the amount time and effort that went into this.

-05/10/19

Duration - 3 months

This project was completed in semester 2, year 2, with a group of 5. My role was in avionics. This involved design, making, and programming a semi autonomous flight computer. The rest of the team designed and built the wing.

UAV
For the flight computer, we were given:


With the given items, the avionics system had to:

The first step was to design the circuitry required, followed by a simple prototype:

UAV
After multiple iterations, the design was finalised, and the wiring could be layed out and fixed to the avionics tray. A sizeable portion of time was spent optimising the various systems to lower mass. Jumper cables would added later to connect the various components.

UAV
The final circuit diagram is as follows:

UAV
The software was written in parallel with hardware development. Given the use of an Arduino Uno, memory was severely limited. The program had to do 3 things:

  1. Read sensor data, and log it to an SD card
  2. Monitor if the autopilot switch on the transmitter is engaged
  3. Autonomously control the ailerons and elevator if the switch is engaged

To achieve these goals, many problems had to be solved:

  1. We were specifically told at the start of the project it was not possible to run all the sensors, and we'd have to use a limited subset of them. With careful library choice, we discovered that it was definitely possible. Unfortunately, the GPS logging was not very successful, due to the carbon fibre wing spar, and aluminium tail spar blocking the signal. The rest of the data logging was successful however.
  2. Monitoring the receiver channel was quite straight forward, by simply connecting the channel to a PWM pin on the Arduino. Many failsafes were built into this section, reverting to manual mode if the wire became disconnected, or if the signal is weak.
  3. To control the attitude of the aircraft, accurate measurements of pitch and roll were required. To do this, data from the accelerometer and gyro were combined with a complementary filter. Pitch and roll data was then fed into 2 PID controllers, one for elevator angle and one for aileron angle. Tuning the PID loops correctly was very difficult given we only had one test flight. Luckily, I have some experience with PIDs from a previous project, and using my engineering intuition, guessed approximate tuning values.

In the test flight, the aircraft flew very well, and the autopilot was surprisingly effective. After the test flight, the pilot was clearly very happy with how well the autopilot performed. After receiving the marked work back, the autopilot was the best part of our work, and as far as I am aware, the best they have ever had for that project.

UAV
Overall, everything worked, and the project was a complete success.

-02/08/18

Duration - 2 weeks

This project was in semester 1, year 2. Here I led a team of 5 in designing, building, programming, and testing a robot to drive around a preplanned course, dropping M&Ms in specific locations. I was the team leader, as well as the programmer. While I oversaw the design process, most of it was done by my team members. The almost fully assembled robot can be seen here:

odometry
Here I made the robot drive along my floor and drop the M&Ms:

odometry
And after much testing and refinement, here is a successful drop on the course:

odometry
On the assessment day, the robot followed the course perfectly, however the M&M dispenser was incorrectly loaded, and we unfortunately didn't get many good drops. Overall though, I would still deem the project a success.

-01/08/18