zontar
Posts: 171
Joined: Sun Mar 05, 2017 7:14 pm

[SOLVED] Custom camera v1.3PCB board for CM not really working

Wed Oct 21, 2020 2:16 pm

Hello,

at last I've got my shipment from China with my custom camera board for camera v1.3. Why 1.3? Because it looked simpler to design and cheaper to but.
Anyway, I've connected everything and tested:
  • 3V3 arrives at the board
  • the oscillator generates a steady 25Mhz clock
  • two LDOs generate 2V8 and 1V5 as required
Of course to test the 2V8 1V5 and Clock I had to force the camera enable signal High while doing the tests, since otherwise the LDOs and Oscillator are not enabled.

Afterwards I've connected all the signals from the ComputeModule as expected.

When I launch raspivid I got the usual:

Code: Select all

pi@raspcm(ro):~$ vcgencmd get_camera
supported=1 detected=1
pi@raspcm(ro):~$ sudo raspivid -t 0 -f
Camera control callback  cmd=0x4f525245mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board
But maybe I'm getting some specification wrong? Can anybody tell me if this wiring is correct for the fine pitch SUNNY connector receptacle?
I'am using the camera module V1.3 from a working raspberry camera module, simply unplugged and replugged on my custom PCB
Screenshot 2020-10-21 at 16.00.47.png
Screenshot 2020-10-21 at 16.00.47.png (76 KiB) Viewed 317 times
Any outstanding idea?
Thanks
Z
Last edited by zontar on Sat Oct 24, 2020 4:21 pm, edited 1 time in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 10312
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Custom camera v1.3PCB board for CM not really working

Wed Oct 21, 2020 3:07 pm

The datasheet for OV5647 says there should be a minimum of 5ms between the AVDD being stable and PWDN going low. I'm guessing that's pin 24 that you've tied low and you get away with it.

I've looked at the schematic for the V1.3 camera module. You've got the two sides of the connector numbered the opposite way to that (ie pin 1 is pin 24, etc), but if the I2C is working then you it is correct in reality.
The order of the CSI2 signals matches yours.

Which CSI2 interface on the CM have you connected to? All the Pis use Unicam1 for the first (or only) camera module. Wiring into Unicam0 would result in no CSI2 data being received. You can alter that via the "pin_define@CAMERA_0_UNICAM_PORT" line in dt-blob.dts - see https://www.raspberrypi.org/documentati ... -camera.md
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

zontar
Posts: 171
Joined: Sun Mar 05, 2017 7:14 pm

Re: Custom camera v1.3PCB board for CM not really working

Wed Oct 21, 2020 3:16 pm

Hello,
i am a bit worried about numbers being the opposite.. but if you sai this is correct..
another try Ive done is to revere 180 degrees the sunny+camera: raspivid spat out a terrible error, even worse than the usual one, so I tend to agree with you, even in my ignorance. I2C seems to work

I use CAM1, if this is the question you ask. I've built a custom device tree that works with the usual camera board module V1.3 (the official one).

See the last post here.
viewtopic.php?f=43&t=283406

where

Code: Select all

 
pin_define@CAMERA_0_UNICAM_PORT {
          type = "internal";
          number = <1>;
 };
 pin_define@CAMERA_0_I2C_PORT {
          type = "internal";
          number = <1>;
 }
 ;
Thanks
Z

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 10312
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Custom camera v1.3PCB board for CM not really working

Wed Oct 21, 2020 3:41 pm

zontar wrote:
Wed Oct 21, 2020 3:16 pm
i am a bit worried about numbers being the opposite.. but if you sai this is correct..
You've got I2C comms working, so those two lines and the supplies had to be correct.
zontar wrote:another try Ive done is to revere 180 degrees the sunny+camera: raspivid spat out a terrible error, even worse than the usual one, so I tend to agree with you, even in my ignorance. I2C seems to work
Eek, that's likely to blow it if you're not careful.
zontar wrote:I use CAM1, if this is the question you ask. I've built a custom device tree that works with the usual camera board module V1.3 (the official one).

See the last post here.
viewtopic.php?f=43&t=283406

where

Code: Select all

 
pin_define@CAMERA_0_UNICAM_PORT {
          type = "internal";
          number = <1>;
 };
 pin_define@CAMERA_0_I2C_PORT {
          type = "internal";
          number = <1>;
 }
 ;
