Launched via Kickstarter, McRoboFace is a PCB board with 17 WS2812B RGB LEDs, also known as NeoPixels. These are fully addressable and arranged in the shape of a face. At full power, they’re blindingly bright and, while their intensity is adjustable via software, we’d advise purchasing the optional diffuser kit to soften the effect; the frosted acrylic diffuser is easily fitted to the front using three nylon screws, nuts, and spacers.
Either way, you’ll need to solder on the supplied four-pin rightangled header to connect it to your Raspberry Pi. It can also be driven by many other microcontrollers, including micro:bit, Arduino, Codebug, BeagleBone, Crumble, and ESP8266. When using it with the Pi, you have two options. The first method is to connect it via a Picon Zero, using output 5 set to WS2812B. Since the Picon Zero also features two H-bridge motor drivers, it’s an easy way to create a wheeled robot with an expressive face at the front.
Alternatively, you can hook the McRoboFace up directly to the Pi’s GPIO pins 5V and GND, along with GPIO 18 (the PWM pin) for precision control of the NeoPixels. While requiring a few extra setup steps, this method works perfectly well; no voltage level shifting is needed, as the pixels can be controlled using 3.3V quite happily. Incidentally, the fourth McRoboFace pin is a digital out for daisy-chaining with other NeoPixel displays.
The Pi connection method will determine the Python programming method for controlling McRoboFace. Again, a little more setup is required when using the GPIO pins directly, including the importing of the neopixel (rpi-ws281x) library. It’s not a major hurdle, however, as you can just adapt the example code from the GitHub repo.
Controlling the NeoPixels is easy enough, as they’re numbered on the PCB: 15 and 16 for the eyes, 14 for the nose, and the rest for the mouth. Since they’re all fully addressable, you can adjust the RGB shade and brightness of each precisely. This makes it possible to create some very impressive fade and colour cycle effects. Using Python lists also enables you to easily change several pixels at once for facial expressions.
Last word
4/5
McRoboFace is an inexpensive and fun way to add a bit of character to your robots or other creations with facial expressions, or as a general NeoPixel light display. You could even hook it up to an audio input, as Robin Newman did, to ‘sing’ along to music!