Sports

How I made a camera from 23,248 coffee stirrers, powered by a Raspberry Pi, and controlled with a Nintendo controller

This is the story of how I created one of the strangest cameras you may ever hear about. Iā€™ve been working on the design for over a year and Iā€™m finally ready to share it with the world. Itā€™s a long story, but first I want to jump to the end. Hereā€™s what the final camera looks like as well as what a photo take with it:

When I tell people that I made a camera out of coffee stirrers I get an odd reaction. They want to know why. Where the idea came from? The idea is strange, even for me, and Iā€™m the guy who inventedĀ the Lego camera. Thereā€™s a drawing in my sketchbook that shows the first inklings of the idea. I mentioned the idea to a fellow photographer friend (thanksĀ Natalie!) over lunch and we brainstormed whether it would be possible. Before long I was assembling a proof-of-concept in my basement.

How does it work? Imagine if you created an array of straws all pointed in the same direction. Each straw will ā€œseeā€ a different point of light. In theory, if you put a piece of light sensitive photo paper behind the straws you would be able to record the light from each straw.

The problem with photo paper (or film) is that you only get one picture before you have to go back into the darkroom to reload and see if your photo was successful. Without a reliable way to know how long to expose the paper/film your ratio of good photos to duds will be very low.

A somewhat more practical solution is to build a lightproof box around the back of the straws with a semi-transparent surface that the straws could project on to. Then you could use a second camera to photograph the projected image. As you can see from my sketch, originally I thought maybe tissue paper would be suitable for collecting the image. Itā€™s not, and I had to find a different material for the focal plane. But I am getting ahead of myselfā€¦

Thatā€™s how it worksĀ in theory. In practice it took quite a bit of experimentation to arrive at the final version of the camera. This essay is the story of that journey. You might have noticed that I still havenā€™t answered the question of why. The truth is, I donā€™t know. All I can say is that scratching this odd itch has been very satisfying and the results please me. Some people will read this story and just not get it. Thatā€™s fine. But my hope is that others will be inspired by my exploration and be energized to pursue their unique obsession. If thatā€™s you then I donā€™t need to explain why we make things. The journey is the destination.

Finally, if you like this project, pleaseĀ follow me on Instagram. Better yet,Ā sign up for my weekly emailĀ where I share creative ideas with my friends. I spend most of my time creating things alone and your likes and shares go a long way to helping me feel connected with the world. Let me know that all my time and effort has been worth it. Thanks in advance.Ā Now on to the showā€¦

Prototype 1

In my head the idea of a straw camera worked but I needed to build a prototype to test my hypothesis. I bought a box of 250 coffee stirrers and began to play. At first I wasnā€™t impressed with what I saw. If you hold a bundle of straws up to the light your eye can only see through a few of them at a time.

In order to ā€œcaptureā€ the light from each straw it needs to land on a surface that can ā€œrecordā€ it. Some old cameras used ground glass as a surface that would collect the light coming through the lens so you could ā€œpreviewā€ your picture before you committed to putting the image on film. I have a small viewfinder from an old camera with a small chunk of ground glass in it. Holding the viewfinder up to the straws allowed me to ā€œseeā€ through all the straws at the same time. This simple test was the moment I realized this idea just might work.

Looking through ordinary coffee stirrers (left) vs looking through the ground glass

Next it was time to order a massive amount of straws. The stirrers that they sell at my local Wal-Mart are split down the middle. Later I would realize that this was a benefit (it essentially gave me 2 straws in one, doubling my ā€œresolutionā€) but at the time I wanted round holes so I ordered 11,000 black straws on Amazon. This is where the economics of building a camera out of straws get questionable. It cost about $60 for that many coffee stirrers, which was almost enough of a deterrent for me to abandon the idea. I bit the bullet.

Making the first prototype using 11,000 coffee stirrers

When my shipment of straws arrived I built a box to house them. I used 1/2 inch foam core for the walls and plexiglass for the ends. The surprising thing was how much pressure that many straws puts on the walls. The thick foam core bent slightly outwards under the outward pressure of 11,000 straws.

Now that I had a box full of straws I needed to figure out how to get a large piece of ground glass. I wanted a piece of ground glass about 10 inches wide and 15 inches tall. Buying ground glass that large would be impractically expensive and making it myself would involve hours of sanding. I had a dead MacBook Pro in my closet from way back in the days when Apple still made a 17 inch laptop. It even had a matte surface instead of a glossy screen. I decided to take it apart and see if its screen would work as ground glass. I was optimistic.

I ended up destroying a 17in MacBook Pro for nothing

What you will find inside the screen of an old laptop is interesting. Itā€™s more than just a piece of plexiglass. The glass is thicker on one side than the other. And if you look through it the light bends, distorting the view kind of like a camera lens. I believe the purpose of this is to magnify the light, which I thought would be great since there is so little light coming through a straw to begin with. I put the laptop screen against the straws and gave it a try.

At this point I have a box of straws sandwiched between plexiglass and a laptop screen. If you look at the back of it you wonā€™t see anything. In order for the ā€œpictureā€ to appear I needed to block out all the light except for the light coming through the straws. I put my camera in a light-proof enclosure behind the straws and took my first photo. It looked like thisā€¦

The first image from my first prototype

Look closely and you can just make out my face in the dots. The photo isnā€™t without its charm but it wasnā€™t what I was hoping for. To be honest I almost abandoned the project at this point. The thing that confused me, and the question that ultimately saved my camera was that vertical line of light just off center in the image. What was causing it?

I decided to make a smaller prototype before I abandoned the idea altogetherā€¦

Prototype 2

I didnā€™t want to drop more money on straws and I wasnā€™t ready to disassemble my 11,000 prototype yet. So using the coffee stirrers I could get at Wal-Mart I built a smaller prototype. I decided to try to use my phone to record the image. The focus distance of my phone required me to build a box that was 12 inches deep in order to get a 4.5Ɨ5.5 grid of straws in frame. Hereā€™s what it looked like.

The second prototype was a ā€œmobileā€ version of the straw camera

You can see the little camera holder that I rigged up and the rubber band that holds it in place. There is a hole just big enough for the lens of my phone to poke through. Using this setup I tested different ground glass alternatives to my laptop screen.

Through experimenting I realized that the problem with the laptop screen was that because it bent the light it ruined the image.Ā Thatā€™s right, I destroyed a 17in MacBook Pro screen for nothing.Ā So it goes.

If I was going to get a good image I would have to find something more like true ground glass. First I tried sanding plexiglass with fine sandpaper. It didnā€™t work. The tissue paper I mentioned earlier didnā€™t work either. Then I tried painting the plexiglass with frosted glass spray paint. While it wasnā€™t as crisp as real ground glass it was pretty good. But what turned out to be the best surface was the cheapest option of all, wax paper. Surprise! With this setup I got my first successful images.

A pinecone and a camera shot with the second prototype:

While I had originally dismissed the split coffee stirrer straws as inferior, it wasnā€™t until now that I realized the benefit of this type of straw. The size of the straw was the same as the circular straws but now I had 2 ā€œpixelsā€ of light coming from a single straw. This effectively doubles my ā€œresolution.ā€ And to my eye, the randomness of the patterns are more interesting than the circular straws. Sometimes you stumble into success despite yourself.

Encouraged, I took the camera outside and used it to photograph some spring flowers. I loved the painterly feeling of the flowers. It was as if Chuck Close and Monet had birthed a camera. The most common response I get to pictures taken with my coffee stirrer camera is that they feel like paintings. This is an effect that you wouldnā€™t be able to achieve with normal glass. We assume that the purpose of a camera is to re-create reality accurately. It is easy to forget that there is beauty in interpretation, in abstraction, in the loss of detail. What the coffee stirrer camera lacks in fidelity it makes up for in expressiveness.

Flowers as seen through the second prototype:

Flowers are the perfect objects for photographing with my mini straw camera. Thatā€™s because anything bigger than a few inches simply wonā€™t fit in the frame. Normal cameras have a lens that bends the light allowing you to be near or far from your subject depending on the the type of lens. Straws donā€™t bend the light so the size of the image will always be 1-to-1 with the size of the subject. In other words, if you want to take pictures of things that are bigger than a flower you need to make the camera bigger. So I went back to my first prototype, scrapped the laptop glass and rebuilt it with wax paper and what I had learned. The photo below shows the original prototype after I upgraded the picture surface.

At the rear of the camera is my Olympus OM-D E-M10 Mark III. You can see from the self-portrait on the right that that the ā€œresolutionā€ of 11,000 straws is just barely enough. For my third prototype it was clear that I needed to experiment with the split coffee stirrers and see if I could get an even clearer image.

Prototype 3

Somewhere in this adventure I found out that I wasnā€™t the first person to experiment with straws as an ingredient in cameras. Michael Farrell and Cliff Haynes built a camera with 32,000 drinking straws. In one of their experiments they used corrugated plastic instead of straws. Unfortunately, the square holes of the plastic are larger than the holes of a straw, effectively reducing the ā€œresolutionā€ of the camera. It did give me an idea, though. What if I inserted coffee stirrers into the square holes of the plastic sheets? I wondered if this might give me extra ā€œresolutionā€ because I would get 2 points of light from each straw plus the surrounding light in each square of the plastic. It was worth a try.

The square holes of corrugated plastic are larger than a straw, reducing the ā€œresolution.ā€

Corrugated plastic sheets are surprisingly expensive at $26 for an 18Ɨ24 sheet. If you didnā€™t catch my thriftiness earlier, it is in full display now. I splurged on a single sheet and then bought out Wal-Martā€™s supply of coffee stirrers. I had to wait for Wal-Mart to re-stock, then I bought them out again.

I cut the corrugated plastic into strips and stacked them up to build an array that is 10 inches wide and 12 inches tall. Counting the holes of the plastic I was left with 60Ɨ58 squares for a total of 3,480 holes. Once I inserted a coffee stirrer into each slot I essentially had 10,440 points of light. Thatā€™s 0.01 megapixels in case you were wondering.

I could have bought more plastic so that the size of my straws matched the size of my stack of corrugated plastic. Instead I decided to cut each stirrer to 3.25 inches. This allowed me to save on plastic and doubled my stock of straws. Did I mention I was cheap? This left me with the tedious task of cutting each straw in half and inserting it into 10,000 holes by hand. For your enjoyment, here is a timelapse of the job.

I am not opposed to tedious work, and after several hours I was done. As before, I sealed the straws between plexiglass and built an enclosure that could hold my digital camera.

Back to the prototype. Hereā€™s what the third version of my straw camera looked like and the first image I captured with it. Not bad, right?

The third prototype in action

Encouraged by the tests in my studio I took the camera outside and looked for pretty things to take pictures of. Hereā€™s another nice assortment of spring flowers.

I guess this might be the time to answer the question about whether my camera is actually a camera. Is it more of a lens? The distinction is a bit murky, I admit. Hereā€™s why I prefer to think of it as a cameraā€¦

Just as in a camera, if you were to put a piece of film, or an enormous digital sensor at the plane where the straws kiss the glass, you would be able to take a picture. Obviously, thatā€™s not practical so I use a digital camera as the ā€œfilmā€ for my camera. So the distinction I make is that a lens canā€™t create a picture by itself. Since my contraption could take a picture (in theory) by itself I consider it to be a camera.

It kind of feels like cheating, Iā€™ll admit, to require an expensive digital camera in order to get a picture out of a camera made of paper and plastic, but thatā€™s a problem I will address when I get to the final version of my camera. Hold that thought.

The size of the third straw camera prototype is just about the size of a human head, making it ideal for portraits. Remember, the size of subjects need to be equal to the size of the camera, so if I wanted to include shoulders in my portraits I needed to build a bigger camera. Here are some of the faces that Iā€™ve captured with the third prototype:

My mom, son, and dad as seen through the third prototype:

Armed with what I had learned from building my 3 prototypes, it was time to build a final version of the cameraā€¦

The Final Design

When it came to building a final version of my coffee stirrer camera I knew it was going to be big because I wanted to be able to capture the full head and shoulders of people. The final dimensions of the straw box are 18 inches wide, 20 inches tall, and 8 inches deep. Extending off the back of the camera is a light-tight enclosure for the lens that extends another 24 inches. Here are all 4 cameras lined up to show you how much the size increased as the straw camera evolved.

From left to right: Final camera, Prototype 1, Prototype 3, and Prototype 2

A camera this large was going to require a lot of coffee stirrers. Every time I visited Wal-Mart (or letā€™s be honest, my wife does the grocery shopping) I would clear their shelf. Somewhere there is an auditor wondering why this particular store sells so many coffee stirrers. When it was all said and done the camera held 23,248 straws. Why not 23,250 straws you ask? Well, one straw was damaged coming out of the box. Another one escaped and hid under a box until after I had already sealed up the box. So it goes.

Because each straw has 2 ā€œpixelsā€ that translates to a 0.0465 megapixel resolution. Hereā€™s what it looks like to load all those coffee stirrers into the camera. While I am bragging about the specs, I should also mention that the final camera weighs in at 40 pounds.

You can see from that video that Iā€™ve ditched the foam core in favor of 1/2 inch plywood. The weight and pressure of that many straws is more than you would expect so it needs to be strong. There are 52 screws holding it together with brackets at the corners. If this thing falls over it needs to hold together otherwise thousands of straws will go flying everywhere.

Notice how one crooked straw on the left messes up the image

Once I got the thing together it was time for a test photo. Despite my best efforts to keep all the straws perfectly lined up, one straw managed to get turned. This is the face you make when you realize that you are going to have to take the whole thing apart and find the crooked needle in the haystack.

The effort to open the camera back up wasnā€™t wasted because it gave me a chance to improve the design in another way. The camera is heavy and awkward. I wanted to add handles. So while I had it open I could screw in some sturdy drawer handles from the inside. And while it was open, why not add a camera mount? I ended up taking all 22,000 straws out and putting a camera mount on the bottom. I havenā€™t tested it yet, but in theory I can now stick this 40 pound camera on top of a tripod. Maybe someday I will work up the nerve to test this feature out.

Once I got the straws all in alignment again I finally got my first suitable test shot. If you look at this next self-portrait you will notice some light leaks on the edges. This is what it looked like before I completely sealed off the back from light. Itā€™s a nice effect and I debated keeping it that way. Ultimately, I sealed it up, but not permanently. If I want this effect I can basically open it up a crack and let some stray light paint the edges.

Alright, so at this point I know the camera is going to work so I set out to tackle the next challenge. I wanted this camera to be self-contained. I thought it would be great if I didnā€™t need to have my digital Olympus camera strapped to the back of it.

This is where the Raspberry Pi comes in. If youā€™ve never heard of it, a Raspberry Pi is an affordable computer the size of a credit card. Earlier this year they announced a lens mount for the Raspberry Pi with a 12.3 megapixel sensor. With the Raspberry Pi as the brains, and the sensor as the ā€œfilmā€ I would be able to let my coffee stirrer camera stand alone.

Raspberry Pi sells two lenses. The 6mm lens was better for me because its wider angle let me mount the lens closer to the straws. Hereā€™s what it looks like:

Raspberry Pi camera mount with 6mm lens and homemade lego mount:

Youā€™re wondering if thatā€™s a Lego that the lens is sitting on? Why yes it is. I wanted to be able to switch my Raspberry Pi rig between my smaller prototypes and Lego was the obvious choice. I drilled four holes in an 8Ɨ8 Lego brick, added some spacers, and the rest is history.

The other thing that turned out to be handy about the Lego mount is that it lets me continue to use my digital camera if I want to. Hereā€™s what my Olympus looks like with a Lego sleeve. To keep my expensive camera from falling off, I use the hole for the tripod mount to screw it on to the Legos.

I can swap cameras and lenses between my straw cameras with this Lego mount:

The fun part (or the frustrating part, depending on your point of view) is that the Raspberry Pi doesnā€™t come with camera software. You get to write your own. I am not afraid of Python so I got to work writing some code.

Writing software and testing the Raspberry Pi camera:

Above is a photo of my setup for testing the Raspberry Pi as I was writing my software. I was completely new to Raspberry Pi and Python, but after a week of evenings and weekends I finally had an app that did what I needed it to do.

Not that a 3-foot, 40 pound camera is particularly convenient to begin with, but having to carry a mouse, keyboard, and monitor makes it even less cumbersome. Ideally my camera would be a camera with a single shutter button. While I didnā€™t get to that extreme, I got close.

When it came to controlling my camera there was really only one choice, an original Nintendo controller. With a USB adapter I can connect the NES controller to the Raspberry Pi. Once I figured out how to map the controllerā€™s buttons to the functions of my software I was off to the races. Hereā€™s what the keypadā€™s buttons doā€¦

The Start button launches a preview of what the camera is seeing. The A button takes a picture. The Up and Down buttons increase or decrease the exposure time by 1 second. The Select button launches a gallery of photos so I can see the last photo I took. The Right and Left buttons cycle between photos in the gallery. I am saving the B button for something else in the future. Maybe I will use it for uploading to Dropbox, I havenā€™t decided yet.

A ā€œself portraitā€ of my camera taking a picture of its controller

What about the screen? Well, I bought a tiny touchscreen that was supposed to work with the Raspberry Pi. That seemed promising. The problem was that the driver was a pain to install. Every time I would upgrade the OS it would break the drivers. Ultimately I sent it back. Instead, I use my phone. Using a VPN app I can connect to the Raspberry Pi and I essentially have a wireless monitor.

For power I bought a battery that supposedly can run a Raspberry Pi for 24 hours. The Raspberry Pi and the battery are connected with velcro. There is a ribbon cable that runs the length of the camera where it connects to the lens. Again, for the sake of being able to use the Raspberry Pi on my other prototypes I have a couple of connectors on both ends of the ribbon cable that make it relatively easy to disconnect the lens and Raspberry Pi without taking everything apart.

And finally I have a working camera. Finding the right exposure time is a bit of an art. In order to keep the entire plane in focus, a small aperture is better. But that increases the exposure time. Even in direct sunlight the exposure time is probably going to be a second or two. The ideal ISO seems to be 800. The closer objects are to the glass, the clearer they appear. Anything more than a foot from the front is essentially a blur.

Another feature of my camera is that I can remove the camera shield from the back. I use bungee cords to hold the shield in place. This makes the camera a little easier to transport because I can move it in two pieces. It also lets me experiment with different ā€œbacksā€ if I want to. For example, the variation below shows a shorter version that lets me use my widest Olympus lens. Itā€™s still not particularly practical but it reduces the camera from 3-feet long down to 2. Iā€™ve tried to track down a wider lens that will fit in the Raspberry Pi mount but 6mm seems to be as wide as they go unless I want to experiment with a fisheye lens.

The smallest version of the camera is still 2 feet wide:

As I mentioned, the Lego back allows me to swap the Raspberry Pi between the three cameras. Hereā€™s what the early prototypes look like today as well as the final version.

The first prototype (left), the second prototype (center), and final version (right):

Now we can compare the output of the straw cameras side by side. Below are 3 photos of the same Yoda toy.

Yoda as seen through the evolution of the 3 straw cameras:

It is worth noting that the final Yoda photo is cropped significantly. For a sense of scale, his head is 3.5 inches wide, not counting his long ears. So you are seeing about 12 inches of the total 18 inches that the final straw camera is capable of. And finally, to complete the sequence of self-portraits, here is one final photo of meā€¦

Self-portrait

Now that I have the coffee stirrer camera (and its siblings) finished I have a bunch of ideas for things I want to photograph with them. If you are in Colorado and interested in having your portrait taken, get in touch with me. I will be documenting my ongoing adventuresĀ on InstagramĀ and I would love it if you followed me.

Thanks for listening to my story. I hope you enjoyed it. Donā€™t forget to sign up for theĀ weekly email I write for friends. I appreciate the likes, follows, and shares.Ā Stay creative.

About the Author

Adrian Hanft is a designer, creator, and author from Colorado. He is a writer of the book Art of the Living Dead and writing project Letter Zero. You can check out more of his writing on his website and Medium. His design and other works are on Behance and Instagram. This article was also published here and shared with permission.



Source link