TCM8240MD connector and example

Have a good idea for a new product for SFE or Olimex? Let us know!

Moderator: phalanx

Re: TCM8240MD connector and example

Postby WickedMinds » Mon Dec 05, 2011 2:47 pm

I started experimenting with object tracking. Using CMVisions "YUV466" color map I found at http://www-2.cs.cmu.edu/~jbruce/cmvision/ to threshold the image, I got the following results :)

Image

P.S. Turns out my old Rubiks Cube is a great model for testing colors since you can just twist up any old color combination to test!
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

Re: TCM8240MD connector and example

Postby FET_Destoyer » Tue Dec 20, 2011 4:06 pm

Hi WickedMinds
What is the hardware that u are using to interface the camera with the pc?

regards
FET_Destoyer
 
Posts: 9
Joined: Tue Nov 29, 2011 11:55 am

Re: TCM8240MD connector and example

Postby WickedMinds » Wed Dec 21, 2011 12:27 pm

FET_Destoyer wrote:Hi WickedMinds
What is the hardware that u are using to interface the camera with the pc?

regards


The camera is connected directly to a static ram chip as described in my previous post. I use an ATMega128 to read frames from the static ram chip and send the data via serial to the PC which is processed by a C# .NET application I threw together.
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

Re: TCM8240MD connector and example

Postby KreAture » Wed Jan 04, 2012 3:17 pm

Wow! Been a long time!
Just wanted to mention I hope to publish a updated version of Atmels ISI driver with tcm8230md and tcm8240 driver module for avr32linux. It has all the cameras registers available in debugfs for hacking directly from linux userspace.

It still has issues but it's also a lot of fun.
It makes it a lot easier to fiddle with these cams. (as long as you have a old ngw100 card lying around that is...)
KreAture
 
Posts: 158
Joined: Thu Apr 24, 2008 2:57 pm

Re: TCM8240MD connector and example

Postby FET_Destoyer » Tue Jan 10, 2012 5:26 am

KreAture wrote:Wow! Been a long time!
Just wanted to mention I hope to publish a updated version of Atmels ISI driver with tcm8230md and tcm8240 driver module for avr32linux. It has all the cameras registers available in debugfs for hacking directly from linux userspace.

It still has issues but it's also a lot of fun.
It makes it a lot easier to fiddle with these cams. (as long as you have a old ngw100 card lying around that is...)


Hi KreAture
I'll wait fot that driver.
I read all the posto but I'm with a little dificult to understand registers of tcm8240, is there any APPnote for this camera?
Cause the datasheet the register are not clear of what they do.

Regards

EDIT: I just saw that the appnote is on sparkfun website, even so I think your driver will be welcome here for those who are strating this camera. =)
FET_Destoyer
 
Posts: 9
Joined: Tue Nov 29, 2011 11:55 am

Re: TCM8240MD connector and example

Postby leonix » Tue Jan 10, 2012 6:20 am

Hi WickedMinds,

your direct SRAM interface to the TCM8240MD sounds very interesting. Can you please post a circuit diagram of it?
Even a sketch would be very useful.

Another question - what is the minimum distance of that camera to get a sharp image?

Thx
Leo
leonix
 
Posts: 4
Joined: Fri Jun 08, 2007 2:32 am

Re: TCM8240MD connector and example

Postby Sonal » Sat Jan 14, 2012 3:01 am

Can anybody tell me the exact weight of this camera module. The weight is a big concern in my project..
its weight should be less than 15 grams. :|
Sonal
 
Posts: 2
Joined: Sat Jan 14, 2012 2:54 am

Re: TCM8240MD connector and example

Postby WickedMinds » Sun Jan 15, 2012 4:27 am

leonix wrote:your direct SRAM interface to the TCM8240MD sounds very interesting. Can you please post a circuit diagram of it?
Even a sketch would be very useful.


Here is the schematic of the last time I had it bread boarded. I've added on to it for stuff specific to my project but this still remains the core method of how I have been able to grab frames with an ATMega128.

Image

leonix wrote:Another question - what is the minimum distance of that camera to get a sharp image?


I have had good results with my tests that have objects from inches to about 3 feet from the camera using QCIF Zoom.
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

Re: TCM8240MD connector and example

Postby Sonal » Tue Jan 17, 2012 12:08 am

Does anybody know what is the size of a compressed image after the jpeg compression feature of this camera has been implemented?? :?:
Sonal
 
Posts: 2
Joined: Sat Jan 14, 2012 2:54 am

Re:

Postby glide » Fri Jan 20, 2012 3:34 pm

KreAture wrote:Just wish I had solder-masks...

Image

If this board was to be made professionally I'd ofcource do it 2-sided to tidy up the routing. Then I'd add silkscreen to connector-side so one would always have the pinout of the connectors available.

edit:
The large 1206 resistors are for all spots where user might want to change stuff. Only the power-system is set up with tiny stuff as that will be a 1-time affair. (0603 and 0805 for power system.)


KreAture can you tell me from were do you buy the blue pcb?
glide
 
Posts: 1
Joined: Fri Jan 20, 2012 3:29 pm

Re: TCM8240MD connector and example

Postby WickedMinds » Mon Feb 20, 2012 11:36 am

More images here.

Camera and Color Mapping Board
Image
Client Application to edit on board Color Map and display frame dumps.
Image
Last edited by WickedMinds on Tue Feb 21, 2012 3:07 pm, edited 1 time in total.
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

Re: TCM8240MD connector and example

Postby swaroop.b » Mon Feb 20, 2012 12:45 pm

Hi all!
I'm new to forum and I'm pleased to see so much work being done with the TCM82x0 cameras.
I'm using TCM8230MD camera in my project. But currently I'm facing a problem: the register values of the camera are not changing from their default. And hence the camera is not getting started at all. I checked it by reading the values by I2C. I'm getting the ACK for write though. I have used pull-ups of 4.7kOhm. I have connected the camera pins SDA and SCL to that of PIC18F2455 (operating at 2.8V, same as IOVDD of camera). I have given 16MHz clock to EXTCLK. The clock for PIC is 24MHz and SCL frequency is set to 400kHz. Since reading operation is being performed correctly, I'm getting confused.

Please suggest me a remedy for this! Unless the register bytes are written properly, I can't move ahead!

Thanks in advance! :)
swaroop.b
 
Posts: 2
Joined: Mon Feb 20, 2012 12:33 pm

Re: TCM8240MD connector and example

Postby WickedMinds » Tue Feb 21, 2012 10:56 am

Here is a snip of code I use with the Arduino Wire library to start up my cam.

Code: Select all
#define TCM_DEV_ADDR                    0x3C
#define TCM_REG_SLEEP                   0x1F
#define TCM_SOFT_RESET                  0x06
#define TCM_REG_AWBSW                   0x0A
#define TCM_REG_PICTURE                 0x03
#define TCM_DOUTSW_ON                   0
#define TCM_DATAHZ_OUT                  0
#define TCM_PICFMT_YUV422               0

// Picture Formats
#define TCM_PICSIZE_VGA          0
#define TCM_PICSIZE_QVGA         1
#define TCM_PICSIZE_QVGA_Z       2
#define TCM_PICSIZE_QQVGA        3
#define TCM_PICSIZE_QQVGA_Z      4
#define TCM_PICSIZE_CIF          5
#define TCM_PICSIZE_QCIF         6
#define TCM_PICSIZE_QCIF_Z       7
#define TCM_PICSIZE_SUB_QCIF     8
#define TCM_PICSIZE_SUB_QCIF_Z   9

void WriteCameraRegister(unsigned char reg, unsigned char data)
{
   Wire.beginTransmission(TCM_DEV_ADDR);
   Wire.write(reg);
   Wire.write(data);             
   Wire.endTransmission();    // stop transmitting
}

void CCD_Init(unsigned char pic_format)
{
   // Send a Reset
   WriteCameraRegister(TCM_REG_SLEEP, (1<<TCM_SOFT_RESET));
   _delay_us(500);
   // AWB
   WriteCameraRegister(TCM_REG_AWBSW, 0x80);
   // Enable Picture
   WriteCameraRegister(TCM_REG_PICTURE, TCM_DOUTSW_ON | TCM_DATAHZ_OUT | (pic_format<<2) | TCM_PICFMT_YUV422);

}
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

Re: TCM8240MD connector and example

Postby swaroop.b » Thu Feb 23, 2012 12:06 pm

Hi again! Thanks for the reply!
Just wanted to tell that I solved the problem! :)
It was a stupid error in my I2C program (as stupid as missing a semicolon!) (I'm using PIC18F2455)
I'm getting a decent image output. But the colour saturation is poor and the picture is getting slightly over-exposed. So, now will try some tweaking of the image-related registers. I'm currently extracting only one frame. So, next milestone would be accepting a 30fps video. Will keep posting! :)
swaroop.b
 
Posts: 2
Joined: Mon Feb 20, 2012 12:33 pm

Re: TCM8240MD connector and example

Postby WickedMinds » Thu Feb 23, 2012 1:07 pm

The default settings do give a washed out appearance. Set the brightness to 0xDC.
WickedMinds
 
Posts: 21
Joined: Wed Nov 30, 2011 6:50 pm

PreviousNext

Return to New Product Ideas

Who is online

Users browsing this forum: No registered users and 0 guests