Camera Project

By Griffin Danninger, Alec Wicklund, and Ivan Arevalo

Project Report

This camera system uses the LPC4088 Development Kit and the Arducam Mini 2MP Camera Module to take pictures and save them to the SD card. The board uses I2C to configure the registers of the OV2640 Sensor on the Arducam Mini. It then uses a GPIO interrupt from the on-board push button to trigger image capture. This is done through SPI communication with the Arducam. After the image has been captured, the LPC4088 reads image data from the Arducam over SPI and writes it to a new image file on the SD card. When this is done, the system is ready to capture a new image.

We have optimized our code so that it reads from the camera First In, First Out (FIFO) buffer as quickly as the camera module can handle. We did this through a process of trial and error. We found that if we tried to access the FIFO buffer in too quick succession, the buffer will not have shifted the current byte out in time and it will be reread as the same byte. We now having it running pretty quickly, so that the capture is almost immediate and the SD card saving takes about 10 seconds. The picture resolution is pretty decent as well at 1024x768.

Program Flow:

  1. Set up I2C
  2. Check if SPI is communicating
  3. Prompt the user to press button to take picture
  4. Wait for button interrupt (while loop). Once pressed, set a flag to take picture and go back into loop.
  5. Take picture by sending a value to SPI.
  6. Give the image file a unique, dynamically allocated name
  7. Grab one chunk of image data at a time until finished. Each chunk of data gets saved to SD card
  8. Close the file and prompt user to press button again

Potential Application:

One potential application of this project is a small surveillance system for the front door of a home. The camera could fit into a small hole in the door and capture an image any time someone rings the doorbell. We would just have to remove the actual LPC board and solder the pins to connections on the camera.

Fulfilling Reach Goals

Although we were unable to reach our original, lofty goal of creating a gif out of three simultaneous image captures, we did complete the most complex part of the problem, which is capturing the image itself. From here, if we had more time, we would have scaled this up by adding a couple GPIO pins for additional Chip Select signals. This way, we could incorporate two more cameras using the same I2C bus and MISO/MOSI connections on the board.


Demo Video


720p.mov

Block Diagram

Sample Images