Skip to the content
PCBKitNew board
2 layers142.2 × 99.1 mmCowPi mk3a, the printed circuit board in 3D

CowPi mk3a

DocBohn/CowPi1

Library for the Cow Pi hardware kit used to teach memory-mapped I/O, polling, and interrupts.

Size
142.2 × 99.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
65
Nets
73
Pads
265
Tracks, vias
358, 20
Pours
3
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
17 Aug 2022
Updated
27 Oct 2024

Overview

CowPi mk3a is an open-source printed circuit board by DocBohn, from the DocBohn/CowPi repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 142.2 × 99.1 mm with 65 parts on 73 nets, routed with 358 tracks and 20 vias.

It is built around the 74HC595, 74LS20P-E and PN2222A. Its parts include 21 switches, 18 diodes, 7 connectors, 3 resistors and 2 ICs. It belongs with the AVR (ATmega, ATtiny) and NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

3

README

README.md

CowPi Library

GitHub Release GitHub License

Arduino Library PlatformIO Registry

Depends on CowPi_stdio

What is the Cow Pi?

The hardware

The Cow Pi is a simple circuit that consists of a microcontroller board, a display module, a couple of LEDs, a couple of momentary buttons, a couple of maintained switches, and a matrix keypad. We use it to teach memory-mapped I/O, polling, and interrupts.

The library

Initially we supported the memory-mapped I/O lab with a header file that defined some structs and named constants. Later we added some macros to reduce complexity that didn't contribute to the learning objectives.

We decided to create a library for three reasons:

  • It allows us to provide some additional bootstrapping for students: they'll be able to work on polling logic using some of the functions in the library and then later replace those with functions that use memory-mapped I/O. Or they can start with memory-mapped I/O and then move on to the polling logic. Before the library, students had no choice but to start with memory-mapped I/O.
  • It allows us to replace parameterized macros with functions.
  • We can use more complex display modules. Originally, the Cow Pi's display module was an 8-digit/7-segment display module. The Terasic Altera DE1 boards that we used to use had a 4-digit/7-segment display. Manipulating 7-segment displays is incredibly easy. To simplify the supply chain for our supplier, we're going to try using 2-row/16-column LCD display modules. Manipulating the LCD1602 display modules is not incredibly easy. With a library, we can let students focus on the memory-mapped I/O aspect and not on the details of controlling the display module.

Why is it called the Cow Pi?

Because it's punny.

No, I mean, -Pi is typically used as a suffix for circuits that use a Raspberry Pi instead of an Arduino.

Typically, yes, but Cowduino isn't very punny, is it?

Besides, there soon will be a version of the Cow Pi that makes use of the Raspberry Pi Pico. That's why we said that the circuit has "a microcontroller board" instead of "an Arduino Nano."

Why did you design something new? Didn't you consider something manufactured?

We used to use the Terasic Altera DE1. Our computer science students and software engineering students didn't reprogram the FPGA; they simply used C and compiled their programs to run on the Nios II soft core that came pre-programmed into the FPGA. When we decided it was time to stop using the DE1s, our computer engineering students switched to the Terasic DE10-Lite, but we decided that the cost was too great for the features that our CS and SE students would use.

The problem we ran into with the various Arduino shields or Raspberry Pi hats is that they either were unavailable in the quantity we needed, or would require our students to solder them together -- and we have no expectations that our CS and SE students are able to solder. We were pretty sure that they could put together a circuit on a solderless breadboard, though.

We are, however, planning to have PCBs manufactured and assembled, assuming we can keep the cost down.

The Cow Pi uses nearly all of the pins on the Arduino Nano; that'll make it hard to do any other projects with it.

Yes, that's true. The Cow Pi is designed to support specific learning objectives. If you want to do a different project, then disassemble the kit and use the parts to build your project.

Why don't you just use existing libraries like LiquidCrystal and Wire?

Because those libraries hide the details. Part of what we use the Cow Pi for is teaching memory-mapped I/O.

Have you considered making the CowPi library work with MicroPython or CircuitPython?

😐

Python isn't exactly known for being a language that exposes the underlying hardware. While it's possible to make the library work with MicroPython and/or CircuitPython, that'd defeat the point of the library being a way to hide only the complexities that are unrelated to memory-mapped I/O, polling, and interrupts.

Are you going to make it work with the XYZ microcontroller board?

Probably.

The Cow Pi works with the Arduino Nano and the Arduino Uno.

