C-BISCUIT: Schematic Design for the RCB—Power, Stepper

October 07, 2016 by Robert Keim

We’ll continue our discussion of the C-BISCUIT demo bot by looking at portions of the RCB schematic that weren’t covered in the previous article.

We’ll continue our discussion of the C-BISCUIT demo bot by looking at portions of the RCB schematic that weren’t covered in the previous article.

The C-BISCUIT Series

  1. C-BISCUIT: A Robotics Platform for the Hacker and Hobbyist
  2. C-BISCUIT: Design Choices and Justification
  3. C-BISCUIT Power: 5V 3A Buck Regulator for Wandboard
  4. C-BISCUIT Power: Crowbar Protection Circuit for 5V Regulator
  5. C-BISCUIT: The Brains of the Operation
  6. C-BISCUIT Power: Assembly and Testing of Regulator and Crowbar Circuits
  7. C-BISCUIT: Monitoring Your Robot’s Health
  8. C-BISCUIT: Robot System Architecture
  9. C-BISCUIT: Schematic Design for the RCB—Microcontroller, Motor Controller
  10. C-BISCUIT: Schematic Design for the RCB—Power, Stepper
  11. C-BISCUIT: Layout and Assembly for the Robot Control Board
  12. C-BISCUIT: System Integration and Testing


In the previous C-BISCUIT article (Schematic Design for the RCB—Microcontroller, Motor Controller), I explained some important sections of the schematic for the Robot Control Board (RCB). The remaining functionality is the following:

  • regulating 12 V down to 5 V
  • stepper-motor control
  • voltage monitoring
  • buffering UART signals for communication with the Wandboard

Let’s take a look at how we accomplish these tasks. The following diagram, first presented in the previous article, should refresh your memory as far as the overall RCB design.


Switching Made Simple

The bot’s NiMH battery gives us 12 V. That’s fine for the 12 V motors, but the rest of the C-BISCUIT demo system needs a lower voltage: the Wandboard takes 5 V, and we need 3.3 V for the RCB’s logic-level components. We don’t need to worry much about the 3.3 V because the EFM8 microcontroller has an integrated 5 V–to–3.3 V regulator, so our concern here is generating 5 V from 12 V.

Our VIN-to-VOUT differential is fairly high (12 V – 5 V = 7 V), and our output current is also nontrivial—the Wandboard datasheet recommends a supply that can deliver 2 A, and considering the datasheet’s lack of solid current-consumption specs, I’ll feel better with capacity closer to 3 A. So, if we were to use a linear regulator, we’d be dealing with power dissipation of about 7 V × 3 A = 21 W. That’s some serious thermal stress for the regulator, and it’s not exactly efficient to use 21 W of battery power as an unnecessary and undesired robot heating system.
It should be clear, then, that we need a switching regulator. The watchword here is efficiency: With a linear regulator, we would burn 21 W in the process of supplying 3 A at 5 V to the load; thus, we have 21 W of wasted power and 15 W (because 3 A × 5 V = 15 W) of usable power. We can calculate the efficiency as


$$E_{LR}=\frac{P_{LOAD}}{P_{LOAD}+P_{WASTED}}=\frac{15\ W}{15\ W+21\ W}\approx42\%$$


Just for the record, it is actually much easier than this to calculate the efficiency of a linear regulator: it’s simply the ratio of output voltage to input voltage.


$$E_{LR}=\frac{5\ V}{12\ V}\approx42\%$$


It’s easy to ignore efficiency when you have seemingly unlimited power available from a wall outlet, but we can’t tolerate that sort of waste when we’re using battery power. And that’s why we turn to a switching regulator.

As you probably know, switchers are far more battery-friendly than linear regulators—efficiencies can reach and even surpass 90%. The switching regulator on the RCB (the LTM4623 from Linear Tech) maxes out at about 93% with VIN = 12 V and VOUT = 5 V:



This is a truly massive improvement over the linear-regulator-based solution. Let’s assume we are supplying the full 3 A, which means the efficiency will be slightly lower (about 92%). From our first equation for calculating efficiency, we have


$$E_{SR}=\frac{P_{LOAD}}{P_{LOAD}+P_{WASTED}}\ \ \Rightarrow\ \ 0.92=\frac{15\ W}{15\ W + P_{WASTED}}\ \ \Rightarrow\ \ P_{WASTED}=1.3\ W$$


So with the switcher, we can deliver 3 A at 5 V while wasting only 1.3 W; with the linear regulator, PWASTED was 21 W!

Of course, with that sort of improvement in efficiency, there must be some disadvantages. One is more noise in the output voltage, but the issue that I’m generally more concerned about is circuit complexity.

Switching-regulator circuits are far more complicated and sensitive than linear-regulator circuits, and this complexity doesn’t even come with the consolation prize of increasing my self-esteem—a successful switcher doesn’t make me feel like I’ve accomplished something great because I do little more than carefully (and somewhat slavishly) implement the recommendations in the datasheet.

