Picture of Building a moving and tracking Portal Turret

It's cute, It's polite and it is really deadly. It's a turret from Portal. It moves, has light, has sound, and something that my previous Portal project did not have: Camera tracking.

The turret is controlled with an Arduino and a PC. The arduino handles the movement and the light, the PC processes the video from a webcam to decide where the turret needs to aim and provides the sounds for the turret.

When no computer is present, the turret automatically switches to manual control. In this mode the turret can be controlled by a joystick, though there will be no sound.

The turret is full 3D printable and requires very little additional tools to make. This does not mean that this is an easy project, but it is manageable with some basic 3D printer, electronics and programming skills.

For more projects like this, go to my site:

Remove these adsRemove these ads by Signing Up

Step 1: Design (and design flaws)

Picture of Design (and design flaws)
Problem with turret.JPG

The design was the the hardest part of this project. Not because there are no reference images or because the turret is that difficult in its design. It is because the turret does things that are not physically possible.

At first I wanted to make this turret so it could open and close as well. The issue is (as you can see in the images) that the guns of the turret almost touch each other when the turret is closed. There simply is no room to have a turret with all movement that can also open and close. The solution was a compromise where the turret only moves and doesn't open.

Also the design doesn't include a real space for the electronics (as seen in all the photos and videos). After I built mine i did a last wave of improvements where I hollowed out the top of the turret. There is some space there now to place electronics if you can manage to make them small enough.

The rest of the design was only a matter of time. First the turret was designed in one piece in Solidworks to get the design right. Then this part was cut up into smaller pieces and mechanisms were added to make the guns and eye move. All in all the design took between 40 and 60 hours (I don't really track the time).

(Reference image to the right made by: Tyler Garrison, for another turret project by CitizenSnips and modified by me to show the flaws in the turret's original design)

JuanZ122 days ago

Hi! I'm quite surprised with all the work you've put into this. Bravo. I only have one question though. Do you think this could be tweaked somehow to eventually allow the guns to retract and fit everything?

dragonator (author)  JuanZ122 days ago

I couldn't get the guns to also retract in the tiny amount of space I had, so my opinion is no, but if you can manage, give it a go and share it when you have managed.

Taytay20825 days ago

This is seriously impressive, this is what I want to be doing for a living lol. Question: Any estimate to how much this project cost? (Not including buying a 3D printer/fillament).

dragonator (author)  Taytay20824 days ago

I can guarantee you, me too, but I guess being an engineer will have to do. This was not that expensive a project. Around €100-€150 probably.

The thing that is more costly is time. Designing is over 40 hours, making it is also that. Everything combined this thing clocks out at 100 hours.

Fortunately, I have more time than I do money (; but this summer will be very boring for me so I seriously hope I find the motivation to do this!

MarcioWilges3 months ago

This is so cool! That it's actually vunctioning and moving around is really a feat in itself! I bet some of my geeky friends might be really interested to try this out themselves!

pauln36 months ago

this is awesome. i was wondering if the camera had to be attached to a laptop or desktop. Is it possible if I disassemble an old webcam and attach it to the portal turret through arduino? please answer back.

dragonator (author)  pauln36 months ago

Attaching a webcam to the arduino is nearly impossible. You will need a special microcontroller camera for that. My webcam was on my laptop because the software doesn't allow a second webcam to be attached to the computer, but if you have a desktop you can have a camera that can be mounted anywhere.

Numbuh18 months ago

This is awesome! Did you happen to take any inspiration from my Instructable? Also, I had the same problems as you, but the fact is Valve had a solution since they made one IRL that opens, closes, and simulates shooting. The solution the used is to remove the back panel of the gun box so you can fit servo's and other parts in the center(you can look at my gun box to see what I'm talking about. But other than that, top notch!.

Numbuh1 Numbuh18 months ago

*They used.

Numbuh1 Numbuh18 months ago

Sorry, my grammar is a bit off when I type too quickly.

BallscrewBob8 months ago

Did you ever update the software and what was the OS base you ran it on ?

Valyces9 months ago

Extremely cool project, you got my vote!

I love this I will vote for it without question. Makes me really really want a 3D printer.

eyouel9 months ago
Absolutely awesome, nice one!
Poppy Ann9 months ago

i think this is a great project if i had a 3d printer i may have give it a try even though i have nowhere to put it, many thanks for the instructable.

yellowcatt9 months ago

Rather than tracking a colour I suppose that it would be possible to control it with face tracking software or a heat sensor.

Maybe add remote-control Airsoft guns, though they would probably be too bulky to fit the shell.

bergerab9 months ago

Absolutely incredible idea and great execution! I'm sure this will do well in the sensor/battery/epilog contests

Woah! That's amazing! A working portal gun next? ;P
chrwei9 months ago

nice! add a Pixy and you can drop the PC connection :)

hematime8089 months ago
The nerdling9 months ago

put a high power laser on it

watchmeflyy9 months ago

Amazingly well done!

Honus9 months ago


Oh wow, this is awesome!