Documentation

Setup Guide

Complete hardware wiring and software installation guide for your Autobowl system.

Step 0: Get the 3D Printed Parts

This project requires the Mini Tabletop Bowling 3D printed automatic pinsetter files from Kickstarter. All mechanical components are 3D printed — no additional hardware needed except the PCA9685 servo driver board.

View Kickstarter Project
01

Hardware Requirements

The only electronic component you need to purchase separately is the PCA9685 servo driver board. All other components (servos, sensors, LEDs) are included with the Kickstarter kit or are standard Raspberry Pi accessories.

Main Controller

Raspberry Pi 4

  • 2GB+ RAM recommended
  • MicroSD card (16GB+)
  • USB-C power supply (5V 3A)
  • HDMI display (optional)

PCA9685 PWM Board

16-channel, 12-bit PWM driver via I2C for reliable servo control

7 Servos

Deck raise, slide, scissors, sweep arms, ball return

Stepper Motor

Turret control with Hall effect sensor for homing

Sensors

IR sensor (pins), ball sensor, Hall effect (turret home)

WS2812B LEDs

300 addressable RGB LEDs for lane lighting effects

Servo Channel Mapping

ChannelServoFunction
0Left RaiseDeck height (left side)
1Right RaiseDeck height (right side)
2SlideDeck forward/back movement
3ScissorsPin grab/release mechanism
4Left SweepLane sweep arm (left)
5Right SweepLane sweep arm (right)
6Ball ReturnBall return door
02

Wiring Diagrams

03

Software Setup

1

Quick Start (Cross-compile from Mac/Linux)

Build without WS2812 LED support for quick testing:

# Clone repository
git clone https://github.com/yourusername/autobowl.git
cd autobowl

# Build for Raspberry Pi 4 (64-bit)
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o autobowl-arm64 .

# Copy to Pi
scp autobowl-arm64 pi@<raspberry-pi-ip>:~/autobowl

# Run on Pi
ssh pi@<raspberry-pi-ip>
./autobowl
2

Build on Raspberry Pi (with LED support)

WS2812 LED control requires CGO and must be built on the Pi:

# Install dependencies
sudo apt update
sudo apt install -y golang git cmake build-essential

# Build WS2812 library
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
mkdir build && cd build
cmake .. && make
sudo make install
sudo ldconfig
cd ~

# Clone and build autobowl
git clone https://github.com/yourusername/autobowl.git
cd autobowl
CGO_ENABLED=1 go build -o autobowl .

# Run (requires root for WS2812 DMA access)
sudo ./autobowl
3

Enable I2C on Raspberry Pi

Required for PCA9685 servo board communication:

# Enable I2C interface
sudo raspi-config
# Navigate to: Interface Options → I2C → Enable

# Install I2C tools and verify PCA9685
sudo apt install -y i2c-tools
i2cdetect -y 1

# Should show device at address 0x40
04

Configuration

Servo Calibration

Access the debug page at http://<raspberry-pi-ip>:8080/debug to:

  • Adjust servo positions with sliders (0-180°)
  • Test stepper motor movement
  • Monitor sensor values in real-time
  • Trigger LED animations (Strike, Comet, etc.)

Web Interface URLs

/Main scoreboard display
/new-gameStart a new game
/playersPlayer management
/calibrationCamera pin calibration
/debugHardware diagnostics

LED Animation Modes

offAll LEDs off
idleSolid white
strikeRed wipe → Flash → White
comet4-LED white comet
greenSolid green (fill ball)
05

Troubleshooting

PCA9685 Not Detected

  1. Check I2C is enabled via sudo raspi-config
  2. Scan I2C bus: i2cdetect -y 1
  3. Should show device at address 0x40
  4. Check SDA/SCL wiring (GPIO2/GPIO3)
  5. Verify VCC (3.3V) and GND connections

Servos Not Moving

  1. Verify PCA9685 is detected via I2C
  2. Check external 5V power supply to V+ on PCA9685
  3. Ensure common ground between Pi, PCA9685, and power supply
  4. Test with debug page slider at /debug
  5. Check logs for "PCA9685 initialized" message

WS2812 LEDs Not Working

  1. Must run with sudo for DMA access
  2. Must be built on Pi with CGO_ENABLED=1
  3. Check data pin connection (GPIO21)
  4. Verify 5V power supply capacity (3A+ for 300 LEDs)
  5. Check logs for "WS2812 initialized" message

Sensors Not Detecting

  1. Check 3.3V power to sensor
  2. Verify GND connection
  3. Use debug page to view raw sensor values
  4. Sensors use internal pull-ups (active LOW)
  5. Test sensor output with multimeter