Ben's Blog

No description yet.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Archives
    Archives Contains a list of blog posts that were created previously.
  • Login
    Login Login form

Robotics and FPGAs (5) - The 17 DOF Biped Robot Assembly, Part 3 : The Inertial Frame

Posted by on in Robotics Using FPGAs
  • Font size: Larger Smaller

Hello and welcome to another post in the blog series on using FPGAs in Robotics. So far the series has concentrated on the construction of a 17 DOF robotic kit, which was purchased without any assembly instructions. This kit, when fully constructed, will be central to this series of blog posts and should be controlled using one of Altera's Cyclone family of FPGAs on  a development board or kit. In this blog post I will finish the construction of the lower limbs and add the waist bracket, which will eventually act as our Inertial Frame when the Denavit-Hartenberg parametric representation of articulated joints is considered.

I will also demonstrate how I designed a waist bracket plate to attach the robot's frame to a retort stand. This should, for example, allow the development of movement algorithms, like the lower limbs moving in a walking movement, without the robot actually moving. That is, in this early experimental stage our inertial frame shall remain static. Hence, the problem of how the robot is balanced, while moving, will not arise, as it is suspended from retort stand.

a1sx2_Original1_002-000019c.pngTo recap what has been done so far, the first two parts of the assembly process has led to the construction of both legs up to the thigh joint, as can be seen, in the Figure, opposite. To get this far all the varieties of the different parts included with the kit have been used bar one piece. Hence, we should feel encouraged to know that we do not need to come to grips with anymore unknown parts in the kit, except for the waist bracket. This should mean that the assembly of the rest of the kit, including the upper limbs, should be less challenging. 

Also, previously, I briefly mentioned the Retort Stand, also seen in the image opposite, which I intend to use as part of the robot's support system. More detail on how this is used is provided below. The U-Type Robot Waist Bracket, as one would expect,  is used to attach the lower limbs, consisting of the articulated legs, to the  upper body whose active parts include the arms.

So in this part of the construction process, apart from attaching the legs to the waist, using the U-type robot waist bracket, I will show how the waist bracket can be attached to the retort stand by designing and printing, in 3D, a custom part for the job. This part, which I have called the Waist Attachment Panel, is used to harness the robot's waist bracket to the retort stand's circular Retort Ring. However, before we discuss the design of the panel I will quickly discuss the assembly of the remaining parts of the lower limbs.


The picture above shows the layout of the U-type robot waist, the servo and the U-type short brackets required for this part of the build. The servo bracket, which is directly attached to the waist bracket, as usual hosts a MG996R servo with a servo horn. Also attached to the servo bracket, opposite to the servo horn, is the ball bearing assembly discussed in this previous post. This assembly creates a joint with the U-type short bracket and implements part of the hip  joint.


The servo brackets are attached to the waist bracket using the outer attachment positions on the waist bracket. When this is done, as seen in the Figure above, the offset of one in relationship to the other gives the appearance of a hip bone. This appearance can be fully appreciate in the Figure below where both servo brackets can be seen attached to the waist bracket. In this picture the waist bracket can also be seen attached to my waist bracket panel.

To complete the construction of the lower limbs, after a servo has been secured to the servo bracket,  a short u-type bracket is attached perpendicularly to the long u-type bracket introduced in the previous post's build. This complete the assembly of the lower limb.

The Waist Attachment Panel

 In this section I discuss how I have designed the custom part, the waist attachment panel, used to attach the lower limbs to the retort stand. The orange panel, or part of it (see below for an explanation), can be seen in the image below  attached to the waist bracket assembly and the retort stand's circular retort ring. The retort ring has an inner diameter of approximately 76.2mm and an outer one of approximately 85mm. The discussion will describe how the panel has been designed in AutoCAD and printed in 3D on an UP! Mini 3D Printer. 3D printers are great for little jobs like this and will definitely excel in the field of robotics. No longer do researchers have to go to the university workshop with an order form, for a technician, to carry out small jobs. We can now make small robot parts for ourselves!


