Skip to the content
2 layers79.6 × 68.8 mmShield teensy4.0, the printed circuit board in 3D

Shield teensy4.0

AhmedAmineSebti/NXP-CUP

The car uses an onboard smart camera to detect track lines, a custom PCB centered on a Teensy 4.1 microcontroller to run the real-time control loops, and a set of IR/ToF sensors for start-line detection and obstacle…

Size
79.6 × 68.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
35
Nets
43
Pads
125
Tracks, vias
245, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
27 Aug 2026
Updated
4 Sep 2026

Overview

Shield teensy4.0 is an open-source printed circuit board by AhmedAmineSebti, from the AhmedAmineSebti/NXP-CUP repository on GitHub. It is a 2-layer board of 79.6 × 68.8 mm with 35 parts on 43 nets, routed with 245 tracks and 0 vias.

Its parts include 21 connectors, 5 resistors, 2 ICs, 1 capacitor and 1 diode. It belongs with the NXP (LPC, Kinetis, i.MX RT) boards of this library.

README

README.md

NXP Cup Racing Car

Overview

The car uses an onboard smart camera to detect track lines, a custom PCB centered on a Teensy 4.1 microcontroller to run the real-time control loops, and a set of IR/ToF sensors for start-line detection and obstacle stopping. This README covers the mechanical design and electronic architecture of the vehicle.

Mechanical Design

  • Chassis and all mechanical supports designed and modeled in SolidWorks.
  • Ackermann steering mechanism: an MG996R servo mounted centrally on the front axle drives both front wheels via a linkage (biellette), so the wheels trace concentric circles in a turn — no lateral scrub.
  • Camera mast: a raised mount holding the Pixy2 camera for a forward, elevated view of the track.
  • HMI mount: a dedicated 3D-printed support integrating the OLED display and 2 push buttons.
  • Front bumper design integrates 4 IR sensors symmetrically plus a centered ToF sensor.
  • Parts were 3D printed; most structural parts in PLA.

Electronic Architecture

System Layers

The system is organized in three functional layers around the Teensy 4.1:

  • Perception: Pixy2 camera (line detection), 4× IR sensors (start/finish line), ToF sensor (obstacle distance)
  • Processing: Teensy 4.1 — runs two parallel PID loops (steering and speed)
  • Actuation: MG996R servo (steering), DC motor via H-bridge (propulsion)

Microcontroller — Teensy 4.1

  • ARM Cortex-M7 @ 600 MHz, hardware floating-point unit, 1 MB RAM
  • Arduino-compatible, multiple SPI/I²C/UART buses, independent PWM timers
  • 35.6 × 17.8 mm footprint, 3.3 V logic level (matches all sensors used)

Human-Machine Interface (HMI)

  • 0.96" OLED display — shows live PID gains and system state
  • 2 push buttons — mode selection and race start

Components Summary

ComponentReferenceRoleInterface
MicrocontrollerTeensy 4.1Central processing—
CameraPixy2 v2Line detectionSPI
IR sensorsTCRT5000 × 4Start/finish lineGPIO
ToF sensorVL53L0XObstacle stopI²C
Steering servoMG996RWheel steeringPWM
Drive motorBrushed DC motorPropulsionPWM + H-bridge
Display0.96" OLEDStatus displayI²C
ButtonsPush button × 2Mode selection/Race startGPIO
Wheel encodersQuadrature, 408 CPRSpeed/position feedbackGPIO (interrupt)
Power source3S LiPo (12.6 V)Energy source—

Pinout (Teensy 4.1)

PinPeripheralSignalInterface
12Pixy2 CameraSPI RX (MISO)SPI0
11Pixy2 CameraSPI TX (MOSI)SPI0
13Pixy2 CameraSPI SCKSPI0
10Pixy2 CameraSPI CSSPI0
18VL53L0X / OLEDI²C SDAI²C0
19VL53L0X / OLEDI²C SCLI²C0
17MG996R ServoPWMPWM
6-7-22-23IBTsPWM (speed)PWM
14–17IR sensors 1–4Start lineGPIO (pull-up)
2-3-4-5Rotary encoderCH A/BGPIO (interrupt)
8Mode buttonSWGPIO
9Start buttonSWGPIO

Photos

NXP Cup car — isometric view NXP Cup car — front sensors and steering

Repository Contents

  • CAD files (chassis, camera mast, steering mechanism, HMI mount)
  • PCB design files (KiCad project)
  • 3D-printable part files

Parts

35
QtyValueFootprintReferences
7Conn_01x02Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ5, J6, J7, J8, J18, J19, J21
5Conn_01x04Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_VerticalJ11, J13, J14, J15, J20
5RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1, R2, R3, R4, R5
4MountingHoleMountingHole:MountingHole_3mmH1, H2, H3, H4
4Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ3, J4, J9, J16
3Conn_01x06Connector_JST:JST_XH_B6B-XH-A_1x06_P2.50mm_VerticalJ1, J2, J12
2Conn_01x03Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalJ10, J17
14N25Package_DIP:DIP-6_W7.62mmU2
1C_PolarizedCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
1DEV-15583DEV-15583:MODULE_DEV-15583U1
1LEDLED_THT:LED_D3.0mmD1
1SW_SPSTButton_Switch_THT:SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mmSW1

Similar boards

  • 2 layers97.2 × 59.1 mmArmLEDsPrototype, the printed circuit board in 3D

    ArmLEDsPrototype

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    35 parts915
  • 2 layers62 × 42 mmMod cell 0 02, the printed circuit board in 3D

    Mod cell 0 02

    Green-bms/SmartBMS

    Open source Smart Battery Management System

    35 parts756
  • 2 layers75 × 26 mmDIY detector electron variant, the printed circuit board in 3D

    DIY detector electron variant

    ozel/DIY_particle_detector

    A mobile low-cost spectrometer for measuring radioactivity and the energy of ionising radiation like alpha particles and electrons

    35 parts558BSD-2-Clause
  • 2 layers45 × 25 mmReCamera Basically Board, the printed circuit board in 3D

    ReCamera Basically Board

    Seeed-Studio/OSHW-reCamera-Series

    reCamera is a series of open-source AI cameras.

    35 parts495Apache-2.0
  • 2 layers160.8 × 24.4 mmHUD VID RCD PANEL, the printed circuit board in 3D

    HUD VID RCD PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    35 parts431
  • 2 layers75 × 50 mmBackplane tester, the printed circuit board in 3D

    Backplane tester

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    35 parts397Apache-2.0
  • 2 layers50 × 20.5 mmOtterIron PRO Top, the printed circuit board in 3D

    OtterIron PRO Top

    Jana-Marie/Otter-Iron-PRO

    USB-PD soldering station for JBC C245 handles.

    35 parts321
  • 2 layers50.5 × 67.1 mmHackheld Vega, the printed circuit board in 3D

    Hackheld Vega

    SpacehuhnTech/HackHeld

    Hackable Handheld

    35 parts277

Questions

How big is the Shield teensy4.0 PCB?

It measures 79.6 × 68.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Shield teensy4.0 use?

35 parts. 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 Shield teensy4.0 KiCad files?

From the AhmedAmineSebti/NXP-CUP repository on GitHub, at the commit this page was made from: the board is éléctronique/shield_teensy4.0/shield_teensy4.0.kicad_pcb and its schematic éléctronique/shield_teensy4.0/shield_teensy4.0.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Shield teensy4.0 design in my own project?

Its repository states no licence, so its author keeps all rights: ask AhmedAmineSebti before reusing the design.