You can say at least one thing about the recently released movie, Star Wars: The Force Awakens. It inspired a pretty cool toy called the BB-8, named after a droid in the movie by the same name. The BB-8 is made by a company called Sphero. Its design is close to two other toys the firm makes called the Sphero and Sphero Two. The most visible difference is a movable head piece that floats on top of the BB-8 as it rolls along.
The toy’s mechanics sit in a relatively thick (about an eighth-inch) polycarbonate sphere which we hacked into with a table saw. Inside, the main structure is a clear plastic frame that holds the circuit board, two motors and two Lithium batteries, a charging coil, and a plastic mast that sits on the frame. That plastic mast holds a couple of magnets that attract the BB-8’s head and let it stay in place as the toy rolls. The mast is a separate piece that is spring-loaded to keep it pressing against the inner surface of the sphere.
The toy is able to roll on command thanks to a pair of small dc brush motors in the base of the plastic frame. They sit just above the wireless charging coil that lets the BB-8 recharge when it sits in its charging base.
The motors are from a Chinese company called Standard Motor. They are nothing special. They are what’s dubbed the 130 series and is a type that’s widely used in toys. The particular motors used in the BB-8 have carbon brushes and a somewhat stronger magnet than some kinds of 130 motors, perhaps so the toy has enough torque to rotate itself with the additional load of the head rolling around.
Each motor drives a plastic wheel that’s positioned against the inner surface of the sphere. The drive mechanism consists of two gears having a ratio of about 4.3:1 between the smaller motor gear and larger gear on the wheel. Thus, the velocity of the driven wheel is reduced by the same ratio while its torque increases similarly.
A smart phone app controls the BB-8. The operator uses a virtual joystick to send the BB-8 off in a chosen direction after using LEDs flashing on the toy’s circuit board to tell it which direction is considered “forward.” The app The BB-8 also has a “patrol” mode in which it wanders around until it bumps into an obstacle, all the while beaming back its position and, oddly, its internal temperature. When it hits something in patrol mode, the toy has enough knowledge about its situation to back away slightly and try a slightly different direction.
The secret to this sort of controlled movement begins with servo-controlled motors. The tip-off that both motors are servo-controlled is in the small wheels visible on the motor shafts. These are apparently magnetic encoder wheels containing alternating magnetic areas. The alternating magnetic signals get picked up by a couple of Hall effect sensors visible on a small circuit board also on the motor shaft.
The feedback from the Hall sensors probably forms some kind of velocity or position loop. There’s no way to know for sure whether its velocity or position feedback that the BB-8 uses, but we think velocity readings would probably be enough for the kind of movement the robot executes.
With velocity feedback, the processor tells the motors to spin at a certain speed in a given direction; the encoders feed back what the true motor speed is, gauged by simply counting the magnetic areas spinning past the Hall sensors. Then the difference between the commanded speed and the true speed is an error signal that drives the motor. In the same vein, the encoder feedback could serve as a measure of the BB-8’s position, simply by letting the processor count pulses coming from the Hall sensors.
Feedback from the encoders can tell when the BB-8 has bumped into something as well as how fast it’s moving. Say the BB-8 hits a wall while it’s in patrol mode. When the BB-8 bumps against a wall, the motors don’t have enough torque to spin the wheels though the robot isn’t moving. In that case, the processor will issue a velocity command but the encoder signals, or lack of them, will show that the robot isn’t moving. The processor will use that information to reverse at least one of the motors and try to back away from the obstacle. It will use the encoder feedback in similar ways to try and find a path away from the obstacle.
There’s also a gyroscope/accelerometer sensor on the circuit board that may play a role in getting the BB-8 away from obstacle. On the smart phone app that you use to run the BB-8, there’s a mode which reads out acceleration and the path of the robot. So what you are seeing there is the output of the gyroscope /accelerometer which produces an output in response to an acceleration or a rotation of the circuit board on which it sits.
Circuit board components
The gyro is one of the chips on the main circuit board, which plugs into the plastic frame via four electrical connectors. The circuit board sits on top of the two 3.7-V, 350 mAH lithium batteries, which come from a Chinese company called Full River. There’s a thin plastic cover that sits over the batteries and separates them from the circuit board.
The board itself has components on two sides but it’s tough to tell whether it has more than two layers. The two LEDs sit on the top side as do eight ICs, including the gyro sensor.
Five of the ICs have identifying markings, but unfortunately the gyro is one of those that does not. So we are guessing as to who makes it and what kind it is. But the markings on one 16-pin SOIC resemble some of those on sensors made by Analog Devices, so it’s possible the sensor is some variant of those devices.
Interestingly, the smart phone app also reads out the temperature inside the robot. This sounds a bit weird: After all, why would the average toy user care about the temperature in the robot? But there may be a reasonable explanation for that temperature sensor. It is common practice to temperature-calibrate gyroscopes to improve their overall accuracy. And it may be that the real reason the temperature sensor is in there is to keep the gyroscope output from drifting with temperature. But the designers of the BB-8 may have figured that since they had to put a temperature probe in the thing anyway, why not also read its output on the phone app?
So our guess is, the temperature sensor is really installed for compensation purposes, either for the gyro or for some other component. In another case of dual-use, the sensor sits on the end of a probe sticking up from the circuit board. Our guess is that the probe body doubles as an antenna for the Bluetooth communication back to the smart phone.
That brings us to the five chips that we can identify from their markings. The main processor is an ARM Cortex-M4 from ST Micro. This is a 72-MHz 32-bit device. There’s also a 512-kbit serial EEPROM also made by ST Micro. A Huatai battery charger chip handles the wireless recharging of the two lithium-ion batteries. There’s a Bluetooth Smart chip from CSR (now part of Qualcomm). Bluetooth Smart is a low-power version of Bluetooth that a lot of battery powered devices are starting to go to. And there is a chip from UTC holding dual op amps.
That leaves two other chips on the board unidentified. But we can make some good guesses about what their functions might be. There are two LEDs on the board that give off either blue light or red light depending on what the BB-8 is doing. So it is likely that one of the mystery chips has a role in generating the constant-current source needed to drive the LEDs.
To figure out the likely role of the last mystery chip, it helps to know that the BB-8’s processor from ST Micro doesn’t contain any kind of special circuits for driving motors or for handling servo loops. That leads us to conclude that the last mystery chip probably has something to do with driving the two motors, closing the feedback loop around the magnetic encoders, and reversing the motors if necessary to get the BB-8 away from an obstacle.
That leaves two more components on the board worth commenting on. They are 16 and 8-MHz crystal oscillators both from JKE in China. The 16-MHz crystal seems to be for the Bluetooth Smart chip and perhaps an external clock for the ARM processor.
The other crystal’s role is a bit of a mystery, at least to us.
Finally, a note about the circuit board itself. Both sides are white rather than the traditional green. A white surface on top is there probably to better reflect the light from the two LEDs. But the reason for the white on the bottom surface of the PCB is anyone’s guess.