camera modules - rough notes








back to index

camera modules - rough notes
      OV2640
            OV7670
      esp cam
      raspi cam
      DVP connector
            24pin 0.5mm FFC/FPC ribbon
                  cables
            30pin ribbon arducam
            Arducam 16pin header
      MIPI connector
            15pin MIPI CSI-2 (raspi)
            22pin MIPI CSI-2 (raspi zero)
      FFC/FPC cables
            15pin 1mm
            22pin 0.5mm
            24pin 0.5mm
            40pin 0.5mm
            50pin 0.5mm
            cameras:
            displays:
      JPEG format
            tools
            EXIF
      raspi cameras
            raspi highspeed cam
      OV2640 registers
      ESPcam AI-Thinker
            external antenna
      ethernet chipsets
            LAN8720
            W5100
            W5500
            ENC28J60
            USB
      raspi camera, raspiraw
            arducam ar0230
      arducam video device, ar0230

camera modules - rough notes



OV2640

2Mpix, 1920x1600, 4:3
Arducam, ESP32-cam
110 czk

24-pin interface (21-pins connected), ribbon, 0.3mm thick, 0.5mm pitch

FREX mode (exposure control, global-shutter-like) on pin B2, connected to A2, accessible on cable as pin 10
https://www.esp32.com/viewtopic.php?t=11126

OV7670

640x480


esp cam

R8=RAW 8bit, R10=RAW 10bit, Ra=RAW8/10, Rb=RAW8/10/12 R6=RAW16 J=on-chip JPEG, D=DVP, d=DVP(?), M=MIPI M2=2-lane M4=MIPI 2/4 lane
ISP=Image Sensor Pipeline
a=arducam
A=arducam with drivers/demo https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield/tree/master/RaspberryPi
r=raspi
R=raspi native
U=USB
E=ESP-cam

ill.=illumination, Back/Front

         cam       Mpix   res     res(raw) pixel size   ifce  bits sensit min SNR dyn    act.size  ISP ill.
                                             um                  mV/lux.  lux  dB  dB       mm         B/F
    ! AE OV2640    2   1600x1200 1632x1232  2.2  1/4    R8J D    8   600       40  50   3.590x2.684  Y     15mV/s,1.2kE; 730czk(rpi,SPI)                 https://www.arducam.com/ov2640/
      a  OV3640    3   2048x1536            1.75 1/4    Ra  D   10                                   Y     2x2 binning; bigger-pixel variant of OV3660
       E OV3660    3   2048x1536 2080x1548  1.4  1/5    RaJ D   10   670       34  70   2.912x2.167  Y     2x2 binning    http://www.imagequalitylabs.com/PDFs/OmniVision_OV3660.pdf  https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/OV3660_CSP3_DS_1.3_sida.pdf
    ! AE OV5640    5   2592x1944 2624x1964  1.4  1/4    RaJ DM  10   600       36  68   3.674x2.738  Y     8mV/s; OmniBSI (back-illum.); works on raspi under Unicam, QVGA@120fps
         OV5642    5   2592x1944            1.4  1/4"   R?J DM                                             QVGA@120fps
         MT9P111   5   2592x1944            1.4  1/4"   R?J DM
         S5K4ECGX  5   2592x1944            1.4  1/4"   R?J DM                                             QVGA@120fps
      aE OV7670    0.3   640x480   656x488  3.6  1/6    R8  D    8  1300       46  52   2.360x1.760  ?     12mV/s,17kE    95czk(hadex.cz,DIP,M12,no-FIFO), 98czk(laskarduino)
    ! aE OV7725    0.3   640x480   656x488  6.0  1/4    R8  D    8  3000       50  60   3.984x2.952  ?     40mV/s,26kE
       E NT99141   1    1280x720  1288x728  3.0  1/4    R8  D    8                      3.864x2.184  Y
      A  OV5642    5   2592x1944                 1/4    R?J DM
      a  OV7660    0.3   640x480
      A  OV7675    0.3   640x480            2.5         R8  D    8  1800       38       1.640x1.220  ?
         OV7740    0.3
      a  S5K4ECGX  5   2592x1944                 1/4"   R?J DM                                       ?
      ar OV9281    1   1280x800                  1/4"                                                       monochrome, global shutter, $45(arducam, ir-pass filter)
      ar OV2311    2   1600x1300            3.0  1/2.9  Ra   M2 10             37  68                       monochrome, global shutter, $100(arducam, no ir filter)
      ar OG02B10   2   1600x1300            3.0  1/2.9  Ra   M1 10             37  68                       color, global shutter, $100(arducam), Omnipixel3-GS
         AR0144    1   1280x720                                                                             global shutter, common GS on ebay

