LogoLogo
GitHub
  • Welcome to smart city traffic monitoring
  • Getting Started
  • Build Your Own Device (DIY)
    • Recommended Hardware
    • Assembly Instructions
    • Software Installation
  • Deployment and Mounting Guide
  • Setup Guide
  • Configuration
    • Config Overview
    • Frigate Config
    • Node-RED Config
  • Development
    • Dev Environment
    • Contributing
  • Help & FAQ
    • Frequently Asked Questions
    • Where can I get support?
  • Sensor Payloads
    • Events Payload
    • Radar Payload
    • Air Quality (AQ) Payload
Powered by GitBook
On this page
  • Sample Configurations
  • Hardware Check List - Bill of Materials (BOM)
  • Computing Device
  • Storage
  • Power
  • Camera(s)
  • AI Co-processor
  • Radar
  • Other Sensors
  • Enclosure (weather-resistant box)

Was this helpful?

Edit on GitHub
Export as PDF
  1. Build Your Own Device (DIY)

Recommended Hardware

Commodity hardware to enable object detection and speed/direction measurement.

Last updated 2 months ago

Was this helpful?

Customize the hardware to fit your needs! The core components include the computing device, storage, camera, and co-processor. Feel free to mix-and-match components but most of the documentation and default configuration assumes using the hardware recommended below.

Sample Configurations

Here are some sample sensor configurations and the data it collects:

  • The camera + AI co-processor is the lowest cost and will give you object detection and direction.

  • Add in a radar for the most accurate speed and direction measurements.

  • Include an environmental sensor to also measure air quality, gases, particulate matter, noise, temperature, and much more.

  • (future feature) Install only the radar for the most privacy-conscious built that will be capable of basic object detection, speed, and direction.

  • Add in an additional camera to monitor a second direction using the same AI co-processor.**

** The traffic monitor software is capable of supporting potentially any number of cameras either connected directly or via a local feed on the same AI co-processor for monitor multiple directions or any other configuration (see for more details). The TM software also has support for up to four (4) radars directly connected and paired in any pattern to the cameras.

Hardware Check List - Bill of Materials (BOM)

Use the following checklist as a quick guide to components you need to purchase

We are not affiliated with any of the stores or companies linked in this section. These are suggestions that have been used or tested by contributors. If you have used or tested more, post on !

Computing Device

The Traffic Monitor is based on the Raspberry Pi 5. The Raspberry Pi 4B and earlier units are not recommended as they have experienced detrimental performance due to not meeting the power requirements on the peripherals (USB) for the TPU and radar for this setup. However, many have been successful with earlier versions of the Raspberry Pi for object detection, so your mileage may vary.

Storage

(Required) A high-quality microSD card or a SSD (see alternative). Recommend at least 32GB capacity for system files with minimal (or no) snapshot and video capture.

Power

(Required) To run the Traffic Monitor and components.

The Raspberry Pi 5 is rated for 27-watts (5V at 5A) and using anything with a lower rating like the older RPi PSUs will often result in resets and/or throttling. However, the Traffic Monitor typically consumes between 6-14-watts of energy when it is fully operational and inferencing, depending on number of components in use and how much motion is detected.

Camera(s)

(Required) For full object detection capabilties.

The Raspberry Pi 5 has 2 camera transceiver slots, so you can easily attach 2 native Raspberry Pi cameras.

AI Co-processor

(Required with camera) The AI co-processor is an efficient way to run the object detection model, much more efficient than CPU-alone.

  1. Alternative: Coral HATs (Hardware-Attached-on-Top [of a Raspberry Pi]) are more compact, upgradable, and usually cheaper:

Radar

(Recommended) Provides accurate speed and direction measurement.

Planned future capability of object detection and confirmation with the radar, which will be enabled with a software update.

Other Sensors

(Optional) For additional environmental data.

The TM enclosure attempts to isolate the AQ sensor by physically separating the hardware. This way the heat from the RPi and other components do not interfere with environmental readings.

Get AQ sensor details and capabilities on the Air Quality (AQ) Payload page.

Enclosure (weather-resistant box)

  • Purchase: (coming soon) Purchase the box or a kit to assemble yourself.

(Required) (RPi 5) 4GB/8GB. The Traffic Monitor is designed around 4GB memory profile, but if you have many sensors and other applications running, 8GB may be more performant.

Also pick up a (very cheap) official CPU cooler: which helps prevent overheating on very hot days.

Option: Setup has been tested and works well with the .

Option: should perform particularly well but sizes only range up to 128GB.

Alternative: There are many options on the RPi5 to use a faster, more durable NVME (M.2) drive, including those that pair with the Coral TPU, such as the Pineboards .

Recommended Option: The official for testing and permanent mounts.

Alternative: PoE (Power over Ethernet) HATs available for the RPi 5. Raspberry Pi Foundation has not yet released an official one, but if you have a working solution suggest it in the !

(Future discussion) Solar panel + battery. There have been working prototypes, with caveats. Discuss it in the !

The official, connected Raspberry Pi cameras are below recommended for compact, local object detection; however any camera that can output H.264 is conceivably compatible with the traffic monitor, so you may attach USB or even networked cameras. See more at for alternatives.

Recommended: (wide angle recommended)

Requires a that is sold separately.

Alternative/additional: for faster motion capture and custom-lens based on your needs

Requires a that is sold separately.

See the for more information on tuning stream configurations based on various goals for your deployment.

The AI co-processor is used by Frigate to run the object detection model, see Frigate's for more options and details.

. The Coral TPU is capable of 100+ FPS with millisecond inference time. Other co-processors may work, but the Coral TPU is fully supported with out of the box.

Easiest Option: is easy-to-use co-processor that you can connect to any computing device with a USB interface.

pairs nicely with the (not the A+E key!).

Pineboards offers the that connects via PCIe that offers a sleek way to add the Coral capabilities with an additional slot for an M.2 SSD.

Alternative (currently testing): with Hailo-8L offers high-performance, power-efficient processing.

- certified with same tests as law enforcement speed radars. Detection up to 100-meters away.

Air quality (AQ) sensor: paired with the (recommended) . Also pick up a longer ribbon cable, we recommend the .

Print it yourself: We offer a 3D printable model so you can build the truly open source Traffic Monitor. Visit our open source repository for details and parts list.

Alternative DIY: There are many waterproof electrical junction boxes that may be modified to fit your needs with the traffic monitor. Rough dimensions to fit the Traffic Monitor components including the camera and radar should be around 9"x7"x4" such as the .

recommended hardware > cameras
TM GitHub discussions
Raspberry Pi 5
27W USB-C Power Supply
RPi5 active cooler
SanDisk Extreme Pro microSDXC UHS-I Card
Raspberry Pi Camera Module 3
RPi 5 Camera Cable
OmniPreSence OPS243-A Doppler Radar Sensor
Enviro+
Particulate Matter (PM) Sensor
male-to-female GPIO ribbon cable
Raspberry Pi 5
RPi5 active cooler
SanDisk Extreme Pro microSDXC UHS-I Card
Raspberry Pi official SD Card
HatDrive AI! Coral TPU bundle
27W USB-C Power Supply
TM GitHub Discussion
TM GitHub Discussion
Frigate's recommended camera hardware
Raspberry Pi Camera Module 3
RPi 5 Camera Cable
Raspberry Pi Global Shutter
RPi 5 Camera Cable
Frigate camera setup
supported hardware
Coral AI Tensor Processing Unit (TPU)
Frigate object detectors
Coral USB Accelerator
Rapsberry Pi M.2 HAT+
Coral M.2 Accelerator B+M Key
Hat AI! Coral TPU bundle
Raspberry Pi AI HAT+
OmniPreSence OPS243-A Doppler Radar Sensor
Enviro+
Particulate Matter (PM) Sensor
male-to-female GPIO ribbon cable
greendormer/tm-enclosure-3d
TICONN IP67 ABS Enclosure