My favorite solution to this dilemma is to use a switching-regulator module. In other words, I allow highly skilled people at some highly professional organization to do the difficult design work, then I drop the module into my system and (carefully, slavishly) follow the datasheet recommendations—the difference is, there are far fewer recommendations when you’re using a module!

Here is the schematic excerpt for the DC/DC converter circuit, which is based on the LTM4623 µModule regulator:



As you can see, few external components are required. You definitely need input and output capacitors, and the resistor connected to the FB pin determines the output voltage. You can find information on these components in the datasheet.

There are various features that can be ignored in many applications (you can read about these features in the datasheet if you’re interested); I mostly ignored them, although I did use zero-ohm resistors to provide some flexibility just in case. The capacitor connected from TRACK/SS to ground enables soft-start functionality, and I added a test point for the PGOOD signal, which is pulled to logic low if the actual output voltage is not within ±10% of the desired output voltage.

Stepping Made Simple

The C-BISCUIT demo robot currently has no need for stepper-motor control but, by incorporating this functionality, we have turned the RCB into a versatile, extensible motor-drive board. As you can see from the schematic excerpt, I have once again chosen to benefit from the experts’ expertise.


This is one of two stepper-driver circuits on the RCB.


Here I am using the DRV8880 driver chip from Texas Instruments. This thing is loaded with features, and I’m not going to describe them all. Suffice it to say that this is a very appealing alternative to driving a stepper motor using a discrete FET H-bridge controlled by a microcontroller executing custom-designed stepper code. You can certainly do it that way, and the amount of work is not intolerable, but a basic implementation like that cannot compete with the advanced functionality provided by the DRV8880.

I’m going to mention some salient points related to this circuit, and if you want more information you’ll have to spend some quality time with the datasheet.

  • You can see that one DRV8880 has two pairs of motor-drive outputs (AOUT1/2 and BOUT1/2). Keep in mind, though, that one DRV8880 controls one stepper motor. This is because a stepper motor needs two separate windings to accomplish the stepping action.
  • In the previous article, I explained why each MAX14870 driver chip has a large (100 µF) capacitor between the motor-drive voltage and ground. Note that each DRV8880 also gets a 100 µF cap.
  • The previous article also explains how a sense resistor allows the MAX14870 to implement current regulation. The DRV8880 provides similar functionality; you can see the sense resistors connected to the AISEN and BISEN pins. In the DRV8880 datasheet, the maximum winding current is referred to as the full-scale current (IFS). I used 0.1 Ω sense resistance, which, in conjunction with the values chosen for R5 and R6, corresponds to IFS of 1.5 A (see page 33–34 in the datasheet for more information). However, the DRV8880 includes a handy feature that allows you to adjust IFS without the rather inconvenient process of removing the existing sense resistor and soldering in a new one. I’m referring to the TRQ pins; by applying different logic levels to these two pins, you can reduce IFS to 75%, 50%, or 25% of its maximum value. Remember that sense resistors can dissipate some serious power; the parts I chose are rated for 1/2 W.
  • If you’re accustomed to writing microcontroller code for stepper control, you might be wondering, How do I apply the step sequence? Answer: You don’t. All you have to do is apply a rising edge to the STEP pin when you want to move the motor one step. The DRV8880 handles step sequencing, and furthermore it allows you to choose the step size (full, half, 1/4, 1/8, or 1/16) by simply applying the appropriate logic levels to the M0 and M1 pins. (Actually, “logic levels” is not quite right because the M0 and M1 pins are tri-level inputs, meaning that they can detect a logic-low state, a logic-high state, and a high-impedance state.)

Monitoring and Buffering Made Simple

At this point, we have covered the bulk of the RCB’s circuitry. I’ll just briefly discuss the last two functional blocks.

First, voltage monitoring. As discussed in the “Proper Care of NiMH Batteries” section of the Robot System Architecture article, the RCB needs to keep an eye on the battery’s discharge state. We accomplish this by feeding the battery voltage into the EFM8 microcontroller’s integrated analog-to-digital converter. However, 12 V is way too high for the EFM8, which is a 3.3 V device. So we simply divide the battery voltage by a factor of ten; this puts the nominal battery voltage right in the middle of the EFM8’s ADC range, which is 0 to 2.42 V because we are using the internal 2.42 V reference.


I use another circuit just like this one to monitor the 5 V supply as well. The capacitor helps to filter out some noise before the signal gets to the ADC.


Finally, I used a Schmitt-trigger buffer for the UART signals, which must travel between the EFM8 and the Wandboard in a potentially noisy environment. The buffer should offer some noise immunity and help keep the logic levels closer to ground and VDD.



I hope you now have a thorough understanding of the schematic design for the Robot Control Board. In the next article, I’ll discuss some details related to the process of turning this schematic into a professionally manufactured and assembled circuit board.

Next Article in Series: