SparkFun Forums 

Where electronics enthusiasts find answers.

Have a good idea for a new product for SFE or Olimex? Let us know!
By KreAture
#52422
Let me repeat myself here as it does not look like people have grasped the major issues with this sensor...

- No readout buffer
This means you can NOT halt the flow of data or the image would have been corrupted, thus there is no such function.
In RGB mode, the camera simply sends the data according to the master clock at some fractional rate determined by zoom setting and possibly some undocumented register.
In JPEG mode, the camera sends data at high rate, but intermittant. It does so "on-the-fly" as image data is dumped from the sensors, encoded and sent without being stored in advance.

- Poorly documented registers
All operations is done via I2C by writing or reading to any specified register in the camera. Theese control everything in camera including data output on/off but there is no way to pause the transmission if your controller can't keep up with the data flow.
I have not yet been able to get my cameras into fully auto mode on brightness, contrast, balance etc so images look awfull.

- Data-rate
At minimum clock input of 6 MHz, the internal PLL seems to generate around 8 MHz. To use Jpeg the internal PLL MUST be active. This means data will be sent out at 8 mbyte/second on the 8 bit paralell bus. There will be convenient or inconvenient pauses in the data flow (depending on your view) intermittantly as the camera encodes the data on the fly.
To handle the datastream you'd need to be able to receive the data, store it and increment the address inside your MCU before the next byte comes. You have to do this while keeping an eye on the VBLK and HBLK signals so as to know when there therre is an actual image and when there is data. Also, to read valid data, it has to be done synched to the DCLK signals clock flanks.

This really isn't a simple sensor to handle, and anyone thinking so will have a rough time. Either dedicated hardware, a very smart approach or a fast MCU is needed to get the job done.

Hope this is clear for everyone.
By adamkumpf
#53480
hey KreAture and Twingy -- you guys are great. thanks for sharing your findings with this forum.

I'm looking to use the TCM8230MD camera with a microcontroller and understand the difficulty with setting this up; there is just way too much data for an 8-bit 40MHz microcontroller to keep up! I have an idea to maybe get around this a bit for my use, so I am curious to hear if anyone has done something like it...

I'm using the camera as a positioning sensor, not trying to capture a full image. I really only care about a small number of pixels on each frame (i.e., less than 50), so the actual data throughput is not too bad as long as I can pick it out. Which brings me to my question: how slow can EXTCLK be clocked (slower than 11.9MHz as described in the pdf?)? Can I speed through 100 pixels, slow down for a couple, then speed back up again? If so, I could have the microcontroller run through the data I don't care about and then just grab the pixels that are important to me.

thanks!
By KreAture
#53487
The extclk drives a reference for the internal clock that is generated from a pll in jpeg mode on the TCM8240MD. On the 30, I don't think there is any pll so it could work.

The downside is that the cameras exposure system is reliant upon clock rates. Also, readout system is such that diff clock on diff pixels will result in different exposures.
By adamkumpf
#53490
thanks, I'll give it a shot. My parts should arrive in a couple days.

In the worst case, I think I could just drive EXTCLK at 12MHz and use the lowest resolution (subQCIF at 128x96) and try to keep up with the microcontroller (hoping that DCLK is divided down a bit, although I can't find much in the pdf about how DCLK is derived from EXTCLK in the various modes).

I want to keep my system super small, so I don't really have room (or the patience) for a nice FIFO buffer and an ARM9 (that would be sweeeet). Ideally, it's just a camera, a little Atmega AVR, and a few discretes to glue it all together.
By pciftvi
#54469
What do you have to do to get the camera to begin outputting data?

I have a TCM8240MD hooked up to an SX microcontroller. I2C communication is working fine, I can read and write to the camera successfully. DCLK is outputting the same clock signal as I am inputting, but the data pins appear to be outputting nothing.

Is there some I2C command I need to send to get it outputting images? I was under the impression that it would begin sending images on its own after the clock signal started up.
By KreAture
#54474
Yes.
There is a register bit that enables/disables output.
By pciftvi
#54481
KreAture wrote:Yes.
There is a register bit that enables/disables output.
Great... which register does this? The datash**t isn't very helpful on defining its registers.
User avatar
By FartingMonkey92
#55078
Just joined this forum to let people know that the pads on the bottom of the module are connected the outside pads and that there is a connector for it made by Alps, looks like you can only get it in 2000+ quantities from them so its down to you, people at Sparkfun...

It would be great if Sparkfun/Olimex would make a breakout for it using said connector. If your camera goes (insert relevent noise here) just put in a new one...

Relevent link:
Connector for CMOS Camera Module SCKA Series
By buffercam
#55163
I don't think the Alps connector would work for this camera since the dimensions don't match:
The camera is 10x10mm and the socket is 6mmx6mm.
By Random
#55166
The 8230 is 6mm x 6mm though...

I've also got an 8230, currently on a PCB that just brings all the pins to a 0.1" header. I'm planning on trying to get some kind of image out of it to an STM32 running at 72MHz - all I need to do is some basic computer vision so 128x96 images will be sufficient but it's got plenty of other things to be getting on with at the same time.

Has anyone tried changing the framerate from 30fps to 15fps and seeing what that does?
User avatar
By FartingMonkey92
#55177
Sorry guys, saw a 3 instead of a 4 in the topic, would work great for the TCM8230MD though as you said. Kinda thought it was a bit too good to be useful...
By buffercam
#55226
Here is the breakout board I made for the TCM8240MD to a .1" header.
I'm using it to connect the camera to a Spartan-3E starter kit (FPGA development board).

I haven't tested it yet.

Breakout Board for TCM8240MD (Pictures)

-David
By buffercam
#55251
I'm starting to question my design...

What do the pads on the underside of the module connect to?
I assume it would be bad if I connected a lot of them to 2.8V.

As you can see in my schematic, I routed the supply voltage under the camera along the right and bottom sides, without giving much clearance.
I used KreAture's Eagle component for the camera and kept the traces outside the keepout area, but didn't give myself much room for error for positioning the component during soldering.

Is there a way to check if I'm connecting to any of those pads underneath?

-David
By KreAture
#55254
The pads on the underside connect to some of the pads on the sides.
I did a overview of them a while back:
Code: Select all
under   side    function
        1       gnd
19      2       DCLK
        3       gnd
13      4       EXTCLK
        5       gnd

5       6       2.8v
4       7       DOUT0
3       8       DOUT1
2       9       DOUT2
1       10      DOUT3

24      11      DOUT4
23      12      DOUT5
22      13      DOUT6
21      14      DOUT7
20      15      gnd

16      16      VBLK
15      17      HBLK
        18      gnd
8       19      SCL
10      20      SDA
Don't take the numbering 100% serious but I think I got it right.
Since there is fewer pinns on the underside than on the sides, something was missing and it turned out to be ground connections.
By buffercam
#55276
KreAture,

I tried a quick connectivity test earlier today on an unmounted camera, but I didn't find any connections.

I pressed one wire from the DMM across five of the pads on the underside of the camera and raked the other wire across all of the edge pads, but didn't find any connections. (I repeated this for the remaining three sets of pads, no luck.)

How did you determine the connections?

-David
  • 1
  • 7
  • 8
  • 9
  • 10
  • 11
  • 31