Make your own plastic mini lens

3689382699?profile=original

One of my side projects has been to develop an open-source visual motion / optical flow sensor that may be usable in all sorts of devices, whether robotic related or not. I've found though that one of the most difficult parts of developing tiny vision sensors is finding the right optics. Ideally we want something that is cheap, easy to mount, has a decent field of view, and yet creates a reasonable image. For higher resolution images (hundreds of pixels across or more) and image sensors four or more millimeters wide, there are many excellent lens assemblies available from companies like Sunex. (We've used and still use their products in higher resolution sensor designs, always with success.) However there is really nothing available for image sensors a millimeter wide. Printed pinholes do work, but don't let through as much light. This post highlights a little project to design a decent lens for the Faraya64 image sensor, whose focal plane measures about 1.1mm across.

 

The basic concept (shown below) is to make a simple "plano convex" lens, with the curved surface (e.g. "bump") facing outward and the flat section resting on an image sensor. I decided on acrylic as an optical material, since it is light, easily formed, and for our purposes is as good as glass. An opaque "stop", perhaps made of paint or a piece of black plastic, would fit over over the lens and allow light to reach the image sensor through only the center of the front bump.

 

3689382738?profile=original

For the front surface I decided to use a spherical shape- this is a pretty traditional shape for 99% of all lenses out there. I used the ray tracing and optimizing capabilities of Zemax, a commercial optics design software package, to find an optimal shape. I found that to provide the 1.1mm image sensor chip with a 60 degree field of view, the dimensions shown above were optimal: The front bump would be a sphere with a radius of 0.61mm, while the total thickness would be 1.6mm. I also allowed the optimizer to try aspherical conic shapes (e.g. parabolas, hyberbolas, ellipses) but found that I did not gain much performance over that of a sphere and so decided to keep it simple.

 

The two figures below show two plots generated by Zemax. First is the lens layout, showing the 0, 10, 20, and 30 degree off-axis rays. Second is the spot diagram showing how the image would be blurred from ideal, for red, green, and blue rays! The pitch between pixels on the Faraya64 image sensor is about 17.1 microns, so the RMS blurring shown here was not quite optimal but was good enough for me to go on.

3689382766?profile=original3689382805?profile=original

 

I decided next to first try forming a lens by hand by stamping it. This technique won't match the precision from the Zemax simualtion, but I thought it would be fun. Using Alibre, I designed a simple stamp that would produce a lens of the above shape. I had this stamp CNC machined from aluminum by the company FirstCut.

3689382398?profile=original

The stamp came back, but it needed more finishing. Basically the part of the mold that forms the spherical lens bump needed to be polished to "optical quality". I didn't really know what I was doing, but I did manage to find a way to polish this area! I used a Dremel tool, a toothpick, and some polish (Simichrome Polish by Gesswein), put a dab of polish in the hold, and used the Dremel tool to spin the toothpick. After about 5-10 minutes of spinning and moving the toothpick around, I managed to get the spherical surface polished to a decent quality, as shown below. I also cut channels to let the plastic escape as the stamp was being pressed down. The result is shown below.

 

3689382861?profile=originalNow comes the fun part- the pressing! I don't have any photos from this step, but I'll try to describe the technique that worked best. I placed a pyrex dish on a hot plate, and set the heat to low-medium. After a few minutes I then placed a piece of aluminum foil on the hot plate, and a tiny piece of acrylic onto the aluminum foil. A few minutes later the acrylic piece got soft, and I pressed down onto it with the stamp. I lifted the stamp out, and the pressed acrylic piece (and the aluminum foil) came up with it. The picture below shows the business end of the stamp, the pressed piece of acrylic, and a U.S. Quarter for size comparison. If you look carefully, you can see the spherical bump in the middle of the piece of acrylic. You can also see extra plastic around the outer side of the lens- I cut that away with a utility knife.

 

3689382796?profile=originalI'd say that about 40% of the lenses I pressed turned out OK. Below and at the very top of this post are front and back pictures of some of the final lenses produced.


3689382882?profile=originalThe next step is to mount the lens on a chip. Basically I used a UV curable optical adhesive (Norland 63) to glue the lens directly onto the chip. Then I used black modeling paint to form the "opaque enclosure". Finally I added more optical adhesive to encapsulate everything (except for the lens bump). The result is shown below- you'll see the lens mounted onto a Firefly chip (similar to the Faraya) and that mounted on a small 9mm x 9mm PCB. If you look closely you can also see the wire bonds that connect the chip to the PCB.

 

