Build an Army of PIC12F1612-Based Blinking LED Traffic Barrels

pavel_lishin1 pts0 comments

Build an Army of PIC12F1612-based Blinking LED Traffic Barrels | Photons, Electrons, and Dirt

Photons, Electrons, and Dirt

A blog by Glen Akins

Skip to content

Home

Old Projects

My Videos (YouTube)

My Code (GitHub)

My Mastodon Profile

← RP2040 MIDI Soundboard Player for Live Streaming

Build an Army of PIC12F1612-based Blinking LED Traffic Barrels

Posted on July 27, 2026 by Glen

An army of miniature traffic barrels waiting to assault your morning commute.

I designed a miniature traffic barrel with a blinking warning light then built a whole army of them to slow down traffic on my desktop. The warning light was a challenge because it has a lot of detail, it holds a real LED, and it’s quite small. After designing the barrel and warning light, I chose a PIC12F1612 8-pin microcontroller to make the LED blink. It requires fewer parts than a 555 timer circuit, uses less power, and the blink pattern is fully programmable. Read on to learn how to design a traffic barrel complete with a functioning, battery-powered warning light.

The Traffic Barrel

The 3D model of the completed traffic barrel in Autodesk Fusion.

I drew the traffic barrel in Autodesk Fusion. It consists of three components: the main barrel, the "weighted" ring at the base, and the warning light. The warning light is divided into two bodies. The first body is for the base of the light. The second body is for the lens. This facilitates using different filaments for each part of the warning light in the slicing software.

Dimensioned drawing of the traffic barrel.

The main body of the barrel is roughly 82 mm high. The handle adds an extra 8 mm and the light, an additional 29 mm. This is roughly a 1:10 to 1:12 scale model of a real traffic barrel which is approximately 1 m high with a 200 mm diameter warning light.

Barrel

The main body of the barrel is a 360° rotation of a sketch profile.

The main body of the traffic barrel has a relatively simple design. The hardest part was getting the dimensions correct. I went with 15 mm rings with the bottom and top rings 15% larger to accommodate the flared base and rounded top edge. The base ring diameter, excluding the flared base, is 49.5 mm. The seams between each ring rise and run 0.6 mm up and inward. The walls are 2 mm thick. The top of the barrel has a 45° slant to allow printing without supports. Rotating the profile sketch 360° build the main part of the body.

Extruding the barrel handle and warning light mounting holes.

The handle is a 1.5 mm symmetric extrusion of a sketch profile then a mirror operation. The holes in the barrel handle will align with the holes in the warning light. The ends of the handle do not quite go all the way to the edge of the barrel to keep them from being extruded over the edge of the barrel.

The barrel with the completed handle and the extrusion for the warning light’s wires.

I used a projected sketch profile to locate the center of the warning light and place a 5 mm hole through the top of the barrel. This hole is for the warning light’s wires.

The 3D printed barrel main body.

I printed the barrel in Bambu Lab’s basic orange PLA using 0.20 mm slices and no supports. If I were designing this again, I’d make the handle a bit shorter to eliminate some of the issues with the large bridge distance.

Weighted Base

Rotation of the profile to create the weighted base.

The weighted base is another 360° rotation. The profile is offset from the main body of the barrel by 0.2 mm. I applied a fillet to the top outer edge to soften it a bit.

The printed barrel with the "weighted" base ring.

I printed the barrel in Bambu Lab’s basic black PLA using 0.16 mm slices and supports.

Warning Light

Many of the different warning light experiments: two different sizes and four different color combinations.

The warning light, especially hollowing it out to accommodate a T1 3 mm round LED, was the most difficult part of the project. I started with a light with a 25 mm diameter lens but this was too big for the barrel. I reduced the lens diameter to 20 mm and this looked much better.

Create the lens.

The first step was to draw the lens using a 360 revolution of a sketch profile around the z axis. This created half the lens.

Create the neck.

The second step was to draw the neck using a 90 degree symmetric revolve around the y axis. This creates half the neck on the same side of the xy plane as the lens.

Mirror to create the complete lens and neck.

Mirroring the combined body produces the full lens and neck.

Sketch and extrude the battery box.

The next step was to draw and extrude the base into a new body in the same component. The Bambu slicer lets you assign different colors to each body when importing a component for 3D printing from Fusion. We’ll assign the lens body a translucent filament color and the base body an opaque yellow filament.

Apply some fillets to take the edges off.

Next I added a hole to mount the lens to the barrel and used the fillet...

barrel light warning traffic body base

Related Articles