Cheap Iphone Macro Lens for Barcode Scanning

32,754

79

35

Intro: Cheap Iphone Macro Lens for Barcode Scanning

A glaring problem with the iPhone's camera is its inability to focus closer than ~1 foot away. Some aftermarket solutions help fix this problem such as the iClarifi by Griffin Technology. This case for the iPhone 3G allows you to slide a little macro lens over the camera to take closeup pictures, and is also handy for scanning barcodes for use with apps like snapr.net.

I've got a 2G iPhone and a limited budget and wanted in on this barcode-scanning fun as well. I googled some things and was inspired by this, but it wasn't quite what I wanted. I finally came up with the following cheap (free) solution.

What you need:

-a disposable camera. You can get these from most any photo counter, for processing they just crack the film out and will recycle the rest. They'll usually give you a handful of cameras for free if you tell them you're doing a project.
-a flathead screwdriver or something else to pry the camera case open.
-a flexible iPhone case. Not necessary, but you've gotta mount the lens somehow. I got a case for $5 at 5 Below.

Step 1: Assess the Salvaged Disposable Camera

Salvaged cameras will be in various states of disassembly, but almost any camera will do. The Kodaks seem to be more plentiful and they have more plastic that we can use for mounting, as you'll see later. All we need from the camera is the viewfinder lens that is closest to your eye when you're taking a picture. The camera contains other lenses, including a slight telephoto lens, but I've found this one is the best for barcode scanning purposes.

WARNING!!! These cameras have a large capacitor for the flash which can give you a very damaging shock if you touch it. Stay away from the circuit board or you may get injured. The people at the photo place will probably warn you about this as well. You should probably wear safety goggles for this project.

Also, do NOT press the "flash" button before you start to take apart the camera, or you can be sure that you've made the project a lot more dangerous than it needs to be.

Step 2: Crack It Open

Insert the screwdriver or prying tool into the top of the camera, carefully push toward the viewfinder, and twist. Depending on the type of camera, you may need to press a little catch or peel away some stickers first.

Step 3: Remove the Lens

Again, we want the lens that would be up against your eye if you were taking a picture. In some cameras like the Kodak, the whole viewfinder setup is one piece of plastic, consisting of two lenses and a connector. If so, we want the flatter lens so we can manipulate this plastic to end up with the lense we want. I cracked off the other lens by covering it with a rag, applying pressure with my fingers and rocking the lens back and forth until it snapped off.

If you're using a different type of camera, such as the Fuji shown, the lens may be one piece that slides out. This is good too, but may be harder to mount to your case.

Step 4: Testing the Lens

Hold your lense over the iPhone's camera. Notice that when you switch to your camera app, objects closer to the lens are much clearer. Using the snappr.net app, you can actually scan barcodes effectively!

In the first set of pictures, without the lens, the barcode is blurry and will not work with snappr.net app. In the second set, with the lens applied, the barcode scans fine.

Note that even with the macro lens it takes some finagling to get the barcode to be recognized by the app. It's not perfect, but is really promising. Also, some books have huge barcodes and don't work so well with this lens.

Step 5: Mounting the Lens (temporarily)

If you just have a tiny lense at this point, simply slide it into your iPhone's case so it covers the camera.
This is the simplest method, but you'll need to slide the lens out of the way for taking normal shots. It can also slide around and you could lose it. I recommend a more permanant system as shown in the next step.

Step 6: Mounting the Lens (more Permanently)

You can see I've massaged my lens quite a bit. I bent the good lens so it was flat, cracked off the other lens, then shaved it down a bit with some wire snips. I then drilled two small holes in the arm and used an exacto knife to connect the holes, making one slot. I also snipped the arms of a paper fastener. I'd have liked to have a smaller one but I used what was at hand. I then poked a tiny hole in the case as seen on the ridge. (by the way, I got the case at 5 below for $5 so not worried about it too much).

Next slide the fastener through the lens and case hole and spread the paper fastener's wings so they curl into the case. Put a piece of transparent tape over it to discourage scratching the iPhone (you could use something industrial but I wanted to keep up the clear case effect). Now just slide the lens over the camera whenever you want to use the macro!

I'd like to have mounted the lens inside the case and cut some of it away, but I thought I'd quit while I was ahead.

Also note that the app SnapTell (AppStore link) is pretty fantastic-- it basically bypasses barcodes and does image recognition on pictures you take of objects. Basically a Shazam for products. Right now it's only for CDs, DVDs, and games, but can you imagine what either of these technologies could do for grocery shopping!?

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Audio Contest 2018

      Audio Contest 2018
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge

    35 Discussions

    0
    None
    appsman

    6 years ago on Introduction

    For the iPhone 4 or 4S, 3D print a cute macro lens. Shown here:
    https://www.instructables.com/id/Make-an-iPhone-4-or-4S-slide-on-macro-lens/

    Loup-e 4.jpg
    0
    None
    geraldkrug

    7 years ago on Step 6

    This is a great thing you made. Are you still testing out barcode apps with it?

    1 reply
    0
    None
    ch0rtlegeraldkrug

    Reply 7 years ago on Step 6

    Thanks Gerald! I haven't had use of it since the newer iPhones have better cameras that can handle barcodes up close. Now such things are built right into the Google app! Thanks for the comment.

    0
    None
    metaldazza

    9 years ago on Introduction

    This is cool. I removed the same lens to use on a mac book pro to get it to work with Beep My Stuff. I blogged it here but it's basically the same as what you've done. Thanks for posting this.

    1 reply
    0
    None
    ch0rtlemetaldazza

    Reply 9 years ago on Introduction

    Nice! Glad it helped. And thanks for the heads-up on your site as well. I use DL sporadically but I like the online aspect of BeepMyStuff. BTW other folks who wander here, I got a 3G S and the more advanced camera eliminates the need for this hack, at least for barcode application. I haven't built this into a 3G case, but I assume it's still good for experimental photography and extreme closeups.

    0
    None
    Kryptonite

    9 years ago on Step 1

    This is cool, but next time, why not just use a non-flash-disposable-camera instead? Probably safer, I've seen what happens when you play around with these. (The pliers used to discharge the capacitor is no longer alive, poor Bob, may he rest in piece(s))

    9 replies
    0
    None
    zwild1Kryptonite

    Reply 9 years ago on Introduction

    You're right. But it's pretty hard too really hurt yourself with one of those. Sure it might give you a little scare, but fatality i think not.

    0
    None
    Kryptonitezwild1

    Reply 9 years ago on Introduction

    Yeah, fatality's out, but it does hurt. :S It'd probably just be easier to use non-flash though, so if you've got an option... well, you get the point.

    0
    None
    ch0rtleKryptonite

    Reply 9 years ago on Introduction

    I just got out of my coma. :) You're right, a non-flash model would be safer. They're pretty rare, though. All of the models I acquired had a flash.

    There are instructions out there for making taser/stunguns out of these cameras, so yeah, be careful.

    0
    None
    Kryptonitech0rtle

    Reply 9 years ago on Introduction

    I hate the idea of tasers, and to an extent stunguns, I've seen one in use and it looks like those medieval tortcher chambers. Painful. Sometimes it can rip the muscle off the bone if they wind the voltage up enough. Most of the ones I acquired were none flash, oh well I guess it depends on your camera store. i busted a perfectly nice set of pliers ($2) when short circuitting one of these. Sad face.

    0
    None
    KryptoniteIzokay

    Reply 9 years ago on Introduction

    You don't buy it, if you plan to get a disposable camera and not use the film, just go to a camera store and ask for a used disposable camera. Just say that it's for a project and they'll happily give you as many as you want. They recycle them any way.