Thanks
Z
OK, so your wiring from this bit to the CM socket is
CAM_D0+ to 159 (CAM1_DP0)
CAM_D0- to 161 (CAM1_DN0)
CAM_CLK+ to 147 (CAM1_CP)
CAM_CLK- to 149 (CAM1_CN)
CAM_D1+ to 153 (CAM1_DP1)
CAM_D1- to 155 (CAM1_DN1)
In which case that should work.
Sorry, I don't always link forum handles back to older threads.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Amornthep
Posts: 9
Joined: Sat Apr 23, 2016 5:14 pm
Location: Thailand
Contact: Website Facebook Twitter

Re: Custom camera v1.3PCB board for CM not really working

Thu Oct 22, 2020 10:03 am

Take a look at EagleEYE Samart camera circuit.

https://github.com/QWaveSystems/QwaveSm ... a_EagleEYE

PDF Schematic
https://github.com/QWaveSystems/QwaveSm ... strial.PDF
RUBY-SCH.png
RUBY-SCH.png (153.15 KiB) Viewed 257 times
https://qwavesys.com
https://github.com/QWaveSystems
https://www.linkedin.com/in/amornthep-phunsin/
https://twitter.com/QwaveSystems

Amornthep
Posts: 9
Joined: Sat Apr 23, 2016 5:14 pm
Location: Thailand
Contact: Website Facebook Twitter

Re: Custom camera v1.3PCB board for CM not really working

Thu Oct 22, 2020 10:06 am

This is a schematic of image sensor part.
EagleEYE Circuit.png
EagleEYE Circuit.png (153.47 KiB) Viewed 257 times
https://qwavesys.com
https://github.com/QWaveSystems
https://www.linkedin.com/in/amornthep-phunsin/
https://twitter.com/QwaveSystems

zontar
Posts: 171
Joined: Sun Mar 05, 2017 7:14 pm

Re: Custom camera v1.3PCB board for CM not really working

Thu Oct 22, 2020 12:47 pm

Thanks Amornthep,
the camera you dseigned seems very interesting. But if I get it right, you don't use the small connector that binds the camera to the socket on the camera module, instead you just use the camera sensor in your PCB.

And this, at the moment, is too much complicated I fear. Or maybe not.. but I don't even know where to find the raw OV5647 sensor (on digikey there is no such component). I am still stuck with the small SUNNY connector, but I will look into your diagram and schematics.

Thanks!
Z

zontar
Posts: 171
Joined: Sun Mar 05, 2017 7:14 pm

Re: Custom camera v1.3PCB board for CM not really working

Fri Oct 23, 2020 2:53 pm

Hi Amornthep,
one difference I see from your schematics and mine is regarding the signals and power input that (in your schematics to RUBY_OV5647_B) go to the camera (or camera module).

I can see all the logical signals but i can see several different power going there
  • 1V5
  • 1V8
  • 2V8
  • 3V3
whereas my PCB has only
  • 1V5
  • 2V8
I wonder why.. and I doubt that the tiny SUNNY connector has components that boost or buck voltage.

Then of course there are many signals that I don't know of, for example FLEX, STROBE, PWRDOWN and RESETB, but I hope they derive their value from for other signals.
Btw I've copied the general layout from the only project that I have found on line https://hackaday.io/project/167794-dual-camera-board-for-ov5674 with a PCB layout of "a" camera module or similar..


Another difference seems to be that the Oscillator in your schematics is 24Mhz while mine is 25Mhz.

Could these be the reasons?
Thanks
Z

zontar
Posts: 171
Joined: Sun Mar 05, 2017 7:14 pm

[SOLVED] Re: Custom camera v1.3PCB board for CM not really working

Sat Oct 24, 2020 4:21 pm

Ok.. I've rechecked everything and.. very simply I had mismatched the data lanes/clock lanes etc...
after careful rechecking and rewiring, it works as you can see from these pictures.
IMG_7095.jpeg
IMG_7095.jpeg (70.63 KiB) Viewed 170 times
Moreover signal travels from CM to camera module via a standard miniDP cable.
IMG_7097.jpeg
IMG_7097.jpeg (66.35 KiB) Viewed 170 times
And I can confirm that the schematics posted was correct :)

Thanks everybody for your help.. really awesome. Now of course I have a product still to be designed, with CM3+ (which is now superseded by CM4) and camera v1.3 (which is supposed end of life.. but.. since the proof of concept works I can at least just design a newer PCB for the camera v2, since I remember there are official schematics somewhere.
here

Thanks everybody!

W

Return to “Compute Module”