Uno Polaroid Camera even possible?

I have recently purchased an Arduino Uno from my local RadioShack and im still trying to figure out how to use this thing effectively. If there is one thought i recently had for a project, it was something that could top what has already been made.

Polaroid cameras these days will print out business card sized photos, but the Zink photo paper and camera cost quite the pretty penny. A French guy who i cant remember the name of made a Digital Polaroid Camera that made its pictures from a receipt printer, yet it had no memory to store pictures with and takes three minutes to develop a photo. I think between these two examples, it is possible to create the "Silver Lining" between the expensive brand camera and the scrap parts camera through the use of Arduino tech.

From what i am trying to figure out with this project is how to make a relatively "cheap" Digital Polaroid Camera. I have looked all over the web and many auction sites for Arduino parts and i am liking what i am seeing. Yet i am still a novice at this whole thing. especially when it comes to the programming of the Uno R3.

Within some requirements of this project, the camera would have to have:

  • the ability to capture and store images either in internal memory or an SD card
  • an LCD and/or a Touch Screen Display to not only view images, but to manage them (deleting photos, adjusting settings, maybe even a zoom feature)
  • some way to produce its own "polaroids" (Personally, i was thinking it could print out photos onto cheap index cards)
  • those three requirements put into an enclosure to make it easily portable

Im pretty sure something like this couldn't be made with an Uno R3, but maybe it could be done with a Mega. Personally im not sure at all what board model would be best. All in all though, does anyone have any thoughts or suggestions on how this could be made? Hardware, software, even the mechanics im pretty sure there are questions or replies to post.

Im not sure if i would have the money to actually construct such a camera, and im not asking for any donations or anything like that. Im just asking for any thoughts, suggestions, questions and the like.

-Jakit

This is not really a project well-suited for an Arduino. An image takes up a relatively large amount of RAM, which most AVRs do not have. Considering the cost of a Raspberry Pi is about the same as an Arduino Uno (and cheaper than a Mega retail) that would be a better option.

And aside from the fun/learning aspects, if you really priced out all the parts you need, I doubt that you could make something like this cheaper than what exists.

Just my .02 cents and I normally don't shoot down an idea, but I think you will get more use out of finding a project more suited to the Arduino.

It would be extremely challenging to do it, even with a Mega, due to the very limited ram available on all Arduino class machines. You could use a camera that produces jpg images over a serial line, like the linksprite cameras that sparkfun sells, and write the image to a SD card. However you are likely to have to process the image before sending it off to the printer, and it would be challenging to do it in the limited space you have available in the Arduino and clones.

A raspberry pi would have the resources to do it, since it comes with 256M or 512M of memory, runs a multitasking OS, and there are suites of tools that you can download to do image processing. The R-PI's weak point is it is less useful than the Arduino at direct hardware control.

In terms of printer ink, it is expensive for just about all manufacturer printer inks who subscribe to the so-called Gillette business model (sell the razor body cheap and make your profits selling razor blades). I recall a few years ago, HP reported that something like 1/3 of its total profits came from printer ink.

A few years ago, I had the thought about doing a walk around gig at a renaissance faire, where I would be an artist, and disguise a camera inside of my paint board, and then use a portable HP printer I had at the time to print an image. At the time, I was planning on using either PictBridge from the camera, or just taking out the memory card and putting it in the printer (which had a card reader).

I do admit, that is very good realism with the feedback for this topic. I can understand how an arduino might be limited in RAM and Processing power. So with that being said, splitting the concepts of camera and printer apart, what about the possibility of making a small printer that can print images and other stuff onto a 4x6 Index card? It might be a stretch, but would arduino tech be able to work with something that size?

i only ask these questions to understand how and why what i propose would work or not. That way ill know if i should attempt the project or not.

Sure, the Arduino could work as a controller for a printer. However, you will want some sort of 'buffer' to hold the image while it is printing or else you will need to send only bits of the image at a time which will hold up your camera end of the business. Once the image is in the buffer you can take all the time in the world to process the image for printing. So, you could use a static RAM to hold the image and use a multiplexed interface to read the RAM to gets bits of the image at a time.

BTW, I have one of these which prints awesome pictures that look just like they were printed at a photo shop: http://www.ebay.com/itm/Kodak-EasyShare-Photo-Printer-300-New-/290888433388?pt=COMP_Printers&hash=item43ba4d3eec#ht_1207wt_1398

These are pretty cheap and the materials (ribbon and paper) is really not too bad.

They are USB, but perhaps if you are inclined, you could just replace the controller and use the mechanical bits.