C   ! R  OV5647    5   2592x1944            1.4  1/4    Ra  DM  10   680       36  68   3.674x2.738  N      16mV/s,4.3kE, 535czk(rp,csi2,M12)
       U OV5648    5   2592x1944            1.4  1/4        DM       680       36  68   3.674x2.738  Y      540czk(rp,USB,autofocus,embedded lens)
C   ! Ra IMX219    8   3280x2464  3296x2512 1.12 1/4    Ra   M4 10   600       39  69   3.680x2.760  N      also Jetson Nano, 702czk(rp,raw), many lenses, 3200czk/stereo
C     R  IMX477   12.3 4056x3040  4072x3176 1.55 1/2.3  Rb   M4 12                      6.287x4.712  ?      2000czk(rp,CSI2,M12)
rp  ! ra IMX291    2   1945x1109            2.9  1/2.8  RbJ DM4 12  1300? .001 30  80   6.058x4.415  ?  B   1430czk(rp,USB), sens.at 1/30 sec, dyn.r.128dB?, 12bit parallel, Exmor R, STARVIS
rp    ra IMX298   16   4656x3496            1.12 1/2.3       M4 10                                   N      RGBW Bayer, 1690czk(rp,csi2), non-v4l2, embedded lens
rp    ra IMX135   13   4208x3120            1.12 1/3    Rb   M4 12   620                             ?      RGBW Bayer, 1405czk(rp,csi2), non-v4l2?, exmor-r, embedded lens
rp       IMX214   13   4224x3200            1.12 1/3.06 Ra   M4                                      ?      560czk(rp,csi2,Khadas), Exmor RS, autofocus?, embedded lens
rp     U IMX258   13   4208x3120  4224x3192 1.12 1/3.06      M4 10                                          HDR, 2240czk(rp,USB), autofocus, opt.stab.,
rp    ra AR1820HS 18   4912x3684            1.25 1/2.3  Rb   M4 12   620       36  66                N      12bit ADC, 3380czk(rp,csi2); 400fps at 306x229, 120fps at 1080p, A-PixHS BSI, M12 lens
rp  ! aU AR0230    2   1928x1088  1944x1116 3.0  1/2.7  R6  DM4 16  4000  .01  41  96                Y      0.01 lux, up to 16 bit/pixel, HiSPI bus, 12bit parallel, 12bit ADC to 16bit output
      aU IMX179    8   3288x2512            1.4  1/3.2  R    M2      650  .5   34  72   6.18 x5.85   ?      0.5 lux, 1600czk(rpi,USB,autofocus)
rp     U OV2710    2   1920x1080            3.0  1/2.7    J DM      3700       40  69   5.856x3.276  Y      930czk(rp,USB,M12?), 970czk(rp,usb,M12,motor.IRfilter, IR LEDs), Omnipixel3-HS
rp    r  AR1335   13   4160x3120            1.1  1/3.2       M                 37  69                       4.7k e/lux-sec, 
      ar IMX230   21   5344x4012            1.12 1/2.4  RaJ  M                                       Y      $100(arducam, autofocus)

         AR0238    2                        3.0  1/2.7      D                  41  96                       off-chip HDR
      A  AR0134    1.2 (global shutter)
      A  AR0135    1.3 (global shutter)
      A  MT9V022   0.3 (global shutter)
      A  MT9V034   0.3 (global shutter)                                                                     $37(ebay), standard ebay global shutter
      a  MT9V111   0.3   640x480
      a  MT9M112   1.3
      a  MT9M001   1.3
      A  MT9N001   9
      A  MT9J001   10
      A  MT9J003   10
      A  MT9F002   14
      A  MT9F001   14
      a  MT9D111   2   1600x1200            2.8  1/3/2  R8J D                                        Y
      a  MT9D112   2
      a  MT9T112   3

rp=raspishop.cz
C=common

OV5642, MT9P111 (OnSemi), S5K4ECGX (Samsung) - all 5Mpix 1/4" 2592x1944 with DVP/MIPI, RAW/JPEG



raspi cam

MIPI CSI-2
raspi normal: 15-pin connector        also Jetson Nano
raspi zero:   22-pin connector

raspi cams:
V1: OV5647    5 Mpix,                no ISP (bayer raw only), needs GPU postprocessing
V2: IMX219    8 Mpix, 3280×2464, RAW10               ATSHA204A crypto chip for anticloning; also Jetson Nano
HQ: IMX477   12 Mpix, 4056×3040, RAW12/10/8, c-mount

Pivariety Arducam: https://www.arducam.com/pivariety-is-isp-supported-rpi-cameras-up-to-21mp-starvis-global-shutter-sensors/
IMX298   16 Mpix, 4640x3472
IMX230   21 Mpix, 5344×4012

raspishop:
   IMX258   13 Mpix, autofocus, USB, 2640 czk
   IMX179    8 Mpix, autofocus, USB, 1600 czk
!! AR0230    2 Mpix, 1/2.7", 3um, 4V/lux.s, 96 dB dynamic, USB, 1700 czk; DSP, MIPI,?
   AR1820HS 18 Mpix


global shutter: OV7251, OV9281, OV2311, OG02B10, AR0234, ...
low light: IMX290, IMX327, IMX462...

OV5640: for Banana Pi, 5 Mpix, ISP



DVP connector

DVP, SCCB
24-pin, 0.5mm pitch, ribbon cable

SCCB interface: SIOD=SDA, SIOC=SCL
XCLK: main clock input
PCLK: pixel clock output
Vsync: vertical sync output
Href: output

24pin 0.5mm FFC/FPC ribbon

                OV7670             OV5640    OV9650
 1  nc          strobe (out)       nc        CIF PDN1
 2  DGND        AGND               AGND      AGND
 3  SIOD        SIOD/SDA           SIOD      YUV SDA
 4  AVDD        AVDD (2.45-3V)     AVDD      2.8V
 5  SIOC        SIOC/SCL           SIOC      YUV SCL
 6  Reset       RESET (neg or pos) RESETB    YUV RST
 7  Vsync       Vsync (out)        Vsync     CIF Vsync
 8  PwDn        PwDn (L=enabled)   PwDn      Flash0 CLE
 9  Href        Href (out)         Href      CIF HREF
10  DVDD        DVDD (1.8V)        DVDD      1.8V
11  DOVDD       DOVDD (1.7-3V)     DOVDD     YUV VCCIO
12  Y7          D7                 D9/MDP1   CIF D7
13  XCLK        XCLK (clock in)    XCLK      CIF CLKOUT
14  Y6          D6                 D8/MDN1   CIF D6
15  DGND        DGND               DGND      DGND
16  Y5          D5                 D7/MCP    CIF D5
17  PCLK        PCLK (out)         PCLK      CIF CLKIN
18  Y4          D4                 D6/MCN    CIF D4
19  Y0          D0                 D2        CIF D0
20  Y3          D3                 D5/MDP0   CIF D3
21  Y1          D1                 D3        CIF D1
22  Y2          D2                 D4/MDN0   CIF D0
23  nc          nc                 AF_VCC    GND
24  nc          nc                 AF_GND    AF_28

pin 10: sometimes GND, with OV2640 the FREX pin?, sometimes nc
pin 11: sometimes nc
pin 23: GND   or D8 or AF_GND
pin 24: AFVCC or D9 or AF_VCC

cables

extender: https://cz.mouser.com/ProductDetail/Adafruit/4524?qs=7MVldsJ5UaxjO1QLbOvGEQ%3D%3D
cables: https://cz.mouser.com/Wire-Cable/FFC-FPC-Jumper-Cables/_/N-ad930?P=1ybmvggZ1z0wxjx&Ns=Pricing|0




30pin ribbon arducam

 1  GND
 2  nc
 3  trigger (exposure sync output)
 4  Vsync
 5  Href
 6  D11
 7  D10
 8  D9
 9  D8