We have plans to make it work with the Arduino Mega 2560, the Arduino Nano Every, the Arduino Nano 33 IOT, and the Raspberry Pi Pico (both using the Arduino framework and using the Pico SDK). Probably the Raspberry Pi 4 and 400, too. Eventually the Arduino Nano 33 BLE Sense, the Arduino RP2040 Connect, and the Arduino Uno WiFi & Arduino Uno R4 (but we don't have samples of any of these laying around).

What about the STM32 "Blue Pill," or something in the Adafruit Feather family, or the SparkFun Teensy family, or...?

If there's interest using one of these microcontroller boards for the Cow Pi, we can certainly look into it.

Similarly, if there's interest in a different display module, we can look into it.

Parts

65
QtyValueFootprintReferences
161N4001Diode_THT:D_DO-41_SOD81_P2.54mm_Vertical_AnodeUpD3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16, D17, D18
4Conn_01x01_MaleTestPoint:TestPoint_Pad_D2.0mmJ3, J4, J5, J6
3MountingHoleMountingHole:MountingHole_3mm_PadH1, H2, H3
2470Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR1, R2
2SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mmJP1, JP4
110KResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR7
110KPotentiometer_THT:Potentiometer_Vishay_248GJ-249GJ_Single_VerticalRV1
174HC595Package_DIP:DIP-16_W7.62mm_SocketU2
174LS20Package_DIP:DIP-14_W7.62mm_SocketU1
1Arduino_Nano_v3.xModule:Arduino_NanoA1
1BreakoutsConnector_PinSocket_2.54mm:PinSocket_2x08_P2.54mm_VerticalJ2
1Button NAND JumperConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP2
1Conn_01x16_FemaleConnector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_VerticalJ7
1External PowerConnector_BarrelJack:BarrelJack_HorizontalJ1
1GreenLED_THT:LED_D5.0mmD2
1Key #Button_Switch_THT:SW_PUSH_6mm_H5mmSW15
1Key *Button_Switch_THT:SW_PUSH_6mm_H5mmSW7
1Key 0Button_Switch_THT:SW_PUSH_6mm_H5mmSW11
1Key 1Button_Switch_THT:SW_PUSH_6mm_H5mmSW4
1Key 2Button_Switch_THT:SW_PUSH_6mm_H5mmSW8
1Key 3Button_Switch_THT:SW_PUSH_6mm_H5mmSW12
1Key 4Button_Switch_THT:SW_PUSH_6mm_H5mmSW5
1Key 5Button_Switch_THT:SW_PUSH_6mm_H5mmSW9
1Key 6Button_Switch_THT:SW_PUSH_6mm_H5mmSW13
1Key 7Button_Switch_THT:SW_PUSH_6mm_H5mmSW6
1Key 8Button_Switch_THT:SW_PUSH_6mm_H5mmSW10
1Key 9Button_Switch_THT:SW_PUSH_6mm_H5mmSW14
1Key AButton_Switch_THT:SW_PUSH_6mm_H5mmSW16
1Key BButton_Switch_THT:SW_PUSH_6mm_H5mmSW19
1Key CButton_Switch_THT:SW_PUSH_6mm_H5mmSW20
1Key DButton_Switch_THT:SW_PUSH_6mm_H5mmSW21
1Keypad NAND JumperConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP3
1LOGOartwork:CowPiLogo-40x20-soldermaskG***
1LOGOartwork:CowPiLogo-14x7G***
1Left ButtonButton_Switch_THT:SW_PUSH_6mm_H5mmSW2
1Left SwitchButton_Switch_THT:SW_Slide_1P2T_CK_OS102011MS2QSW17
1Output EnableConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJP5
1PN2222APackage_TO_SOT_THT:TO-92_InlineQ1
1RESETButton_Switch_THT:SW_PUSH_6mm_H5mmSW1
1RedLED_THT:LED_D5.0mmD1
1Right ButtonButton_Switch_THT:SW_PUSH_6mm_H5mmSW3
1Right SwitchButton_Switch_THT:SW_Slide_1P2T_CK_OS102011MS2QSW18
1WC1602ADisplay:WC1602ADS1

Questions

How big is the CowPi mk3a PCB?

It measures 142.2 × 99.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CowPi mk3a use?

65 parts, built around the 74HC595, 74LS20P-E and PN2222A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the CowPi mk3a KiCad files?

From the DocBohn/CowPi repository on GitHub, at the commit this page was made from: the board is extras/hardware/mark-3a/kicad-files/CowPi-mk3a.kicad_pcb and its schematic extras/hardware/mark-3a/kicad-files/CowPi-mk3a.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the CowPi mk3a design in my own project?

Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers119.9 × 73.4 mmArduinoMultiInterface, the printed circuit board in 3D

    ArduinoMultiInterface

    RomualdRousseau/Miniish

    Homebrew 6502 Computer

    28 parts1GPL-3.0
  • 2 layersApollo, the printed circuit board in 3D

    Apollo

    rigidus/rigidus.ru

    Contacts: email: i.am.rigidus טּ gmail.com jabber: rigidus@jabber.ru

    111 parts20AGPL-3.0
  • 2 layers50 × 50 mmPectenAlphaSMD, the printed circuit board in 3D

    PectenAlphaSMD

    Mucio-18/Herramientas_Microchip_XC8-PicAs

    Repositorio con archivos include de códigos para microcontroladores PIC con el compilador XC8 pic-as

    31 parts1
  • 2 layers78.7 × 53.3 mmCoffee timer, the printed circuit board in 3D

    Coffee timer

    tibordp/coffee-timer

    Kitchen timer on an ATtiny85 with a 7-segment display and a couple of shift registers

    28 parts1GPL-2.0
  • 2 layers202.6 × 43.9 mm8bit, the printed circuit board in 3D

    8bit

    dustinb/Make8BitBlink

    8bit computer program loader

    10 parts
  • 2 layers301 × 262.6 mm1 Sistema FINAL, the printed circuit board in 3D

    1 Sistema FINAL

    felipesantiagoach-ops/cdp1802-8bit-computer

    8-bit microcomputer based on the RCA CDP1802, the first CMOS microprocessor. Three stages designed in KiCad: two built and tested (assembly programs, UART, Tiny BASIC, Elf/OS) and a final design with an ADC, I²C/SPI…

    207 parts
  • 2 layers77.3 × 76.7 mmLed matrix 8x4 module, the printed circuit board in 3D

    Led matrix 8x4 module

    jkga/led_matrix_8x4_module

    This repository aims to provide a basic program, schematic diagram, and PCB design for an eight by four (8x4) LED matrix with Arduino and SN74HC595 shift register IC

    69 partsMIT
  • 2 layers117.2 × 115.1 mmExED, the printed circuit board in 3D

    ExED

    lucaci32u4/ExED

    Extended Digital Electronics Laboratory

    136 partsGPL-3.0