Hooking CMUcam2 with IFC

CMUcam is a powerful embedded vision module, it enable embedded system such as microcontroller to have vision capability. There are several videos showing the capability of CMUcam. It is developed by Carnegie Mellon University in US and currently there are 3 version of CMUcam starting from CMUcam1, CMUcam2 and latest is CMUcam3. Let’s see what can this small tiny yet powerful camera could do.

Color tracking using CMUcam2

Not only that, you can do quite a lot of stuff with this camera, here is the specification:

  • Track user defined color blobs at up to 50 Frames Per Second  (frame rate depends on resolution and window size settings)
  • Track motion using frame differencing at 26 Frames Per Second
  • Find the centroid of any tracking data
  • Gather mean color and variance data
  • Gather a 28 bin histogram of each color channel
  • Process Horizontally Edge Filtered Images
  • Transfer a real-time binary bitmap of the tracked pixels in an image
  • Arbitrary image windowing
  • Image Down Sampling
  • Adjust the camera’s image properties
  • Dump a raw image (single or multiple channels)
  • Up to 176 x 255 Resolution
  • Supports baudrates of: 115,200 57,600 38,400 19,200 9,600 4,800 2,400 1,200
  • Control 5 servo outputs
  • Slave parallel image processing mode off of a single camera bus
  • Automatically use servos to do two axis color tracking
  • B/W Analog video output (PAL or NTSC, depending on camera module used)
  • Flexible output packet customization
  • Power Down Mode
  • Multiple pass image processing on a buffered image

If you refer to the board, it come with several features, this include ready make ports (5) to control standard RC servo, and it come with the demo to track color in the video above. Now, let’s say you want to integrate with your microcontroller board, you need to have some communication between these 2 devices right? It will be done using UART (Universal Asynchronous Receiver and Transmitter) which is 5v TTL level. Of course, you must write program to communicate with it, is not that easy, but I am sure you have no problem to do it if you want to do it as many have done it!

Since I wanted to share the interface with IFC, I will not talk about integrating with microcontroller.

For IFC, if you notice, there is a DB9 (Serial Port) socket at the front of IFC-MB00 card. That is a ready made RS232 connector. We can utilize that for CMUcam 2 interface. Following picture show the connection from CMUcam2 to IFC-MB00 board.


This is the diagram of the RS232 connection, you need to configure the jumper on CMUcam2 for RS232 connection. Now, let’s create the cable for IFC main board to connection. The RS232 cable comes with CMUcam cannot be connect to IFC because the DB9 is female socket while IFC-MB00 also come with female socket. We need to create a male DB9 socket for CMUcam 2.


I hope the picture is clear enough, becareful when you create the connection at IDE socket, the orientation must be correct. We only need 3 cables from CMUcam2 to IFC board, which is Gnd (pin 5 at DB9, Rred color in picture), CMUcam2 receive (pin 2 at DB9, Blue color in picture) and lastly CMUcam2 transmit (pin 3 at DB9, Grey color in picture). It is done for the communication line. You can hook it up to IFC-MB00.


How about the power for CMUcam2? You can take from the Power Out Connector at IFC-PC00, the power card.


The CMUcam2 can take power from 6 to 15V and the IFC normally is being powered with 12V adaptor or battery, thus it is save to use the power from IFC. Do take care of the polarity. Now, the hardware connection is done. Oh, not yet, you need to set the correct baud rate before you can communicate correctly with IFC.


Choose the normal and stable baud rate which is 9600. You need to send the jumpers to obtain the baudrate.

How about software? I cannot provide a total solution, or a complete example here as there can be any application that you may develop. However, what I can show you is to use the UART function in IFC template file. Download the latest template file from IFC main board page here. The file is Sample Source Code under “Useful Document” tab.


In the IFC new template file, the UART is being initialized to 9600. You can further call “uart_write (data)” to transmit a byte or “uart_read” to obtain 1 byte of data.


Again, please go through the User’s Manual of IFC Main board and also the User’s Manual of CMUcam2 before you do anything, this article is only for reference to start, not a comprehensive article. To avoid any unneccesary damage to IFC and CMUcam2, you need to go through the User’s Manual.

For those that have did the connection or project with CMUcam and IFC, you are welcome to send the information to us with some photos and brief description at, or you can post your inquiry in our technical forum as we seldom check the comments in tutorial site 🙂


4 thoughts on “Hooking CMUcam2 with IFC

  1. hello there..I would like to ask, is cytron have the CMUCAM to sell? if it doesnt, may Cytron be the middle guy to import it into malaysia?

  2. We do sell CMUcam sometime ago, but the supplier is out of stock for some time since end of last year. We are still searching. If you have link, you are more than welcome to send the request to our sales, just send an email to Thanks.

  3. i have some question…is there have example of coding using microcontroller to communicate with CMUcam2? because i have a little bit problem at USART..please help

  4. We do not have the sample code, but you are welcome to discuss in our technical forum as there might be members which done the project before and they might be able to share with you.

Leave a Reply

Your email address will not be published. Required fields are marked *