Monday, 16 March 2015

Bench Inspection

On Friday we had our bench inspection. Our chance to display our project work and present our research, thought process and finished result.


We were assessed by two people, a laboratory demonstrator and our supervisor. With the demonstrator we answered his questions at ease but received no feedback for any of our work so we were clueless to how well we had done.
Our supervisor gave us more constructive criticism, most notably our poster was too text heavy and seemed to be in a fairly illogical order, though visually pleasing. Aside from this he was happy with our presentation and the answer we gave to his challenging questions.


We felt that it was a successful day and are happy with the final result, though this could be vastly improved upon if we had a bigger time scale. We just need to work on our project report now which is due in a couple of weeks.


Our poster:


A link to our poster is

Tuesday, 10 March 2015

Last Laboratory Session

On Friday we had our last laboratory session. A lot of this time was spent neatening the circuit by shortening wires, making sure everything was on veroboard and soldered correctly ready to be placed inside the submarine body.



Testing and altering the sonar took most of the laboratory session we had to calculate the speed of sound underwater compared to air, this was approximately ¼ of the speed and so we have to alter the Arduino UNO code. However with these calculations and changing other variables within the code we still struggled to get the sonar working underwater. It is too late to get another component but the team agreed we should have got a sonar device specifically for underwater use rather than choosing a cheaper component.

The rest of the session was spent adding the circuit into the UAV and sealing it in and waterproofing it. Due to the sonar problems it has been left out of the circuit and we have put the backup code on the Arduino.



Finished result:



Unfortunately we have had problems with buoyancy and hoping to sort them out before the bench inspection.

Wednesday, 4 March 2015

It's Alive!


The submarine is now taking shape and looking more and more like a finished product. Since the last laboratory session the motors have been placed in film canisters with Vaseline and sealed in. Two of these have then been attached to the back of what is to be the submarine, what is currently the top of a plastic bottle. After being sealed using epoxy and PVA glue (as an extra precautionary layer) it was then wrapped in red electrical tape and drawn on for aesthetic purposes.


In the laboratory session an additional power supply and switch were added to the circuit, the diagram of which is in the previous blog post. This was then tested, with it working we are now neatening and finishing the circuit for it to be implemented in the submarine.
We also waterproofed and tested the ultrasound component in the water, though this didn't return good results and so we need to come up with a solution for the next laboratory session

We also successfully sealed and filled the tank we are testing the submarine in. This was done by filled all the holes with cork, both ends then sealed with white tac and then on the outside tape was added for added security.






Below is a video of the motors being tested in the water.



Tasks for next week:

Finish submarine casing
Neaten and finalise circuit
Test AUV as a final product in tank
Evaluate progress and final result


Wednesday, 25 February 2015

AUV Arduino Code




Due to not having a variety of sensors and only one ultrasound, the AUV is coded so when it encounters a wall it will reverse and then turn right. Below is the code which was developed for the Arduino UNO. Resources used to develop code has been listed in the references at the bottom of the post.

--------------------------------------------------------------------------------------


#define LogicR1 2 // Defining the h-bridge pins to digital outputs on the arduino
#define LogicR2 3
#define LogicL1 4
#define LogicL2 5
#define trigger 13 // defining the sensor's trigger and echo pin
#define echo 12
#define LogicX1 7
#define LogicX2 8

void setup()
{
Serial.begin(9600); //9600 bits per seconds.A default setting for arduino
pinMode(echo,INPUT); // configuring the echo pin to act as an input 
pinMode(LogicR1,OUTPUT); // configuring all the other defined pins to act as outputs.
pinMode(LogicR2,OUTPUT);
pinMode(LogicL1,OUTPUT);
pinMode(LogicL2,OUTPUT);
pinMode(trigger,OUTPUT);
pinMode(LogicX1,OUTPUT);
pinMode(LogicX2,OUTPUT);
}


void loop()
{
 
long Time;
long distance; // defining the terms distance and time as long integer
  digitalWrite(trigger, LOW);  //sets the trigger pin off
  delayMicroseconds(4); // delays for 4 microseconds
 
  digitalWrite(trigger, HIGH); // http://arduino.cc/en/Reference/DelayMicroseconds
  delayMicroseconds(9);
 
  digitalWrite(trigger, LOW); // This process configures the trigger pin to work as an output. Reference websit above.
 
  Time = pulseIn(echo, HIGH); //pulseIn reads the pulse when the echo pin is high and sets the value as Time. 
 
  distance = (Time/2) / 29.1; // 29.1 is the speed of sound in a kilometer
  if (distance < 6) { 
    STOP();
    Back(3000); // the AUV goes back for 3 seconds before turning right for seconds.
    Turn_Right(2000);
    Go_Forward();
   
}
  else {
    Go_Forward();
  }
  if (distance >= 220 || distance <= 0){ // if the distance is far, the AUV is set to turn left and then go straight.
    Serial.println("The AUV can't detect anything");
   
   Turn_Left(2000);
   Go_Forward();
  
  }
  else {
    Serial.print(distance);
    Serial.println(" cm"); // prints the distance to the object in centimeters.
  }
  delay(400); // delays for 4 milliseconds



}