10  D7
11  D6
12  D5
13  GND
14  D4
15  D3
16  D2
17  D1
18  D0
19  nc
20  PCLK
21  I2C SCK
22  I2C SDA
23  RESET (active low)
24  GND
25  GND
26  Standby (active high)
27  +3.3V
28  +3.3V
29  +3.3V
30  +3.3V


Arducam 16pin header

  +3.3V   1  o o   2   GND
    SCL   3  o o   4   SDA
  Vsync   5  o o   6   Href
   PCLK   7  o o   8   XCLK
     D7   9  o o  10   D6
     D5  11  o o  12   D4
     D3  13  o o  14   D2
     D1  15  o o  16   D0




MIPI connector


15pin MIPI CSI-2 (raspi)

       raspi       jetson nano
 1 P   GND
 2 i   CAM1-DN0
 3 i   CAM1-DP0
 4 P   GND
 5 i   CAM1-DN1
 6 i   CAM1-DP1
 7 P   GND
 8 i   CAM1-CLKN
 9 i   CAM1-CLKP
10 P   GND
11 o   CAM-GPIO    reset
12 io  CAM-CLK     strobe (cam-out)
13 o   SCL0
14 io  SDA0
15 P   +3.3V

22pin MIPI CSI-2 (raspi zero)

 1 P   GND
 2 i   CAM1-DN0
 3 i   CAM1-DP0
 4 P   GND
 5 i   CAM1-DN1
 6 i   CAM1-DP1
 7 P   GND
 8 i   CAM1-CLKN
 9 i   CAM1-CLKP
10 P   GND
11 i   nc  (MIPI DATA2N)
12 i   nc  (MIPI DATA2P)
13 P   GND
14 i   nc  (MIPI DATA3N)
15 i   nc  (MIPI DATA3P)
16 P   GND
17 o   CAM-GPIO (MIPI PowerEn, active H)
18 io  CAM-CLK (24MHz clock if needed, for stereo vision), or 3.3V
19 P   GND
20 o   SCL0
21 io  SDA0
22 P   +3.3V




FFC/FPC cables


15pin 1mm

MIPI/CSI-2 raspberry pi camera

22pin 0.5mm

MIPI/CSI-2 raspberry pi zero camera

24pin 0.5mm

parallel/DVP cameras, ESPcam
parallel 16bit (RGB565?) displays, eg. https://www.adafruit.com/product/4520
some SPI eink displays


40pin 0.5mm

parallel RGB888 LCD displays, eg. https://cdn-shop.adafruit.com/product-files/2354/adafruit_SPEC-YX700WV03_REV.A-787880.pdf
LVDS displays


50pin 0.5mm

parallel RGB888 LCD displays, eg. https://www.adafruit.com/product/2770



cameras:

15x1:    MIPI/CSI2 raspberry pi "big"
22x0.5:  MIPI/CSI2 raspberry pi zero "small"

displays:

https://hackaday.io/project/179868-all-about-laptop-display-reuse/log/193081-common-lvds-laptop-panel-pinouts
15x1:    OLED, some SSD1306(?)
16x?:    OLED, some SSD1306(?)
24x0.5:  some eink, parallel 16bit RGB
30x0.5:  LVDS; some OLED, eg. SH1106, SSD1322, SSD1306, SSD1331
40x0.5:  parallel RGB888, some LVDS
50x0.5:  parallel RGB888



JPEG format

https://www.disktuna.com/list-of-jpeg-markers/
https://www.manhunter.ru/software/942_evristicheskoe_opredelenie_proizvoditeley_fotokamer.html

espcam:
FFD8 - start image
FFE0 - JPEG identifier, JFIF
...data...

FFDB - quantization table ...data...
FFC0 - start of frame ...data...
FFC4 - Huffman table ...
FFC4 ...
FFC4 ...
FFC0 - start of frame ...
FFDA ...image data itself...
FFD9 - end image others: FFE1: start of EXIF FFE2: ICC profile FFED: Photoshop/IPTC data example: FFD8 FFE0 [00 10 "JFIF" 00 01 01 00 00 01 00 01 00 00] FFE1 [00 18 ...] FFE1 [03 65 ...] FFDB ... EXIF insertion: after FFE0 (FFD8FFE0 [length]) frame[4]<<8 + frame[5] + 4, usually 0x14 in example: two exif blocks from 0x14 to 0x394 example: /home/shared/car-exploded-view.jpg FFD8 FFE0 ... FFE5 ... FFEC ... FFED ... FFE1 ... FFDB ... ffd8: start ffe0: JFIF header FFE5: uncommon FFEC: picture info (old digicams) FFED: Photoshop FFE1: EXIF ffdb: quantization table

