element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Photography
  • Challenges & Projects
  • Project14
  • Photography
  • More
  • Cancel
Photography
Blog Cat Detector Mk IV #1 : Testing the Serial TTL Camera
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Photography to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dubbie
  • Date Created: 4 Jun 2021 4:03 PM Date Created
  • Views 1703 views
  • Likes 11 likes
  • Comments 2 comments
  • cat detector
  • nano
  • photographych
  • cat detector mk iv
  • camera
  • ttl serial
Related
Recommended

Cat Detector Mk IV #1 : Testing the Serial TTL Camera

dubbie
dubbie
4 Jun 2021

Today I should be laying my newest path and cementing in the edging brick pavers, but it's cold and raining so I'm staying inside. I could watch the telly, I could drink a cup of tea, I could even tidy my desk (no, anything but that), but I thought why not see about something for the latest Project14 competition on Photography (Photography | element14). I'm not particularly a camera person and I don't know much about optics but I did purchase a digital camera module with serial TTL communications (Miniature TTL Serial JPEG Camera with NTSC Video : ID 1386 : $35.95 : Adafruit Industries, Unique & fun DIY electronics and kits) when I retired (some years ago now) with the intention of finding out more about this stuff - but then never did. So now this competition seems like a good time to dig out the camera.

 

It is quite an interesting camera module as it is designed for surveillance so pretty much everything is automatic (light level, colour level and so on - which is good for me), it provides a direct video output (NTSC) along with a serial communication link for modifying the video and for taking snapshots which can be downloaded via the serial link as JPEG files. The serial is a bit slow for this kind of activity at 38400 Baud but I'm retired so I'm not in a hurry. It also has motion detection built-in. I was outside when it came rushing into my brain at the same time as I was disposing of yet another cat pooh that maybe I could use this to detect the cats using my garden, and hey presto, Cat Detector Mk IV was born.

 

Unfortunately I do not have any screens capable of displaying NTSC directly as we are PAL based in the UK so I have purchased a low cost NTSC to HDMI convertor as I have at least one HDMI display I could use. While I am waiting for that to arrive I have sorted out the serial communication link. The user manual provided with the camera is nearly 10 years old and for a slightly different camera but it was suitable, mostly, for connecting the camera to my laptop. I needed a TTL serial to USB convertor to connect the camera to my laptop and I do have some of these, but as I want to do things with data at some point I decided to use a Nano instead and piggy-back the serial, again as this is not something I have done before.

 

Piggy-backing serial turns out to be a bit more confusing than I had anticipated as I think the laptop is now the master so that the serial data transmitted (from the laptop) comes out of the Rx pin on the Nano PCB and goes into the Rx pin on the camera. Similarly Tx on the Nano is connected to Tx on the camera. Fortunately the camera is more resilient than the data sheets indicate especially as first I connected the power the wrong way around and then the serial communication pins incorrectly. Also, the camera is 3.3V serial and the Nano is 5V so I used a simple resistive voltage divider on the Nano Rx (transmitting!) pin. The Tx pin doesn't need anything as it is the camera doing the transmitting at 3.3V and the Nano will work correctly with this voltage level. The circuit diagram is shown below. followed by a photograph of the working system.

 

image

 

image

 

To get the serial link on the Nano to work it needs to be programmed with an empty shell, listed below.

 

/*

*  Empty sketch for testing the TTL Serial Camera

*  Dubbie Dubbie

*  4th June'21

* 

*  Uses a Nano, Cooms Tool software package and the serial

*  camera. Serial needs voltage divider for correct 3.3V

*  connections.

* 

  */

 

void setup() 

{

}

 

void loop()

{

}

 

A software communication tool is provided for the chip in this camera called VC0706CommTool which I downloaded and setup with the COM6 serial port being used by the Nano.

 

image

 

There is a button near the bottom which puts the software into  a mode that enables the camera data stream to be accessed Fbuf Ctl which brings up the menu below enabling snapshots of the video stream to be taken and displayed. First you have to use Set File to create a JPEG file in Windows that will be used to save the JPEG image, which gets overwritten every time you take another picture, unless you change the file name. Then you click the Stop CFBuf button followed by the Read button and after a short delay while the JPEG file is loaded a still image appears, as illustrated below.

 

image

 

If you want to take another snapshot you click the Resume button, then the Stop CFBuf button and finally the Read button. The latest image will then be displayed.

 

The image is upside down so I'm assuming the camera is also upside down as well which I can fix by rotating it through 180 degrees. There might even be a software button to do it - or there might not. It is a relatively low quality image but good enough and if you look carefully you can see the brick pavers waiting to be cemented in. I think the rain may have stopped but it is too late in the day now and tomorrow looks to be warm and sunny.

 

The next step will be to work out how to get the motion detection working and then see if I can detect cats! It does seem to use quite a lot of current, somewhere is the region of 70-80 mA, somewhat high for a battery powered system. Still, I used a BIG battery for Cat Detector Mk III and I might have to use the same one for this.

 

All I need now is a programme to make use of the motion detector feature of the camera, something to store the JPEG images and some sort of time stamp, maybe a PIR detector and I will have a fully functional Cat Detector. It will also detect dogs, foxes, horses, rabbits, squirrels (probably), people and maybe even birds!

 

Dubbie

  • Sign in to reply

Top Comments

  • cstanton
    cstanton over 4 years ago +4
    I never considered that a camera could be used with only a microcontroller.
  • dubbie
    dubbie over 4 years ago in reply to cstanton +4
    Chris, It is this ease ( ? ) of using these serial cameras with microcontrollers that attracted me. It has to be relatively easy or I probably wouldn't be able to use it. My previous experience was with…
  • dubbie
    dubbie over 4 years ago in reply to cstanton

    Chris,

     

    It is this ease ( ? ) of using these serial cameras with microcontrollers that attracted me. It has to be relatively easy or I probably wouldn't be able to use it. My previous experience was with line cameras but they are difficult to get hold of and expensive, but you can use a single line of video from an array camera which is almost the same. A bit slower and for this one you do have to decode the JPEG - which I have not yet done. And probably never will.

     

    Dubbie

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cstanton
    cstanton over 4 years ago

    I never considered that a camera could be used with only a microcontroller.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube