LinkSprite JPEG Color Camera TTL Interface - 2MP

Every super spy has a small compact camera at their disposal just to get the advantage on the bad guy and though you may not be a "00" this high res TTL camera still has plenty of uses! LinkSprite's latest JPEG Color camera module can capture high resolution pictures and transport them over TTL serial, making it perfect for embedded applications. This a very simple camera module with great user applications and can be incorporated into almost any project with ease.

Each one of these camera modules is capable for taking single 2MP JPEG images. All that is required to power these little guys is a 5VDC supply at 80-100mA (max 120mA).

  • 1600x1200 / 1280x960 / 1024x768 / 800x600 / VGA / QVQAF / 160x120 resolution
  • Support capture JPEG from serial port
  • Default baud rate of serial port is 115200
  • DC +5V (+/-5%) power supply
  • Current consumption: 80-100mA (max 120mA)* Module: 36.6 x 32 x 27.6 mm
  • Cable: ~210mm L
  • [User Manual](https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/JPEG camera 2M UM.pdf)
  • Product Wiki

LinkSprite JPEG Color Camera TTL Interface - 2MP Product Help and Resources

Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

2 Programming

Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #844031 / about 8 years ago / 1

    CAN i connect it to slip ring

  • NightEule5 / about 8 years ago / 1

    Is is possible to take videos with this module?

  • Member #727029 / about 8 years ago / 1

    Hi, I have been trying for days now to run a code on Arduino Mega 2560 that will take a picture from this camera and save it in an SDHC card. I have found the correct pins (19, 50, 51, 52 and 53 output) so the card initializes, but I cannot write anything. Could someone please post a working code ? The one in the Arduino page never reaches the EndFlag... Thank you

  • RyeMAC3 / about 10 years ago / 7

    Can you post a sample image at full rez so we can see if this thing is worth $55 bucks?

  • TimDC / about 9 years ago / 5

    Just thought I'd provide a quick write-up of this module based on several weeks now of trying to get it to work well. Most of that time was spent fussing with code to handle the serial transmissions (between an Arduino and the camera, and between my Macbook and the Arduino) to transmit JPEGs to my Mac.

    Getting the camera to take pictures is relatively easy, although the sample code provided in the wiki is a bit of a mess. I'll work on a blog post with my sample code.

    I was very disappointed in the image quality. I was hoping for quality that would rival a low-end 2MP (1600x1200) consumer camera. However, the color quality is so bad you'd almost mistake it for a black-and-white camera, and there is significant spatial distortion at the edges of the frame. For example, here's a high-res photo taken with the Linksprite and here is essentially the same photo taken with my iPhone. You can see they're not even close.

    If you do get this, be sure to use the User Manual linked on this page, which is different than the one in the product wiki. The latter is out of date and wrong. The correct manual gives instructions for changing the exposure and IR mode on the camera. I was hoping that changing the IR mode would improve the color quality, but I couldn't get it to work at all.

    I also couldn't fetch images from the camera (via the Arduino) at anything above 38400 baud, which made for pretty slow image transfer, but that might not have been the camera's fault.

    • Flecko / about 9 years ago / 1

      Thank you for posting a write up especially posting up sample photos - definitely helps when choosing embedded cameras such as this. Also, your issue with not being able to fetch images at any baud higher than 38400 - were you using sofwareserial? I believe 38400 is the highest stable baud rate you can achieve with the software serial port. Just a thought. I may be wrong so someone please chime in if so.

  • Member #592107 / about 9 years ago / 2

    1600x1200 at 15fps through a serial link with a max 115200 baud rate?...no way

  • Member #231949 / about 9 years ago / 1

    I just bought one of these cameras (LinkSprite JPEG Color Camera TTL Interface - 2MP) But I have no idea how to take a picture! The User Manual and product wiki is almost useless. Can someone let me know how to take a picture?

    • Member #727029 / about 8 years ago / 1

      Hello, did you ever figure it out? I have been having the same problem. I am using an Arduino Mega 2560. If you have a working code -even for another Arduino board- could you please post it ? Thank you so much

  • Member #711689 / about 9 years ago / 1

    I do not know the meaning of [exposure control] settings Someone you know person do you?

    "0x80" no change where I tried, the other (for example, 0x01, etc.) has changed to extremely dark image

    8.Serial port to manually adjust the exposure control 56 00 46 00 xx XX 00-0xff

  • Member #667969 / about 9 years ago / 1

    Do the Rx and Tx Pins work at 5V or 3.3V? I was planning to interface it with a Tiva Launchpad.

  • Member #567645 / about 9 years ago / 1

    I've been working on getting this working with an Arduino and Openlog. I believe I've taken a picture and I now have a massive string saved to the Openlog starting with the characters FF D8 and ending with FF D9. But I can't seem to convert this text to an actual image. I suppose the image has been encoded into JFIF. How could I now convert this to an actual jpeg that I can view?

    • ksomervi / about 9 years ago / 1

      It sounds like you have a text file. You'll have to write it as a binary file.

  • This is a 2MP CMOS camera.

  • Member #528026 / about 9 years ago / 1

    I'm running an mbed board with a serial connection on pins PTC3 (rx) and PTC4 (tx). I'm sending the commands out as I see in the manual on the tx pin (connected to rx pin of camera), however, I never get the "ACK command" back on the rx line (connected to tx pin of camera)? Are the commands in Hex or Decimal or something else? Any suggestions on how to get the camera to acknowledge?

    • Member #475033 / about 9 years ago / 1

      The commands are definitely in hexadecimal. Make sure that you are sending them out as such. For example 56 on the datasheet is 56 in hexadecimal or 0x56.

  • Kerbal / about 10 years ago / 1

    For about $20 more, this basic digital camera does 20.1 megapixel stills, 720p video at 30fps, etc, etc, etc... Included in that price is a >~1000mAh battery, 2.7" LCD, the plastic enclosure, etc, etc, etc... http://www.bestbuy.com/site/sony-dsc-w800-20-1-megapixel-digital-camera-black/4349004.p

    How then, does this slower and lower-fidelity camera with no storage, lights, usb, etc, etc, maintain this price? Not intended as a dig at sparkfun, because I find no significantly better and/or cheaper cameras available.

    Where does one purchase the comparatively well-featured cameras they put in every ~$20 cell phone nowadays? I realize the phone manufacturers buy 1000000000000 cameras at a time but even with adding the onboard encoder to make the camera 'standalone', the price-feature ratio seems way off.

    Could you not (summarizing) add a <$20 SD sniffer to the above BestBuy camera and outperform this in every way? Besides being tiny and low-power, please spell out for me where the value in this is?

    Thanks

    • M-Short / about 10 years ago / 2

      That's a hard one to answer, but I'll try. A lot of it really is scale, and that Sony is buying/making a lot of these, and can therefor do so much cheaper. But a lot of it is that these are very different devices. The Sony camera is great if you are on a family vacation and just want to take pictures, but not very good if you want to build a system to automatically take and email you pictures every time your fridge opens. Even with an SD sniffer you still don't have direct control of the camera module. For hobbyists building their own device, this is really the missing piece. Different markets and different pricing.

    • Member #471922 / about 10 years ago / 1

      Agreed, there definitely is a market for a cheap serial cmos camera with jpeg compression / video at a resonable transmission rate. Surprised Adafruit/Sparkfun/etc havn't gotten something going yet.

  • Member #471922 / about 10 years ago * / 1

    The section of code that seems to be some of the most important is relatively unexplained:

    void SendReadDataCmd(){
    MH=i/0x100;
    ML=i%0x100;
    mySerial.write(0x56);
    mySerial.write(ZERO);
    mySerial.write(0x32);
    mySerial.write(0x0c);
    mySerial.write(ZERO);
    mySerial.write(0x0a);
    mySerial.write(ZERO);
    mySerial.write(ZERO);
    mySerial.write(MH);
    mySerial.write(ML);
    mySerial.write(ZERO);
    mySerial.write(high);
    mySerial.write(med);
    mySerial.write(low);
    mySerial.write(ZERO);
    mySerial.write(0x0a);
    i+=low;}
    

    This code works as long as low is less then 255 of course because of byte size. However I have been unable to make the chunk size something larger like 512 without it breaking mainly because I don't understand what is functionally happening and what real maths need to happen for mh and ml. When I change the i+= section to the full chunk size (512 for example) this also doesn't work.

    How can I get information on this statement for communicating with the camera. The section in the documentation says:

    Returning Bytes: 56 00 32 0c 00 0a 00 Addr2 Addr1 Addr0 00 Data2 Data1 Data0 00 0a
    Addr2 Addr1 Addr0 is start Addr of the package
    Data2 Data1 Data0 is package Size package Size is a multiple of 8
    

    Alright so... if package size is 512 how do I express that in two bits and how do I calculate Addr2 Addr1 Addr0

  • Member #471922 / about 10 years ago / 1

    Can someone please tell me what MH and ML represent in the code and subsequently what purpose they serve in the SendReadData command? I've pretty much mastered this camera but this is stumping my final hurdle!

    • devond / about 10 years ago / 2

      MH and ML are the range of bytes to be read from the image. Check out this library, it was the best I could find on the googles.

  • Member #601031 / about 10 years ago / 1

    Can any one help me to build a camera like this?

    • 1080P

    • can use the WiFi module as the following. Or other way to use WiFi to link to the camera. I just want the camera to link outside with WiFi connection, but I don't want the serial cable connection between the camera and WiFi module, other connection is fine.

    https://www.sparkfun.com/products/10004

    Please let me know if you know how to make it. Thank you very much. My email is sli1828@hotmail.com

  • devond / about 10 years ago / 1

    FWIW I thought I would pass along that I have been able to get this camera to work with a Due, saving the image to SD and/or processing it in memory as needed.

    Note that the documentation suuuuuuuuucks and some settings such as cranking up the image size or dialing down the compression seem to blow the poor things tiny mind, requiring a reset.

  • Member #382994 / about 10 years ago / 1

    As no response from SF contradicting the statements done I fear they may be true......

    • We try to monitor the comments but things slip through! If you have specific questions about a product and the comments haven't answered it, I recommend emailing techsupport@sparkfun. They'll be able to help you out.

  • I have one of the earlier models and it does work, just not to any of the clained perforamce levels. Perhaps Sparkfun Live could incorporate this device into a project where the real device get demonstarated.

  • Member #2817 / about 10 years ago / 1

    When they say "..can capture high resolution pictures and transport them over TTL serial, making it perfect for embedded applications." do they mean serial out to a PC for display or how else can JPEG format be used in an embedded application?

  • Member #121921 / about 10 years ago / 1

    Is there any way to get raw pixel data from the camera? The manual and wiki do not mention raw, only JPEG, I believe.

  • swolpert / about 10 years ago / 1

    Anyone know what chip is behind that "QC PASSED" sticker?

    • Piotr Kula / about 10 years ago * / 1

      The same chip that is behind this QC sticker. http://www.ebay.co.uk/itm/1x-JPEG-Camera-Serial-UART-Interface-with-Built-in-Inrfared-TTL-Level-Module-/400701165634?pt=UK_Sound_Vision_Other&hash=item5d4ba69042 I know its not a 2MP ... this is a newer CMOS on it. But looks very similar

      • swolpert / about 10 years ago / 1

        This new 2MP LinkSprite has a 64-pin processing chip with an external 4Mbit SRAM (IS61LV5128AL-10TLI). The previous VGA LinkSprite module you've linked to has a processor with many more pins and no external memory. The new 2MP LinkSprite could use the same/a similar processor in a different package, but I bet a new processor is being used. If SF or someone with their hands on one wouldn't mind peeling off the sticker, I'd love to hear the processor part number. Or Piotr, were you being sarcastic?

        Thanks!

        • Piotr Kula / about 10 years ago / 1

          Yea a little bit sarcastic really. Just annoyed that the specs given here are misleading. If this can truly do 15FPS @ 2MP over UART.. then yea.. I retract my sarcasm and apologise.. but I seriously doubt it and it makes me fume a bit.

      • I'm not sure thats the same chip. The one in the link you provided has more pins than this one and the crystal in on different pins between the two.

        • Piotr Kula / about 10 years ago / 2

          This 2MP most likely has a newer version of what's on there. That is likely because this module has a dedicated SRAM module to deal with larger buffer, while the older version had a buffer built into the chip. The specs are very similar (except this is higher res) but the rest looks very similar.

  • Piotr Kula / about 10 years ago * / 1

    " maximum frame rate of 1600?0x1200 at 15fps" ?? Does that mean like MJPG at 1600x1200 @ 15FPS? I dont understand that. THe user manual says "160x120 preview @8bpp with 0.75~6 fps" - Come on guys, you just shoving some cheap chinese crap on here now.oh wait £32 - Thats seems a bit to expensive for my liking! You can get better modules (not UART) but still.

    • swolpert / about 10 years ago * / 2

      Hm, yes, there seems to be an issue.

      Does that mean like MJPG at 1600x1200 @ 15FPS?

      Some assumptions:

      • Camera outputs a 1600x1200 frame in color, 8 bit/pixel (likely YUV 4:2:2 format)
      • Therefore: 1 frame is 1600x1200x8 bits or 1.92 MBytes (aka ~2MP @8bpp).
        Note: No file system here so 1,000,000B = 1,000kB = 1MB
      • JPEG compression varies drastically based on a lot of factors, but let's say we do really well and JPEG compression brings us from ~2MB uncompressed down to 50kB.

      [formatting seems broken here]

      A theoretical 1600x1200 JPEG stream at 15fps with 50kB per frame
      Units can get confusing very quickly, so step-by-step:

      • 50kB/frame at 15fps
      • 50kB/frame x 1000 bytes/kB x 8 bits/byte at 15fps
      • 400,000 bits/frame at 15fps
      • 6,000,000 bits/s (aka 6,000,000 baud)
      • 6Mbps

      According to the User Manual PDF the maximum baud rate is 256000 baud, and the product description says max 115200 baud. In either case, we still come up short by at least an order of magnitude (data output is >10x more than our transfer speed).

      Maybe not fully Q.E.D., but I concur that there's likely no way this module can output 1600x1200 JPEGs at 15fps.

      • omegahacker / about 10 years ago / 1

        Given the way the baud command is set up, I strongly suspect that it can go faster, if you find the right value. It looks like it's a standard divider-style, though probably with some extra bit stuffed in there since faster baud rates seem to be in a separate range. Of course, when they list the same value (0xAE) for both 9600 baud and 128000baud, I'm guessing that anybody looking to speed it up will just have to try a bunch of values and measure what comes out to derive the appropriate formula.

        There's still no chance this thing will ever actually capture 1600x1200x15fps and be able to send it anywhere...

  • xsk8rat / about 10 years ago * / 1

    This line of text may be incorrect:

    16000x1200 at 15fps

    Though this is what is on the wiki.

Customer Reviews

No reviews yet.