A robotic eyeball powered by a Raspberry PI + Camera, 2 servos and OpenCV.
Follow this guide or similar to get opencv up and running on the Pi, but I might just upload the image somewhere if I get time. You will also need pigpio.
- Print lower level
- Using the small screws from the micro servo, fit the raspberry pi.
- Print the middle level
- Cut 4 screws to length and screw the camera in to the middle level
- Print the servo bracket
- Screw in the servos - see pic
- Glue the servo mount to the base of the top level, over the top of the locator marks
- Print the two levers and their axle
9 Slide the levers onto the axle and locate the axle into the axle bracket in the top level. Fix it in place with a tiny blob of glue, being careful to not get glue on the levers. They should rotate about the axle.
- Print the top level back plate and pipes. You may need to angle the big pipe and print with raft and supports - after some trial and error, I found that the strange angle that I have it at in the stl printed the best.
- Glue the big pipe to the back of the back plate and then the small pipe to the big pipe. You might find it useful to attach the top and middle levels at this point to aid with locating. Note that the back plate should just slot snugly into the back of the gimbal housing and shouldn't need gluing.
- Print and paint the eyeball and middle ring.
- Loosely assemble and paint the top, middle and bottom levels, along with the back plate and pipes.
- Clip the eyeball into the middle ring, by applying pressure at the sides. The eyeball should clip into two small holes at the top and bottom of the ring.
- Do similar to attach the middle ring to the top level housing, this time by squeezing the top and bottom of the housing to locate the middle ring into the two holes left and right inside. You may need to sand the interior of the gimbal housing slightly to make sure that the eye can move freely in the socket.
- Cut a length of wire to make a pull rod to attach from the top link in the back of the eye to the tall lever.
- Repeat to create a rod from the right link in the back of the eye to the shorter lever.
- Make two more rods to attach to the perpendicular sides of the levers to the servos.
- Attach all cables to the Pi.
- Tighten screws and power up.
- Unzip TheEye.zip onto the Pi and run main.py to start the eye. I have included a startup-cron tab and startup.sh script in the zip if you want the eye to start on boot. Note that CONFIG['showWindow'] must be False if you want to run it in this mode.
From layershifter's comments:
I admit that I probably skimped on the front a little and could have hidden the camera a bit more, although it already has quite a narrow field of view. I'd probably use a fisheye lens in retrospect, or multiple cameras. The pipes at the back were actually just an after thought to provide a distraction from the back plate a bit. More pipes would definitely be a great addition. Perhaps for version 2.0!