It would be good to have some understanding of Pycom microcontroller boards before reading this article. We won’t go into what capabilities each microcontroller board has. If you’d like an introduction, try our Pycom WiPy Overview.
The Pycom microcontroller boards are built around the standard 0.1” pitch so they go straight into a breadboard. But using any microcontroller on its own requires that you’re careful about connecting things to it. First there’s power: 3.3V to 5.5V -- and you need to be sure about polarity! You’ll likely want to run your finished project from a battery, so you’ll need a separate board to manage that. All Pycom devices can be programmed over the built-in WiFi, so you don’t have to connect an FTDI board to program it. A basic circuit with an input and output would be good so you can verify the simple things before writing a complex program. Another thing you might attach is an SD card socket for data logging.
Wouldn’t you like a short-cut to all that?
Enter the Pycom Expansion Board 2.0. With duplicated pin headers you can drop-in any Pycom microcontroller and still have a place to connect jumper wires to a breadboard or slide-on an extra circuit board. The power issues are all sorted: USB power or battery power is automatically selected. Not only does your project now have reverse polarity protection but the battery will be charged whenever another power source is available. It has a USB socket and an FTDI chip ensuring the 5V signals from the USB socket are dropped to 3.3V before arriving at the UART. There’s a micro SD card socket too!
Breadboard prototyping with micro SD card and LiPo battery
The three LEDs indicate USB power on, battery charging, and any function you’d like to program on pin P9. The on-board button connects to pin P10 to provide a basic input. There’s an onboard voltage divider circuit for monitoring the battery voltage via pin P16. A row of jumpers gives you the option to disconnect the default functions of the expansion board and makes those pins available for any other purpose. If you’re programming over Telnet, for example, you can disconnect the FTDI chip so you have both onboard UARTs available to connect to other devices.
Pinouts
Pinout diagram
Looking at the pinout diagram we can see the power connectors at the top-right of the board with red and black tags. VIN must be in the range 3.3V to 5.5V. The 3.3V pin takes power from the microcontroller’s regulator so, in the case of the WiPy, up to 550mA can be supplied..
The RESET pin (yellow tag) is useful for resetting other devices when the reset button on the microcontroller is pressed. The other yellow tagged pins (P9, P10) are connected to the LED and BUTTON on the Expansion Board. The LED can be disconnected via the LED jumper on the left of the board. The BUTTON doesn’t have a disconnection jumper as it’s a normally-open switch and so does nothing unless operated.
Pin P16 has a green VBATT tag. This is connected through the Internal Voltage Divider circuit shown in the breakout below it. By configuring P16 as an analogue input the voltage of the battery can be read directly. Your code can then change the device’s behavior based on how much power it has left. This too can be disconnected with the BAT jumper if you don’t want it.
All the features of the microcontroller board are unobstructed so you can still use the RGB LED, the reset button and the U.FL antenna connector. The microcontroller board doesn’t obstruct the Expansion Board 2.0 either. If you’ve ever had to use a spudger to get to a nearly-inaccessible reset switch, you’ll appreciate it!
Summing Up
I highly recommend an Expansion Board 2.0 if you’re starting out with Pycom devices. It simplifies the hardware configuration and gets you programming within minutes of unpacking the parts.