Despite having only 14 pads with 8 general purpose I/O pins available, there are a lot of possibilities with Circuit Playground Bluefruit. We went over all the internals in the last page. On this page we'll go through each pin/pad to explain what you can do with it.
Other than the Audio pad, no external I/O pads are shared with internal sensors/devices, so you do not need to worry about 'conflicting' pins or interactions!
There are 6 power pads available, equally spaced around the perimeter.
- GND - there are 3 x Ground pads. They are all connected together, and are all the signal/power ground connections
- 3.3V - there are two 3.3 Volt output pads. They are connected to the output of the onboard regulator. The regulator can provide about 500mA max, but that includes all the built in parts too! So you should roughly budget about 300mA available for your usage (450mA if you are not using the onboard NeoPixels)
- Vout - there is one Voltage Output pad. This is a special power pad, it will be connected to either the USB power or the battery input, whichever has the higher voltage. This output does not connect to the regulator so you can draw as much current as your USB port / Battery can provide. There is a resettable fuse on this pin, so you can draw about 500mA continuous, and 1 Amp peak before it will trip. If the fuse trips, just wait a minute and it will automatically reset
If you want to connect chips, sensors, and low power electronics that requires 3.3V clean power, use the 3.3V pads.
If you want to connect servos, NeoPixels, DotStars or other high power electronics that are OK up to 5V, use the Vout pad.
Next we will cover the 8 GPIO (General Purpose Input Ouput) pins! For reference you may want to also check out the datasheet-reference in the downloads section for the core nRF52840. We picked pins that have a lot of capabilities.
All the GPIO pads can be used as digital inputs, digital outputs, for LEDs, buttons and switches. In addition, A1-A6 can be used as analog inputs (12-bit ADC) (TX and Audio can not!). All but Audio can be used for capacitive touch. All pads can also be used as hardware interrupt inputs.
Each pad can provide up to ~20mA of current. Don't connect a motor or other high-power component directly to the pins! Instead, use a transistor to power the DC motor on/off
All of the GPIO pads are 3.3V output level, and should not be used with 5V inputs. In general, most 5V devices are OK with 3.3V output though.
Other than Audio, which is shared with the speaker, all of the pads are completely 'free' pins, they are not used by the USB connection, LEDs, sensors, etc so you never have to worry about interfering with them when programming.
Let's start with Audio which is in the bottom right corner, and work our way counter-clockwise. Because the nRF52840 is flexible with PWM pins, you can make any of the pins PWM outputs
- Audio (a.k.a D12) - This is a designated pin that is OK with high speed PWM signal, so it's great for playing basic audio clips - it's also connected to the little speaker on board. In can be digital I/O, but if you do that it will interfere with the built-in speaker. This is the one pin that cannot be used for capacitive touch.
- A1 / D6 - This pin can be digital I/O, or analog input and can be capacitive touch sensor
- A2 / D9 - This pin can be digital I/O, or analog input and can be capacitive touch sensor
- A3 / D10 - This pin can be digital I/O, or analog input and can be capacitive touch sensor
- A4 / SCL / D3 - This pin can be digital I/O, or analog input. This pin is also the designated I2C SCL pin, and can be capacitive touch sensor
- A5 / SDA / D2 - This pin can be digital I/O, or analog input. This pin is also the designated I2C SDA pin, and can be capacitive touch sensor
- A6 / RX / D0 - This pin can be digital I/O, or analog Input. This pin has PWM output, Serial Receive, and can be capacitive touch sensor
- TX / D1 - This pin can be digital I/O. This pin has PWM output, Serial Transmit, and can be capacitive touch sensor
These are the names of the pins that are used for built in sensors and such! CircuitPython has more user friendly names available as well for some pins with things like buttons and LEDs on them - these are included in parentheses where applicable. Both names will work in CircuitPython!
D4 (BUTTON_A) - Left Button A
- D5 (BUTTON_B) - Right Button B
- D7 (SLIDE_SWITCH)- Slide Switch
- D8 (NEOPIXEL) - Built-in 10 NeoPixels
D11 (SPEAKER_SHUTDOWN; in CircuitPython, use
board.SPEAKER_ENABLE) - Power control to the speaker amp, pulled up by default. Set to output and LOW to turn off the speaker and save power.
- D12 / AUDIO (SPEAKER) - Speaker analog output
- D13 - Red LED
- A8 (LIGHT) - Light Sensor
- A9 (TEMPERATURE) - Temperature Sensor
- D24 - PDM mic data
- D25 - PDM mic clock
- D26 - Internal I2C SCL for accelerometer
- D27 - Accelerometer interrupt
- D28 - Internal I2C SDA for accelerometer
- D29 ~ D34 - QSPI FLASH chip pins
- D35 - Sensor + NeoPixel power pin, default is pulled LOW (to enable power to sensors and NeoPixel). Set to output and HIGH to turn off power to NeoPixels and light/thermistor/microphone. Accelerometer does not get turned off (so you can do shake-to-wake). Speaker shutdown pin is different as well