To begin the design, like I described previously in my blog post Designing the 17 DOF Robot's shoes Using AutoCAD - Rev.1 I scanned an image of the circular ring using a standard USB scanner attached to a desktop PC. This produced a .pdf file of the scan of the ring, which I converted to a .png graphic format file. I then imported the graphic into AutoCAD using the IMAGEATTACH command. I cannot stress enough how useful this process is, as it saves a lot of time and effort obtaining exact physical measurements of objects being designed in AutoCAD. I performed an identical process to obtain a reference image of the waist bracket, which can also be seen in below.


The IMAGEATTACH dialog, seen below, provides some options when importing the scanned image. However, I tend to leave the settings on their default values and click on the OK button. I imported the circular ring onto AutoCAD's default layer and created a new layer imaginatively labelled, waist bracket, to import the waist bracket scan. I find importing the different parts of the scanned images onto different layers extremely useful when it comes to designing each individual object, as it allows one to switch of the layers of the objects not needed. This helps unclutter the display.


Next, I scaled the two imported images,  by physically measuring the waist bracket and the circular ring and comparing their actual lengths with their imported image equivalents. Quite interestingly, I had to scale the circular ring down and the waist bracket up.   The scaled circular ring can be seen in the image below. (N.B I used the acadiso template, as my starting point in AutoCAD).


The next step I performed in the design process was to create a trace layer, in purple, and a construction layer in blue, which I later changed to green. In the image above, it can be seen how I have traced around the edges of the circular ring, using the construction lines for guidance. I undertook the same process for the waist bracket. The result of aligning the two traced images can be seen below, where the construction lines have been changed to green to contrast with the darker background.


So far, so good! The design in AutoCAD was now in a state where I could estimate the size of the waist attachment panel, which should completely encompass both objects. This I did by drawing a rectangle around both objects, shown above, such that the edges of the panel are about an estimated 10mm away from the edge of the traces. I then switched AutoCAD to a SW isometric 3D view, because I find it easier to design in this view and extruded the panel. Initially, I made the panel 2mm thick, but this seemed to be too thin so I changed the thickness to 4mm, which turned out to be ideal. I coloured the panel orange, because this was the colour of the ABS plastic I had to hand. You can colour yours any colour you want!


Next, I used the EXTRUDE command, as can be seen above, to believe it or not extrude the relevant circular purple coloured traces to a height of about 10mm. I did this with the intention of not only creating holes in the panel that were coincident with the waist bracket, but also new ones that I could use to attach the panel to the circular ring by using cable ties. Once this had been done I used the SUBTRACT command, which produced the final pieces of the panel with holes in seen below. The reason why there are two pieces is explained next.


At this point I knew I was almost there. However, there was still a slight problem, as the maximum print area of the UP mini 3D printer is 120mm x 120mm and the panel measured approximately 120mm by 135mm. To work around this problem I cut the panel into the two separate pieces seen above. The first part measured just under 120mm squared, while the other measures approximately 15mm by 120mm. I then went about printing the square part of the panel, as a test. You can read more detail about how I printed part of this 3D AutoCAD drawing in my blog post 3D Printing AutoCAD models in my 3D Printing blog category.


About three and a half hours later the result, seen in the image opposite, was more than pleasing to the eye. It left me feeling like I had accomplished two important milestones, in a relatively short period of time. Firstly, it demonstrated that I could accurately design robotics parts in AutoCAD and secondly, after only a few hours of tinkering with a 3D printer,  it demonstrated that the AutoCAD parts printed were robust enough to be useful.

 The assembly of the waist attachment panel, waist bracket, circular ring and the short u-type bracket, which is used as part of the upper body assembly can be seen below. The screws, which were provided as part of the robotics kits, were too short to use to attach any of the parts, mentioned above, to the panel.

However, quite fortunately, I had some 3mm screws in my box of "screw" goodies, which measured about 12mm in length that were adequate. Once assembled one can only marvel at the accuracy of the whole process. It is truly stunning! One of the unmentioned benefits of 3D printers must be in creating design templates, due to the accuracy of design packages like AutoCAD.

To fully complete this part of the design process I still need to print the other half of the panel. However, after printing the first part of the panel I got carried away, as I wanted to see what the robot's limbs would look like when attached to the retort. Hence, I commenced with this activity, which is described next.


The two images, below, show the panel construction relative to the robot's lower limbs. However, before I could take any more pictures of the end result, with the servos installed, one of my daylight light bulbs, which I use in my DIY light box, died. Hence, I couldn't take anymore "decent" pictures of the construction. Although, I couldn't resist taking one more picture with my iPad, as seen in the image further below, in order to complete this blog post. Expect some more images of this part of the completed construction soon.


Thoughts and Ideas

We have now reached an important crossroad in the project. Up till now all our effort has been concentrated on constructing the robotic kit. Now, with the design of the waist bracket panel and the completion of the lower limbs more ideas can be thrown into our robotics cauldron. That is, we can now begin to think, more intensely, about how the legs are going to be moved from a mathematical view point and from a physical perspective too. 


 Figure: And there she is! - said quietly and in spectacular awe, just like in Thunderbirds. Every time I look at it I can't help but think of a Terminator, but the next generation!

FPGA Board

Now we should begin to think about the decisions that need to be made, which will influence our choice of the FPGA development kit that will be used to control the robot. We have already penciled in using one of Altera's FPGAs, from the Cyclone family, with a possible candidate being the Cyclone V on the BeMicro CV Evaluation Board or the Cyclone IV on the DE0-Nano Development Kit. These are some of the least expensive development boards on the market, which should provide us with a good starting point into our robotics algorithm development.

Servos and Sensors

Also, we could begin to think about how we are going to apply orientation detection, as well as think about the best way to initialise the robot's in its "start" position. Quite fortunately, in this implementation of the design, we do not need to consider the balance of the robot. Initially, the  sensors should include accelerometers, magnetometers, gyroscopes and other MEMS modules. We may also need to think about the type of end stops that should be used, if any at all. Should we use micro switches or optical ones? In the first instance the plan is to develop a prototype control board that will be used to control only the lower limbs, with data read from the sensors feedback to the FPGA. Thankfully, we have one less decision to make when it comes to choice of servos, as the MG996R, is the recommended servo for the kit.


Figure : Walk sequence taken from "Advanced Animation and Rendering Techniques - Theory and Practice, Alan Watt and Mark Watt, Addison-Wesley, 1998.

Robot Control Board PCB - Rev. 1

How the servos are controlled and the sensors are read is another aspect of the design that needs to be considered immanently. Hence, a custom Multi-channel Servo Controller Printed Circuit Board (PCB)  needs to be developed for this purpose. In the first instance the plan is to develop a prototype control board that will be used to control only the lower limbs, with data read from the sensors feedback to the FPGA. The board in the planning should be compatible with both the BeMicro CV and the DE0-Nano. Also, the board should be host to the components of the 10 DOF accelerometer, magnetometer, gyroscope and barometer module, first encountered in one of my previous posts. The board will be placed at the Inertial Frame or what will become our World Coordinates Origin,  as can be seen in the image below



Mathematically the time has come to think about how the position of the legs can be translated into the orientation of the joints or inverse kinematics. Likewise, we can begin to considered how the location of the joints can be translated into the movement of the legs or forward kinematics. Hence, the time has come to think about applying the four Denavit-Hartenberg parameters for articulated joints when our world reference frame is located at the center of the waist bracket. This will be our origin, as mentioned previously. It is also time to begin to think about how the transformations resulting from the Denavit-Hartenberg articulated joint movement can be implemented in the Cyclone V FPGA on the BeMicro CV FPGA board or the Cyclone IV FPGA on the DE0 Nano.


There is a lot to do here, hence happy days ahead!  TBC

Last modified on