Last tested: Raspberry Pi OS Bookworm 64-bit | April 11, 2026 | Raspberry Pi 5 (8GB) with Coral USB Accelerator
Coral TPU Raspberry Pi 5 setup gives the board a dedicated edge inference engine that handles TensorFlow Lite models at speeds the CPU cannot match. The Coral USB Accelerator connects via USB 3.0, the libedgetpu runtime handles communication, and quantized TFLite models compiled for the Edge TPU run at 5 to 10ms per inference on image classification tasks. This guide covers installation, driver setup, device verification, a working inference test, and the most common failure points.
Key Takeaways
- The Coral USB Accelerator requires libedgetpu and a TFLite runtime. Neither comes pre-installed on Raspberry Pi OS.
- Only quantized TFLite models compiled with the Edge TPU compiler work on the Coral TPU. Standard TFLite models run on the CPU only.
- On Bookworm, the
apt-key addmethod for adding the Coral repo is deprecated. Use thegpg --dearmormethod instead. - Connect the Coral USB Accelerator to a USB 3.0 port (blue). USB 2.0 ports cannot supply enough bandwidth or power.
- Use
libedgetpu1-stdrather thanlibedgetpu1-maxfor sustained workloads on a Pi. The max runtime runs hotter and is better suited to desktop hardware with active cooling on the TPU itself. - Active cooling on the Pi 5 is required for sustained inference workloads. Throttling affects both CPU and USB controller performance.

Hardware and Software Requirements
Hardware
- Raspberry Pi 5. The USB 3.0 controller via the RP1 chip provides the bandwidth and power the Edge TPU needs
- Coral USB Accelerator (Google Edge TPU)
- Official Raspberry Pi 5 power supply (5V/5A USB-C). Underpowered supplies cause USB instability under inference load.
- 32GB+ microSD card or USB SSD for OS and model storage
- Active cooling case. The Pi 5 throttles under sustained USB and compute load without airflow.
The Pi 4 works with the Coral USB Accelerator but shows USB bottlenecks under sustained inference load due to the older USB controller architecture. Pi 5 is the recommended platform. For storage reliability on a system running continuous inference jobs, see Booting Raspberry Pi from USB SSD and Preventing SD Card Corruption on Raspberry Pi.
Software requirements
- Raspberry Pi OS Bookworm 64-bit (Python 3.11 included)
- Terminal access via SSH or direct connection
- Internet connection for package downloads
Initial System Setup
Update the OS
sudo apt update && sudo apt full-upgrade -y
sudo reboot
After rebooting, confirm the kernel version. Pi 5 needs kernel 6.1 or newer, which supports the RP1 chip handling USB:
uname -a
Connect the Coral USB Accelerator
Plug the Coral USB Accelerator into a USB 3.0 port (the blue ports on the Pi 5). USB 2.0 ports do not provide sufficient bandwidth or power for reliable TPU operation. If using a USB hub, it must be a powered hub. Confirm the device is detected:
lsusb
Before the driver is installed, the device appears as:
Bus 001 Device 004: ID 1a6e:089a Global Unichip Corp.
After driver installation it shows as the Coral Edge TPU. If the device does not appear at all, try a different USB 3.0 port, check the cable, and confirm the power supply is the official 5V/5A adapter.
Installing Coral TPU Drivers
Add the Coral APT repository
On Raspberry Pi OS Bookworm, apt-key add is deprecated. Use the gpg --dearmor method to add the Coral signing key securely:
# Download and install the signing key
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/coral-edgetpu.gpg
# Add the repository
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | \
sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
sudo apt update
Install libedgetpu
sudo apt install libedgetpu1-std -y
libedgetpu1-std is the standard runtime. It runs the TPU at its rated clock speed with moderate heat output. libedgetpu1-max overclocks the TPU for slightly faster inference but generates significantly more heat. On a Pi with passive or light active cooling, libedgetpu1-std is the right choice for sustained workloads. Only install one or the other. They conflict.
Verify udev rules
The libedgetpu package installs a udev rule that gives Python permission to access the TPU device. Confirm it is present:
cat /etc/udev/rules.d/99-edgetpu-accelerator.rules
If the file is missing, reinstall libedgetpu and reload the rules:
sudo apt install --reinstall libedgetpu1-std
sudo udevadm control --reload-rules && sudo udevadm trigger
Unplug and replug the Coral USB Accelerator after reloading rules. Reboot if the device still does not appear correctly in lsusb.
Install the TFLite runtime
The Python inference library is separate from libedgetpu. On Bookworm with Python 3.11, install from PyPI:
pip3 install tflite-runtime --break-system-packages
Confirm the import works:
python3 -c "import tflite_runtime.interpreter; print('OK')"
If you see an error about missing modules or architecture mismatch, the PyPI wheel may not support your exact Python version on ARM64. In that case, install from Coral’s GitHub releases page, which provides pre-built wheels for specific Python and platform combinations. Using a Python virtual environment also helps isolate version conflicts:
python3 -m venv coral-env
source coral-env/bin/activate
pip install tflite-runtime
Verifying the Coral TPU Raspberry Pi 5 Setup
Confirm device recognition
# Check USB device list
lsusb
# Check kernel messages for TPU device
dmesg | grep -i "coral\|edgetpu\|unichip"
After driver installation, lsusb should show the device with a different product string than the pre-driver state. If dmesg shows errors like device descriptor read/64, error -71, this is a power or cable issue, not a driver problem. Try a different cable and confirm the power supply.
Run a test inference
Download a pre-compiled Edge TPU model and a test image from Coral’s GitHub:
mkdir coral_test && cd coral_test
# Edge TPU compiled model
wget https://github.com/google-coral/test_data/raw/master/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite
# Test image
wget https://coral.ai/images/parrot.jpg
# Example classification script
wget https://github.com/google-coral/pycoral/raw/master/examples/classify_image.py
python3 classify_image.py \
--model mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--input parrot.jpg
A successful run returns a classification label and inference time. Typical results on Pi 5 with Coral USB are 5 to 10ms per inference. If you see Failed to load delegate from libedgetpu.so, the udev rules are not applied or libedgetpu did not install correctly. Recheck the previous section.
Performance Testing
Compare TPU vs CPU inference speed
The meaningful test is the same model with and without the TPU delegate. Run the Edge TPU compiled model first:
# With TPU
python3 classify_image.py \
--model mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--input parrot.jpg
# Without TPU (standard quantized model, CPU only)
python3 classify_image.py \
--model mobilenet_v2_1.0_224_inat_bird_quant.tflite \
--input parrot.jpg
A working TPU setup shows roughly 5 to 10ms with the Edge TPU model versus 60 to 100ms on the CPU alone with the equivalent quantized model. If the TPU inference time is close to or slower than CPU, the libedgetpu delegate is not loading. The model is running on the CPU despite the filename.
Sustained load and temperature
# Run 100 consecutive inferences
for i in {1..100}; do
python3 classify_image.py \
--model mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--input parrot.jpg > /dev/null
done
# Check Pi temperature after the run
vcgencmd measure_temp
# Check for throttle events
vcgencmd get_throttled
If temperature climbs above 80 degrees C or get_throttled returns a non-zero value, the Pi is throttling under load. Add active cooling before running production inference workloads. See Raspberry Pi Randomly Reboots Under Load for a full breakdown of throttle flag values.
Optimizing Performance
Model requirements
The Coral TPU only runs models that meet two conditions: the model must be quantized (weights converted from float32 to uint8 or int8), and it must be compiled with the Edge TPU compiler. A standard TFLite model, even a quantized one, runs on the CPU. Only the Edge TPU compiled version runs on the Coral hardware. Model filenames ending in _edgetpu.tflite are compiled for TPU inference.
For custom models, the workflow is: train normally, apply post-training quantization, export to TFLite, then compile:
# Post-training quantization (in your training environment)
converter = tf.lite.TFLiteConverter.from_saved_model('your_model_path')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_model = converter.convert()
# Save the quantized model, then compile for Edge TPU
edgetpu_compiler your_model.tflite
The Edge TPU compiler outputs a _edgetpu.tflite file and a log showing what percentage of operations are mapped to the TPU. Operations not supported by the Edge TPU fall back to CPU. Higher TPU mapping means better performance.
Power and cooling
- Use the official Raspberry Pi 5 power supply. Cheaper adapters drop voltage under combined USB and compute load, causing USB instability that looks like driver failures.
- Use a powered USB hub if running the Coral alongside other USB devices. Sharing USB bus power across multiple high-draw devices causes intermittent disconnects.
- Keep the Pi below 80 degrees C. The RP1 USB controller throttles independently of the CPU, which reduces TPU throughput even when CPU temperature looks acceptable.
- Use
libedgetpu1-stdfor sustained workloads. The max runtime increases TPU clock speed but generates heat proportional to the increase and shortens the thermal headroom on a small board.
Real-World Applications
Computer vision tasks
The Coral TPU handles image classification, object detection, face detection, and pose estimation at inference speeds that make real-time video processing practical on a Pi. A Pi 5 with Coral USB running MobileNet SSD can process a 1080p frame in under 15ms, which supports 30fps detection pipelines when capture and pre-processing overhead are managed efficiently. For a practical example of this applied to wildlife monitoring, see Raspberry Pi Bird Feeder Camera with Motion Detection, which uses a similar detection architecture on Pi hardware.
Edge AI deployment patterns
- Smart security camera: person or vehicle detection with local inference, no cloud dependency
- Industrial inspection: defect classification on a production line at low latency
- Environmental monitoring: species identification from camera trap images
- Wake word detection: always-on audio classification at very low power
Keep models under 10MB for best performance on the Coral USB. Larger models may exceed the TPU’s on-chip SRAM, which causes operations to spill to CPU and reduces the performance advantage. For comparison with a software-only local AI inference approach on the same hardware, see Raspberry Pi 5 llama.cpp Local LLM Setup.
Troubleshooting
Device not detected by lsusb
Try a different USB 3.0 port. Confirm the cable is not a charge-only cable. Data transfer cables are required. If using a hub, switch to a powered hub rated for at least 2.4A. Check dmesg | grep usb immediately after plugging in for kernel-level error messages. A power supply below 5V/5A combined with other USB devices is the most common cause of intermittent detection failures.
Failed to load delegate from libedgetpu.so
This error means Python found the TPU device but cannot load the runtime library. Check in order: confirm libedgetpu is installed (dpkg -l | grep libedgetpu), confirm the udev rule file exists (ls /etc/udev/rules.d/99-edgetpu-accelerator.rules), and confirm the current user has permission to access the device (ls -la /dev/bus/usb/). Reloading udev rules and replugging the device resolves most cases.
TPU disappears during inference
Intermittent disconnects during sustained inference are almost always power-related. Run dmesg | grep -i "voltage\|under" to check for undervoltage events. Check Pi temperature with vcgencmd measure_temp. The RP1 USB controller on Pi 5 reduces power delivery to USB ports when it detects thermal stress, which disconnects the Coral TPU mid-inference. Active cooling resolves this in most cases.
Unsupported data type or cannot allocate tensors
The model is not compiled for the Edge TPU. Regular TFLite models and quantized TFLite models without Edge TPU compilation both produce this error when passed to the libedgetpu delegate. Download a model specifically ending in _edgetpu.tflite from Coral’s test data repository, or compile your model using edgetpu_compiler.
tflite-runtime import fails on Python 3.11
Pre-built tflite-runtime wheels for Python 3.11 on ARM64 have not always been available through the standard PyPI channel. If pip3 install tflite-runtime installs but the import fails with a shared library error, check the Coral GitHub releases page for ARM64-specific wheels. Using a virtual environment with a specific Python version that has confirmed wheel support is the most reliable workaround until official Python 3.11 wheels are widely available.
FAQ
Can I use the Coral TPU with a Raspberry Pi 4?
Yes, but the Pi 4 uses an older USB controller that introduces more latency and has lower sustained bandwidth than the Pi 5’s RP1-based controller. For occasional inference tasks the Pi 4 works fine. For sustained video processing or high-throughput inference pipelines, Pi 5 is the better platform.
Why does the TPU disappear after plugging in?
Usually a power issue. The Coral USB Accelerator draws more current than typical USB devices. If other peripherals are connected to the same USB bus, the combined draw can exceed what the Pi’s onboard USB power management allows. Use a powered hub to give the TPU a dedicated power path, or disconnect other USB devices to test in isolation.
What models work with the Coral TPU?
Only TFLite models that have been quantized and then compiled with edgetpu_compiler. The Coral website and GitHub repository host a collection of pre-compiled models covering object detection, image classification, pose estimation, and segmentation. For custom models, the TFLite conversion and quantization steps must precede the Edge TPU compilation step.
How do I confirm the TPU is handling inference rather than the CPU?
Run the same classification task with the Edge TPU compiled model and compare the inference time against the standard quantized model on CPU. If the TPU is active, inference time drops from 60 to 100ms on CPU to 5 to 10ms on TPU. If the times are similar, the libedgetpu delegate is not loading and inference is falling back to CPU. Recheck driver installation and udev rules.
What is the difference between libedgetpu1-std and libedgetpu1-max?
The std runtime runs the Edge TPU at its standard clock speed. The max runtime overclocks the TPU for marginally faster inference at the cost of significantly more heat. On a Pi where the TPU is powered from the USB bus and there is no active cooling on the Coral stick itself, the max runtime causes thermal throttling that erases the performance gain. Use std unless you have confirmed adequate cooling for the TPU specifically.
References
- https://coral.ai/docs/accelerator/get-started/
- https://github.com/google-coral/edgetpu
- https://github.com/google-coral/pycoral
- https://www.tensorflow.org/lite/guide/python
- https://www.raspberrypi.com/products/raspberry-pi-5/
About the Author
Chuck Wilson has been programming and building with computers since the Tandy 1000 era. His professional background includes CAD drafting, manufacturing line programming, and custom computer design. He runs PidiyLab in retirement, documenting Raspberry Pi and homelab projects that he actually deploys and maintains on real hardware. Every article on this site reflects hands-on testing on specific hardware and OS versions, not theoretical walkthroughs.
Last tested hardware: Raspberry Pi 5 (8GB) with Coral USB Accelerator. Last tested OS: Raspberry Pi OS Bookworm 64-bit.

