Hardware
This section describes the Cow Pi development boards, describes the theory of operation for its components, and summarizes the features of its display module.
Important
If you need to assemble a Cow Pi development board, see the Cow Pi Physical Assembly Instructions.
Cow Pi Development Board Overview
The Cow Pi development board consists of:
a microcontroller board, such as an Arduino Nano, an Arduino Uno, or a Raspberry Pi Pico
a display module, such as a MAX7219-driven 8-digit/7-segment display, an HD44780-driven LCD character display, or an SSD1306-driven OLED graphic display
a 4 × 4 matrix keypad
two momentary buttons
two toggleable switches, and
at least two LEDs
Cow Pi mk1 boards are assembled on solderless breadboards:
Cow Pi mk2 boards are assembled on perfboards:
Cow Pi mk3 boards are assembled on through-hole PCBs:
Cow Pi mk4 boards are assembled on surface-mount PCBs:
The toggleable switches are referred to as the left switch and the right switch, and each can be positioned in the left or right position. When a switch is in the right position, its logic value is high, by way of a pull-up resistor. When a switch is in the left position, the switch is grounded, and its logic value is low.
The momentary buttons are referred to as the left button and the right button, and each can be pressed (alternatively, in the down position) or unpressed (alternatively, in the up position). The buttons are normally-open, and so when a button is unpressed, its logic value is high, by way of a pull-up resistor. When a button is pressed, the button is grounded, and its logic value is low.
The LEDs are referred to as the left LED and the right LED. An LED will illuminate when the corresponding microcontroller output is high, and it will deluminate when the corresponding microcontroller output is low. Most of the microcontroller boards incorporated into Cow Pi designs have an LED mounted on the microcontroller board itself, which we refer to as the internal LED. The internal LED on Arduino boards also serves as the left LED. The internal LED on Raspberry Pi Pico boards are a distinct, third LED.
The matrix keypad is designed to be scanned using the conventional approach of selectively setting the rows’ logic values and reading the columns’ resulting logic values.
Warning
The matrix keypads used in the Cow Pi mk1 designs and the mk2a & mk2b designs cannot safely have multiple keys simultaneously pressed. Certain key combinations will result in a short circuit.
Important
The matrix keypad used in the Cow Pi mk2c design cannot reliably read more than two simultaneously-pressed keys. Certain key combinations will result in unpressed keys falsely being detected as pressed.
Note
The matrix keypad used in the Cow Pi mk3 & mk4 designs use general-purpose diodes to isolate the keys. Any combination of up to 16 simultaneously-pressed keys can safely and reliably be read on Cow Pi mk3 & mk4 designs only.
The microcontroller communicates with the display module using either the Serial Peripheral Interface (SPI) protocol or the Inter-Integrated Circuit (I2C or IIC) protocol, also known as the Two-Wire Interface (TWI) protocol.