Introduction: PiNoculars - Raspberry Pi Binoculars

About: I help run makerspaces / hackerspaces, love learning new tools and technology by building and documenting projects, and enjoy exploring the world with my wife ; )

Strap a Raspberry Pi 2 + Camera to a pair of binoculars (or telescope, microscope, etc.) and use one of adafruit's touch LCDs + custom raspbian image to view and take pictures. (Scroll through the photos above for examples / comparisons)

This project takes more time, money and is clunkier than if you were to purchase a commercial product. You're probably not on instructables because you wanted to buy a solution ; )

There are two sets of instructions here! See the images and video above for a brief overview. The first few prep steps are the same for both. Once construction starts you have a choice between a "Quick & Dirty" version that anyone can do, and an "Over-engineered" edition requiring fancier tools (laser cutter or power tools) and more time.

Finally, this is a fairly newb friendly guide, some may find it a bit slow. It's also very unlikely you have the same pair of binoculars, any dimensions mentioned are going to differ for you. Make your own measurements!

Super props to Phillip Burgess and Ruiz Brothers for their DIY WiFi Camera Script and adafruit for making it very easy to connect an LCD to the Pi. Much thanks to the Ann Arbor District Library and Maker Works for access to wonderful tools!

Step 1: Prep - Image Download & Installation

Description: First step, download the appropriate OS, a specific version of the Raspbian OS put together by the adafruit crew to make it easy to interface with their 2.8" Capacitive Touchscreen.

Note: The information here is accurate as of October 26th, 2015. It's likely that the steps for this will change as the websites adafruit.com and raspberrypi.org evolve, and/or as the Raspbian OS changes.

Materials:

  • Micro SD Card + Adapter
  • Computer with Internet Access

Basic Steps (See video for detailed instructions... specific to Mac OS)


Step 2: Prep - Test Your Hardware

Description: Let's connect the barebones setup, this way if there's an issue we'll know before we have it mounted to our Binoculars. Quick note: the default (150mm / 6") cable that ships with the Pi Camera is a little tight, you may need to order a longer one.

Materials

Basic Steps (see video for detailed instructions)

  • Remove Micro SD Card from adapter
  • Flip Pi Over, place Micro SD card in holder
  • Attaching camera cable to camera (silver tabs face lens)
    • Disengage clasp if needed
    • Place cable in slot
    • Engage Clasp
  • Attaching camera cable to Pi (Silver side faces HDMI port)
    • Disengage clasp if needed
    • Place cable in slot
    • Engage Clasp
    • Leave cable hanging out over network jack
  • Attaching LCD Panel to Pi (beware of loose LCD!)
    • Line GPIO Pins on Pi with Header on LCD
    • Carefully press down (avoid pressing on LCD)
  • Attach power, boot up!
    • It may take a minute, but you should end up at the Raspi Boot Config
    • A Grey & Blue Screen.

I used a USB WiFi dongle for this project, it's optional, though the steps later on will make use of it.

Step 3: Prep - OS and Camera Setup

Description: Finish setting up the Operating System, connect to your network and get the camera running at boot. A basic outline of the steps is below, a detailed run through is available in the video above.

Materials

  • Raspberry Pi with LCD and Camera attached
  • SD Card with TFT capable Raspbian Wheezy OS (previous step)
  • USB WiFi Dongle or Ethernet Cable attached
  • Power Supply for Pi

Basic Steps (see video for details)

  • A. Finish Configuring OS:
    • Boot Pi
    • If the Raspberry Pi Software Configuration Tool doesn't run at boot
      • Login and run the command 'sudo raspi-config' to start it.
    • Expand File System
    • Internationalization Options: Change Locale
    • Internationalization Options: Change TimeZone
    • Internationalization Options: Change Keyboard Layout
    • Enable Camera
    • Advanced Options: Enable SSH
    • Restart
  • B. Get the Pi connected to your network.
    • Option 1: Ethernet Cable (Network Cable)
      • Connect from your router/modem/switch to your Pi
      • Reboot Pi. When at the login screen look at the 3rd line up.
        • This should be your IP address
      • Skip down to Section C below
    • Option 2: Connect a USB WiFi Dongle to your Raspberry Pi.
      • run: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
        • add to bottom:
          network={
          ssid="YourWiFiName"
          psk="YourWiFiPassword"
          }
      • Reboot Pi. Third line up on LCD Panel should be your IP Address
  • C. Download & setup camera script
    • SSH into your pi: pi@your.pi.ip.address
      • You can also hook a keyboard & mouse directly to your PI : )
    • Browse to the "DIY WiFi Camera" tutorial at adafruit
      • Scroll down to "Install Camera Script"
      • Follow "Install Camera Script"
      • Follow "Tweaks"
      • Follow "Standalone Mode"
  • D. Enable Tactile Switch #23
    • SSH into your pi: pi@your.pi.ip.address
    • Browse to the PiTFT Tutorial at adafruit
    • Follow the "Extras! Tactile Switch as Power Button" steps
      • Do NOT follow the additional steps below the Tactile Switch section.
  • Move on to the next step : )

    Step 4: Choose a Method!

    There are an infinite number of ways to attach your Pi to your Binoculars. We've provided two!

    The Quick & Dirty method involves a little bit of foam, electrical tape, ruler, pencil, and a knife. It can probably be done in half an hour or less.

    The Over Engineered method involves a computer, inkscape vector image editing software, thin plywood, a laser cutter, nuts & bolts, etc., and a lot more time. Completely pointless! It is an interesting exercise in designing and fitting a piece of material to an existing object, and the steps are geared toward someone who's never done something like this.

    Side note: The Over Engineered design could be used to make a template for cutting out the pieces with a jigsaw and a drill or similar tools.

    Step 5: Q&D: Build the Camera Mount

    Description: The first step in the Quick & Dirty method. We'll be marking up and cutting out a small circle of foam that serves as a mount for the Pi Camera.

    Materials needed:

    • Binoculars
    • Ruler
    • Pencil
    • Foam (6mm thick, wider & longer than the eye piece of your binoculars)
    • X-Acto Knife

    Basic instructions (see images and video for steps)

    • Place binoculars with the eyepiece facing down on your section of foam.
    • Use a pencil to draw an outline on the foam around the eyepiece.
    • Use a ruler to draw a crosshair through the center of your circle.
    • Draw a rectangle approximately 8mm x 8mm at the center of your circle.
    • Use your X-Acto knife to cut out the rectangle, and then the circle.
      1. Make many light cuts.
      2. Force doesn't always help, and will cause more damage if you slip.
      3. Use disposable material below foam to save your work table.
    • Test fit. The camera mount should barely cover the eyepiece, and the Pi camera should fit just inside the rectangle. This doesn't have to be perfect, but the closer the camera is to the center of the mount the better.

    Step 6: Q&D: Attach the Pi, LCD, and Camera

    Description: Putting it all together. We'll be assembling all of our pieces and booting up our Pi. After testing your basic setup from earlier, you will need to disconnect the LCD Panel from your Pi. Be careful! A small flat-head screw driver may help in separating the two.

    Materials Needed:

    • Binoculars
    • Raspberry Pi with Camera Cable Attached!
    • LCD Panel
    • Pi Camera
    • Pi Camera Foam Mount
    • Scissors
    • (2) Small to Medium Rubber Bands
    • Electrical Tape
    • Ruler

    Basic Instructions (see video for clarity!)

    • Place rubber bands around top & left side of LCD to hold the LCD in place.
    • Cut a piece of tape long enough to wrap around binoculars (for me ~25cm)
    • Place sticky side of tape against the inner edge of the LCD Hat header
      • Use your ruler to smooth the sticky side against the edge
    • Attach the LCD Panel to Pi. Careful not to crush your LCD!
    • Place Pi+LCD on top of binoculars
      • Position close enough to front so camera can reach eyepiece.
    • Wrap loose electrical tape snug around the binoculars
      • Tape may not adhere well. It works great on my binoculars. Be careful : )
    • Cut a short (~4cm) piece of tape
      • Place across the back of the camera and around foam mount.
    • Attach camera to cable if needed
      • Silver side of cable pins facing direction of lens
    • Boot up Raspberry Pi
    • Point binoculars at a well lit area
    • Cut a longer (8-10cm) piece of electrical tape
      • Place camera on front of eyepiece
      • Move camera around until you see a well defined circle
      • Secure tape around camera and to binocular eyepiece
    • Cut another piece of tape
      • Wrap that around the eyepiece, over the tape you just attached

    Mission Complete!
    Mostly, see the last two steps in this instructable for further comments on power, video alignment, etc.

    Step 7: OE: Design, Laser, and Assemble the Camera Mount

    Description: Create a mount to hold the Pi Camera to the eyepiece of your binoculars. We'll be using vector based software (InkScape) for this. If you have no experience with software like Inkscape, the video is pretty thorough. Otherwise you may find the video a little slow ; )

    Materials

    • Binoculars
    • Calipers (A ruler will work, but is not ideal)
    • Pi Camera
    • Computer with InkScape installed
    • Raspberry Pi Camera Board Dimensions
    • 5cm x 15cm x 3mm - 6mm baltic birch, cardboard, acrylic, or other laser safe material *
    • (3) M2 x ?? x 25mm length machine screws and nuts *
    • (4) M2 x ?? x 8mm length machine screws and nuts *

    Basic Steps
    Use the video as a guide. Measurements are going to be different based on your binoculars, adjust as appropriate!

    * Material thickness and screw sizes are going to affect each other. Watch the full video before purchasing anything to understand how things are assembled so you can make the right decision when it comes to choosing your materials and hardware

    Step 8: OE: Design, Laser, and Assemble the Pi + LCD Mount

    Description: Create a mount to hold the LCD and Raspberry Pi to your Binoculars. Keep in mind that the dimensions mentioned in the video will likely differ for you. Use the video as a guide.

    Materials

    • Binoculars
    • Calipers (A ruler will work, but is not ideal)
    • Raspberry Pi 2
    • LCD (AdaFruit 2.8" PiTFT Capacitive Touch)
    • Computer with Inkscape installed
    • Diagram of LCD Hat (Download the full size 'original' version)
    • 12.5cm x 12.5cm x 3mm - 6mm* baltic birch, cardboard, acrylic, or other laser safe material
    • (1) M2 x ?? x 25mm length machine screw and nut *
    • (2 or 3) M2 x ?? x 8mm length machine screw and nuts *
    • Plastic Tube (A small section of straw will likely work fine)

    Basic Steps
    Use the video as a guide. Measurements are going to be different based on your binoculars, adjust as appropriate!

    * Material thickness and screw sizes are going to affect each other. Watch the full video before purchasing anything to understand how things are assembled so you can make the right decision when it comes to choosing your materials and hardware

    Step 9: Camera Flip!

    Description: It's likely that the image you are viewing on the LCD is flipped vertically and horizontally. If this is the case we need to add two lines to the cam.py file.

    Materials:

    • PiNocular!

    Basic Instructions (see video for details)

    • ssh into your pi (pi@your.ip.address)
      • Or plug a keyboard directly into your Pi
    • login
    • Type "cd ada" then hit Tab to autocomplete
    • Type: "nano cam.py -c" then Enter
      • Hit Ctrl-W to Search
      • Search for "# Init Camera"
      • Should put you around line #571
    • Right above the line "#Camera.crop" add two new lines:
      • camera.hflip = True
      • camera.vflip = True
    • Hit Ctrl-X, "y", and finally Enter to save and exit
    • Type: "sudo reboot" and hit Enter to restart

    The video should now be flipped in a way that responds more naturally to your movement.

    Step 10: Power and More!

    Description: Choose a method for powering your PiNocular. There are a number of options, we cover one and link to a number of others.

    Materials

    Basic Steps

    • Make sure your batteries are fully charged
    • Make sure the Battery Pack is switched off
    • Connect the USB Cable to both the Battery Pack & Raspberry Pi
    • When you are ready to use the PiNocular setup, switch the Battery Pack on.
    • When you are done using the PiNocular setup
      • First switch the Pi off via Button #23 on the front of your Pi
        • Wait at least 30 seconds for your Pi to shut down.
      • Switch the Battery Pack off.

    Some Power Details
    The Guide 10 Recharger Pack is rated for 2300mAh at 4.8v. The Raspberry Pi with the LCD and WiFi will probably draw between 500 - 1000mAmps per hour. I haven't done extensive testing, so let me know if you know better ; ) A 2300mAh battery pack should last around two hours. I would recommend against pushing this limit. If the battery can't supply enough power you may end up the contents of your SD Card, or worse.

    If you don't need the WiFi adapter * running for this setup, feel free to remove it. It's a pretty significant power drain.

    Other Battery Options
    There are a number of other options. Some are less bulky but require more work, others offer more run time. If you try one, I'd love to hear how well it works!

    A 10,000mAh USB Rechargeable Battery Pack from Adafruit is another bulky $50 option, but should last ~10+ hours.

    The SnapPiCam Tutorial at Adafruit includes information on sandwiching a slim Lithium Ion Battery + Charger between an LCD Panel and a Pi.

    Having the battery pack on a long enough USB cable that I can keep it in my pocket helps keep the weight of the binoculars down.

    * The Raspberry Pi does not have a built in battery / clock module to keep the proper date and time when it's not powered. It relies on an internet connection to do this. This means the date / time stamps on your images are probably going to be all wrong! You can fix this by purchasing and configuring an RTC Module for the Pi, or using your cell phone as a WiFi tether (assuming your cell phone has internet access) for you Raspberry Pi : )


    Learnings and Difficulties

    Blurry images: Are very common! Holding the setup as still as possible and shooting in broad daylight will help.

    Switch position: Using either the switches next to the touch screen or the screen itself to take pictures is not ideal. Positioning a switch closer to where your fingers rest would be much nicer.

    LCD Unnecessary? Once you've calibrated the position and focus of the camera lens, the LCD is unnecessary beyond reviewing pictures taken (which is nice). But these could be sent to your phone, or viewed from your phone over a web page.

    Video: Taking video would be nice but isn't functional in this setup. I tinkered with adding it briefly, but haven't succeeded.

    Tech Contest

    Runner Up in the
    Tech Contest