EngineerJakit:
I do admit, that is very good realism with the feedback for this topic. I can understand how an arduino might be limited in RAM and Processing power. So with that being said, splitting the concepts of camera and printer apart, what about the possibility of making a small printer that can print images and other stuff onto a 4x6 Index card? It might be a stretch, but would arduino tech be able to work with something that size?

i only ask these questions to understand how and why what i propose would work or not. That way ill know if i should attempt the project or not.

There are a few mobile 4x6 printers out there already:

Retroplayer:
Sure, the Arduino could work as a controller for a printer. However, you will want some sort of 'buffer' to hold the image while it is printing or else you will need to send only bits of the image at a time which will hold up your camera end of the business. Once the image is in the buffer you can take all the time in the world to process the image for printing. So, you could use a static RAM to hold the image and use a multiplexed interface to read the RAM to gets bits of the image at a time.

BTW, I have one of these which prints awesome pictures that look just like they were printed at a photo shop: http://www.ebay.com/itm/Kodak-EasyShare-Photo-Printer-300-New-/290888433388?pt=COMP_Printers&hash=item43ba4d3eec#ht_1207wt_1398

These are pretty cheap and the materials (ribbon and paper) is really not too bad.

Though the problem with Kodak is how long will they be around, producing the paper/ink refills? This is an issue with most of the printers in this category, where at some point, the manufacturer will move on to different printers or get out of making that model. Given Kodak's dire financial straights it might be more of an issue for them.

Retroplayer:
They are USB, but perhaps if you are inclined, you could just replace the controller and use the mechanical bits.

Or put on a USB shield on the Uno, and control it that way. That depends on whether you can figure out the appropriate command sequence to send.

Just had another thought with this concept of an arduino polaroid camera. Would there be more processing power available for the Arduino to translate pictures between the printer, camera, and data storage if the camera was a low resolution? like the resolution of an old cell phone? I know i have a cell phone in need of minor repair and i could salvage the camera and possibly other parts from that. But would i have to sacrifice the use of an LCD screen so the image processing would be faster? Any thoughts anyone?

I don't know how much such a camera would have. But some popular resolutions might be:

  • 1.3MP, 1280x980: 1.2 megabytes if the camera produces GIF (8 bits per color), 3.5 megabytes if the camera produces JPG after decompressing;
  • VGA, 640x480: 300 kilobytes for GIF, 900 kilobytes for JPG;
  • QVGA, 320x240: 75 kilobytes for GIF, 225 kilobytes for JPG;
  • 1/2 size QVGA, 160x120: 19 kilobytes for GIF, 56 kilobytes for JPG;

Given an Arduino has 2 kilobytes, if you have any processing on the photo, you will need to use something like a SD card and read it in, chunk at a time, and write it back out.

At 160x120 you have only enough pixels for a 4x6 for 26 dpi. Normally people say the best photos are at 300 dpi, but frankly I think that is over-rated for most photos (other than say the National Geographic magazine, etc.), and 150 dpi gives great photos if the camera has a clear image, and you use good printing techniques. I've gone down to 75-80 dpi, and for photos that don't have lots of detail that people will look at (i.e. a normal snapshot) it produces ok results. However, I'm not sure the 26 dpi might not start being noticeable.

The popular Polaroid photo size is actually smaller than 4x6 (3.5 x 4.5 for the consumer cameras, or 4x5 for the older pack cameras), so your dpi would be a little higher if you found a printer that printed to those dimensions.

I'm honestly not trying to shoot you down, it is just photo processing takes a lot of memory, and it just isn't what the Arduino is good at. What an Arduino is good at is reading sensors, waiting for button presses, and turning motors to control moderate things.

At times, I use my Arduino to fire off my big steampunk camera that has my digital SLR inside of it (see my icon photo). I have a telegraph key that acts as a button, and when the button is fired, it tells the camera to focus (using the guts of the wired shutter release) and when you release the telegraph key it tells the camera to take the picture. I needed to do this 2 step process because my digital camera focuses rather slowly in live view mode, and if I tell it to shoot and focus at the same time with a single button press, often times the pictures come out unfocused. As an extra feature, I light up one light to indicate the camera is focusing and another to indicate when the camera is firing. I also have a buzzer on the Arduino, and I play "Fire" in morse code when you take a picture, and I've thought instead of the buzzer, perhaps put a hobby motor with a gear attached, and spin the gear when I'm taking a picture (perhaps mounting this on my bowtie).

<edit 2>
So over the years, I've made quite a few boxes to hold my cameras, and I'm in the middle of building another one. One of the things I've thought about using the Arduino for is for cameras that don't have a wired shutter release. In those cases, I've thought about wiring up a servo to press the shutter button to take a picture. Then you can attach an IR sensor to the Arduino, so that you can fire the camera remotely. There is a rather expensive commercial product that does this, and I've seen a few websites where people have done it as well. For example:
http://arduino.cc/forum/index.php/topic,54122.0.html

<edit 3>
Even if the camera has a wired shutter release, I've thought it might be interesting to have a servo that controls a finger to press the button. I even bought a finger/servo kit some time ago, but I haven't had time to construct it.

MichaelMeissner:
I don't know how much such a camera would have. But some popular resolutions might be:

  • 1.3MP, 1280x980: 1.2 megabytes if the camera produces GIF (8 bits per color), 3.5 megabytes if the camera produces JPG after decompressing;
  • VGA, 640x480: 300 kilobytes for GIF, 900 kilobytes for JPG;
  • QVGA, 320x240: 75 kilobytes for GIF, 225 kilobytes for JPG;
  • 1/2 size QVGA, 160x120: 19 kilobytes for GIF, 56 kilobytes for JPG;

Given an Arduino has 2 kilobytes, if you have any processing on the photo, you will need to use something like a SD card and read it in, chunk at a time, and write it back out.

At 160x120 you have only enough pixels for a 4x6 for 26 dpi. Normally people say the best photos are at 300 dpi, but frankly I think that is over-rated for most photos (other than say the National Geographic magazine, etc.), and 150 dpi gives great photos if the camera has a clear image, and you use good printing techniques. I've gone down to 75-80 dpi, and for photos that don't have lots of detail that people will look at (i.e. a normal snapshot) it produces ok results. However, I'm not sure the 26 dpi might not start being noticeable.

The popular Polaroid photo size is actually smaller than 4x6 (3.5 x 4.5 for the consumer cameras, or 4x5 for the older pack cameras), so your dpi would be a little higher if you found a printer that printed to those dimensions.

I'm honestly not trying to shoot you down, it is just photo processing takes a lot of memory, and it just isn't what the Arduino is good at. What an Arduino is good at is reading sensors, waiting for button presses, and turning motors to control moderate things.

Seeing as how I have recently found out about a contest on Instructables.com thats related to anything about video games, then i think what im trying to get figured out in this topic will help greatly. http://www.instructables.com/contest/gamelife3/

A bit of side information, I figure making a camera that can make pictures in 1/2 QVGA would be perfect for what im trying to make. A game that I am a good fan/owner of is "The Legend of Zelda: Wind Waker". In this game the player can find an item called a "Pictobox", which lets you take up to 3 pictures of people, enemies, places, basically anything in the game itself. When you find it, it can only take pictures in a black and white/sepia tone, so there's no vibrant colors for the device. But after you do a side quest and find some sort of firefly thing, you can upgrade to the "Deluxe Pictobox" to take color photos.

Heres a link that i hope shows the difference between the higher quality of the game, compared to the somewhat blurry quality of the photos you can take with the Pictobox.
http://www.ign.com/faqs/2003/action-replay-ultimate-codes-legend-of-zelda-the-wind-waker-photo-quest-faq-390843

If the size of the photo comes out to a 4x6 with relatively "good" resolution, then i would say getting this camera made with 1/2 QVGA quality is what im looking for! The more accurate i can be with the look and functionality of this project in comparison to the game, the better my chances would be at winning the contest. So MichaelMeissner, have you ever tried to make a camera with that low a resolution? And would it be possible for an arduino to process pictures with that much data?

Btw, thank you very much for your knowledge on photography, because that list of resolutions may have possibly saved this project. Possibly.

EngineerJakit:
Seeing as how I have recently found out about a contest on Instructables.com thats related to anything about video games, then i think what im trying to get figured out in this topic will help greatly. http://www.instructables.com/contest/gamelife3/

Interesting contest. I never really played video games, other than nethack on my Linux systems, and some early Pacman, so I can't offer any suggestions. I did spend about 6 months working at Metrowerks on their PS/2 and PSP compilers, but generally it was like all of the other compiler jobs I've held over the years, where you are focused on the code being generated, and don't worry about what the programmers are creating with the compiler. There was one bug, that only showed up if you had the demo game display, and did a specific sequence to get to the bug.

EngineerJakit:
A bit of side information, I figure making a camera that can make pictures in 1/2 QVGA would be perfect for what im trying to make. A game that I am a good fan/owner of is "The Legend of Zelda: Wind Waker". In this game the player can find an item called a "Pictobox", which lets you take up to 3 pictures of people, enemies, places, basically anything in the game itself. When you find it, it can only take pictures in a black and white/sepia tone, so there's no vibrant colors for the device. But after you do a side quest and find some sort of firefly thing, you can upgrade to the "Deluxe Pictobox" to take color photos.

Heres a link that i hope shows the difference between the higher quality of the game, compared to the somewhat blurry quality of the photos you can take with the Pictobox.
http://www.ign.com/faqs/2003/action-replay-ultimate-codes-legend-of-zelda-the-wind-waker-photo-quest-faq-390843

The Linksprite camera that Sparkfun sells does produce VGA, SVGA, and 1/2 SVGA pictures. From the manual, it produces the image as a text stream, and presumably you could have the Arduino store the image on a SD card. So, you would need a SD/microSD shield of some kind, plus the camera: LinkSprite JPEG Color Camera TTL Interface - Infrared - SEN-11610 - SparkFun Electronics.

Due to the memory, you will not be able do any processing of it without heroic efforts, but if you write to a SD card, you could use a portable printer to print the image by taking the card out of the Arduino and putting it into a card reader that portable printers have. Since portable printers have Pictbridge, in theory you could implement a pictbridge driver in the Arduino. However, the protocol is not freely available, so that may not be an option: PictBridge - Wikipedia

The newest portable printers now take bluetooth for printing from cell phones. I'm not sure if the Arduino bluetooth chips can act for transferring pictures. However, given you mention an old cell phone, that may be the way forward. If it is old enough that the cell phone uses physical keys instead of swipe screens, you could presumably have the Arduino rig up a servo that presses a button. Then you program the sequence to take a picture, and possibly upload it to a printer. Again, you wouldn't be able to modify the picture, just take the picture and possibly print it.

I do have a cell phone hack planned, where I take this handset, combine it with a bluetooth dialer, and put keys over the buttons to press them, so I can add phone capability to the steampunk camera. http://www.thinkgeek.com/product/f286/

EngineerJakit:
If the size of the photo comes out to a 4x6 with relatively "good" resolution, then i would say getting this camera made with 1/2 QVGA quality is what im looking for! The more accurate i can be with the look and functionality of this project in comparison to the game, the better my chances would be at winning the contest. So MichaelMeissner, have you ever tried to make a camera with that low a resolution? And would it be possible for an arduino to process pictures with that much data?

When I got into digital photograph in 2001, I used cameras that shot 1600x1200, and on the high end camera (for its time), I could print good 8x10 photos if I didn't crop anything, other than 100 pixels to make the aspect ratio 5:4 (1500x1200, or 150dpi). I occasionally have printed crops at smaller dpi. I think 75 or 80-ish dpi was the smallest I ever went. Note, this is using the printer at places like Walmart, and not a home inkjet printer.

While at one time I thought about doing an artist gig where I disguise a camera in a pochade box easel and have a printer (where I would manually move the card), I've never used one in the field.

As I mentioned in passing, I've been disguising my cameras as steampunk cameras for about 3-4 years now. I started with putting my Olympus E-P2 inside of a 1915 Kodak Pony Premo 5x7 bellows camera, and then moved to making ever more elaborate custom boxes for my Olympus E-3/E-5 cameras. I've made a Halloween pumpkin camera for the last 2 Halloweens, and now I'm making a mini-me smaller box camera based around my latest digital camera (Olympus E-PM2). I gave a talk last summer on the history of these cameras, and next week I'm going to give it again. The old slides are at: Slide 1

However, except for the telegraph shutter key, none of this is Arduino based.

EngineerJakit:
Btw, thank you very much for your knowledge on photography, because that list of resolutions may have possibly saved this project. Possibly.

You are welcome.

You know, the real problem is that the AVRs don't have enough RAM, but several of the AVR processors have external RAM interfaces built in. The ATmega2560 does for example whichis already officially supported. It uses PortA for multiplexed Address and Data (A0-A7 and D0-D7) and PortC as A8-A15. Then you need the PortG for RD/WR/ and ALE. This would give you access to 64K of external RAM directly, but with some bank-switching, you can get lots more but slower. Of course there is also SPI RAM that would work with any of the Arduinos (though it would be slower of course.) All that is missing is support in the core or a library.

However, some smart people have created support for this:
http://www.ruggedcircuits.com/html/megaram.html

So, just interfacing directly to 64K, it would appear mapped directly in the address space which makes it just as fast as the internal RAM and the stack/etc. Not a whopping amount of memory but even at 64K, that is 8 times the amount of RAM available in the Mega.

Retroplayer:
You know, the real problem is that the AVRs don't have enough RAM, but several of the AVR processors have external RAM interfaces built in. The ATmega2560 does for example whichis already officially supported. It uses PortA for multiplexed Address and Data (A0-A7 and D0-D7) and PortC as A8-A15. Then you need the PortG for RD/WR/ and ALE. This would give you access to 64K of external RAM directly, but with some bank-switching, you can get lots more but slower. Of course there is also SPI RAM that would work with any of the Arduinos (though it would be slower of course.) All that is missing is support in the core or a library.

I would imagine it depends on whether you can address the external ram as normal memory, in which case you could do limited processing. However, once you have marginally enough RAM, the next obstacle might be the size of program memory. Some of the graphics programs are quite big, because they tend to support every image format, and 10,000 options. Porting these to Arduino will also cause some problems if the programs assume ints are at least 32-bits.

However, if you are going to buy a Mega to do this, I would recommend getting a Rasberry PI ($25-40 depending on the model) or pcDuino ($60) instead. These have plenty of memory, and because they run Linux, have various graphics packages already provided. While the R-PI is not as suited to direct hardware control, a lot of people use the Arduino and R-PI together, letting the R-PI do the higher level control, and the Arduino do the low level hardware interface. I imagine the pcDuino is similar:

gotta say, for what im trying to make with this project, i think im starting to feel confused about what i would need to accomplish the goal. You all have been quite helpful with all the replies. for right now though, im gonna take a breather and then get back to this. Overall though, what kind of components would be needed for the camera portion of this project, at least to make the resolution and pixel size im looking for?

Assuming you want to continue using the Arduino, and realize you will just be able to take a picture, and store it, I would think things similar to the following:

Of if you go my route, and incorporate an existing camera, and use the Arduino to fire it, you would need:

  • If the camera supports a wired shutter release: a donor wired shutter release that you can cut up, 1-2 opto-couplers to protect the camera from the Arduino and vice versa, and some wires, soldering iron, solder, buttons, etc (I can point you to links, etc. for this);
  • If the camera has an older style infra-red shutter release, you would need an infra-red LED, moldable clary or similar to position the LED so the camera can see it, wires, buttons, soldering iron, solder (there is a library that contains the programming for most camera infrared shutters that I can give you a link);
  • If the camera cannot be controlled via a shutter release mechanism, you would need a servo, mounting platform, buttons, wires, etc. (I posted a link several messages back)

Now, if you have never done a complex project before, you need to break it down into smaller steps, to work on each step independently. You will have missteps, so plan for that. When buying things like wire, wood, etc. if possible buy enough for 2-3 attempts, rather than having to go back to the store when a piece of wood gets cut wrong. Before making a finished project, do it with cheaper materials like cardboard for the build structures, and breadboarding for the electronics, so that you can iterate, to get it right. Then you can make it pretty.

MichaelMeissner:
Assuming you want to continue using the Arduino, and realize you will just be able to take a picture, and store it, I would think things similar to the following:

Of if you go my route, and incorporate an existing camera, and use the Arduino to fire it, you would need:

  • If the camera supports a wired shutter release: a donor wired shutter release that you can cut up, 1-2 opto-couplers to protect the camera from the Arduino and vice versa, and some wires, soldering iron, solder, buttons, etc (I can point you to links, etc. for this);
  • If the camera has an older style infra-red shutter release, you would need an infra-red LED, moldable clary or similar to position the LED so the camera can see it, wires, buttons, soldering iron, solder (there is a library that contains the programming for most camera infrared shutters that I can give you a link);
  • If the camera cannot be controlled via a shutter release mechanism, you would need a servo, mounting platform, buttons, wires, etc. (I posted a link several messages back)

Now, if you have never done a complex project before, you need to break it down into smaller steps, to work on each step independently. You will have missteps, so plan for that. When buying things like wire, wood, etc. if possible buy enough for 2-3 attempts, rather than having to go back to the store when a piece of wood gets cut wrong. Before making a finished project, do it with cheaper materials like cardboard for the build structures, and breadboarding for the electronics, so that you can iterate, to get it right. Then you can make it pretty.

With the way the project looks, ill be going with route #1. All im really missing with that is the camera module, but i think i can get that taken care of.

Ok, so given the money i can spend and the time i have until the 25th (end of the Game.Life 3 contest on instructables) Ill come back to this project when i have the ability to. In the meantime, ill be trying to think of a different idea for the contest.

EngineerJakit:
Ok, so given the money i can spend and the time i have until the 25th (end of the Game.Life 3 contest on instructables) Ill come back to this project when i have the ability to. In the meantime, ill be trying to think of a different idea for the contest.

Sounds reasonable. It can be hard, but sometimes it is better to scale back projects so that you can ultimately finish them. Of course I say this, as I have several undone projects, and quite a few thought of but not yet started. Good luck!