Hallo to everyone who is interested in electrical and electronic engineering. My name is Martin Schuster and I’m currently third year Electronic Systems Engineering student at the University of Manchester. In the following paragraphs I want to tell you a bit about my individual project in the third year, every student has to do. It’s a weekly updated diary with all the work, thoughts and ideas that were involved in designing my project.

I hope that it gives you an interesting insider view on the normal life of an EEE student in Manchester.

 

The aim of the project is to design and build a symmetrical hexapod robot with autonomous navigation. That includes the electronic, software and mechanical elements, as the whole project is a completely new design. Therefore, the School’s mechanical workshop assists with the design of the mechanical aspects, so that the project student can focus more on the electronic and software parts. The hexapod robot is based on 6 legs with commercial servo motors, which are controlled by a small embedded system. Adding a battery pack and a set of distance sensors makes it possible for the robot to navigate through a room, avoiding obstacles like people and furniture.

The motivation and use of the project is to show different development stages and the final product to prospective students on occasions like visit days of the School of EEE.

It’s time to forget the nice summer holiday and start thinking about the real important things in life, Engineering.
At the beginning of third year everyone starts with the individual third year project and that means for me, I have to build a 6 - legged hexapod robot in 2 semesters.
At the beginning there was a white piece of paper and ideas how to realize this project. So we (me and my supervisor) started off gathering concepts and designs to create the project specifications. Once that was done, we knew what we wanted to do and I could start doing some work…

 

Inspired by some example robots in the internet Paul, a very friendly guy in the mechanical workshop, created a first design for the body and legs of the hexapod robot. That way I was able to assemble main body and the first three legs in week one. The servos were also already giving at the beginning of the project, so all I had to do is to build a little test board and some software to control the servos.

It’s really all up to you now. There is no team work like in the second year of the course and the supervisor supports you, but you have to be the driving force to make sure that you can deliver the product at the end of the year. It’s a lot of responsibility, but it also gives you a lot of freedom to realise the projects in your own way, integrating your own ideas and creating something by yourself. And it’s something that nobody has done before in the way you’ll do it. So I’m looking forward to a challenging but interesting semester…

 

In the third week I finished to build the test board for the servos. That made it possible for me to control the angle of the servos with a potentiometer connected to the microcontroller. Moving the potentiometer changes the voltage at the input pin of the micro controller, which can be read in to change the PWM signal, which is send to the servos. That way the control with the potentiometers takes place.

So I was proud of myself, because after 3 weeks, I already got something moving and parts of the mechanical design are already fabricated. Also the other three legs were quickly assembled. Now it was possible for me to control 3 legs in parallel with 3 potentiometers, one for each element of the leg.

Beside all the interesting progress, it’s also important to keep an eye on the rules and regulations. Part of the early stage of a project is also to do a risk assessment, which assesses all the possible risks that might arise during the project. For me it’s mainly work in the mechanical workshop and programming in the lab. Battery handling might become a bit of a bigger risk later on…

 

Four weeks are over now and I feel like being in the middle of the project already. Almost every day I can make progress and I can see my little spider robot growing and learning.

To keep track of my progress and to keep an overview of the whole project I created a project plan that includes all the steps necessary to finish this project and also a time plan of when to finish which task.

I extended my test with now having potentiometers so that I can use the other 3 to control the other set of 3 legs. This way I can control all 6 legs and 18 servos with only 6 potentiometers, as 3 legs are always coupled together. But the whole practical work doesn’t always run that easily without any problems. This week I had to fight with a port on the microcontroller that didn’t want to output the right PWM signal to control th servo.

I checked my wiring and measured the signals coming out and going in the microcontroller, but I can’t find the root of the problem. Sometimes project work is simply annoying. Time for a break on that matter….
In parallel to this I started looking at different sensors, because in the end, the hexapod robot is supposed to move around by itself, without hitting any obstacles, which means that it needs some sort of “eyes” to see, what the world around it looks like. Let’s see what we can find…

 

The first half of the first semester is almost over now and things are becoming a bit more serious, because in week 8 we have our first deliverable, which is a 10 page progress report to show our understanding and progress with the project.
I know it’s still early, but to be well prepared I already created a first draft of the potential content page for the progress report. That way I can make up my mind about things I want to include and discuss them with my supervisor.

This week I also managed to improve the movement of the servos attached to the hexapod legs. At first the steps to control the legs were really big, which made the whole movement look very jerky. With a more refined generation of the PWM signal it’s now possible to move the legs very nice and smoothly. All this is done and improved in software to program the microcontroller.  

The first test sensor has arrived and I started using it using the serial interface on the microcontroller. It’s an ultrasonic distance sensor, which makes it possible to measure the distance in cm, so that the robot knows, if something is in his way and it can move in a different direction.
Oh yes, and I have a confession to make. While I was adjusting the mechanical parts on the servos, I broke one of the servos, by applying to much pressure on the pivot of the servo. These things happen I guess. At least that gave us the opportunity to open up the case of the servo and look at the interior. That way we could find out about the angle limitation of the servo. And the element that actually limits the angle is the potentiometer.

So every mistake and broken component can still be used to find out something relevant for the project. That’s week 5 done.

After doing first tests of movements with the hexapod, using the potentiometer board, I discovered a weakness in the leg design. The outer parts of the legs were too long and not stable enough. Although at the moment it’s still made out of synthetic material, the stability isn’t great and the servos have trouble to produce enough torque to move the robot.

That’s why I decided to improve the design of the hexapod robot and make the legs shorter and more solid. Paul gave me the recommendation to work with a 3D modelling tool called “Google Sketch Up”. I’ve never worked with a CAD program before, but with this one I actually managed to create a new model of the hexapod robot within two days. It was hard work, but once I started I couldn’t stop anymore. It was really fun I must say.

Now I just need to wait until Paul can fabricate the new parts with the milling machine in the mechanical workshop…

 

Very quickly and professionally as usual, the Paul in the mechanical workshop managed to fabricate the new designed legs for me so that I could use them to replace the old legs on the hexapod robot.

I was really looking forward to test the new leg design, hoping that it would give me the improved behaviour I was looking for. You can see it in the videos with the leg design. The whole robot is more stable and because of the shorter legs the servos can handle the weight and movement much better now.

Having this better mechanical design, I decided to get away from the manual control of the hexapod robot via the potentiometers to a sequence of movement. After calibration of the servo positions and the possible angles, I created simple sequences of movement in software. It can now “stand up”, “sit down” and do some turning movement. Have a look on the videos. It’s very simple but it feels so good to actually see a real sequence of movement.
And so my spider baby is growing and learning...

 

We’re now more than half way through the semester and very close to the first deadline. That’s why it’s time to focus on the progress report. That means to finalise the content page, finish the project plan, risk assessment and the project outline.

When I found the time or just needed a break from report relevant stuff I looked at batteries I could use for my robot. As they are heavy and their capacity determines the lifetime of the hexapod robot the batteries are a very crucial part in the project. That means looking at weight, price, capacity, maximum current output, discharge graphs, voltages, physical size etc.

You can’t imagine how many different options you have and it takes a while to find out the best solution for your project. It’s always a compromise of all the parameters listed before. 

 

Week eight was horror. As I was away for the weekend I only had the time during the week to finish the progress report. Even though it was only 10 pages, it takes a lot of time to put all the information in the report, suitable pictures and extra material in the appendix.

The most time takes the writing and then the revision of the written text. It is third year now and we’re expected to write reports on a professional level. That includes a professional style of referencing, literature and journal research, a good structure and a professional use of engineering language. Trust me; it’s different from the normal essay you would write in school.

After a couple of night shifts going on until 3 or 4 in the morning I actually managed to finish the progress report and submit it online via a portal called “blackboard” on the Thursday night, as the deadline was Friday 12pm. I prefer to hand it in a bit before time and not wait until last minute. Some people are experts in doing it on the last minute and I’ve heard stories, where people actually managed to hand it there report at 11.59am on the day of the deadline. Well, if you need the adrenaline kick…

 

I’m so happy that I handed in that report last week. Now it’s finally time again to get some practical work done on the project. Feedback for the progress report will be giving in 2 weeks’ time at the end of week 10.
I mentioned before that I connected and programmed the ultrasonic sensor, but with the serial interface it didn’t really work so that I focussed on getting it working using a different interface call I2C. This will be used for the final version, because it’s more flexible and can handle multiple sensors on one communication bus.

To do this it’s sometimes better to look around in the internet and see if there is anyone else who has done the basic structure of the software already. As the sensor is a standard component there is example code accessible, which I could simply use and modify, so that it works for my microcontroller and my circuit layout. I’ve enough other things to design and develop so that I don’t always need to start developing parts from scratch. So reuse is a very important part of engineering. In cases like this it’s simple and for free. For more advanced project it might cost you money, but it might still be cheaper than developing it yourself.

I also ordered the batteries and the parts for the circuitry. Also ordered is a charger, force sensitive resistors for the legs and smaller components for the circuits.

That means more things to play with. :) 

 

The parts still haven’t arrived after over a week now. It started snowing in Manchester so that the companies have long delays for deliveries. That’s also a very annoying part of project work in engineering. You have to have alternative plans in case something unforeseen happens. As I couldn’t really use the time to build the new circuits for the batteries and the leg controller, I decided to start with the PCB board design of the leg controller. At the moment all the circuits are made on breadboards or Vero-boards to keep the flexibility and make quick changes possible. This is very good for testing and prototyping, but in the end, it’s important to get a professional PCB design for the electronic circuits to save space, weight and to make the circuitry more reliable.

One thing I’ve learned that the weak link of an electronic system is always the connectors. It’s usually never the controller or an IC that causes problems, but it is things like the 40 pin cable connector, which isn’t crimped onto the cable properly or a loose cable in the Molex connector. So when you’re still testing it’s always worth double checking, if something goes wrong and to avoid that in the final design, make sure that you use a professional design with high quality connectors.

That’s the status for the moment. Only one more week before Christmas and there is still so much to get done. If only the deliveries of the parts would arrive…

As my parts still haven’t arrived I could mainly focus on the production of the PCB boards. All the design of the circuit schematics and the PCB layout is done with a software tool called Altium Designer. That’s a very quick and intuitive way to implement circuits and place them onto real circuit boards.

So for my project I needed 3 types of boards. All the legs need one separate board to control the movement of the 3 servos and also to read in a value from a force sensor that will be implemented at the bottom of each leg. Then there is a main controller board that receives data from all ultrasound sensors which detect obstacles and then sends commands out to the leg controller to coordinate the movement of the hexapod. To connect all this together I also need a connector board. 

It is actually very interesting to do this design work, because you can see the actual board already on the computer screen with some 3d animations even. But there are also a lot of things that can go wrong when you’re doing it the first time. There are so many parameters like whole sizes, dimension of all the parameters, different footprints for each component, the width of the tracks on the board and many more.

Thanks to Derrick who is working in the PCB lab I actually got the boards done before Christmas and I must say that I’m a little bit proud to hold my personally designed PCB boards in my hand now. Now we only need to hope that they are actually working.

We’ll see about that after the Christmas breaks and the January exams.

 

 

    

Christmas time is over and finally these annoying exams are out of the way so that I can actually go back to my little spider.

I finally also got all the components I needed to build the boards I designed and produced before Christmas. So now I actually had one of the main board and one leg controller board ready to run and spend this first week mainly with programming. I actually had to do some minor changes in the leg controller circuit to make it work, but that is normal. Even professional engineers don’t always get the design right the first time, especially if the design is a completely new development or prototype. So to avoid producing the complete board again, I simply cut out some track connections and made new one by soldering wires on it.

After a little programming battle with the two different microcontrollers (one for the leg controller, another type for the main controller) I actually managed to get them running. Trust me, you really have some days where you just don’t make any progress and bang your head on the table. But after reading the datasheet for the 10th time and a bit of research in the internet you eventually get there. Mostly it’s as simple as setting a register to the right value, but before you find out which one and what parameters it needs might sometimes take a while. But it’s this magic moment when it actually starts working and it does what you want, which makes it all worthwhile. So now the main controller can talk to the sensor over one communication interface called I2C and receive distance values. Another separate I2C bus is used to communicate to all the six leg controllers, so that now the main controller can send commands to the legs and also vice versa, the leg controller can send sensor data to the main controller.

Another distraction from the project work is a so called poster that we all have to design for our project. At first I was a bit sceptical about the idea of designing a poster, but in the end I actually enjoyed the work. It’s basically an A1 poster that you have to fill with a presentation of your project. That includes aims and motivations, technical content, current progress, but it also has a big design element in it. It has to look good and when people walk past it they should be attracted by it to read it. So that’s another thing for me to focus on. 

   

s I had to finish the poster by the end of the week and I also wanted to make progress with the practical work I split my time so that I worked on the project during the day at University and spent the evenings at home to work on the poster and work for other modules that obviously still run in parallel to all this.

In this week I had to do some of the more repetitive and hence a slightly annoying work to do. That included an hour with the crimping tool to produce the connector cables for the leg controllers and the sensors and the really time consuming activity was to produce the remaining 5 leg controller boards. I felt like a mini one man manufacturing machine, because you had to place all the components, solder them on and in the and also to the minor corrections. And all this had to be done FIVE times. But it was worth it and now I have all the electronics I need to actually control all the legs of the robot individually.

Meanwhile, Paul in the mechanical workshop started working on an alternative design we came up with to make the middle joint of the leg more stable. I actually made a video of how the parts are milled out with the milling machine. 

While making good practical progress during the day I had to focus on the poster design. I went with a first draft into the project meeting with my supervisor and discussed design ideas and different layout and contents for the poster. In the end it’s still entirely up to you to make most of it and use the space as efficient as possible, while keeping it organised and not too full to make it look attractive to the people looking at it. It is really a challenging job, because you need to put all the information in, but you have a very limited pace for text. Then it needs to follow some sort of logical order and you need to integrate suitable graphs and pictures to enhance the general appearance of the poster and make it look more attractive.

It really took me a while to get all things into the right place and to find the right words to summarise my project. But this process also made me aware of how far I currently am with my project and I learned how to focus on the crucial things.

Once the poster was submitted in the morning of the deadline day, I used the rest of the day to implement some new cool movements for the robot now that I can control each leg individually. Have a look at the videos below.
Now that the hexapod platform is complete, the actual fun can start now with all the motion planning and artificial intelligence.

As I can control all the legs individually now I started to implement a first sequence to make the hexapod walk. It sounds actually much easier than it is to implement a simple walk with 6 legs, because each leg needs to do a separate sequence of movements. The tricky part is actually to imagine the right movement in your head first and then enter the sequence in your program. Once it’s programmed in there, the processor does all the work for you and you don’t need to think anymore.

 

The next big step on the way to create this autonomous vehicle is to actually unleash it from the cable power supply and power it from batteries. That’s what I managed to do this week. The battery charger and the batteries had arrived already a while ago, but the problem was that the charger came without a power supply to power the charger.

But as engineers are hands on people, we created our own solutions. Danni, a technician in the mechanical workshop suggested to simply use a standard power supply from a normal desktop computer, as we have more than enough lying around. So it was only a matter of minutes to connect the right cable to the power supply with a connector that fits into the battery charger and so we had our 12V power supply that is capable of supplying high currents up to 5Amps. (In electronics that is a relatively big number of current) In normal circuits we usually talk about milliamps to drive signals.

 

So now I could finally charge the batteries, which I already integrated into the mechanical body of the robot. I must admit that I was a bit nervous, when I first flipped the switch to start up the hexapod with the batteries. Because what you don’t want to see is that you switch it on and nothing happens or it’s just not strong enough.

But the calculations beforehand for capacity and current provided by the batteries were correct so that it actually worked out first time and my little robot was on its own legs for the first time with no external power supply. What a magical moment! To give it a bit more stability I also tried to add some rubber socks onto the legs, which is good for tractions, but it makes it also harder to slide the legs along the floor, when it tries to stand up.

 

The mechanical body is already pretty good, but the weak spot that we could still see is the middle element of the leg construction. As the servo is only connected on one side on the pivot point it bends to the side, when it is standing on the legs with the full weights.

To improve that, Paul and I developed a new construction for the leg joints so that the middle element of the leg actually gets attached to the servos on both sides.

To do that, we had to create a virtual extension of the pivot coming out on the one side of the servo to have an aligned axis. The result can be seen on the photo below.

 

 

I also tested the new design with a new walking sequence that is more stable and more economic than the one I first developed in the week before.

You can see the difference between the sequence with the old and the new leg design and you can clearly see that it walks much more stable with the new legs. 

Another big advantage of the new construction is that we are now using servo horns to attach the legs to the servos. Servo horns are the round black wafers that have the pattern that exactly matches the pattern of the servo pivot. That maximises the traction between the two elements, but more importantly it give me the possibility to align all the legs to exactly the same positions, when they all get the same input signal. Before, I was simply pushing the plastic bits directly onto the servo pivots, which made it very difficult to align them all at exactly the same angle. The improved precision also contributes to a better overall movement of the robot.

In the sense of functionality the hexapod is now almost complete. It has a very good mechanical body, electronics for the leg control, a main controller, the ultra sound sensors are integrated and the hexapod actually runs from battery power. The only missing elements are the force sensors for the legs. The idea behind that is that each leg gets equipped with a very thin force sensor layer so that I can detect when the leg touches the ground and also determine how much force acts on that leg. That way the program could detect when the leg steps into a hole or it walks on uneven ground. The information from the force sensors can then be analysed and used to balance the robot or to get it out a situation where it might be stuck.   

The way it works is that the force sensor is in principle only a resistor that changes its resistance depending on the pressure you apply to it. To get a reading from it for the processor the force sensor is connected in a simple voltage divider circuit and then connected to the ADC of the microcontroller. That way when the force sensor changes its resistance, it changes the voltage of the voltage divider output going to the ADC input of the controller. That voltage change is then translated into a different digital reading and I can use that value in my program code.

    

The functionality of the hexapod is now at a satisfactory level, but engineering is more than just getting it working somehow, but it also needs to be well designed and organised to increase efficiency, minimise cost and improve the reliability.

As the cable connections looked very messy on the robot, due to the design of the connector board, I decided to redesign the connector board. The best way to do it is a hexagonal shape, because that way all the connectors can be close to the legs where the cables come from. This new design also gives me the opportunity to organise the batteries in the middle of the robot, which makes it easier to connect them and they are not in the way of the leg controllers anymore. Conventionally PCBs are designed in rectangular shapes, but the design software can really do any shape you want. You can see the result on the photo below. 

 

The new PCB for the connector board is now shaped hexagonally to fit perfectly into the hexapod design.
I also worked on the software that reads the data from the force sensors. The force sensors are connected to the leg controller boards so that the software has to be located on the leg controller. The microcontroller uses the analogue to digital conversion (ADC) peripheral to convert the voltage input from the force sensor into a digital value. When the applied pressure changes, the voltage changes and hence the reading from the ADC changes. this value provides information about how much weight is on each leg and whether it is touching the ground or not.

The new hexagonal connector PCB is fabricated and populated with the components, but to integrate it into the hexapod, the bottom layer of the mechanical design has to be redesigned to fit the batteries in the middle of the hexapod and to give space for the new PCB. The idea for this is to leave the basic shape the same, but reorganise the central part of the bottom layer. Holes are needed to mount the batteries in the middle. To keep symmetry the best solution is to have 6 holes, although only 4 batteries were used so far. But there is another issue with the power supply for the ultrasonic sensors.

So far the servos and the sensors were directly connected to the batteries without any voltage regulations. For the servos that is desired, because they can consume more than 1A each which adds up to 25A to 30A for the hexapod with 18 servos. But the ultrasound sensors are sensitive and need a constant 5V supply voltage. As the batteries drop in their voltage, the more they get discharged and the voltage supply to the sensors isn’t stable. And the significant current changes also introduce a lot of distortion to the voltage supply of the hexapod so that the sensors reset, while the hexapod is walking. To react to that an additional battery is added to the hexapod to increase the voltage from the batteries to get a higher torque from the servos. An additional 5V regulator is integrated onto the connector board to supply the main controller and the 6 ultrasound sensors with stable 5V.

The picture below shows the design file in AutoCAD for the new base of the hexapod body.

As usual the workshop is very quick and the new base for the hexapod was fabricated within a few days. You can see the result on the pictures below. The first one shows the new base from the bottom of the hexapod with the batteries connected together and the second picture shows the new arrangement of the batteries and the other circuitry from the top. When you compare the new design to the design before, you can clearly see that it is much more organised and the battery contacts are soldered together to provide a better conductance between them. Another improvement is also that now with 5 batteries the servos are provided with a higher voltage to generate a higher torque and the voltage supply to the ultrasound sensors and the main controller are now regulated to stable 5V.

  

Apart from the practical work it is now also time to come to an end and start testing and writing up the final report as it counts 70% of the whole project. The first thing we have to do is to write a executive summary, which summarises all the objectives we had for our project and how we achieved our objectives. This is only a short summary of one page is used for the project viva voce after Easter, where my supervisor and an external examiner listen to a brief presentation of my project and ask me questions about it. They use that as a base for when they mark the final report. The viva voce is their only possibility to check what I’ve actually achieved, because one could write a lot of things in the report, which might not really be realised.

So in a way it is a bit sad, because I really have to force myself to stop now and start working on the presentation and the report. But at the end I have to spend some time on that to actually get credit for all my hard work.

The executive summary is completed and I created the first draft of the content page for the final report. It’s really important to get the organisation and the content of the report write first and then start writing. The reader must be presented with a nice and logical flow of information. The aim for the report should be to take the reader on a journey form the idea and objectives of the project at the beginning all the way to the end and the final implementation of it. The rest is just writing up the different chapters and adding all the important design decisions and ideas that distinguish your project form others.  

So to get some test result and nice pictures for the report I used the last week before the Easter break to do some voltage and current measurements and to get some videos done to demonstrate the different implemented features of the hexapod. The videos show some testing of the light sensors and the distance sensors. I also managed to implement the walking sequence while it is also sensing the environment with the ultrasound sensors to avoid obstacles. This was a proud little moment for me, because this really demonstrates the complete hexapod robot working with the actuation and sensing. With this step I can actually consider my project as completed. Of course there are a lot of other things one could do now with this hexapod platform, but this could be a whole new project for another year.
Enjoy the new material and I’ll report back again after 3 weeks of Easter break.

The Easter break is over and the project is coming to an end. I used two out of the three weeks of the Easter to write most of the final project report, so behind the word “break” there is actually a lot of work hidden as well. But that was very good, because it gave me the chance to give my first complete report version to someone for proofreading and I had enough time to finalise it before the deadline.

Apart from the final project report we also have to do a project viva voce. That means a little presentation, where you present the project result to your project supervisor and the second examiner of your project. It also gives you the chance to have a practical demonstration of your project, because all the other deliverables included only a presentation in written or graphical form. So I used the week mainly to prepare my Hexapod for the big show in the end. To control different programs without the need of reprogramming the Hexapod I quickly redesigned the main microcontroller board and added some switches. 

The Hexapod project has come to an end now. I presented the final version of the Hexapod in my viva early this week and the external examiner and my supervisor were very impressed with the result of the project. For the demonstration I programmed the Hexapod with a sequence of movement that demonstrates the capabilities of the Hexapod. The second program demonstrated the Hexapod walking in the room and detecting obstacles, by walking towards the area where it sees most free space. That was the demonstration that actually proved that the complete Hexapod robot is working with all the sensing and actuation capabilities.

In the end I actually couldn’t use the new designed main microcontroller board, because something was wrong with the hardware for the programming interface. That meant I had to improvise and find a new way to select the programs I want to start. The solution I found was to use the light sensors and selection parameter at the beginning of the software program. I simply tested whether there was a light source present at the light sensors and used that information to start different programs. In practice I used a torch and when I shined light on light sensor 1, then program 1 would start, when I shined it on light sensor 2, program 2 would start etc. In the end that was actually a much nicer way to control the different programs for the demonstration.

Thank you for reading this blog and showing some interest in my project. I hope I could give a little inside into the world of a 3rd Electrical Engineering student at the University of Manchester.

 

   

 

   

   

 

   

   

 

 

 

▲ Up to the top