Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Hexapod: A Self-Balancing, Biologically Inspired, Six-Legged robot

Hexapod: A Self-Balancing, Biologically Inspired, Six-Legged robot

 

Contact Information

University: University of Manchester

Team Members: Josh Elijah (MEng Grad 06/2015, PhD Grad 01/2019)

Email Address: joshua.elijah@gmail.com

Country: UK

 

 

Description: A custom built National Instruments themed hexapod robot capable of walking and self balancing.

 

Products: NI sbRIO-9605, LabVIEW Development System, LabVIEW Real-Time Module, LabVIEW FPGA Module.

 

The Challenge:

The NI Single-Board (sbRIO) is an incredibly powerful piece of hardware however it is somewhat less known than the more popular Compact-RIO.

 

Yet the sbRIO's incredibly small size makes it ideal for robotics. A package that is barely bigger than the palm of one's hand contains an FPGA, Real-Time processor and 96 DIO lines, a combination that (as will be explained) is incredibly adaptable.

 

Add to this hardware platform the intuitive NI LabVIEW development system (that somehow manages to make even FPGA programming understandable!) this becomes a very powerful tool indeed.

 

The challenge here was to build a Hexapod - a biomimetic, six-legged robot, which emulates insect locomotion. I wanted my fully mobile Hexapod robot to be able to both capable of multi-directional walking and self-balancing. It’s a fundamental yet complex system design, that would push myself and the sbRIO.

 

Hexapod robots have applications in areas such as disaster relief, terrain mapping and factories of the future, I chose this project to learn more about embedded FPGA programming and electronics design.

 

Here is some footage of the sbRIO motor control, during development

 

 

The Solution:

There were three key parts to this project; Mechanical Design, Electronics and LabVIEW Software. Here is the overall system diagram.

 

System Diagram.png

It's not especially complex in terms of hardware. All commercial components are shown in blue, bespoke hardware is shown in orange. The system is powered by either an onboard Lithium Polymer (LiPo) battery or a mains power input (selected by a switch). This power input is then regulated by a power regulation board, providing appropriate voltages for the rest of the components on the hexapod.

 

A TP-link router is connected to the sbRIO to allow for wireless programming and operation, whilst an Xsens Orientation sensor is connected to one of the serial ports on the sbRIO to allow the hexapod to sense it's own orientation. Signal routing circuitry is used to get the various digital signals from the sbRIO to the various system components.

 

 

Mechanical

Here are the components to be mounted onto the hexapod.

~ LiPo battery

~ 18 servo motors

~ TP-link Wi-Fi router

~ Neopixel LED array

~ Xsens IMU Orientation sensor

~ Power distribution circuit

~ Signal routing circuit

 

I started with a pre-built hexapod frame, the Lynxmotion CH-3 frame. It's a pretty simple setup out the box.

CH3 Frame.png

Six legs, each consisting of three servo motors, for a total of eighteen. Mounting the other components onto this frame is not a trivial task. In fact a great deal of thought went into mounting these components to allow for (a) robustness, (b) ease of replacement and (c) neat design.

 

It also called for some bespoke mechanical component design. At this point in the project I was doing an internship at Fab Lab London, so I decided to give 3D printing a go.

 

The LiPo battery, Xsens sensor and the Router mount to the bottom of the frame. To protect these components, I designed a battery holder and a bottom case for the hexapod, both 3D printed as bespoke parts.

 

 

And here is how these parts on the bottom fit together.

 

 

The sbRIO, and various bespoke circuitry was mounted inside the hexapod between the top and bottom plates. On the top of the hexapod I mounted a custom designed top plate, bearing the National Instruments logo. And beneath that plate, I mounted the LED array; hidden so that it only becomes visible when illuminated. There when you need them, gone when you don't!

 

hexapod jpeg.jpg

 

 

Electronics

Electronics was needed for this project to:

1) Convert an unregulated 12V input voltage to a stable 5V for the motors, router, LED array and Xsens IMU.

2) Route the multiple digital signals (20 in total) from the sbRIO to the motors, and LED array.

 

To achieve this I designed a main board to mate directly with sbRIOs high density IO (RMC) connector, along with three seperate power regulation boards to be distributed across the chassis. Below is shown the RMC connector; 96 seperate lines inside a surface mount socket (requires accurate placement for reflow soldering!)

 

Main Board.jpg

 

Using three seperate power regulation boards, rather than combining them with main board means that the motors cables can be easily accessed and on the whole makes the electronics more modular.

 

Here is the electronic system diagram.

Electronic Circuit System.png

 

For brevity only one power regulation board is shown here. The Main Board (blue) and Power Regulation Boards (green), were both designed as printed circuit boards (PCBs), manufactured, soldered and tested.

Untitled.jpg

This is the majority of the electronic infrastructure on the hexapod; routing the various signals, and regulating the DC power, for the system components. Ribbon cables are used to route the Motor PWM signals to the Power Regulation Boards, making the electronics modular and easy to remove/replace.

 

elecrronics hex.jpg

 

LabVIEW Software

By far the most extensive part of this project is the software. Co-ordinating 18 motors to achieve a good quality overall movement is not easy and requires well structured code. Below is the overall software architecture.

 

Software Architecture.png

 

The software is divided across the three hardware platforms on the hexapod; The FPGA, RT Processor and Development Computer.

 

The FPGA is used for the laborious mathematical calculations for needed to perform inverse kinematics (converting XYZ robot leg postions to leg join angles, read more about that here), and low level digital signal generation. This frees up the RT Processor to do the higher level work; in this case generating the list of XYZ positions required to make the robot walk, or calculating desired body orientations based on sensed orientation.

 

To organise the code controlling the XYZ positions of six legs, I build my own object oriented set of drivers, humourous referred to as LEGmx. They make the process of writing 6 XYZ motor positions (that's 18 values) to an FPGA VI much simpler.

 

LegMX.PNG

 

 

Essentially the FPGA acts almost like a bespoke hardware driver for the RT processor, easily performing the hundreds of calculations needed for control, saving millions of operating cycles for the RT processor. This kind of hardware setup is absolutely ideal for robotics applications, and is one of the key benefits of using the sbRIO.

 

A VI on the development computer runs a 3D simulation of the hexapod (based on imported STL files), and animates it based on the real angles sent from the RT processor via a global variable. The VIs running on the RT Processor are controlled via Front Panel Communication from the development computer.

 

FP.PNG

 

And finally, here is the hexapod in balancing.

 

 

 

Contributors