void Go_Forward()
{
Serial.println("The AUV is going forward!");
digitalWrite(LogicR1,LOW);  // H-bridge configuration for the AUV to go forward
digitalWrite(LogicR2,HIGH);
digitalWrite(LogicL1,LOW);
digitalWrite(LogicL2,HIGH);

}


void STOP() 
{
Serial.println ("STOPPPPP!!!"); // H-bridge configuration for the AUV to go stop

digitalWrite(LogicR1,LOW);
digitalWrite(LogicR2,LOW);
digitalWrite(LogicL1,LOW);
digitalWrite(LogicL2,LOW);

}


void Turn_Right(int Enter_Time)
{
Serial.println ("The AUV turns right"); // H-bridge configuration for the AUV to go right

digitalWrite(LogicR1,LOW);
digitalWrite(LogicR2,HIGH);
digitalWrite(LogicL1,HIGH);
digitalWrite(LogicL2,LOW);

delay(Enter_Time);

digitalWrite(LogicR2,LOW);
digitalWrite(LogicL1,LOW);

}


void Turn_Left(int Enter_Time)
{
Serial.println ("The AUV turns left");
digitalWrite(LogicR1,HIGH); // h-bridge pin configuration for turning left
digitalWrite(LogicR2,LOW);
digitalWrite(LogicL1,LOW);
digitalWrite(LogicL2,HIGH);

delay(Enter_Time); // once the time is entered, the AUV turns left for that many seconds.

digitalWrite(LogicR1,LOW); // Stops the motor after turning left.
digitalWrite(LogicL2,LOW);

}



void Back(int Enter_Time)
{
Serial.println ("The AUV is going back");  // H-bridge configuration for the AUV to go backwards
digitalWrite(LogicR1,HIGH);
digitalWrite(LogicR2,LOW);
digitalWrite(LogicL1,HIGH);
digitalWrite(LogicL2,LOW);

delay(Enter_Time);

digitalWrite(LogicR1,LOW);
digitalWrite(LogicL1,LOW);
}

----------------------------------------------------------------------------------------------

In our recent laboratory session we spent time troubleshooting the circuit due to it not working. We have now realised the 5V output of the Arduino was struggling to power the ultrasound, h-bridge and motors. Therefore we will need to include another battery supply in circuit, a switch will also be added. Below are the new circuit diagrams:






In other news the motors have now been waterproofed, work on the shell/case has begun and we have retrieved the tank to test out motor.





A two page sustainability report has also been created talking about the regulatory information that we would need to follow, the implications of the manufacturing the AUV at a large scale, and the ethical implications of the market and follow-on products.
Additionally we have made a start on the final report, this is as we have decided that if we start now we can continuously add to it and improve it, instead of having to do all the work at the end. So far we have done an abstract and discussed our original research and hope to expand on it over the coming weeks.


Tasks for next meeting:

Collect and test Perspex sheet
Continue work on shell/case
Complete circuit testing
Modify water tank for testing
Start planning bench inspection poster design and content


References:
[1] Arduino and HC-SR04 Example, http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/
[2] Arduino Libraries, http://arduino.cc/en/reference/libraries
[3]Arduino Programming Notebook, http://playground.arduino.cc/uploads/Main/arduino_notebook_v1-1.pdf
[4]Measuring a watertank level, http://www.makechronicles.com/2012/06/09/arduino-project-11-2d3d-pictures-measuring-a-water-tank-level-v2-hc-sr04-ultrasonic-rangefinderarduino-uno1-0/
[5]Obstacle Avoidance System for Unmanned Underwater Vehicle Using Fin System, http://www.ijisme.org/attachments/File/v1i9/I0407081913.pdf

Tuesday, 17 February 2015

Progress




We have successfully completed the complete circuit diagrams for the UAV:



Here you can see the three motors connected to the two h-bridges which are in turn connected to the Arduino UNO, this also has the sonar attachment and has a voltage supplied to it.

The start of the laboratory session began by using a track cutter and testing the h-bridge soldered last week. We soon discovered it wasn't working and presumed we blew the h-bridge by attempting to test it without the tracks cut last week. Therefore we needed to solder a new h-bridge, this was quickly done and tested, working correctly with the motors on patchboard. Once we were sure of it working a second was produced.

Code also got developed, a blog post containing the current code will be posted shortly. The sonar/ultrasound code was tested using a green and red LED[1]:





Holes were placed into film canisters to house the motor, with one hole for the wires and one for the shaft of the motor[2]. Our plan is to recreate waterproofing recommended on several hobby websites, an example video is below. 

