Jump to content

mattday

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

1336 profile views
  1. This is wrong. Please don't plug your camera directly into an Orange Pi One or Orange Pi PC. They output 5V on pins 1 & 24. You need the expansion board to drop this to 2.8V/1.8V for the camera. With Orange Pi 2, Orange Pi Mini and Orange Pi Plus you can connect the camera directly (according to the schematics, as I have not personally tried these). I also don't believe Xunlong/SinoVoip have changed any camera pin layouts. They are just working with what is available and there is no standard.
  2. @lex, not working on first try - PM sent.
  3. Yes, I am using a fixed focus module. It looks as though different modules may use different pins for the AF supply. Obviously not wise to short the supply to ground. However, it is possible some modules internally route power from IO-VDD to AF-VDD and don't even connect pins 23 and 24 to the sensor chip. This is a pure guess, but could explain what lmvc says about it not mattering. Unfortunately there are no standards for the camera connector. Some of them seem to use the same layout, but it is entirely down to the company who package the sensor. Omnivision just sell an imaging chip with contact pads on the back. Someone else must mount this on a small circuit board with some passive components, route some of the pins out to a connector and integrate a lens assembly to focus light onto the front of the chip.
  4. @tkaiser, I agree regarding Steven/Xunlong. Curiously, the current OPi camera expansion board has "200M&500M" printed on it. Anyhow, it should be straightforward to add an extra connector to the board. This seems to be all that is required. The second camera connector would point in the opposite direction to the first camera connector, allowing a OV5640 to plug straight in. I have attached a very rough illustration to show what I mean. In theory, this could also be used with the older OPi boards (the ones that don't require an expansion board to use a GC2035). In this case, it would function only as a means of reversing the pins. The extra cost is unlikely to amount to more than maybe 20 cents. Does anyone have any suggestions on what I should try next with the OV5640? I was thinking of taking a look at what is going wrong at certain image sizes (e.g. 1920x1080). @lex did you experience this with the guitar board?
  5. Orange Pi One Orange Pi camera expansion board and flat flex cable from official camera (2Mp GC2035). OV5640 (of unknown origin) with extra flat flex cable. These are soldered together to reverse connector pins. Ideally the cable would be shorter, but this was just to test. Note that camera is pointing downwards in photo, whereas it would be pointing upwards if plugged directly into expansion board. Hope this is useful to clarify and hope the photo still has enough detail after the forum software has messed with it.
  6. Just a small update from me as I've not had much time. My new parts arrived and after some messing around I was able to reverse the camera connector. Running modprobe vfe_v4l2 is now successful (output same as post #34). fswebcam is able to capture images from the sensor: 1280x960 and 640x480 give decent images 2592x1936 (full resolution) and 1024x768 give very over exposed images 1920x1080 and 800x600 give green/pink noisy images I get the following output when running fswebcam: [ 2424.901977] [VFE]vfe_open [ 2424.902034] [VFE]..........................vfe clk open!....................... [ 2424.902095] [VFE]vfe_open ok [ 2424.903081] [VFE]Set vfe core clk = 216000000, after Set vfe core clk = 200000000 [ 2424.903116] NOT_SUPPORT_THIS_FUNCTION:sun8iw7p1_isp_set_table_addr, line: 372 [ 2424.903147] [VFE]mclk on [ 2424.939416] [OV5640]enable oe! [ 2425.060972] [VFE_WARN]v4l2 sub device queryctrl (null) unsuccess! [ 2425.250099] [OV5640]s_fmt set width = 1024, height = 768 [ 2425.250535] [VFE]buffer_setup, buffer count=4, size=1179648 [ 2425.486065] [VFE]capture video mode! [ 2425.619313] [VFE]capture video first frame done! [ 2425.722818] [VFE]vfe_close [ 2425.722841] [OV5640]sensor_s_release_af [ 2425.735208] [OV5640]disalbe oe! [ 2425.735554] [VFE]mclk off [ 2425.747635] [VFE]..........................vfe clk close!....................... [ 2425.747670] [VFE]vfe_close end @lmvc I think you must have also changed something else when your camera started working with vip_dev0_fmt = 1. If you haven't already, I suggest you try putting your camera back in YUV mode because raw bayer format image data is not so useful.
  7. @lmvc: I think it is correct because all the pins match up. OK so they use some slightly different naming depending on which datasheet you are reading. OV5640 can use 10-bit output, whereas only 8-bits are usually connected, so Y9 becomes D7, etc.
  8. @lmvc Your pinouts for board/camera seem to match OK. You can do a quick check for ground pins on the camera FPC because they can be easily identified (see image). This is how I first realised my camera must not be connected correctly. The pin definitions in your fex also look good to me, going off the schematic. If you have a multimeter or oscilloscope, perhaps check the voltage between ground and all VDD/VCC pins. Sorry this is not very helpful.
  9. So everyone is plugging their cameras in the wrong way round!? Maybe I am missing something because I am surprised it is possible to connect the FPC wrong on these boards. The contacts are usually only on one side. If I try to switch mine 180º there will be no connection. @lex: Your sensor may still be OK. I wouldn't worry too much about 3.3V having been connected to ground. Voltage regulators often have some protection built in. There is a small chance you damaged the sensor if 3.3V on pin 2 was connected to the camera data line on pin 23, but because it was shorted, the actual voltage would probably have been lower than 3.3V. The maximum ratings from the OV5640 data sheet suggest it would probably tolerate this. @lmvc: I'm surprised your sensor is damaged. Your BPi has the voltage regulators on board, so the maximum voltage the sensor can ever see should be 2.8V which it should handle. I guess it is possible you have damaged something on your board.
  10. @lex, Unfortunately I will have to wait for another camera expansion board to come from China now. I attempted desoldering the connector and reversing it at home... this inevitably went horribly wrong. It is possible I damaged my OV5640 sensor, but fortunately I have another one of those. For the NanoPi M1, I think you should be able to copy the [csi0] section from the Orange Pi One fex file with only minor changes. I've looked at the schematic for the M1 and there are only a couple of differences from the Orange Pi. There is no power enable signal on PA17 and it is not clear if PE15 is used for a power down signal, but there is no harm in leaving that pin assigned. Assuming the Orange Pi One config is correct, then the following changes may be all that is needed for the M1. vip_dev0_mname = "ov5640" vip_dev0_power_en = BTW, I assume you have a camera and board that were sold together like this?
  11. I hope it will be solved, but I can't try yet. The pin reversal was responsible for this error in my case. The connections were all wrong. I imagine the first thing the driver does is try to talk to the camera using i2c, but the i2c pins (SDA/SCLK) were connected to some camera image data pins (D2/D3). So of course the communications failed and driver aborted. PIN BOARD CAMERA --- ---------- --------- 01 NC AFVCC-CSI 02 GND GND 03 SDA D2 04 VCC-CSI D1 05 SCK D3 06 RESET D0 07 VSYNC D4 08 PWDN PCLK 09 HSYNC D5 10 VDD1V5-CSI GND 11 VCC-CSI D6 12 D7 MCLK 13 MCLK D7 14 D6 VCC-CSI 15 GND VDD1V5-CSI 16 D5 HSYNC 17 PCLK PWDN 18 D4 VSYNC 19 D0 RESET 20 D3 SCK 21 D1 VCC-CSI 22 D2 SDA 23 GND GND 24 AFVCC-CSI NC
  12. I found my hardware issue. It wasn't obvious what 'Sitheek' meant about 'reversing pinouts' for OV5640. From the picture of the adapter board he posted it looked like he might be doing something with pins 10 and 11, but that didn't seem like a good idea from the data I have. It turns out you need to essentially switch the whole connector 180 degrees. So pin 1 becomes pin 24 and vice versa. I can't see how his adapter achieves that, but I can confirm this is necessary for the Orange Pis. I don't have pinouts for the GC2035 or the camera expansion board, but the OV5640 should be pin-compatible based on my scope measurements and the schematics for the Orange Pi 2 (which does not require an expansion board). Unfortunately I don't have the equipment at home to desolder the FFC connector, so can't try anything else for the moment.
  13. Thanks for the latest info guys, I'll be very interested to see how @lex gets on with the 5Mp camera on NanoPi M1. I only bought the gc2035 for the camera expansion board, so haven't tested that beyond grabbing a frame. I have a OV5640 like this which looks like it should be pin compatible with the board. Although when I run 'modprobe vfe_v4l2' I get the following, suggesting a problem with the i2c communications perhaps? [ 1946.945905] [VFE]Welcome to Video Front End driver [ 1946.946271] [VFE]pdev->id = 0 [ 1946.946286] [VFE]dev->mipi_sel = 0 [ 1946.946298] [VFE]dev->vip_sel = 0 [ 1946.946311] [VFE]dev->isp_sel = 0 [ 1946.952440] [VFE_WARN]vfe vpu clock is null [ 1946.959970] [VFE]..........................vfe clk open!....................... [ 1946.960049] [ISP] isp platform_id = 5! [ 1946.960205] [VFE]vfe_init end [ 1946.970063] [VFE]probe_work_handle start! [ 1946.970088] [VFE]v4l2 subdev register input_num = 0 [ 1946.970099] [VFE]vfe sensor detect start! input_num = 0 [ 1946.970114] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" ! [ 1946.970126] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start! [ 1946.970141] [VFE]v4l2_device_register_subdev return 0 [ 1946.970152] [VFE]registered sensor subdev is OK! [ 1946.970160] [VFE]Check sensor! [ 1946.983467] [VFE]mclk on [ 1947.050306] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 1000a30 [ 1947.050569] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 1000a30 [ 1947.050831] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 1000a30 [ 1947.050847] [OV5640]error at sensor_detect [ 1947.050856] [OV5640]chip found is not an target chip. [ 1947.050866] [VFE]mclk off [ 1947.086994] [VFE]vfe sensor subdev unregister! [ 1947.087009] [VFE]Sub device register "ov5640" failed! [ 1947.087020] [VFE_ERR]vfe sensor register check error at input_num = 0 [ 1947.087311] [VFE]V4L2 device registered as video0 [ 1947.087344] [VFE]..........................vfe clk close!....................... [ 1947.087365] [VFE]probe_work_handle end! [ 1947.096023] [VFE]vfe_open [ 1947.096043] [VFE]..........................vfe clk open!....................... [ 1947.096076] [VFE]vfe_open ok [ 1947.096262] [VFE]vfe_close [ 1947.096273] [VFE]vfe select input flag = 0, s_input have not be used . [ 1947.096292] [VFE]..........................vfe clk close!....................... [ 1947.096320] [VFE]vfe_close end
  14. I have the gc2035 camera working on my Orange Pi One running Armbian, but I need a better image sensor. I've had a quick attempt to get an ov5640 working without any luck. It is a popular 5Mpixel module similar to the RPi camera. I know that 'Sitheek' on the Orange Pi forums had it working. However, that place is a ghost town now and Sitheek has not visited since January. So, I wonder if anyone here has got an OV5640 camera working, or failing that, could just offer some pointers on how to go about this? Thanks.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines