Instructables

The SnapPiCam | A Raspberry Pi Camera

FeaturedContest Winner
Picture of The SnapPiCam | A Raspberry Pi Camera
IMG_1961.JPG
IMG_1987.JPG


Adafruit launched it's PiTFT not long ago and I bought one immediately from Pimoroni. Soon after that Adafruit published a tutorial entitled DIY WiFi Raspberry Pi Touchscreen Camera. I had a good read through it and on the final page the final paragraph was;

The package could be slimmed down considerably; there’s a huge amount of empty space between the PiTFT and Raspberry Pi (even more with a Model A board). Advanced makers could squeeze a slim LiPo battery and a 5V boost converter in there, connecting to the expansion header at the right edge of the TFT board instead of the side-protruding USB power connector. The result would be similar in size to some consumer point-and-shoot digital cameras.

Hmmm OK, Challenge Accepted! 

But let's see if we can fit in a charger too, and attach some lenses while we're at it. Modern cameras feature both as standard, no reason why the SnapPiCam shouldn't......

Thanks for voting for the SnapPiCam in the Raspberry Pi Contest, we made First Prize!

The SnapPiCam kit is available from The LittleBox Company.
 
Remove these adsRemove these ads by Signing Up

Step 1: Parts

Picture of Parts
camera.jpg
pitft.jpg
charger.jpg
dc.jpg
lipo.jpg
1 x Raspberry Pi Model A
1 x Raspberry Pi Camera
1 x Adadfruit PiTFT
1 x Adafruit LiPo Charger
1 x Adafruit 1200mAh LiPo
1 x Pololu Step-Up/Step-Down DC Converter
1 x Slide Switch
1 x Compact Micro SD Adaptor
1 x 8gb Micro SD Card

4 x M3 45mm Button Head Screws
4 x M2 8mm Screws
8 x M2 6mm Screws
2 x Nylon M2.5 6mm Screws
2 x M3 4mm Nylon Spacers

4 x M3 Microbabrs
2 x M2.5 Microbarbs
12 x M2 Microbarbs

25 x Laser-Cut Acrylic Parts

1 x Raspberry Pi Mini Sticker

1 x 8x Zoom Lens
1 x Fish-Eye Lens
1 x Telephoto Lens

Step 2: Power

Picture of Power
The SnapPiCam uses a 1200mAh LiPo battery. I wanted to know what sort of run-time I could expect from the power pack.

Before I started with the build I hooked up the electricals to a DC Power Supply. By doing a few calculations using the data from the DC Supply we can work out an estimated run-time.

To calculate the power consumption of the electrical components in watts we multiply Volts by Amps.

V x A = W

5.2 x 0.51 = 2.652

The electricals consume power at 2.652 watts per hour. Next we calaulate the battery's capacity.

V x A = W

3.7 x 1.2 = 4.44

The battery holds 4.44 watts based on 3.7v. The Lipo will supply ~4.2v when fully charged, and it's lowest rating is 3.7v. I've gone with the lower value as not to over-estimate the run-time.

Now we know the battery's power capacity and the electricals consumption rate we can approximate the run-time with a simple division.

4.44 / 2.652 = 1.674

We can expect a run-time of 1.6 hours, or 96 minutes. An hour and a half.

Step 3: Starting Point

Picture of Starting Point
fascia.jpg
switch.jpg
cable.jpg
battery.jpg
I'm going to be making the parts with my laser cutter and the plans will be drawn in Illustrator.

I began by taking measurements of the Raspberry Pi. From that I could estimate the overall width and height of the camera frame. I wanted all the ports such as HDMI, USB and the SD Card all to be accessible even with the components fully enclosed. I also left space for a screw in each corner.

The overall width of the camera worked out at 101mm and with height was 67mm. The depth of the camera depends on how many layers of 3mm acrylic it would take to enclose everything in.

Next I needed to model the LiPo Charger and the DC DC Converter as both of those would be going at the front. The PiTFT needs to face backwards so the Raspberry Pi will be in a down-position with the camera and charger in front.

Cut-outs in the acrylic layers will hold the components. I'll also use recessed Microbarb brass inserts as bolt anchor.

I want to attach some lenses to the front. I bough a few different ones off eBay. The small ones are magnetic and need a washer to attached themselves, but the 8x Zoom has a latching system. I'll have to use interchangeable lenses to handle the two types.

The battery is ~5.5mm thick. It should fit nicely between two 3mm layers. I'll make cut-outs for the battery in the layers and add thinner layer each side of those to box the battery in.

There will also need to be holes for the GPIO and channels for the wires and cables. I'll also need an On / Off switch.

Step 4: Putting it together

Once the plans are finished I can hand them over to my laser cutter. I'm using 3mm clear acrylic.

I went through several versions before arriving at the final design. Before connecting all the wiring I did a test build to make sure it all fitted together.

I've used Microbarb brass inserts instead of nuts. They are a super bit of engineering. Some of the holes for the inserts have been engraved so the Microbarbs will sit flush with the acrylic so the layers will be flat togeher.

Step 5: Wiring

Starting with the fascia face down the SnapPiCam is built up layer by layer.

I had to remove the wires from the LiPo to make it easier to assemble. The FFC for the camera needs to be bent at some nastey angles. You can really only bend the cable once, after that the tracks will probably break and then it will need replacing. You can use the standard cable that comes with the camera.

Two pins connect to the PiTFT on pin 2 (+5v) and pin 9 (GND). Before you connect them to the power check the volatages are correct. You'll find the DC DC Converter needs adjusting. I set mine at 5.2v.

Step 6: Power Up

If you have already setup your Raspberry Pi as described in the Adafruit DIY WiFi Raspberry Pi Touchscreen Camera Tutorial then the camera should load up without any intervention.

A neat trick If you have setup a DropBox account on the camera is using your phone as a Wi-Fi hot-spot to upload your photos to DropBox even while out and about. It makes transfering images back from the camera so much easier.

The LiPo can be set for different charge rates, I left mine as is at 500mAh, most PC USB ports won't give out much more than 500mAh anyway. I didn't want to overheat the battery while it's in an enclosed space either. Charge time is about 3 hours.

Step 7: The Results

In what can be described as a typically windy British Day in Derby I ventured out to take a few test shots. The Photos are as follows;

1 | No lens

2 | Fish-Eye

3 | 2 x Telephoto

4 - 7 | 8 x Zoom Lens

8 | Fish-Eye Selfie.

All the photos are unedited.


There are several change I want to make to the design when I get the time; the process of swapping between the magnetic lenses and the 8 x zoom lens is way too complicated to do outside. I'll change the four M2 screw for a single M3 Thumb Screw and have knotches to stop it from rotating. I'll also consider using black acrylic for the lens assembly to stop any light seaping into the picture like what can be seen on the photos taken with the 8 x z00m lens. There is room to the left of the AV socket to fit in a tripod mount, I ran out of time but it will be featured in any future versions. Finally the three polycarbonate sheets, the two for the battery enclose and the back-plate, will be swapped out for 1mm acrylic.

A set of the SnapPiCam plans can be downloaded for free from The LittleBox Company

5t0rm16 hours ago

How did you set up the touch screen from adafruit

SilverJimny (author)  5t0rm16 hours ago
nerd74731 month ago

you should make your own app/distro that changes to a camera as soon as teh pi boots... that would be very cool

SilverJimny (author)  nerd74731 month ago

It does do that :)

what program did you end up using and how does one such as yourself go about doing that?

esperling1 month ago

I just need to build a simple camera where I can use lipo power, hit a button, record to sd. film from an rc car and then grab the video. could you point me to something like that? sorry if that's a remedial question. I'm a noob

SilverJimny (author)  esperling1 month ago

Haha i am aware of the gopro and appreciate the response, however, in this build im looking to mount 3-4 cameras to record a 360 degree field of view and i need the whole setup to be as compact as possible

SilverJimny (author)  esperling1 month ago

I suggest using cheap digital cameras, eBay would be a good point to start your research from.

Discovered that my Pi has an antiquated an unsightly growth that your pi does not-

Any advice before I do this?: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=40&t=32331

2014-03-03 20.04.33.jpg

Figured it out... need to make amendments for my Model B. Stay tuned.

SilverJimny (author)  CactusMonkey1 month ago

It might be better to just get a Model A

Hey SilverJimny-

Hopefully, you don't mind me asking- how did you deal with the slant due to the pi cam pins?

As you can see, assembly is still in progress...

2014-02-22 17.04.21.jpg
SilverJimny (author)  CactusMonkey1 month ago

3mm Sticky foam pad behind the camera stuck to the acrylic. The screws tighten the camera down onto the foam keeping it level.

IMG_2164.JPG

Laser cutting gave me one extra piece than what is shown here. I'll try to figure it out in the next few days (still waiting on microbarbs to arrive).

2014-02-18 20.30.43.jpg
SilverJimny (author)  CactusMonkey1 month ago

Cool!

Did some laser cutting today... and so it begins

2014-02-18 18.08.11.jpg
fotosyn2 months ago

Totally blown away by this. Everything is so well crafted - great idea with the layering of cut plastic slices.

SilverJimny (author)  fotosyn2 months ago

Thanks :)

slimbore2 months ago
I do understand , any image interface require lens / at least pin hole , what I need to know can I replace existing lens with a camera lense wich can be adjust focuse. , so that I can replace 35mm film with image interface?
SilverJimny (author)  slimbore2 months ago

If you are asking if you can fit a standard Canon or similar lens onto the SnapPiCam then the answer is no, not without modification to the design.

arquimana2 months ago
Very nice project! Congrats!
Are there laser plans for download?
Can't wait for build one.

Thanks
SilverJimny (author)  arquimana2 months ago

Thanks.

The plans are attached to the last step.

slimbore2 months ago

I wassearching for conversion of my Fusica wide angle couple range finder camera , as I love this camera , don't want to through in scrap. as 35mm film becoming obslete nowadays. No0w even I can dream of having camcorder. of my own built.

Thanks.

SilverJimny (author)  slimbore2 months ago

My pleasure :)

One more query, Does it possible to use lense of present camera? or the interface has lense / pinhole for?

SilverJimny (author)  slimbore2 months ago

do you mean use it without a lens on it?

MikB SilverJimny2 months ago

I think this confusion is because your first example pictures is labelled "without lens", which is of course unlikely to give an image. You mean "without additional lens, but with the built in Pi Camera Lens", right?

SilverJimny (author)  MikB2 months ago

Yes thats right.

One more query, Does it possible to use lense of present camera? or the interface has lense / pinhole for?

JoQuez242 months ago

what other alternatives can make for the camera body and CHALLENGE ACCEPTED

SilverJimny (author)  JoQuez242 months ago

Just about any 3mm and 1mm thick sheet material should work. So long as you can cut the shapes out yoiu should be fine.

shizumadrive2 months ago

I love the idea I need a new camera and I
have a ras-pi sitting around asking for attention. making the acrylic
case though is beyond something I could make. Maker centers are too far
away. Some day maybe Ill get laser cutter.

Hey you like challenges come up with a ras-pi laser cutter!

I guess Ill see if I can make one out of metal, wood or best of all a dead old camera that cant be repaired. Rip out its guts and stick this in it.

SilverJimny (author)  shizumadrive2 months ago

You could try that with an old film camera, you'd have the advantage of being able to use the old camera's optics.

CactusMonkey2 months ago

Hi There,

This is awesome- I'd like to make this my next project (although with acrylic that has a nice blue tint to it).

I was hoping you wouldn't mind answering a question on the Illustrator file. Our laser cutter makes us specify which colors go through and which ones do not. Would you mind giving a run-down on the colors in the adobe files (or provide a link to where I can look this up)? I'd like to have something like: "Red(255,0,0)goes through , blue(0,0,255)goes through, green does not (0,255,0)...".

These are the easy ones- I don't know what to do with (66,33,11; brown?) or (117,76, 36).

Thanks again- fantastic project!

SilverJimny (author)  CactusMonkey2 months ago

Hi,

I should have unified the colour, my bad. I separated them out to make the cutting quicker for me. Anyway, the colours are as so;

Red(255,0,0): Cut, all the way through.

Blue(0,0,255): Cut, all the way through.

Green(0,255,0) Vector Engrave, on my cutter I have it at 16% power and 40mm/s.

All the other colours should be raster engraved, or scan as my cutter calls it. Set power at 25% and 40mm/s for raster engrave. I would do a few test runs just to verify the settings beforehand.

Take care to note that layers 11,12, & 16 should be cut from 1mm thick material.

And lastly, photos!

Please :)

Thanks

Greg

Great- Thanks so much. Hopefully you don't mind verifying which layers are 11,12, and 16.

Cheers,
Drew

PiCam_Case.png
SilverJimny (author)  CactusMonkey2 months ago

I don't mind; the three layers at the bottom which have been separated from the others should be cut from 1mm material.

weish2 months ago
this is a really cool project. do you think a 3d printed enclosure would be a good alternative to laser cut? seems like an even more compact and precise fit might be doable that way
SilverJimny (author)  weish2 months ago

Yes of course, i think there are plenty of 3d printer raspberry pi cases. It should be too hard to adapt one, or start from new to include a camera.

Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!