Thursday, 13 January 2011

Water Tank Project

I've recently been doing a project at unis to design a control system for a water tank.
The object is to create a sample of a given volume of water at a given temperature.
Using the water from a hot and a cold tank.
The current concept of operation is rather crude.
While the volume of the sample is below a certain weight the program loops.
On each loop it sense the temperature of the sample  and either adds hot or cold to bring the result up or down towards the target.  The valves are held open for different times as they seem to have a different flow rate in each of them.

The volume control is working quite well as is the temperature.
Unfortunately there is quite a lot of sensor noise and this is affecting the accuracy.
Also I've been using Flowcode to program the Pic which is controlling the project and the code is so bloated i have not been able to implement much in the way of sensor handling or PID control to improve matters.

The project is now over but i'm going to keep tinkering with it too see how much it can be improved.
In order to do this I need to gather more data on the performance of the sensors and performance of the current programme.

I think if I sample the data lines going to the LCD and convert it to serial using a parallel to serial chip I can then send that 4 bit byte to my laptop over USB.
I then decode the information to give me the temperature and weight of the sample.
This would allow me to plot the temperature and weight of the sample on each iteration of the loop.
If I change the code a little bit I could add a loop counter and display tanks temperatures as well.

Improvements that can be made.
1. Converting the program to use the  int data type instead of the current float.  This would save space and speed the program execution up.
2. Take repeated samples of each sensor and average them.  This would give more reliable sensor performance.  Currently the value will fluctuate a small amount very rapidly.
3. Implementing a control system the samples the hot and cold tanks and uses these values to decide the correct ratio of hot and cold to add.
4. Variable delay length on valve opening and closing?  It would make the process much quicker if the valves could be held open much longer initially and the smaller amounts added as the beaker is filled to its target volume.
5. Write the C code directly instead of flowcode.  This will make the code much smaller as I will be able to avoid all the duplication and unused functions that flowcode causes.

Friday, 8 October 2010

Introduction

My Name is Jonathan Gerald Pelham
I hold a Beng in Aerospace engineering from Sheffield University I recently started a part time Msc in Robotics at the University of Western England.

It is well said that a measure of how well someone has understood something is how well they can explain it to others.

During the 2 years of my Msc I will be posting updates here on how I'm doing and explanations of particular interesting or difficult areas.  Both for the interest of any readers and to ensure that the subject is firmly grasped in my own mind.

I will also be using the methods I learn in a design project.
I will be blogging the research, design and building of a robotic Bee.

I was inspired to do this project though the interaction of two things that are dear to my heart.
My Mother and Aerodynamics.

My mum has a passion for bees.
She keeps several hives and I have learn an appreciation for these amazing insects from her.

Aerodynamics has gone through many stages in this world and one of the more fascianting areas is the unsteady flow dynamics such as those used by the bee.
Famously it was once not understod how these little miracles could fly.
Our understanding has moved on since then but it is still a very complex subject and worthy of further exploration.
While I don't expect this project to create a 1:1 scale working robot bee I will hopefully create a working scale model that can flap and navigate like a bee.
Flight may be possible but probably expensive.