tools

http://www.graphicsmagick.org/ - imagemagick fork with better properties


EXIF

https://www.media.mit.edu/pia/Research/deepview/exif.html
http://www.exif.org/Exif2-2.PDF

directory made of 12-byte records:
in little-endian (II):
   ImageDescription (0x010E): ascii, 11; 146
       0E 01 | 02 00 | 0B 00 00 00 | 92 00 00 00
   Orientation (0x0112): short, 1; 1
       12 01 | 03 00 | 01 00 00 00 | 01 00 00 00
   YCbCrPositioning (0x0213): short, 1; 2
       13 02 | 03 00 | 01 00 00 00 | 02 00 00 00

2 bytes: tag number
2 bytes: tag type (1=u8, 2=ascii null-terminated, 3=u16, 4=u32, 5=u32/u32 (unsigned rational)
                   6=s8, 7=undef, 8=s16, 9=s32, 10=s32/s32, 11=float, 12=double
4 bytes: number of components (total length=length of tag type*number of components)
4 bytes: value (if total lengh<=4) or offset to value


structure:
FFE1           EXIF marker
llll           length
457869660000   'Exif\0\0'
49492A00       'II*\0' (Intel format, little endian; TIFF format start)
08000000       offset of directory (incl. beginning, the 'II...') = 0x08 for no other data in between
0b00           number of entries in this IFD (11)

entries per 12 bytes:
directory 01, 11 entries
[0016].01 0e01|0200|0b000000|92000000  --> 0x009e  0x010e (img desc), ASCII (1byte), 11x, offset 0x92 from the beginning of the 'II*\0'
[0022].02 0f01|0200|06000000|b2000000  --> 0x00be  make
[002e].03 1001|0200|0d000000|ca000000  --> 0x00d6  model
[003a].04 1201|0300|01000000|01000000  1
[0046].05 1a01|0500|01000000|d8000000  --> 0x00e4  
[0052].06 1b01|0500|01000000|e0000000  --> 0x00ec
[005e].07 2801|0300|01000000|02000000  2
[006a].08 3101|0200|10000000|e8000000  --> 0x00f4  software
[0076].09 3201|0200|14000000|08010000  --> 0x0114  last modified
[0082].10 1302|0300|01000000|02000000
[008e].11 6987|0400|01000000|1c010000  --> 0x0128 --- to ExifOffset directory
[009a] c0030000                        --> 0x03cc
[009e] '        '0000...              0x92+12d=0x9e
[00be] 'NIKON'0000...                 0xb2+12d=0xbe
[00d6] 'COOLPIX S52'000000
[00e4]
[00ec]
[00f4]
[0114] '2018:09:06 18:18:00'00
ExifOffset directory
[0128] 2300   35x
[012a].01 9a82|0500|01000000|d2020000  --> 0x02de  exposuretime
[0136].02 9d82|0500|01000000|da020000  --> 0x02e6  f-stop
[0142].03 2288|0300|01000000|02000000  2           exposure program
[014e].04 2788|0300|01000000|7d000000  125         ISO speed rating
[015a].05 0090|0700|04000000|30323130  '0210'      EXIF version
[0166].06 0390|0200|14000000|e2020000  --> 0x02ee  DateTime orig
[0172].07 0490|0200|14000000|f6020000  --> 0x0302  DateTime digitized
[017e].08 0191|0700|04000000|01020300
[018a].09 0291|0500|01000000|0a030000  -->
[0196].10 0492|0a00|01000000|12030000  -->
[01a2].11
[01ae].12
[01ba].13
[01c6].14
[01d2].15
[01de].16
[01ea].17
[01f6].18
...

[02c2] [02de] 0a000000 2c010000

raspi cameras

ATSHA204A - security chip in raspi v2 cameras (look for noncrippled GPU drivers)

https://www.raspberrypi.org/documentation/hardware/camera/
v1: Omnivision OV5647, 5Mpix, 2592x1944    from 2013, sensor not made anymore
v2: Sony IMX219,       8Mpix, 3280x2464    
10bit raw RGB available
2x2 binning
2-lane MIPI

comparison, with waveshare aftermarket modules:
https://www.lifewire.com/which-raspberry-pi-camera-module-should-you-buy-4090303




raspi highspeed cam

raspiraw (debayer with dcraw)
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://github.com/6by9/dcraw

raspicam microscope
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=45887&p=1279957#p1295384

MITM on registers, OV5647:
https://www.raspberrypi.org/forums/viewtopic.php?p=374258#p374258


https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=204444

cam flash driver
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=83484

hw cam sync pulses
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=190314&start=25

raw sensor/CSI2 access
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=109137&sid=132519ec19093911fd3d8614ddc90a80

HDMI to CSI2
https://auvidea.eu/b100-hdmi-to-csi-2-bridge/

"wifibroadcast" - video over wifi, without direct links, raw packets
https://diydrones.com/forum/topics/3-km-hd-fpv-system-using-commodity-hardware
https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

custom cameras:
https://raspberrypi.stackexchange.com/questions/22963/using-other-camera-modules-to-build-custom-webcams




OV2640 registers

0xFF=0:

0xFF=1:
0x00: gain (readable agc status?)
0x04: flips; bit7=horz mirror, bit6=vert flip

0x0a:0x0b: product ID MSB:LSB
0x0c: bit2=1=50Hz,0=60Hz bit1=auto 50/60Hz bit0=0=live video,1=single-snapshot
0x10: AEC (auto exposure control) bit 9..2 (bits 15..10 in 0x45, bits 1..0 in 0x04)
0x12: bit7=reset, bit2=zoom, bit1=1=testpattern colorbars on
0x13: bit7=fast AGC(def=1=on), bit5=banding filter off/on, bit2=AGC man/auto, bit0=exposure man/auto
0x14: AGC gain ceiling, bit 7..5 (0x50 default, set to 0xe0 for max)

0x2f: luminance average (autoupdates)

frame time control: https://www.arducam.com/manual-exposure-ov2640/
pixel clock:
0x11: bit7: internal frequency doubler (1=on, def=0=off), bits 5..0 clock divider
line length dummy pixels, 12bit:
0x2a: bit 7..4=MSB
0x2b: LSB
frame dummy lines, added to VSYNC period, 16bit:
0x2D: LSB
0x2E: MSB

functions:
set_quality
set_agc_gain
set_gainceiling_sensor
set_ae_level
set_wb_mode
set_special_effect
set_brightness
set_contrast
set_saturation
set_aec2
set_colorbar
set_hmirror_sensor
set_vflip_sensor



ESPcam AI-Thinker

GPIO guide: https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/

                    5V  o    -----    o  3.3V
                   GND  o   |     |   o  gpio16
 MISO HS2_data2 gpio12  o   |  o  |   o  gpio0   CSI_MCLK  boot-mode
 MOSI HS2_data3 gpio13  o   |     |   o  GND
 CS0\ HS2_CMD   gpio15  o    -----    o  3.3v/5v
 SCK  HS2_CLK   gpio14  o             o  gpio3   Rx0
      HS2_data0  gpio2  o             o  gpio1   Tx0
flash HS2_data1  gpio4  o             o  GND

gpio0: pullup 10k, boot/firmware flashing
gpio4: microsd card data1, flash LED (high to shine)
gpio33: onboard red LED (low to shine)

HS2_* used for SD card

gpio2: QUADWP, gpio4: QUADHD



external antenna

U.FL (aka IPEX) connector on board, zero-ohm resistor as a path selector
https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/
with standard lousy 3dBi(??) antenna, RSSI went from -60 to -36



ethernet chipsets


LAN8720

PHY, MDI-X, RMII with reduced pin count, 1.6..3.6V
98 czk, https://www.laskarduino.cz/mini-ethernet-modul-lan8720/

W5100

MAC/PHY, MDI-X, SPI, 16k Rx buffer, hw TCP/IP stack, 3.3V (5V-tolerant IO)
290 czk, many LEDs, PoE, https://www.gme.cz/modul-ethernet-s-w5100

W5500

MAC/PHY, 3.3V/150mA, 80 MHz SPI+reset, 32k Rx buffer

188 czk, HR911105A MAC, https://www.laskarduino.cz/mini-ethernet-modul-w5500/
228 czk, HR911105A MAC, miniature module, https://www.laskarduino.cz/mikro-ethernet-modul-w5500/

ENC28J60

MAC/PHY, SPI, 3.3V
160 czk, https://www.gme.cz/modul-ethernet-lan-hr911105a



USB

350 czk, 3-port USB hub + LAN, https://rpishop.cz/huby/1276-triportovy-usb-hub-ethernet-microb-konektor.html




raspi camera, raspiraw

to /boot/config.txt:
dtparam=i2c_vc=on
...and /dev/i2c-0, /dev/i2c-10, /dev/i2c-11 appear

i2c_vc=on is old, does nothing i2c bus 10 is empty, until raspiraw/camera-i2c is run then device 36 appears - the ov5647 (what's the device 23? it did not appear on subsequent scans.)
i2cdetect -y 10
0  1  2  3  4  5  6  7  8  9  a  b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
./camera_i2c
setting GPIO for board revsion: 9000c1
PiZero W - I2C 0 on GPIO 28 & 29. GPIOs 40 & 44 for LED and power
Use i2c-10 for the sensor (-y 10)
./raspiraw -o x.raw
Using I2C device /dev/i2c-10
RaspiRaw: Probing sensor ov5647 on addr 36
RaspiRaw: Found sensor ov5647 at address 36
RaspiRaw: Encoding 41414770
No AWB
mmal: Set pack to 0, unpack to 0
mmal: Timing 6/2, 2/6/0, 0/0
mmal: Create pool of 6 buffers of size 6371328
mmal: Create pool of 6 buffers of size 6371328
mmal: Now streaming...
git clone https://github.com/6by9/dcraw apt-get install libjasper-dev libjpeg8-dev gettext liblcms2-dev /buildme
git clone https://github.com/schoolpost/pydng cd pydng/src pip3 install Cython python3 setup.py install pydng: converts data from raspistill -r jpeg files into .dng python3 ./examples/utility.py ../raspiraw/xraw.jpg produces ../raspiraw/xraw.dng
dcraw -i -v /usr/src/raspiraw/xraw.dng
Filename: /usr/src/raspiraw/xraw.dng
Timestamp: Sun Jun 13 01:38:23 2021
Camera: RaspberryPi RP_ov5647
DNG Version: 1.4.0.0
ISO speed: 0
Shutter: 1/8.0 sec
Aperture: f/0.0
Focal length: 3.6 mm
Embedded ICC profile: no
Number of raw images: 1
Full size: 2592 x 1944
Image size: 2592 x 1944
Output size: 2592 x 1944
Raw colors: 3
Filter pattern: GB/RG
Daylight multipliers: 1.745787 0.949537 2.929221
Camera multipliers: 0.976000 1.000000 2.261000 0.000000
work with dng files: http://rawtherapee.com/ https://www.spiedigitallibrary.org/journals/optical-engineering/volume-59/issue-11/110801/Color-conversion-matrices-in-digital-cameras-a-tutorial/10.1117/1.OE.59.11.110801.full?SSO=1

arducam ar0230

kernel module compile:

cd /usr/src
git clone https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver
cd Arducam-Pivariety-V4L2-Driver/src
make
make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: *** /lib/modules/5.10.17+/build: No such file or directory.  Stop.
make: *** [Makefile:10: default] Error 2



apt-get install raspberrypi-kernel-headers
(populates the /lib/modules/`uname -r`/build directory)

cd /usr/src/Arducam-Pivariety-V4L2-Driver/src
make

mkdir /lib/modules/5.10.17+/kernel/drivers/video/arducam
cp arducam.ko /lib/modules/5.10.17+/kernel/drivers/video/arducam
depmod
modprobe arducam

...and nothing happens. Weird.

on reboot, dmesg shows messages from overlay: [ 33.130812] arducam_vddl: disabling [ 33.130852] arducam_vdig: disabling [ 33.130878] arducam_vana: disabling (manual modprobe) [ 111.097100] arducam: loading out-of-tree module taints kernel. (indeed, the AR0230 is not supported.) let's try the other one... cd /usr/src git clone https://github.com/ArduCAM/Arducam_OBISP_MIPI_Camera_Module cd Arducam_OBISP_MIPI_Camera_Module/sourceCode ...makefile is not there, so...
cp /usr/src/Arducam-Pivariety-V4L2-Driver/src/Makefile . make ...and it spits some errors. but produces a .ko file. so,
cp arducam.ko /lib/modules/5.10.17+/kernel/drivers/video/arducam depmod and make the overlay, we can do cd dts dtc -O dtb -o arducam.dtbo arducam-overlay.dts but we'll try first to use the existing binary, cp ../Release/bin/5.4.51+/arducam.dtbo /boot/overlays/ it worked. we uncommented some printk from the kernel, too. this one is supporting these cams: 13MP AR1335 high-resolution camera 2MP AR0230 HDR camera "And Sony starvis IMX290, IMX327 camera will come up very soon."

arducam video device, ar0230

v4l2-ctl --list-devices
unicam (platform:20801000.csi): /dev/video0 /dev/video1 bcm2835-codec-decode (platform:bcm2835-codec): /dev/video10 /dev/video11 /dev/video12 bcm2835-isp (platform:bcm2835-isp): /dev/video13 /dev/video14 /dev/video15 /dev/video16
v4l2-ctl -D
Driver Info: Driver name : unicam Card type : unicam Bus info : platform:20801000.csi Driver version : 5.10.17 Capabilities : 0x85a00001 Video Capture Metadata Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x05200001 Video Capture Read/Write Streaming Extended Pix Format Media Driver Info: Driver name : unicam Model : unicam Serial : Bus info : platform:20801000.csi Media version : 5.10.17 Hardware revision: 0x00000000 (0) Driver version : 5.10.17 Interface Info: ID : 0x03000005 Type : V4L Video Entity Info: ID : 0x00000003 (3) Name : unicam-image Function : V4L2 I/O Flags : default Pad 0x01000004  : 0: Sink Link 0x02000007: from remote pad 0x1000002 of entity 'arducam 10-000c': Data, Enabled, Immutable
v4l2-ctl -l
User Controls brightness 0x00980900 (int) : min=1 max=64 step=1 default=64 value=64 flags=slider contrast 0x00980901 (int) : min=1 max=64 step=1 default=32 value=32 flags=slider saturation 0x00980902 (int) : min=1 max=128 step=1 default=50 value=50 flags=slider hue 0x00980903 (int) : min=1 max=40 step=1 default=40 value=40 flags=slider white_balance_automatic 0x0098090c (bool) : default=1 value=1 gamma 0x00980910 (int) : min=18 max=128 step=2 default=25 value=25 flags=slider exposure 0x00980911 (int) : min=1 max=2000 step=1 default=500 value=500 gain 0x00980913 (int) : min=1 max=100 step=1 default=1 value=1 horizontal_flip 0x00980914 (bool) : default=0 value=0 vertical_flip 0x00980915 (bool) : default=0 value=0 white_balance_temperature 0x0098091a (int) : min=1 max=65535 step=1 default=4600 value=4600 sharpness 0x0098091b (int) : min=1 max=6 step=1 default=3 value=3 flags=slider backlight_compensation 0x0098091c (int) : min=0 max=3 step=1 default=3 value=3 Camera Controls exposure_auto 0x009a0901 (bool) : default=1 value=1
v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'UYVY' (UYVY 4:2:2) Size: Discrete 1920x1080 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 1280x720 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 640x480 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 320x240 Interval: Discrete 0.033s (30.000 fps)
i2cdetect -y 11
0  1  2  3  4  5  6  7  8  9  a  b c d e f 00: -- -- -- -- -- -- -- -- -- UU -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- (after reboot, 0x0c is up too) (I2C addresses without/with the LSB R/W) (0x0c/0x18) (0x64/0xc8)

If you have any comments or questions about the topic, please let me know here:
Your name:
Your email:
Spambait
Leave this empty!
Only spambots enter stuff here.
Feedback: