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 (8) - Design of a Multi-Channel Servo Controller PCB (Rev. 1), Part 2 - Analysis and Component Selection

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

a1sx2_Thumbnail2_006-000051b.pngThis blog post describes the analysis and component selection stage of the multi-channel servo controller board design and it is during this stage where, sadly, for most of us it all begins to go wrong.  It is during this process that every datasheet must be read and reread again and again, until every line of text and every curve in a graph is thoroughly understood. It is at this stage that some, out of despair of a looming deadline, decide to fall on their knees, look skywards and utter words of reverence, utter words of importance or just words.  

It is at this stage that others decide it  is time to put on their jeans and T-shirt and lock themselves in their study. Only to emerge  a few days later wearing a robe and sandals. As you will find out in this blog post we chose to put in a few night shifts to resolve the recurring problems in the design and felt justified emerging with our guru's attire. However, we have known some at this stage of the design process to decide that X marks the spot and continuously aim their heads at it, ceremoniously. Entertaining as this method could be, we prefer ours. However, we recommend you should choose the problem solving method that works for you!

 Quite unsurprisingly, this post continues where the previous one left off, where we established the definition of the Multi-Channel Servo Controller Board design in the form of a Design Definition. Previously, we had also pencilled in some components and a design layout on the "Back-of-an-Envelope". Here, we will use the combination of the design definition and the "Back-of-an-Envelope" layout to analyse the board's design and the component selection process. It is at this stage where our well defined intensions began to fall apart!

 Analysis and Component Selection

To get the ball rolling, at this stage of the design process, lets go through our design definition item by item, along with any components already pencilled in. We do this to determine the design's robustness and the suitability of any already chosen parts.  During this exercise we may find out that a component or device that we have chosen, because  it worked wonderfully well on a previous project, is totally unsuitable for this one. Also, we may find out that we have not used all of the available GPIO pins, which should allow us to add, luxuriously, an LED or two. Flashing LEDs are always good as they look impressive even when nothing else is working! 

Two of the design definitions are provided below:

(2) Ideally, the  PCB that is developed should be mounted at the inertial reference frame of the robot.

(8) Finally, the size of the PCB is TBD, but it will typically be (fabricated) on a two layer PCB with a purple or mustard coloured silk screen. 

In the  5th article in the series it was decided that the Robot's U-type waist bracket could be used as an inertial reference frame, as all the limbs of the robots move relative to this part. Hence, our multi-channel servo controller board could be mounted at this point, on the waist bracket.

 In the drawing below the dimensions of the waist bracket, which have been obtained from the AutoCAD drawing presented in part five, have been used to determine the mounting points of our PCB. The PCB could be mounted at four of these points if adequate PCB standoffs are used with say a 3mm thread, or M3, screw. Alternatively, to use mounting points that are spaced further apart we could place two waist brackets  side-by-side (i.e one on top of the other), as in the assembly of some existing 17 DOF robot kits.

002-002-001-000032.png

Hence, according to this diagram, above, the mounting holes should support M3 screws [RS1]. The mounting holes should be 69.51mm apart in length and 14.19mm apart in width, when a single waist bracket is used. We could also argue that, for stability, the mounting holes should be at the centre of the PCB [RS2].

Three more of the design definitions are listed and it is these three design definitions that began to "lay siege" to our beloved pen and paper design:

(1) We require a multi-channel servo controller board to operate the servo on our 17 DOF robotics project.

(3) Primarily, the Controller Board should be used to Control the Lower Limbs or 12 Servos.

(4) A secondary aim of the board is to control all of the 17 servo motors of the robotics kit.

The multi-channel servo controller board should, obviously, be compatible with the servos and choosing which servos should be used could be a difficult task. However, quite fortunately, the recommended servo motors to use with this 17 DOF robot kit are Tower Pro's MG996Rs. This should have simplified our task considerably, as the design of the board should have been targeted specifically at this motor. However, it is when one investigates the characteristics of this motor that problems begin to arise.

Characteristic Value
Stall Torque 13 kg-cm (180.5 oz-in) at 4.8V
Stall Torque 15 kg-cm (208.3 oz-in) at 6V
Running Current 500mA - 900mA @ 6V
Stall Current 2.5A @ 6V
Operation Voltage 4.8 - 7.2Volts

Houston we have a problem. Look at the running current and the stall current listed in this Table above! If we were to drive 17 of these servos we would need to guarantee a maximum running current of approximately 15.3A at 6V and a stall current of a massive 42.5A. This would require us to build the equivalent of a high-current power distribution board  and adhere to all the associated power safety regulations.

Even if we were to drive only the 10 servos of the lower limbs we would still need to be prepared to handle about 25A of current at 6V. At this point we knew that we had failed and decided to kill this design dead in the water and rethink our multi-channel servo controller board strategy.

Eventually, after what seemed like an eternity, to avoid having to distribute power to the servos through a central board, we decided to split the design into two parts, which are:

  1. Galvanically isolated servo driver boards
  2. A multi-channel BeMicro servo driver board.

The philosophy behind the design of each of these boards is explained presently.

 A Galvanically Isolated Servo Driver Board

One of the things we have decided to do is attempt to create a servo driver board, which can be mounted directly on top of each servo motor. Each board should be powered locally (directly) from a 12V, 3A power source, which would avoid the problem of distributing the power through a multi-channel driver board. We have simply moved the problem elsewhere or to more professional products designed for exactly this type of purpose. Like an off-the-shelf power supply or a modified ATX power supply, for example.

 The board should be galvanically isolated to avoid the high currents and voltages generated by the motor from flowing back into the FPGA pins and damaging the FPGA. A mock-up of the board, which is shown below, has been designed to test out our idea and will be examined in detail in the next blog post in this category.

Here is a brief summary of the design. To control each servo two FPGA signals are required. Firstly, a Pulse Width Modulated, PWM, signal should be required to control the directional movement of the servo. Secondly, a power enable, PWR_EN, signal should be required to enable or disable the power to the motor.

006-000051.png

Now, in addition to these two signals it is anticipated that signals will be required to connect MEMS accelerometer and gyroscope devices, for example in the form of InvenSense's MPU-6050, to measure the orientation of each joint attached to each servo. Thus, access should be provided to three additional signals, the I2C's SDA and SCL signals, as well as an interrupt signal, INT. Hence, each MEMS board shall be connected and powered by its associated servo board. Likewise, the servo board should also relay the FPGA connections to the MEMS board.

One potential problem we have faced with this design is the possibility that the chosen components would not fit into a 40mm by 35 mm area, which is the size of the side of the MG996R servo. Hence, to ensure that we were not designing another dead duck we layed out the components on a PCB of the required size, without routing the traces. So far we are encouraged enough to continue with our new design, as can be seen in the test PCB layout below.

006-000050.png

 A Multi-Channel BeMicro Servo Driver Board

Previously, we had stated that: (5) The board should implement an interface that is compatible with the 36 GPIOs of the 2 x 20 way header of the BeMiro CV Evaluation Kit or the two 2 x 20 way headers of the DE0-Nano Development kit. Given that in our new design each combination of galvanically isolated servo board, described previously, and MEMS sensor board should require 5 FPGA I/O pins, it means that we require 5  x 17 I/O's or 85 FPGA I/O pins.

The 2 x 20 way GPIO headers of the BeMicro CV development kit or the DE0-Nano board cannot support this number of I/O pins. Hence, this new design should require us to develop a custom FPGA board, which is beyond the scope of our current exercise. However, all is not lost! In the short term we only wish to experiment with controlling only the lower limbs, which will require 5 X 10 or 50 FPGA I/O pins when an active toe joint is not considered.

To this end we could create a multi-channel driver board that connects to both of the 2 x 20 way headers. In doing so however we would lose the flexibility of creating a board that would be compatible with both of the BeMicro CV and the DE0-Nano. Hence, we opt to support only the BeMicro family of devices, since it supports the Cyclone V FPGA, as opposed to the DE0-Nano's Cyclone IV device. The two 2 x 20 way connectors of the BeMicro CV support a combined total of 64 FPGA GPIO pins and are shown below.

002-002-001-000047e.png

 In the future we could create a board that is compatible with the DE0-Nano thus widening its appeal to the set of established FPGA robotics users who already own this board. As we still need to create a custom FPGA board, we are considering Altera's Arria 10 family of FPGAs, because of their hardened single-precision floating-point units. This board will still be mounted at the inertial reference point described previously.

What about the other Original Design Definitions? 

 The original design consisted of eight design definitions. How has our new design philosophy affected the remaining two? Well, the remaining two design definitions state that  (6) Any unused I/O pins should be used to connect MEMS sensors including an accelerometer, gyroscope and magnetometer. and that  (5) As with all of our designs we require a USB-UART converter .... Well, quite fortunately nothing has changed here and the two elements chosen to satisfy these two design definitions the GY-80 (5 GPIOs) and the FT232RL (2 GPIOs) still apply. They should reside on our multi-channel BeMicro servo driver board. 

Conclusion

So what have we accomplished from this exercise? Everything! This exercise has shown the importance of undertaking a formalised design process, even in hobbyist designs.  In this case we have been able to analyse a design and decide that continuing with it would be futile. Undertaking this exercise has enabled us to present an improved design and the best part of all is that we have not spent a single penny on manufacturing PCBs that would have only been useful as door stops.

In the next episodes of the design we shall formalise the design of our two new boards, get them manufactured and built. Unless, of course, during the analysis process the design breaks down again and we end-up on our knees, looking skywards! 

Last modified on
0