M12 lens mount for PS3Eye camera hacking

by jasonwebb, published

M12 lens mount for PS3Eye camera hacking by jasonwebb May 6, 2013


Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

7726Views 1515Downloads Found in Electronics


This is a fully functional M12 lens mount for PS3Eye cameras.

The PS3Eye camera has become very popular in the multi-touch community for it's fast framerate, low-cost and high hackability. Any time you want need a decent, cheap infrared camera for computer-vision projects, the PS3Eye is a good place to start! For example, I'm using it for eye-tracking in my Eyewriter 2.1 project, and a pair of them are at the heart of the fancy new Duo finger-tracking system!

For a long time, if you wanted to hack a PS3Eye camera you needed to buy all of the parts from suppliers on the web, which gets expensive and tedious pretty quickly.

You still have to buy lenses and filters, but you can save yourself a little bit of cash by printing your own M12 lens mount! This mount is specifically designed for the PS3Eye camera's hole spacing and physical dimensions, but I've included the OpenSCAD file used to generate the mount so you can hack it for other board systems.

There is surprisingly little slop in the thread; it holds the M12 lens really nice and tight

About the OpenSCAD script
I generated the 3D model for the mount using OpenSCAD, and I've tried to make things as parametric as I could. It relies on MCAD's unit's library, as well as aubenc's sweet "Poor man's openscad screw library". Both are included in the downloads for this Thing, but must be put in a sub-folder called "lib".

You can read more about the development process for this part on my blog at: http://jason-webb.info/2013/05/fully-functional-3d-printed-m12-lens-mount-for-ps3eye-camera-hacking/


Print the M12 mount
Download the STL included and slice it up with the following settings in your favorite program:

  • 100% infill
  • 0.15mm layer height or less
  • 0 shells

Attach the mount to your camera board
You will need two #000-120 "Micro Phillips" screws. Ideally you should grab some self-tapping ("boss") screws, but they are hard to source on the web. McMaster-Carr carries a 10 pack of the required screws, part number 92482A147.

I've heard that you can also attach the mount using hot glue, but I can't vouch for this. It sounds like a great, cheap option, but I'm unsure of how long it'd last and whether it would damage the board.

More from Electronics

view more

All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

How do I buy this?

very nice! I was looking for such a part for the webcams of my structured light scanners. Where did you get the 12mm lens from?

The lens in the picture is a 25mm lens from Secucity, but I would strongly recommend staying away from them. Took about a month to reach me and the customer service was terrible.

Instead, you can get good, cheap lenses quickly from http://m12lenses.comm12lenses.com