3689382917?profile=originalHow was the image quality? Actually much better than I expected, especially since the flat side of the lens was not perfect. The optical adhesive's index of refraction is similar to that of acrylic, so I think together they helped smooth out some of the imperfections. Below is a screen shot- the quality is certainly good enough for 32x32 images, and I think with refining can be further improved.

 

3689382925?profile=originalSo now the final step is to automate this process. Rather than press molding by hand, injection molding is the way to go for quantity. Below is a family mold with four slightly different variations of the same lens. This is currently being fabricated by Protomold. I should get parts back in the second week of January. I'll report back on this in a few weeks!

3689382946?profile=original

 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • @ionot- This lens will actually be part of an Arduino Pro Mini based sensor we are working on. I have some notes and will post that one in a day or two. (Wrapping up things for the holidays and all that.)

     

    @Pig Pilot- Thanks for those sites. You are right that turning is a good way to prototype lenses- even glass lenses of spherical or aspherical shapes can be turned using diamond-tipped lathes. However I don't own a lathe myself. The main reason I chose this path, though, is that I ultimately saw injection molding as the preferred way to go, especially if we want to produce these lenses for much less than a buck apiece. However before going down that path I wanted to see just what I could do with this crude technique. I was also trying to select between different injection mold firms, and figured this initial experiment might tell me if I could go with the least expensive option first or if I might as well start with a more expensive option. The image quality I got was really much better than I expected, so I am going with Protomold- The family shown with 100 charges and 10-day turn is about $2200- not cheap but doable. If that works, we can probably get 10k-100k charges out of that mold. There was also a bit of curiosity involved- I might want to use this technique to try other lens shapes or even (dare I say) PCX surfaces!

     

    Another factor is that these really are small lenses- it is possible to machine thing this size, and then polish them, but it would not be easy (at least for me anyway).

     

    @Chris- Thank You for the compliment! Below are links to the mold files in case anyone is interested, both in Alibre format. The first is for the stamp. The second is for the injection mold family. I have not yet attached a proper "open hardware license" file to these yet (creative commons?), but can do that later on. (Gotta figure out exactly how to do that.) Note everyone that the injection mold family is untested- I have no idea if it will work!

     

    Alibre file for stamp

    Alibre files for injection mold (NOTE: UNTESTED!!!)

     

    Another possibility is that I can come up with a range of different configurations (radius, thickness, stop size, and optional conical parameter) for different image sensor size and fields of view, and others can use this for their own purpose. This way not everyone needs to buy Zemax (though I admit it is a cool piece of software and I learned a lot just from playing with it).

     

    @Ravi- One is the 0.61mm radius sphere / 1.6mm thickness lens. The other three are the same but with 1.575mm, 1.55mm, and 1.525mm thicknesses. The differences are too small to see in the picture. I found that some UV curable glue collects between the lens and the chip which adds thickness, so I might as well shave that off the lens. Also I don't know what the "shrinkage" will be. With this mold I can try several things out and see what works best.

    https://storage.ning.com/topology/rest/1.0/file/get/3692140668?profile=original
  • What are the differences in the 4 lenses? They look the same in that render.

  • 3D Robotics
    this is awesome! It was indeed a lot of work, but it was such a cool exploration of the problem and the tools needed to solve it. Very in keeping with the DIY spirit. Plus now that he's done the work, he can share the mold with the community.

    Great documentation, too!
  • ........Actually, you don't even need a lathe to do this, you can make a very good tiny lens by working the plastic rod in the chuck of an electric drill.

     

    Also, bear in mind the old method of making a microscope objective by melting a strand of glass so that a 'ball' droplet forms on the end.......All these and the above lathe method are the work of minutes.

  • This is an awful lot of work for not very much gain.   The best way to make this is to put an acrylic, or similar. rod in the lathe and turn aspherical end either by eye (not as difficult as you might think,..most decent machinists can do it) or, preferably for this application, a ball turning attachment which is a common lathe accessory.   Use a sharp lathe tool, preferably round nose as plastics have some elasticity.

     

    Nest, polish the 'lens' using a strip of 2000 'wet 'n dry' paper moistened with water and held against the curve with common pressure.    Then, polish the lens with 'T-Cut' car body cutting fluid giving a flawless finish.

     

    Now, part off the lens at close to radius of curveature.    Place flat side down on 2000 w/d on a surface plate and polish the flat side using circular movemnt of the fingers and regular rotation.

     

    ....Voila!....one finished plastic lens of whatever shape and size you want with minimal cost and fuss.

     

    There are several good guides to truning lens components online,..the simplest is that on the 'gadgette builder' site to make optical centre punch.

  • Quite interesting.What is the purpose beside constructing some simple lens?
This reply was deleted.