Menu

camera module working with PIC18 family

2015-04-17
2015-04-17
  • Peter Stone

    Peter Stone - 2015-04-17

    Hi,

    Has anyone had any experience with trying to get a small camera module to work with a PIC.
    I have a new project coming up.
    Here are the basic parameters:
    - 640 x 480 min resolution
    - still images only to be captured
    - JPEG images (processed by appropriate camera module and not processed by PIC)
    - simple interface between camera and PIC
    - PIC does not need to store entire image at a time.
    - PIC to control all camera operations.
    - Camera must be able to buffer an entire image for simple byte by byte download under control of PIC
    - PIC extracts data from camera buffer (byte at a time) and then shuffles it out via an external modem over several minutes (TCP/IP connection).
    - cost needs to be extremely low
    - the final system will be deployed in remote locations and will be powered off a small solar panel/battery combination.
    - most of the time the camera will be powered off and PIC will be in sleep mode to save power.
    - Of course I want to use GCGB. Trying to avoid going the Raspberry-Pi route as it adds complexity and cost.

    I have found a serial interface camera module that looks like it will do the job but I am wondering if there are other options.

    The PIC will probably be set up to buffer 64 bytes of data at a time.

    Transfer will be slow but this should not be an issue.

    Any ideas/past experiences greatly appreciated.

    Suggestions on camera module/PIC combinations would be good. I am currently planning to use PIC18F26K22 that I have used before and understand.

    Peter.

     
  • Anobium

    Anobium - 2015-04-17

    The current art of the possible using the current build. Comment the serial camera via the Pic to a Serial to an Ethernet device. Today, this solution I have build is a sensor with no local storage that streams the data to remote web site via XML. I can share the URL - the output is a web page formatted by the Pic. I have been using WizNEt107 for years (I mean years... I got some of the early dev boards). I have the Pic streaming data as XML then I can ensure the packages are valid.

    Things you could change.

    Communications option. You could you use a ESP8266 for IP communications. You would need to build a GCB driver.  The ESP8266 is on this is drivers required but I am not aware that anyone has completed this ESP8266 driver yet.
    
    Storage option. I am currently completing the SD card driver.  Today, you could stream data from an SD card with some limitations.  I am working this driver at the moment and I want to implement simple read/write/modify/delete commands with the GCB driver.  Then, you use an SD Card as local storage.
    

    Some thoughts.

     
  • Peter Stone

    Peter Stone - 2015-04-17

    Interesting but starting to get more complex than I desired.
    I might have to go this route though if I can not come up with another solution.

    I already have a field monitoring solution that works very well but without camera at present.
    I am currently thinking to use a camera device like this one
    http://www.4dsystems.com.au/product/uCAM_II/

    This camera is reasonably cost effective, allows you to capture an image(JPEG or RAW) and transfer it in small chunks via a serial port.
    Since I do not need to store anything locally can simple capture an image and then byte shuffle the image over a 3G TCP/IP socket connection.

    These devices are to be installed in areas where there is no power and no fixed internet connections.

    Add a camera to my existing design using this technique might be relatively easy.

    Thanks.

     
    • Anobium

      Anobium - 2015-04-17

      A nice way forward.

       
  • Peter Stone

    Peter Stone - 2015-04-17

    Anobium, I would like to see what you have put together. If you could share the link that would be great.

    Peter.

     
    • Anobium

      Anobium - 2015-04-17

      I have attached some screen shots. I decided against posting the URL as this gives an attack vector into my home! :-)

      I can provide you all the CCS and website code. The CCS (style sheet) is intended for a PDA and support touch, swipe etc. The website takes the XML stream and create the pages from that stream.

      Pretty simple. I want to be able to do all of this from within GCB in the next month. Hence the SD card and the Ethernet driver projects I am completing at the moment.

       

      Last edit: Anobium 2015-04-17
  • Peter Stone

    Peter Stone - 2015-04-17

    Thanks.

    I built a very simple SD card data logger a year or more back now based on a 16F88!!!!!.
    It worked, but there was not enough ram in the F88 to even think about a file system.
    I just converted the captured data on the fly to hex ascii records shuffled through to the SD card.

    It worked but was very crude.

    You set up the logging functions using simple serial commands via the ICSP pins.
    It even included a software RTC for time stamping of logged data.

    Getting every thing to work with the fixed record sizes of the SD card was a bit of a challenge. It certainly wasn't efficient on memory usage. I actually wasted space just to fill the blocks when writing. There isn't enough ram in the F88 to buffer anything.

    I have attached the simple schematic.

    Since the was no file system, I just read the data off in raw mode under Linux.

    Cheers

     
  • Anobium

    Anobium - 2015-04-17

    Good work. We need full support for file system really to make this useable for educational purposes. I am making progress. Watch for the first formal release. :-)

     

Log in to post a comment.