LinkSprite JPEG Color Camera TTL Interface

Replacement: None at this time. LinkSprite is currently working on a rev of this camera module, check back later for more information. This page is for reference only.

The LinkSprite JPEG color camera allows you to capture and output JPEG images through UART, making it easy to integrate into an existing design.

Note: These only work reliably with a 5V power supply, even though the manual states they can work at 3.3V. If you want to use it at 3.3v, you will need a lower baud rate. Check the comments for more information.

  • VGA/QVGA/160x120 resolution
  • Support capture JPEG from serial port
  • Default baud rate of serial port is 38400
  • 5V power supply
  • Size 32X32mm
  • Current consumption: 80-100mA
  • [Manual](http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/LinkSprite JPEG Color Camera Manual.pdf)
  • Software
  • Tutorial
  • [Library](http://www.sparkfun.com/datasheets/Sensors/Imaging/JPEG Camera Libraries.zip)
  • Product Page
  • mbed Example

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.

  • verda / about 13 years ago / 2

    The JPEGCamera library download does not explicitly specify a license. It claims to be copyrighted by Sparkfun though. Would Sparkfun be interested in explicitly stating a license, so that it is clear what rules apply for people who want to distribute it or a derivative of it?

  • Member #108742 / about 13 years ago / 2

    Is this really only 160x120 resolution? Seems really low... I would like to interface this with a Netduino Plus. Anyone else had good luck with that? Thanks.

    • Member #338054 / about 12 years ago / 1

      It says VGA/QVGA/160x120, which means 640x480/320x240/160x120, where you can select from one of the modes.

    • Joe P / about 13 years ago / 1

      The datasheet says it'll do 640x480. This thing: http://www.sparkfun.com/products/10549 sets it to 320x240, for image capturing. I bought one when I bought this camera, but haven't used it yet.

      • marcosriolo / about 12 years ago / 1

        I receive this message:

        .v.&..VC0703 1.00 .No ctrl infr .MI360 .625

        what is problem? what solution? for return normal message

  • BurnerJeremy / about 14 years ago / 2

    It looks like you could grab the serial signals before the on-board MAX3232 so you wouldn't need an RS232 level converter.

  • Member #545684 / about 11 years ago / 1

    LSY201 is giving me a "photo once empty order queue" error, My camera is connected to a XBEE, Please can anyone help? Thank you in advance

  • Member #545684 / about 11 years ago / 1

    LSY201 is giving me a "photo once empty order queue" error, My camera is connected to a XBEE, Please can anyone help? Thank you in advance

  • Member #442483 / about 11 years ago / 1

    Hey All, I've bought 5 cameras now and they all get into this crazy state after one picture is taken. So... I hook up RX-TX TX-RX 5v GND... I get the Greeting and the "Init end" then I wait and send Take photo. Everything seems to work. The first time.... Then I can never get the camera to say "Init end" again.... I can get the greeting to come up partially. by taking 5V off and connecting and disconnecting the GND pin. But I only ever get part of the greeting. It is also like a CTS DTR issue but there are no connectors for that on the camera. I don't think I need to ground anything on the MEGA to have CTS / DTR set for serial UART correct? Why the first time and then never again? The 4 cameras are now unusable. I just want to take a picture and get the JPEG data. ARGGGGG i've wasted 4-5 days on this... Gezzz...

    Any help would be great!

  • Member #442483 / about 11 years ago * / 1

    dup

  • Member #409867 / about 11 years ago / 1

    I followed the datasheet's instruction. I stopped the frame, got the FBUF length and read FBUF length number of bytes from the buffer starting from address 0x0000, asking for 32 bytes each time. However, somehow the string of bytes from the camera cannot be converted into a jpg file--it didn't end with a FF D9. I found a few FF D9 somewhere in the middle of the bytes, but even after deleting the rest of the bytes after that FF D9, it still didn't give me a jpg image. Can someone help? Thanks.

  • Member #454182 / about 11 years ago / 1

    Hello everybody, I am a newbie for LinkSprite JPEG Color Camera. Does any body have an example program for AVR? especially in codevision. Thanks a lot

  • Member #445304 / about 11 years ago / 1

    I send Reset command and get response "49 6E 69 74", what is this mean? However, I get expected response for Take Picture and Read JPEG File Size.

    • Member #445304 / about 11 years ago / 1

      I get the answer now. It's not properly power up yet. Now I get the picture data, seen it's takes 10 seconds to capture. I want try to get faster.

  • Member #403106 / about 11 years ago / 1

    Hello MikeGrusin, thank you for your response, if you got the time. kindly send me a sample C code for this camera working with PIC microcontroller. I am really find it difficult. and I am planning to order it soon. Thank you for the time

    • MikeGrusin / about 11 years ago / 1

      I'm sorry, we don't have any example PIC code for this camera. You might be able to look at the non-PIC example code we've linked at the top of this page to get some ideas on how to write your own code. This is not a beginner's item. Interfacing to this camera will require that you have some experience writing code that can send and receive serial data, or learn how to do so.

  • Member #403106 / about 11 years ago / 1

    Hello everyone, I am planning to use this camera with a PIC16F877A in a small satellite project. anyone with advice or sample code. Please am waiting. Thanks

    • MikeGrusin / about 11 years ago / 1

      If you can send and receive serial data from the PIC, then you can use this camera. The communications protocol is described in the documents at the top of the page. Note that the picture data will be larger than what will fit in a PICs SRAM, so you'll probably need to pass it through the PIC to external storage or a comm link. Good luck and let us know when you're in space!

  • colemanjax / about 12 years ago / 1

    after a lot of trial and error with trying to interface with uno (and arduino 2.0), i finally did a direct serial connection to a PC and used their software and followed linksprite's testing instructions. however, the camera does not seem to be communicating back... when i start up the X-CTU software as in Step 6.2 in their manual, it receives some HEX code, but the return text is garbled... With Step 6.4 - i send HEX commands OK (i see appropriate blue text), but, i get no response (i see no red text). Needless to say, while the COM port detection is fine with both pieces of software, i cannot see any snapshots in the LS-Y201 softweare either, so there is no evidence of the PC receiving data.

    Any ideas on what I am missing? Could it be I fried the camera somewhere along the way?

    • I ran into similar issues when I didn't have good connections between the pins on the camera and my breadboard. Make sure whatever cable harness connection you have is really well connected, and try power cycling the camera after exiting XCTU or the LS-Y201 and then re-entering the program. It's a bit of a hassle, but with the loose connection, that was how I was able to determine the camera was actually taking pictures and transmitting the data properly.

      • colemanjax / about 12 years ago / 1

        thanks for the note - i was very careful this time to make sure all connections are tight and sound, but still no communication. any ideas on another way to test the integrity of the camera/ports that doesn't rely on my lack of serial-interface knowledge?

        • Contact techsupport@sparkfun.com. You can provide them more detailed information about your set up and examples of the results you are getting and they can help you in more detail than we can do over the comments. And if it ends up being a bad camera, they'll get you taken care of :)

  • ebird97 / about 12 years ago / 1

    Where can I find Arduino 1.0 compatible code?

    • Member #331581 / about 12 years ago / 2

      You can find a library that works with 1.0.x code : http://code.google.com/p/linksprite-serial-cam-arduino/ and some examples sketches.

  • Member #427964 / about 12 years ago / 1

    Using the Adafruit library, can this camera run 115200 baud rate on hardware serials on arduino mega?

    • Member #331581 / about 12 years ago / 1

      Not sure with the adafruit library but it can do 115200 bds on a leonardo (HW serial) so it should be OK with the Mega. I use my own library (search linksprite camera in google code).

      • Member #426744 / about 12 years ago / 1

        I have a problem when upload to arduino "Arduino ERW 1.0.4/test_cam_sserial.ino:24: undefined reference to `JPEGCamera::reset()'". anyone has an idea? in the library,i only have "JPEGcamera.h". what do you think abaout that?should I have the "JPEGcamera.cpp" too? Newbie

        • Member #331581 / about 12 years ago / 1

          Yes the cpp file contains the actual code, the .h file contains only the declarations. Put it in the same directory as the .h file.

  • Member #427751 / about 12 years ago / 1

    i have wire up the max232 circuit and connected the camera and the db9 rs232 male cable when i open the port via LSY201 it gives me error message "Photo once empty order quene " how to overcome problem??

  • Joni2 / about 12 years ago / 1

    Hi all. I've read literally every comment here, and I've not yet come across a decent example to connect to an Arduino UNO. I'm trying to save a photo to an SD card on a SD breakout board (not the standard shield)

    Any help would be really appreciated.

    • Member #331581 / about 12 years ago / 1

      Well with my library the cam object can output its data to any Stream object and I believe a file on SD is a Stream object!?!

      • Member #331581 / about 12 years ago / 1

        Sorry you can find it here: http://arduino.cc/forum/index.php/topic,157685.0.html

        • Joni2 / about 12 years ago / 1

          Thanks for the quick reply, I'm really grateful. I've had a look at your library and it looks promising. Parts of it are similar to what I'm using, but I think yours is perhaps more elegant anyway. I'm not particularly experienced with C, so I'm not sure what you mean when you talk about Stream objects? Your method for getting the jpeg data only returns the number of bytes read, and sends the read bytes over serial. How can I adapt this to write to SD? Should i perhaps remove the serial and just print to a jpg on the SD?

          I've only successfully saved one photo so far, and that images still had these odd bands through it. Have you any idea where they come from?

          Thanks again.

          • Member #331581 / about 12 years ago / 1

            Stream is a class: Serial derives from it, File also, so this means that if you want to save your picture to a file on SD, you init your SD, open a file and pass it as a parameter of the readData of the cam object, the close the file and voila!:

            something like:

            File f = SD.open("your-file-name",FILE_WRITE); cam.readData(f,0); f.close();

            Also I the second parameter in readData is not used anymore, I will get rid of it at some point. I used to have these bands but not anymore. Each time I get a clear picture. HTH

            • Joni2 / about 12 years ago * / 1

              Hi again, your example is easy to understand, thanks. I've tried using the example code on the link you posted with no luck. Having put serial prints in to debug it, I've noticed it enters loop() but freezes at cam.reset(). Not sure why that is....Unfortunately I can't test it because I got stuck at that point.... Any ideas? I downloaded both the .cpp and .h file for the JPEGCamera library and I used the .ino example on the link. Thanks, J

              EDIT- I've tried commenting out the various calls to "cam" and its showed that they seem to be the problem. Does it matter that I'm using a software serial? Every call of cam.example is halting the execution. Serial.prints show up before cam.example but not after, and it just hangs.

              Could I have the wrong library? Would you mind linking to the exact library you're using?

              Thanks, J

              • Member #331581 / about 12 years ago / 1

                Hmm this is strange: I use the same library, the same sketch (found on the google code I setup), using Serial1 (HW serial on leaonardo) it works perfectly, changing Serial1 to a software serial, it works but I get some camera responses mangled into the data which gives me corrupted pictures. But nothing is stuck. I will upload the new library tonight, you can check tomorrow with the new one to see what it gives you.

                • Joni2 / about 12 years ago / 1

                  I just saw the same. I decided to print to serial as well and saw the responses mixed in. It seems the software serial could be the cause. Unfortunately I am using the serial for communication and was hoping to save the files to an sd. I really appreciate your help. I'll keep trying tonight. J

                  • Member #331581 / about 12 years ago / 1

                    Well you might use the HW serial port to communicate with the cam if you use SD to save the picture and see if it works.

                    • Joni2 / about 12 years ago / 1

                      I haven't been able to test it through the HW ports yet. Before I do that, I'm going to hard code everything in my sketch, all the commands and responses and see if I can get it working that way. I'll try with a software serial on pins 9 and 10. Hopefully they are compatible on the UNO. I'll also change the cam baud rate down to 9800 to be on the safe side. What voltage are you running on? I only seem to get any response at 3.3v. 5v hangs again. I'll let you know how it goes. J

                      • Member #331581 / about 12 years ago / 1

                        I run everything on 5v. I think there is no problem on UNO, IIRC the real problem is for RX as it must be interrupt driven and some pins on mega and leonardo cannot trigger interrupt on level change, though I am not really sure. Anyway you can find the "good" pins in the software serial examples. I remember someone saying that at 3.3V you could not set baud rates as high as with 5v.

                        • Joni2 / about 12 years ago * / 1

                          That's interesting, because I have had no luck at all on 5v at any baud rate. It just hangs. I run at 3.3 and immediately drop the baud rate to 19200 (or something like that) but recently I tried it at 9800 with no difference. I'm considering sending the HEX over serial and just dealing with it in processing. The only problem with that approach is the inaccuracy of the xbee vs the speed of the connection. I'm still writing up a hard code version, as I said I'll update you how that goes. I can't believe it would be a problem in Software Serial. It's not my SD because I've tested that in other ways, and I'm not sure how to test the camera without a direct connection to the pc. Interestingly, some of the "corrupt" files that are saved to the SD using previous methods contain complete thumbnail data when viewed on the pc, showing a picture that was taken days ago with the camera (in a different building), yet they still don't open. And it's very strange that it's an old picture. This is not such an "out of the box" piece of kit as I'd hoped. Have you had any luck? J

                          • Member #331581 / about 12 years ago / 1

                            OK I think you can now try the new library (just very small changes): it works for me using a leonardo and software serial on pins 10 (RX) and 11. BUT I had to put change the baud rate to 19200 for the software port to work reliably: I get perfect pictures with this setting. HTH

                            • Joni2 / about 12 years ago / 1

                              I have one final question (sorry). When I take subsequent photos, now that I have taken one successfully, the ReadData is returning the initial photo. Meaning that no matter how many I take, the files on the SD card all show the same, initial photo. Am I missing something? I couldn't see anything in the manual and the camera is reset at the start of each run. How do I read data from new photos? Thanks, J

                              • Member #331581 / about 12 years ago / 1

                                OK it works: you have to take the picture, read the data then stop picture and you can take another picture. DO NOT stop the picture before having read all the data with readData, it gave me corrupted pictures. I will upload a sketch to the google code site in a minute.

                                • Joni2 / about 12 years ago / 1

                                  You're a genius. You should upload to Playground for more people to use! I have an SD sketch fully commented you can use. Where can I send it to? J

                                  • Member #331581 / about 12 years ago / 1

                                    You can send it to me I will post it to google code and to the playground. Thx

                                    • Joni2 / about 12 years ago / 1

                                      What's your email? Sparkfun has no method of communication between members. I don't think it is appropriate to post a whole sketch here either. J

                                      • Member #331581 / about 12 years ago / 1

                                        OK I did not really pay attention:

                                        eallaud at gmail dot com

                                        Thx

                              • Member #331581 / about 12 years ago / 1

                                To be honest I did not try ;-) Try to call the stop taking picture function (stopPictures()). Let me know if it changes anything.

                            • Joni2 / about 12 years ago / 1

                              I have tested with 100% success. I don't know what you changed but it works! So thanks very much!

                              I have updated your example to work for SD and writing to files, where can I send it to you?

                              For anyone else reading this, this is THE code! http://arduino.cc/forum/index.php/topic,157685.0.html

                            • Joni2 / about 12 years ago * / 1

                              Hi, thanks so much I'll have a go now. Should there be a semi-colon after: while (Serial.read()!='c');

                              in your example?

                              EDIT I've had a go with it and so far so good. What did you have to change to allow for software serial, out of interest?

                              Thanks again. J

                              • Member #331581 / about 11 years ago / 1

                                Sorry I did not see your post before. TBH I dont remember what I changed exactly but it boiled down to some delay that had to be suppessed or added. This thing is pretty sensitive to how you handle the serial comm. For example code like: while (...) Serial.write(Serial1.read()); does not work. It looks like intertwinning calls to different serial ports (HW/SW) is not a good idea. So you need to use a small buffer in between.

              • Member #331581 / about 12 years ago / 1

                I got it working, remember to change all reference to Serial1 in my sketch to your software serial port. I must admit that it seems much less reliable: I got a picture with only a few good rows and the other picture was corrupt. I am trying with a lower baud rate.

                • Joni2 / about 12 years ago * / 1

                  Hi again. I have done just that but any reference to cam still hangs. I'll experiment with a lower rate and post how I get on. Let me know if you make any headway. J

              • Member #331581 / about 12 years ago / 1

                Hmm I did not test it with software serial, let me try that. Did you set the correct baud rate (38400)?

  • SamBlackmore / about 12 years ago * / 1

    Does anyone know why my .jpg isn't viewable? Here are some details:

    • Opening in a hex editor it begins FF D8 and ends FF D9.

    • In notepad it's a load of random ASCII characters so I know I haven't saved the hex as ASCII.

    • The image is read in one big chunk as I couldn't get small chunks working.

    • I use fwrite(temp, 1, 1, image_file_ptr) to write each byte to the .jpg file

    • The camera is powered at 5V with a Baud rate of 38400

    • Member #331581 / about 12 years ago / 1

      You can check here to get a library that I wrote that works for me.

      http://arduino.cc/forum/index.php/topic,157685.0.html

  • Member #413940 / about 12 years ago / 1

    Is the arduino library for this camera (NewSoftSerial.h) compatible with the Arduino Due? Not all libraries are compiled for use with the new ARM processor.

  • Member #412561 / about 12 years ago / 1

    How long does it take for the camera to start up?

    • You should be able to get this camera started up initially. Generally the only delays I've seen with this on my own personal use is getting it initialized with the example software.

  • Member #402914 / about 12 years ago / 1

    I have purchased linksprite serail jpeg cmera RS232 level. It worked fine for 1 month. But today suddenly it stopped responding through the software provided with it. Earliear it was responding to LSY201.exe software and clicking pictures. But now it always gives garabage hex data as i connect it to serial port and doesn't respond to commands.I don't know What is the problem. Please help me to solve this problem.

    • Member #686579 / about 10 years ago / 1

      Hi, I am now facing the same problem. How did you manage to solve it?

  • Member #82030 / about 12 years ago / 1

    Hi, I can't seem to find any information about focal length of the camera? Does anyone know if it will work for a couple of cm's distance? Thanks!

  • Member #336331 / about 12 years ago / 1

    Hi, can anyone show me he circuit needed to use this with arduino (uno, even if it shoud not be important)? My camera is not giving me any output, maybe it is not working... Thanks

  • Member #386313 / about 12 years ago / 1

    I used arm to connect with this camera ,my problem Every time I want to get a new frame that I had to reset my new camera so I have to wait 2-3s to get a new frame in when datasheet burn just read the next frame does not need to reset. I do not understand my problem? is there a way to solve this problem ? thanks.

  • Member #381531 / about 12 years ago / 1

    Do you know how to interface this camera with a BeagleBoard? Any recommendations? Thanks!

  • marcosriolo / about 12 years ago / 1

    I receive this message:

    .v.&..VC0703 1.00 .No ctrl infr .MI360 .625

    what is problem? what solution? for return normal message

  • Member #342868 / about 12 years ago / 1

    Hi, could someone post me a sample code to save on SD Card that works with Arduino 1.0. With my code i could take a picture but the picture a fragmented at the bottom. Thank you

  • Ted M / about 12 years ago / 1

    This is a cool camera! The JPEG trigger board has some very nice code for using this camera with an arduino. The code will take a little bit of tweaking to get working with Arduino 1.0

  • Settorezero / about 12 years ago / 1

    I've written a tutorial on how obtain TTL levels from RS232 camera without level converters, by removing only the MAX3232 on the board: http://www.settorezero.com/wordpress/modding-telecamera-rs232-jpeg-linksprite-ls-y201/ Camera has also a composite video output, suitable for a PAL tv

  • ProE_Pro / about 12 years ago / 1

    Looks like the mating connector/cable is now included. Is it available for purchase separately for those who bought a few months ago? (or maybe complementary for loyal customers ...)

  • Member #128675 / about 12 years ago / 1

    Can anyone tell me the minimum focus distance on this camera?

    Thanks

  • Member #328882 / about 12 years ago / 1

    Is there an example of the binary image data sent by this camera? I want to do some custom processing of the image and if possible I'd like to see exactly how the JPEG is encoded to be sure I can process it before I buy it.

  • Sebo / about 13 years ago / 1

    I am not able to change the image size, it is always 320x240. I have tried sending the command to change the size to 640x480 (56 00 31 05 04 01 00 19 00), and I receive the correct response from the camera (76 00 31 00 00). Then, I reset or power cycled the camera as instructed, but the image size does not change.

    Everything else is working properly, but I cannot get past this issue. Has anyone else run into this? Is there some step not listed in the datasheet that I'm missing? Or, is this an issue with my camera and should I try ordering another one?

    • Member #324133 / about 13 years ago / 1

      Try this: http://www.linksprite.com/faq/shownews.php?lang=en&id=83

  • wibble82 / about 13 years ago / 1

    I spent a couple of days trying to get examples to work using a hardware serial connection on Arduino Mega. If you intend to do the same you'll need to make sure your code waits for 42 bytes to arrive when you request 32 bytes of data.

    The examples wait for a 5 byte response, followed by 32 bytes of image and ignore the fact that there's an extra 5 bytes at the end.

    With software serial you get away with this due to timing, but with hardware serial you gotta make sure you wait for (and ignore) those extra 5 bytes or bam!

    After 2 days finding out it's 42 not 37, turns out to be an awesome camera. My experiences with it are here if you're interested: http://robotblogging.blogspot.co.uk/ (check out the camera blog bits)

    • wibble82 / about 13 years ago / 1

      I've written a much better (I think anyway...) wrapper for the camera if you want it: https://www.box.com/s/ca8e4f5f97793840e298

  • Sebo / about 13 years ago * / 1

    I am encountering a very odd problem, and I can't find any information about anyone seeing anything similar. I have this camera connected to a PIC and I am trying to receive a first image across, but I the data coming back across seems to get stuck on sending the same byte over and over. Pseudocode for what I am doing is:

    CameraTakePicture(); //camera correctly responds 76 00 36 00 00

    CameraReadImageSize(); //responds 76 00 34 00 04 00 00 31 10

    CameraReadImage(int numBytes);

    My calculations for passing in the correct MH,ML,KH,KL values are correct, so this is not the problem is. If I pass in 400 bytes for instance, the camera responds 76 00 32 00 00 FF D8 FF FE 00 24 36 0F D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3 D3...

    Furthermore, sending another command to the camera, I receive only D3s numbering equal to the number of bytes of the expected return command.

    Please let me know if you have encountered this problem or if you have suggestions for what I could try. I can provide a lot more information if needed.

  • Member #319581 / about 13 years ago / 1

    Everytime I change the baud rate I received a perfect first shot but the second one is always missing the starting FFD8 and instead it starts on 12 0B 51 04 51 04 00 00 FF DB, I really don�t understand what is going on. Hope you can help me.

    Also when using the default baud rate of 38400 I always get some broken spaces in the hex values, why?

  • I have working with this camera for a while, it works very good, and i also add a xbee to the MCU, such that it can send the picture wireless to PC, i also write my own version windows program to show the picture. For ppl who need to get the camera work asap and add it to your other project, you can download all source code from my blog:http://dreamland227.blogspot.ca/2012/04/wireless-image-transfer-from-atmega128.html

  • Member #311386 / about 13 years ago / 1

    Hi all!

    I managed to get this thing working on my Arduino UNO. The JPEG file itself is OK but I'm getting weird artifacts. See picture below.

    Anyone knows how to fix this issue? I'm using 5V and 38400 baudrate.

    http://i44.tinypic.com/24c7igx.jpg

    • Member #324133 / about 13 years ago / 1

      Hi, I'm having the same problem with the camera, I'm getting those weird artifacts. Could you tell me how you solved this problem?

    • Member #315617 / about 13 years ago / 1

      hey, will you be able to post your code here? I have been trying to get this camera to work all day, but no success. I'm fairly new to the Arduino platform, and all the libraries and sample codes I found online are outdated, or for the older version of the cam.

      Thanks,

      • Member #311386 / about 13 years ago / 1

        You are perfectly right. Most of those libraries are outdated!

        I'm using this camera (TTL) with Arduino Uno R3. The only external library that I'm using is SoftwareSerial. NOTE! Not NewSoftSerial but the generic SoftwareSerial that is built in the new Arduino (in editor: Sketch -> Import Library -> SoftwareSerial).

        I have fixed this problem with weird banding on my photos. By the end of this week I will post my code somewhere (GitHub) and put link here.

        The only 'problem' that I have is that I can't change the baudrate to higher. When I do so, photos are all corrupted (I can't even preview them). I'm using 38400 baudrate and with 640x480 the transmission of the whole photo takes about 45 sec :(

        • Joni2 / about 12 years ago / 1

          Did you ever post this code on github? The other links to code are no longer working and I'm stuck.

          I'm trying to save a photo to an SD card (not using an SD shield, but a breakout board) I've managed to adapt the example code to work with Software Serial on pins 9 & 10, but the file on the SD is always corrupt.

          Without the direct serial cable I can't debug my hex codes, but I assume as they are part of the example code, they aren't the issue here.

          What I need is a decent example of the writing of the jpeg bytes to a file on the sd card.

          Any help is hugely appreciated.

          Joni

        • Member #315617 / about 13 years ago * / 1

          Thanks for the reply,

          This is the code I was using but it doesn't seem to be sending, or more likely receiving returned data from the camera! I don't know if its a code issue or a hardware issue like a bad camera :( I just get empty jpeg file on the SD card. I'm using Arduino Uno Rev3 too with 5V, GND, and pins 4,5 connected to camera using SoftwareSerial [Rx->Tx and Tx->Rx]

          View my Code

          • Member #315617 / about 13 years ago * / 1

            I managed to get something finally. I stopped using Softwareserial, and instead just used the Pin 0 and 1 on the board, and the hardware serial on the UNO. This way I can't debug it, but I could at least see if it was command transmission issues.

            Now my SD card doesn't have empty jpeg files but it has files around 10-12 KB.

            However, the files are corrupted. There is no picture.

            Any ideas?

            Plus I still don't understand why SoftwareSerial wasn't working!!!

            These are the first few lines from my jpeg using a hex editor plugin in Notepad++

            ff d8 ff fe 12 0b 51 04 51 04 02 02 05 03 03 03 04 05 05 06 06 05 05 05 05 06 07 09 07 06 06 08

            these are the Last few lines from my jpeg

            00 0f 08 04 c4 00 08 04 02 00 01 03 30 63 00 0c 60 17 8d 04 c4 00 08

            notice how it doesn't end with ff d9 like a normal jpeg :(

  • phoneman / about 13 years ago / 1

    Hi all,

    I have acquired the image and have it in RAM: FF D8 .... FF D9. If I save it to the hard drive I can open it in Windows and view the image. I would like to convert the .jpg file to an array of pixels for image processing. Does anyone know of some C code I can use to do this?

    Thanks

    • Member #426744 / about 12 years ago / 1

      hello mr phoneman. I have a same problem like your problem to convert to array RGB. have you finish your project? thanks

  • Member #220300 / about 13 years ago / 1

    There is a new user manual for this product written in March, 2012

    http://www.linksprite.com/upload/file/1333187137.pdf

  • Member #260264 / about 13 years ago / 1

    This is the answer on how to get the data from a serial port of the computer and convert the hex to jpeg file.

    http://arduinounolinkspritettlcamera.blogspot.com/

  • Member #260264 / about 13 years ago / 1

    This is hard

  • sbright33 / about 13 years ago / 1

    Please join this thread if you think you can help me? http://arduino.cc/forum/index.php/topic,92367.0.html

  • sbright33 / about 13 years ago / 1

    Have something similar.

    Hooked up serial TX,RX, 5v, Gnd. When I power it on I see on PC terminal: .Ctrl infr exist .User-defined sensor .625 .Init end

    But it does not respond to any commands. That means I hooked up the 4 wires correctly, not backwards. That means I have the correct baud rate. I tried sending: 0x56 0x00 0x26 0x00 and 0x56 0x00 0x36 0x01 0x00 nothing in response. Not the above text, Assembled a packet in X-CTU.

    What can I test next? Please help!

    • Member #260264 / about 13 years ago / 1

      http://arduinounolinkspritettlcamera.blogspot.com/

  • EtsDriver / about 13 years ago / 1

    This would be nice for robotics :/ sorry to hear its retired :(

  • Member #263780 / about 13 years ago / 1

    i'm use simple code and recieved image from serial. I'm changed baud in NewSoftSerial to 19200 and first image sending good, but second image lost first FFD8 but last FFD9 have. Any idea? If use baud 38400 in recieved image have the broken places. Second image first send 120B510451040000FFDB00 and end FFD9. Code to change baud: SendResetCmd(); delay(4000); ChangeBaud19200(); delay(200); mySerial.end(); delay(200); mySerial.begin(19200); delay(200);

    Help please

    • Member #279357 / about 13 years ago / 1

      Have you tried the stock code first. I think you should try to load the stock hex file in arduino atmega328p and check whether it is working. in the stock replace the memory card write fuction with serial print fucntion so that you can view the data. If this works fine then you have error with your code. Also try to add some delay in you custom code before getting the chunks.

  • Member #263780 / about 13 years ago * / 1

    i'm use simple code and recieved image from serial. I'm changed baud in NewSoftSerial to 19200 and first image sending good, but second image lost first FFD8 but last FFD9 have. Any idea? If use baud 38400 in recieved image have the broken places. Second image first send 120B510451040000FFDB00 and end FFD9. And if i change first value to FFD8 image is the same as the first. Code to change baud: SendResetCmd(); delay(4000); ChangeBaud19200(); delay(200); mySerial.end(); delay(200); mySerial.begin(19200); delay(200);

    Help please

    • Member #260264 / about 13 years ago / 1

      http://arduinounolinkspritettlcamera.blogspot.com/

  • Member #277193 / about 13 years ago / 1

    is the camera module suppoort for NTSC output?

  • Wylly / about 13 years ago / 1

    Hi!

    Does anybody know where I can see an example of usage of this camera (the TTL version)? I'm probably doing something wrong and I can't get any data out of it. According to the manual, pin 1 is +5, pin 2 ground, pin 3 is Tx and pin 4 is Rx. No idea about the 5th pin in the conector.

    As I wasn't getting anything with the example in the libraries I tried directly sending a reset command through serial 1 (ard mega) but I get no reply whatsoever. Checking the signal in an osc, I can see the "commands" being sent but I get no reply. I'm using default 38400 baudrate. Also, when I check the Rx pin in the arduino with the Osc I see the line at about 2.7 V (supply is +5) which I don't think is correct. Any idea what I may be wrong? I'm getting nuts!! Thanks!

    • Wylly / about 13 years ago / 1

      Well, I see some light at the end of the tunnel now. I can see the init end message comming through. So, I guess camera works. I'll try to send commands to see...

      • Menimitz / about 13 years ago / 1

        I have been trying to get this camera to work for over a month. I am not experience enough in handling data like this to even begin to know how to receive a picture. I did get the camera to reset and read the response but I am lost past that. Hope you have some better luck than I have.

  • Member #147387 / about 13 years ago / 1

    Is there any way to read raw data from this camera rather than the compressed jpeg data? (not talking about the analog signal)

    • Member #260264 / about 13 years ago / 1

      http://arduinounolinkspritettlcamera.blogspot.com/

  • phoneman / about 13 years ago / 1

    Does anyone have the dimensions for the lens and plastic body? The manual only has the dimensions for the PCB.

  • Member #160710 / about 13 years ago / 1

    I bought a camera more than one year ago, and it is working well, and I am able to setup it to 640x480. Few days ago I bought another 5pcs and none of them I am able to set to 640x480. I tried the evaluation GUI (which sucks), through serial terminal and through my own firmware. None of these works. There is a change in the protocol ? Otherwise at 320x240 all of them are working.

    • jtallent / about 13 years ago / 1

      Can you tell me how you are hardware interfacing the camera to the PC ? I tried SparkFun's RS232 Shifter SMD but could not snap a single image from the evaluation GUI. Thanks.

  • Member #269802 / about 13 years ago / 1

    Anyone know what is the chip 7333-A ? I need a spear part but could not found it anywhere. It is just next the UART port.

  • jtallent / about 13 years ago / 1

    I tried to interface this TTL camera to a PC using the SparkFun's RS232 Shifter SMD. I'm supplying 5V to both the camera and shifter. I am using the evaluation application "LSY201.exe" to take a single shot but all I get is the message: “PhotoOnce empty order queue” at the bottom of the GUI. The Tx/Rx lights on the shifter are flashing so I know something is working right.

    Any help would be greatly appreciated here. Thanks.

    • Member #260264 / about 13 years ago / 1

      http://arduinounolinkspritettlcamera.blogspot.com/

  • Curantil / about 13 years ago / 1

    What is the field of view of this camera?

  • codeMonk / about 13 years ago / 1

    Just in case anyone needs any more example code than what is already up, I've written a simple C++ program to grab images from this camera.

    https://github.com/nickpascucci/RobotCamera

  • Member #228493 / about 13 years ago / 1

    PLEASE HELP ME OUT ASAP!!!!
    ITS REALLY URGENT!
    i am using this cam.. everything works perfectly fine when i read the image in one go.. the problem arrives when i start to read its image in chunks.
    i get FFD9 twice or thrice, and the data is corrupted.
    Please suggest me the solution, what am i doing wrong? i selected a chunk size which is an integer multiple of 8..
    Please Help!!!

    • codeMonk / about 13 years ago / 1

      You're probably overflowing in your address counter and starting over again. Make sure you end your loop the first time you read FFD9.

  • jdkane527 / about 13 years ago / 1

    What is the feasibility of using this on an Arduino Uno controller with the DFRobot Rover kit to make a wireless controlled robot and get relatively live video. It will be communicating using the APC220 wireless kit. Pictures I expect will probably take 3-4 seconds to refresh. Will the Arduino be able to wirelessly transmit the image data over serial to the computer efficiently or will it be pretty crappy?

  • Member #254737 / about 13 years ago / 1

    How do I convert jpeg to bmp in uC so that the images are displayed on 160x128 color screen?

  • nosebleed / about 13 years ago / 1

    Here is a public repository with the arduino compatible sources which work with this camera. I use it with success with a 7.3Mhz crystal for the AVR, with 3.3v input voltage and with 115200 baud rate.
    Any comments / fixes are welcome :)
    https://github.com/nosebleed/JpegTTLCam

    • nosebleed / about 13 years ago / 1

      Repo name changed to: https://github.com/nosebleed/jpeg-ttl-cam

      Chunk size is increased to 128 making the writing on the microSD much faster.

  • Joe P / about 13 years ago / 1

    I didn't see any references in the datasheet or the product posting about the TV pin on the camera. Turns out, it's NTSC video output, 30fps. I was bored, and hooked it up to my tv out of curiosity, and there it is. Maybe no one else cares, but the feature might be worth mentioning.

  • tonyPR23 / about 13 years ago / 1

    Has anyone been able to connect this to a MSP430? Can it be done? Thanks.

  • Member #218375 / about 13 years ago / 1

    if I use the Arduino, how long he can get the image of the camera? Only obtain, without effecting transfer it

  • Joed / about 13 years ago / 1

    I made a Workstation with Servos, PIC18F4550, GSM(Module)ADH8066 and this Camera. It works very well. Good documentation.
    Thanks sparkfun.

  • Abdulla873 / about 13 years ago * / 1

    Hi all,
    this is a tutorial show you, how to make a wireless camera
    (http://www.pic-tronics.com/How-to-make-a-wireless-spy-camera.php)

  • Member #228493 / about 13 years ago / 1

    Iam writing a code in c-language for camera. do i have to send a command in hex or decimal? secondly, should there be spaces in command? as in 56 00 26 00 or just 56002600?
    if i send a command by making an array, would it send 56 first, followed by 00, then 26 and the remaining of it?

  • Member #237513 / about 13 years ago / 1

    hey...can anyone tell me how to connect this camera module with a graphical lcd display..
    I want to view the picture that I'm taking(in real time).I'm using PIC32 (100 pin) for the control circuit.
    thanks

  • d w / about 13 years ago * / 1

    If you go the on-board chip manufacturer's site and search this you will find a press release on the chip. It talks about all this chip can do, (possibly very powerful if you buy all it says- the full chip stamp is- Vimicro vc0706preb ss0190b 0660322- Google "Vimicro vc0706") but w/o a data sheet I got a camera that sorta works ok-ish. I want to see if you can assist.. all of us.
    It has a TV out (great!) but default is in PAL (wa,wa,wah) ***Edit- (this can be fixed by removing the two screws on the back and soldering a 10k surface mount resistor [has a 102 printed on it] to the empty r5 spot) LinkSprite provided this info and it worked for me ***
    Do you have a good datasheet available yet? I requested one from all the people associated with its manufacture and so far I have not found one.

  • Member #228493 / about 13 years ago / 1

    i check that the cam shows initialization at the hyper-terminal. but i am unable to capture an image with evaluation GUI. what is XCTU ? is it necessary to use ?
    i am getting the following error at the GUI when i click the single shot button.
    (10:43:52) Error: Warning : Write File() error.. Bytes Sent: 0; Message Length: 1 VI

    • jtallent / about 13 years ago / 1

      Were you ever able to interface the camera module to a PC? Do you have the TTL version ? If you were successful with the PC interface can you tell me about the circuitry used between the camera and PC ? I tried the RS232 Shifter SMD but was not successful. Thanks for your help.

  • Member #228493 / about 13 years ago / 1

    I recently purchased the camera module.. and now i want to interface it with PC.. Do i have to use RS232 circuitry in between?

  • TimCole / about 14 years ago / 1

    Hi SFE! Can we get links to the documentation for the TTL version? All the links I've clicked take me to the serial UART version.

    • Tadpole / about 14 years ago / 1

      That threw me too. As a newbie, I just sort of dove in without really thinking. :S
      After a night of frustration, it occured to me right before falling asleep that a computer rs232 would have a different voltage than the TTL level. An FTDI cable solved the problem, but sadly I can't get the cable to show up as one of the first com ports on my computer, which is needed to use the LY201.exe program.

      • MikeGrusin / about 13 years ago / 1

        (Windows) if you go to device manager, then the USB com port in question, then properties, then port settings, then advanced (whew), you should get a window that will let you change the com port number to something lower.

  • Bryan3 / about 14 years ago / 1

    What's the typical file size of a VGA image?

  • jtallent / about 14 years ago / 1

    Has anyone used the product: RS232 Shifter SMD (sku: PRT-00449) to connect directly to this camera and a PC ? If so is it as simple as connecting the tx/rx/power/ground and your off ? Is there any test software for PC/Camera available ?
    Thanks
    Jim

  • Member #157274 / about 14 years ago / 1

    Hi does anyone know what connector type it is using having trouble finding any details about it

    • phoneman / about 13 years ago / 1

      It's a JST PHR5 conector http://www.jst-mfg.com/product/pdf/eng/ePH.pdf. Available from Digikey, Mouser, the usual suspects.

  • swepet / about 14 years ago / 1

    Just got my cam, and i am unable to get 640x480 images from the windows sample application (LS-Y201). Even if i select 640x480 it gets 320x240 images. Any one else that have this issue ? I have not tried taking pictures "manually" yet.. ? (by the way i run linux, and i tried in wine and virtualbox, same issue)..

  • Member #125087 / about 14 years ago * / 1

    For any interested parties, I have basic code that works for Matlab.
    http://forum.sparkfun.com/viewtopic.php?f=14&t=25065&p=125662#p125662

  • Synthercat / about 14 years ago / 1

    Gee I am new to all this but isn't there a good chance this could be combine with an arduino and an XBee so it could send images to the PC? Can't this be used to make a RF control car/robot that feedbacks what it sees?

  • Paxs / about 14 years ago / 1

    Anyone has tried to communicate @1.2Mbps?
    I was successful @115kbps and 3.3 volts.

    • Member #253763 / about 13 years ago / 1

      Hi! If you are using arduino, Could you share your sketch? I cant get 115kbps communication

    • tve / about 14 years ago * / 1

      I couldn't get it to work higher than 614400.
      I worked backwards from the published baud rate values and came up with this equation:
      ((27E6 / baudrate) * 16 ) - 256
      Here are some undocumented values that I have tested successfully:
      uint8_t cmd_slow_baud_230400[] = { 0x56, 0x00, 0x24, 0x03, 0x01, 0x06, 0x53 };
      uint8_t cmd_slow_baud_307200[] = { 0x56, 0x00, 0x24, 0x03, 0x01, 0x04, 0x7e };
      uint8_t cmd_slow_baud_460800[] = { 0x56, 0x00, 0x24, 0x03, 0x01, 0x02, 0xa9 };
      //614400 works but a little flaky
      uint8_t cmd_slow_baud_614400[] = { 0x56, 0x00, 0x24, 0x03, 0x01, 0x01, 0xbf };

  • Steve Beyer / about 14 years ago / 1

    Could anyone send me a picture they took with this camera at compression rate 36 and size 160*120. We are trying to check the header information that we are receiving to see what we are missing. Please send any pictures to smbeyer8@yahoo.com. It would be greatly appreciated!

  • Arasch / about 14 years ago / 1

    Ouch, now I see..
    It's at the very end of this page... I did not scroll through all comments |o)

  • Arasch / about 14 years ago / 1

    I wonder why this camera comes with the connection socket, but the connector which fits to this socket is not mentioned here...

  • Steve Beyer / about 14 years ago / 1

    Hi, I am having similar issues to those on here; I am not able to open images read from the camera. I have confirmed that the values that I am receiving from the camera are correctly saved into the .jpg file using a hex editor. I am worried that we are not receiving complete pictures from the camera. After sending each command we have to sleep for three seconds before we are able to successfully read from the camera. We get correct responses after sending commands and such, but it is still odd that we have to do this. Another issue that we found is that the size returned from the JPEG file size command does not match the actual amount of bytes read from the camera's memory (usually 20-40 bytes less). Here are some common errors that we have received when trying to open the file:
    Corrupt JPEG data: 5 extraneous bytes before marker 0xc0
    Bogus marker length
    Bogus DQT index 9
    We have followed some instructions from cmooney in that we are now reading the picture in one big chunk and have attempted slower baud rates. Any help in this matter would be greatly appreciated!

    • Steve Beyer / about 14 years ago / 1

      We were successfully able to receive a picture!! What we did was read the whole picture at once, normal baud rate, and read all the data in one read call. The trick was that we were not receiving 0x11 or 0x13 due to XON/XOFF flow control. This was fixed with the following command:
      stty -F /dev/ttyS2 -ixon. Shout out to cmooney who helped us out a lot!

      • Member #205600 / about 14 years ago * / 1

        Hey Steve,
        I just bought this same ttl camera too but I was not successful in getting any response. Since you were successful receiving the picture, would you mind helping me out.
        I used the linksprite's datasheet to hookup my camera. Vcc to 5v, gnd to gnd, TXD to RX on arduino and RXD to Tx on arduino but where do you connect the 5th pin at (TX on the camera). I tried using the sample software provided by the linksprite but was not successful with that. It seems to me that the camera is not sending any data back because I keep getting message: 'PhotoOnce empty order queue'. I have also tried some code I found online but to no avail.
        Please help me out.
        Thanks.

        • jtallent / about 14 years ago / 1

          Do you mean the 5th pin on the Camera (TV). I believe the TV is only used for a direct video connection to a television (PAL).

    • Yyc / about 14 years ago / 1

      Hi, though i still cannot get picture from the GUI, but I can read pic data correctly. i dont know how you read return data, but if you use interrupt to read return data, i think you should delay for enough time period to retrieve all the data. the return data of reading file size is pretty longer than other commands, except read pic data.

  • Yyc / about 14 years ago / 1

    does anybody know what is "PhotoOnce empty order queue" at the bottom of the evaluation GUI, when take a single shot?

    • Tadpole / about 14 years ago / 1

      I'm having the same problem. I am guessing the provided tutorials are for the rs232 kind, and not the TTL version? Or is there an onboard converter?

  • cmooney / about 14 years ago / 1

    I've been playing with this camera for a while now, but the images I'm getting are all corrupted. They register as jpegs (correct starting bits, etc) but every reader I've tried to use with them says
    "Error interpreting JPEG image file (Bogus Huffman table definition)"
    Has anyone else had this problem? I'm running it at 5v, which I know has caused problems for others in the past.
    Thanks!

    • Member #184858 / about 14 years ago / 1

      There is some example arduino code on the linksprite site. It has a timeout value for the section where you read the memory buffer off the camera, if you read it too soon - its corrupted. Their example seems to have this problem - if you increase the timeout - it seems to work. It will appear as banding in the image. Which by increasing the timeout will disappear.
      Ive got the camera working on the uno using newsoftserial logging to openlog with the pir sensor acting as trigger - so i guess its running at 5 volts, ive had it running from usb and 6 nimh AA batteries. So far it seems okay, i wish to get the power saving mode to work. Then i want to find some infrared led's to lite up the night with.
      A couple messages up, you talk about 12k - my images are 47k so you must be running in a lower resolution than 640x480.
      Hope this has been of some help.

      • cmooney / about 14 years ago / 1

        I already added the pauses inbetween reads. Without pausing it would simply stop responding. By increasing the pauses, it allowed it to return anything but now it's just got the broken Huffman table definition. I tried increasing the pause a lot more than it was supposed to be and the result is the same.

        • Member #184858 / about 14 years ago * / 1

          There is a utility app written in vb in the software section of their site or maybe here.
          Maybe see if this utility can read the images - you will have to wire it with one of those serial ftdi basics DEV-09716. Jumper the wires and change the temp output to a location that exists.
          That way, you can at least reverse engineer it - as it will write temporary image to the specified location.
          How big are the files your getting from the camera - mine are 47k for a 640x480 image - you are remember to write binary files not text files ?
          With my setup i use openlog sd card system and write the hex code to the serial port which is trapped by openlog - and then i have a vb app which takes the hex code and convert it back to a binary byte. I dont think most sd card systems for arduino work with binary only text. So you will have to convert to true binary.

          • cmooney / about 14 years ago / 1

            Sadly I am unable to use their app as I have neither level converter to use or a computer with Windows on it, I'm afraid.
            I'm actually not using an Arduino or SD card either. All the program on my micro controller does is open a serial connection with my computer and directly dump whatever the data of the image is onto the connection. From my computer, I am just piping the output of /dev/ttyACM0 (the serial port) into a file called something like tmp.jpg, then trying to view it. This is indeed just copying it as a binary file and not formatting it for text or anything like that as best I can tell
            The files vary between 9 and about 12k for me. I'm not sure if thats 640x480 though, as I've not tried to set the size. I was scared off by the post someone made above saying they really messed theirs up with a garbled change-size command.

            • Member #184858 / about 14 years ago / 1

              Dont think thats going to work for you.
              You read the binary data from the camera
              covert it to a hex string for serial transmission – this allows it to be displayed on serial port/screen (as you cant display real binary data only a representation of it (hence hex).
              You then read the hex string out and pump it into another program which writes out the binary equivalent of the hex string ie from text to binary, on to your file system being the jpg.
              Sorta like uuencoding from the old newsgroups days.
              Typically pre-conversion text to binary will look like this.
              FFD8FFFE00241500DE03000000000000000000000000000000F0004001090032120B5..... ending with a FFD9
              if you type/cat your file and see it start with ffd9 its wrong as your treating it as text.
              If you hex edit the file you will see ff d8 as the hex string for the first two bytes if its correct.
              Maybe you know this ?

              • cmooney / about 14 years ago / 1

                Yea, I know about that, but I'm litterally just copying the data straight onto the serial port, so I'm never even converting them to ASCII. Here, I started a forum post so this comment section will stop being absorbed.
                http://forum.sparkfun.com/viewtopic.php?f=14&t=26928

                • ADMHRV / about 14 years ago / 1

                  I had the same problems (lots of weird errors when trying to open the file) and corrected it by using a different baud rate with the camera (19200).
                  http://arduiniana.org/libraries/newsoftserial/
                  However, the camera defaults to 38400 so you need to talk to it at 38400 and tell it to switch to 19200 then close and reopen your softserial at the new baud rate.
                  Did you verify the camera works with the test software? There's a bug with the software that only lets you choose ports COM1 – 4. If you need to reassign that port number to your USB device, you can change it in the device manager.
                  (see my post above for how to work around slow RX speeds)

                  • cmooney / about 14 years ago / 1

                    That was a good suggestion, but sadly it made no difference. I tried turning the baud rate down even all the way to 9600 and the resulting images all still have the same problem.
                    Unfortunately I don't have a windows machine to run the test software on, so I can't check if the camera works that way.

                    • ADMHRV / about 14 years ago / 1

                      Both the camera and the soft serial need to be set to 9600. Can you confirm you are getting the correct hex response when sending a set baud rate command? It should be 76 00 24 00 00. Try setting it to 38400 just to check it's working. You won't be able to see the response if you change the baud rate, because it will be mismatched with your soft serial's baud rate.

                      • cmooney / about 14 years ago / 1

                        Well, I'm not using an Arduino so I have an actual serial port to use and yes I was getting the correct values. I still don't know what was wrong, but I finally got it to work by reading the image in one large chunk instead of several small chunks. I don't know why this made a difference, but apparently it did.
                        Thank you both very much for your help!

  • Member #206578 / about 14 years ago / 1

    In the note, it said it need a level converter before connecting with the arduino. What is a level converter function!?

  • ADMHRV / about 14 years ago / 1

    I had this camera working on a breadboard with an Arduino Pro Mini and am now having problems with it on my PCB. The camera initializes fine, and I get an image response around 12kb, but the images are corrupted and won't open in any programs. Java is throwing the errors:
    Bogus DHT index 32
    Bogus Marker Index
    And Photoshop says: Unsupported JPEG Precision
    I cut out the SD card in case that was causing problems and am sending it directly to a PC. I verified that the camera is working with their evaluation software and now am at a standstill.
    The images even have the correct beginning of file and end of file bytes. Going to face palm myself soon.
    Am using the library provided here, which I know works. Any ideas why there would be problems when on a PCB? The board is setup as a Arduino Mini 8MHz 3.3V clone.

    • Member #184858 / about 14 years ago / 2

      ..

    • I had similar problems that I was able to solve by using 5V on the camera. I know the datasheet says it's compatible with 3.3V. But I couldn't get an entire image to save correctly; out of frustration I decided to power the camera with 5V and shift the logic levels to 5V as well and the problem was resolved.

      • Member #206578 / about 14 years ago / 1

        May I ask for your program code for the camera with the arduino!?
        I am now trying how to write the arduino code. Thanks a lot!!

        • ADMHRV / about 14 years ago / 1

          This camera works fine at 3.3V. The product page should be revised. It's not the voltage, but that when supplying 3.3V you are most likely running it at 8MHz. The camera's default baud rate is 38000. If you want to use a 3.3V/8MHz circuit, you'll need to send the command to change the baud rate to 19200 or lower. If you ask for a response, the camera will hang. Just issue the command. Then close/reopen a NewSoftSerial connection at the new baud rate (19200 or lower) and the camera should work fine.
          The code will be posted here:
          http://itp.nyu.edu/physcomp/sensors/Reports/Linkspritejpegcolorcamera
          by week's end.
          NB about NewSoftSerial:
          "Revised routines now get perfect RX up to 57.6K on 16MHz processors and 31.25K on 8MHz processors."
          http://arduiniana.org/libraries/newsoftserial/

          • SirGlider / about 14 years ago / 1

            Hi I followed your instructions to change the baudrate of the camera by first creating a NewSoftSerial connection at default rate then sending the command
            CHANGE_BAUD_RATE[7] = {0x56, 0x00, 0x24, 0x03, 0x01, 0xAE, 0xC8};
            (without asking for response), then closing the serial port (cameraPort.end()), starting a new serial connection at 9600 baudrate (cameraPort.begin(9600)), but the camera still hangs. Am i doing something obviously wrong here? It'd be great if you could post the code on the site you mentioned. Thanks!!

            • satoshi / about 14 years ago * / 1

              After you change the speed, do not reset the camera. Otherwise it will
              return to the original setting (38400). The setup code looks like this:
              void setup() {
              mySerial.begin(38400);
              mySerial.flush();
              Serial.begin(115200);
              Serial.flush();
              delay(100);
              camera.reset();
              delay(4000);
              camera.setBaudrate(0x56, 0xE4);
              mySerial.end();
              mySerial.begin(19200);
              delay(100);
              }
              The class camera must have method setBaudrate accordingly.
              //Set baud rate
              bool JPEGCamera::setBaudrate(uint8_t high_b, uint8_t low_b)
              {
              cmdResBuffer[0] = 0x56;
              cmdResBuffer[1] = 0x00;
              cmdResBuffer[2] = 0x24;
              cmdResBuffer[3] = 0x03;
              cmdResBuffer[4] = 0x01;
              cmdResBuffer[5] = high_b;
              cmdResBuffer[6] = low_b;
              return commandAndResponse(7, 5);
              }

              • satoshi / about 14 years ago / 1

                I used the following two modified libraries:
                http://code.google.com/p/arms22/downloads/detail?name=JPEGCamera-001.zip
                http://code.google.com/p/arms22/downloads/detail?name=NewSoftSerial-001.zip
                You should add the setBaudrate method on this JPEGCamera library.

  • tessar / about 14 years ago / 1

    Hello,
    I have a big problem:
    I send the wrong command to set the resolution. It should be "56 00 31 05 04 01 00 19 22" but I sended "33" at the end instead of "22". After reboot my camera don't finish init. It don't respond to my commands to change the image size to the correct value, actually it don't respond to any command.
    Is there a way to clear the EEPROM or reset to a default state?
    This is the 2nd camera where that happens (for the first one I didn't recognize, it was the wrong code that killed it but when I think back, it didn't work after changing the resolution)
    Please HELP!!!!

    • tessar / about 14 years ago / 1

      Hello,
      I asked directly at LinkSprite company support. They told me I have to send the camera back to the factory to replace/fix the firmware. Looks like it is not possible to fix this problem by myself.
      So my conclusion:
      This is a nice camera wich much better communication and stability performance than the one from 4dSystems, but:
      ******DON'T MESS WITH THE PICTURE SIZE COMMAND******
      Tessar

      • Travster / about 14 years ago / 1

        Tessar/all-
        I had the exact same problem. After months of taking pictures and setting different resolutions, I accidentally created a bug where I sent an illegal resolution value. Once was all it took and now it shows the first part of init (Ctrl infr exist, User-defined sensor, 625) but never returns "Init end" and never accepts commands. How lame!!!
        How was your interaction with LinkSprite? Did they fix it for you?

        • GENPEE / about 13 years ago / 1

          I've fixed it from this case.
          1:Connect the SDL pin of the EEPROM on this module to GND
          Like this picture:
          http://1.bp.blogspot.com/_ZUQS-90OGno/TOuvdzu4_iI/AAAAAAAAA58/_T3uh18rx3g/s1600/DSC04121.JPG
          2:Turn on the module. It will output different message.
          3:Disconnect SDL-GND
          and send correct resolution command.
          4:Reboot
          Sorry for poor English

          • Sonda / about 12 years ago / 1

            Hello I have the LinkSprite JPEG Color Camera TTL Interface. The camera after some fault is damaged, it no longer responds. Please can you tell me how I can fix it so it works again. Can you send me your picture that describe how can I Connect the SDL pin of the EEPROM on this module to GND. Please help !!

  • DanDare / about 14 years ago / 1

    Im still bit confused about this product.
    It's said on the manual: "It can captures high resolution pictures" but in the specifications it says it can take "VGA/QVGA/160x120 resolution".
    So if I want 800 x 600 resolution this is not the camera I'm looking for?
    Other point is I'm in a project where I need long battery life on the field, plan is to leave all the system on stand-bye and shutton camera only when its needed, someone can tell me it's initialization time? How many time after power shuton it's able to take the first image? Just the 2~3 seconds stated in the manual?
    Appreciate any help on this. Regards.

  • Oriana / about 14 years ago / 1

    I would like to know how to make the processing of the data throws me the camera to make a user interface in matlab, if anyone can help me appreciate what

  • Pauline / about 14 years ago / 1

    I have one on this camera and I would like to knwo if it is possible to connect it directly to the computer with a DB9 cable ? How is it possible to test and evaluate the camera ?

    • phoneman / about 13 years ago / 1

      Pauline,

      If you look on the back of the board, there is a non-populated 16 pin SOIC footprint on the back with two surface mount resistors connecting pins across the footprint. We removed the resistors and put a MAX3232 on the SOIC footprint. This converts it to the RS-232 voltage version. We made a cable with power, TV, and DB9 hookups and connected this to the PC through a Sabrent USB/RS232 converter cables (which shows up in the device manager as a COM port) and it works. You can also build the level shifter (e.g. MAX 232 into the cable if you like.

  • pion / about 14 years ago / 1

    Does anyone know what the maximum framerate is with this camera, assuming a fast enough processor? The datasheet doesn't say anything about this. It also mentions something about a 2-3 second delay between captures, which leads me to believe that this is strictly a still image capture device and not a video camera. Can anyone confirm or deny this?

    • TBaumg / about 14 years ago / 1

      pion:

      It also mentions something about a 2-3 second delay between captures, which leads me to believe that this is strictly a still image capture device and not a video camera. Can anyone confirm or deny this?
      I'm using one now, it only takes still images and it does take 2-3 seconds between images.

  • Paul B. / about 14 years ago / 1

    .NET MF/FEZ Code: http://www.fezzer.com/project/220/linksprite-camera-library/

  • nulluser / about 14 years ago / 1

    I have written a windows test program for this module.<br />
    <br />
    http://www.junklet.net/code/LinkSprite.zip<br />
    <br />
    I found it fairly useful to get the timing down before porting to the dsPIC.<br />

    • Pauline / about 14 years ago / 1

      Hi, How is it working ? I have the message "Transfer: Unable to receive. Code:0" ...

  • fsphil / about 14 years ago / 1

    Can anyone tell me what the spacing is for the headers pins? I don't believe they are standard 2.54mm?

    • fsphil / about 14 years ago / 1

      Just got the camera today, and it came with a 5-pin JST socket already soldered - nice! But it's missing the matching cable, you'll need to order one separately - drat!

  • shintamainjp / about 14 years ago / 1

    What's the 24LC (Atmel Serial ROM) on the board?
    For memory the baud rate?

  • Ritch / about 14 years ago / 1

    Nasea tested over serial, anyone done it over TTL yet?
    160x120 @ 5fps @ 152kbps
    Any other base figures?

  • tz / about 14 years ago / 1

    ANyone know how to change the baud rate (what to put in those XXXX fields)?
    Or the maximum baud rate it can go?

  • qrry / about 14 years ago / 1

    Along with a few IR LEDs, could this be used to take IR photos in the dark?

    • SomeGuy123 / about 14 years ago * / 1

      It could, but the image wouldn't be ideal. You should use a low-lux black and white camera.

  • Jesse2 / about 14 years ago / 1

    How many frames per second could be taken from an arduino mega at 160x120 and the other resolutions?

    • nasea / about 14 years ago / 1

      From some preliminary tests on my Duemilanove, it seems that the arduino can go over an 160x120 (~ 3kbyte) in less than 0.2 secs on the hardware pins with 115200 (no transfer of data to anything else). My test was just a blind loop over the serial port with storage of the timings in the eeprom. It seems that there is some tight room for improvement.
      Software serial seems to be about two to three times slower.

      • Member #427964 / about 12 years ago / 1

        Hi Nasea, how do you get this working with 115200? I am using Arduino Mega now, I intend to capture multiple images (160x120) in one second for my project. I hope you may be able to help me out please. By the way, I am using the library provided by Adafruit,I tried changing the baud rate, but I had no luck. It is set at 38400 i guess.

        Hope you may help me out please.

      • Member #413940 / about 12 years ago / 1

        I am having trouble compiling the softwareserial.h library for the Duemilanove. Can you detail how you got this to run. I am getting the following error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'

  • Ritch / about 14 years ago / 1

    Excellent only disappointment is my order shipped yesterday, so more postage to pay :(
    Evaluation GUI looks nice especially with its size buttons and continous shot buttons.
    Might be worth the effort of someone to use it all and extract any extra codes found like size change.

    • nasea / about 14 years ago / 1

      I think that all the interface commands are in the manual (Sparkfun link). Also the GUI code can be found in the LinkSprite website, if you want to see how the camera is used beyond the Sparkfun library.
      Nevertheless I find some differences that are kind of strange already (for example the buffer size in the read command in the Arduino library is defined as the JPEG file size in the manual and in Linksprite's code). But anyway it works as expected with Arduino (haven't tested all the functions yet).

  • Skye / about 14 years ago / 1

    Any idea about the type of lens installed? Wide, average, or narrow? Does the camera conform to the standard mount sizes so that I might be able to order the right lens for my application?

  • nasea / about 14 years ago / 1

    Linksprite offers the camera with uart interface (ttl level) as well. Will sparkfun stock some of those also?

  • M / about 14 years ago / 1

    It needs one of these spi/uarts on a backer for this... If anyone creates it let me know. I'll do the same.
    http://www.sparkfun.com/commerce/product_info.php?products_id=9981

  • Bret Mattingly / about 14 years ago / 1

    A JPEG camera with good documentation! Finally! Thanks, SFE.

    • Bret Mattingly / about 14 years ago / 3

      Nevermind. It's still in Engrish. Hopefully this will work better than the SEN-08668

Customer Reviews

No reviews yet.