Tunnels are a critical part of road infrastructure and they feature some pretty cool tech. This Smart Tunnel project demonstrates some of the technology involved and how some real-world problems might be solved.
- RFID Trip Counting - Each unique RFID tag is tracked to give a total count of trips taken, and a per-vehicle breakdown.
- Configurable Lanes - Each of the two lanes can be enabled/disabled with a capacitive button. A lane has either a red or green light to indicate its status.
- Text display - The entry of the tunnel sports a text display that can show custom messages. Presently it warns when a lane is closed, or shows a safety message and trip count.
- Ventilation - A user-controllable ventilation fan circulate fresh air through the tunnel.
- Street Lights - Street lighting activates when ambient light is low.
- A Raspberry Pi Pico (with Headers)
- PiicoDev Expansion Board for Pico
- PiicoDev Modules
- OLED Module
- 2x RGB LED Modules
- Ambient Light Sensor
- Capacitive Touch Sensor
- Assorted PiicoDev Cables
- RFID Reader tags - here, we're working with the MIFARE 13.56MHz standard.
- Continous Rotation Servo
- Male-Female Jumper Wires (for RFID connection)
- Male-Male Jumper Wires (for servo connection)
- USB (Micro B) cable for power and programming
- 600 GSM Art Board - Available at OfficeWorks
- Optional: Printed artwork or other decorations for the walls of your tunnel.
Download the plans. This file is scale 1:1
I designed the cutting pattern with a vector editor and cut it out on a laser cutter - though it could just as easily be cut out by hand. The design features perforations for easy folding; If you're cutting the design by hand you can just score the cardboard to help create the fold lines. The cardboard is creased and folded into a tunnel shape, with the joins being stapled in place. Alignment tabs help keep everything secure.
From here, it's just a matter of taping the electronics in place. Each arch features a flat platform that adds rigidity and creates a handy point to mount electronics and wiring.
PiicoDev connections are daisy-chainable - each module plugs into the next without the need for soldering. The following diagram shows the topology. Note that since there are two RGB Modules being connected, they will each need unique ID switch configurations. See the PiicoDev Connection Guide for more information.
The servo and is powered by 5V from the Pico (VBUS) and receives signal from GP28.
The button is soldered to some pin headers and plugs directly into the expansion board, bridging GP16 and GND.
The RFID reader is the most complicated, needing a few point-to-point jumper wires as follows:
- SCK to GP2
- MOSI to GP3
- MISO to GP4
- RST to GP5
- NSS to GP6
Download the code for this project, unzip, and copy it to your Pico. If you need help getting started, follow the guide: How to Setup a Raspberry Pi Pico and Code with Thonny
There are several files to upload - most of the files are device drivers. The user code (code that actually runs our project) is located in main.py.
A little bit of a creative touch goes a long way. Infrastructure should not just be utilitarian - it can be beautiful too. More and more roadways and other classically utilitarian infrastructure are being beautified by artists. One way we can beautify our tunnel is by adding murals to the walls. I also included some simple road artwork.
The completed tunnel:
Our tunnel has some pretty impressive features - but this is just the start! There's plenty of other features and experiments we could include. Here's some inspiration:
- Add a CO2 sensor and trigger the ventilation based off CO2 concentration.
- Include a dangling bar to warn tall vehicles of height limits before they enter the tunnel.
- Add a load-cell and ADC to weigh each vehicle that passes through the tunnel - classify each vehicle based on weight.
- Include a distance sensor and classify each vehicle based on height.