https://www.youtube.com/watch?v=wIcCz5m9LwQ

After tweaking the code and switching the h-bridges and motors from the patchboard to a DC power supply we tested the circuit all together:




Tasks for next meeting:

Complete testing of the circuit
Start waterproofing motors
Implement solution to propeller/shaft connections
Use an external supply (9v) batteries
Think about buoyancy.


References:
[1]Arduino and HC-SR04 Example, http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/, Feb 2014
[2]MIT Sea Pearch Construction Manual, http://seaperch.mit.edu/docs/seaperch-build-october2011.pdf, Feb 2014

Monday, 9 February 2015

It's business time!

We've now had our first lab session!

We began by checking that we had received all of the correct components that we had ordered before Christmas. At first glance it seemed like we had everything that we asked for, however we soon realised that we had ordered the wrong sized thread for the propellers so the motors couldn't be attached and we had also not received the cell holder for the batteries which we had requested. Another problem quickly arose when we realised the Arduino Uno we had ordered did not come with the USB A/B cable needed to connect it to a computer. Thankfully this was soon remedied thanks to the laboratory technicians who kindly found a cable we could borrow.
Once we finished checking the components we began implementing our designs and then subsequently testing them. Starting with the h-bridges (10 pin L293E) on a logic patchboard, we simulated how the motors would work by receiving a high and low voltage. The motors were then attached and operated as intended. Correctly spinning the motors in a certain direction depending on the input to the h-bridge.



By midday we had tested all of our components aside from the Arduino, we installed the Arduino environment on my surface and uploaded an example program to confirm that it operated correctly. This also allowed us to begin getting to grips with the coding language and environment we would use to implement the logic control and the sonar sensor. The example code can be accessed from inside the Arduino environment website and was used to fade in and out a single LED.



We wanted to confirm that the Arduino would work with the previously mentioned h-bridge so we used a sample code from this website to see how the code effected the motors movement and how/if our components worked together[1].
After lunch we separated our tasks: Drawing the circuit diagram and soldering one of the H-bridges, coding the Sonar component for the Arduino, and began soldering the other H-bridge's 10 pin mounts to some veroboard and the connecting wires. I then tested the soldered component on the logic patchboard to ensure it worked as intended. 


The day ended with the soldering of all 10 pins and its wired connections for one H-bridge finished whilst the other requires the wired connections to be added next week. Ideas on propeller solutions and general water proofing were mooted and some of the programming was done. The circuit diagram will be ready for the next lab session.


Our plans for next week:

1.  Likhitha and Steven will test the sonar and begin the main body of coding.
        2.  Both veroboards will be completed and tested with motors.
3.   Motors will be made waterproof.
4.   Buoyancy and infrastructure of submarine will begin. 


References: 
 [1] Arduino two way motor control, http://www.instructables.com/id/Simple-2-way-motor-control-for-the-arduino/#step3, Feb 2014

Thursday, 5 February 2015

An introduction

We are a group of three year two Electrical Engineering and Electronics (EEE) students, doing a project with the aim of designing and implementing an autonomous underwater vehicle (AUV).
To reach these aims we have six weeks to produce a result, on the final week we’ll have a bench inspection along with a poster to display its design information and thought process. This means we have 5 Friday laboratory sessions to create the AUV.

The team is composed of:


Steven Bridge - The project manager and designer, this means he will be overseeing and managing the team effectively to succeed in our goal, as a designer he will be contributing to the circuit design.

Likhitha Ala – Developer and designer, being the developer means Likhitha will do majority of the coding for the AUV, whilst also assisting in circuit design and implementation.

Dominic Stevenson – Technical Writer, responsible for the writing up the report, recording progress through the blog and designing the poster. During the lab sessions Dom will assist the others in achieving their goals.

Research & Components:


So far we have done a couple of research sessions and have decided on a range of components, to control the AUV and make it autonomous we will be using an Arduino. This is because it’s relatively cheap and powerful. It enables us and others to add different sensors and their outputs, which then can be used to control the motor system.
We will be using DC motors to propel the AUV through the water, these will then need to be waterproofed as much as possible even though many websites insinuate they do have an okay lifespan when submerged. To enable the motors to spin in both directions we will be using an h-bridge.
For more effective propulsion we will be adding model boat propellers to the shafts of the motors.
Casing we will be using just a simple plastic bottle, opening it up to put the electronics in then using sealant to then make sure no water can then get in.
Our initial sensor will be an ultrasound component, another group is composing the sensor system for an AUC and so we look to potentially combining both projects.

So what next?

We have a laboratory session on 6th of February, here we will check if the components we have ordered are correct and that they are working as they should. Once we have established this we will progress to developing code for the Arduino and start with the circuit design.


A Gantt chart for our laboratory sessions has been produced below


We'll continue blogging throughout the process to show you our development and progress.