TIbuk
Posts: 3
Joined: Mon Feb 24, 2020 10:25 am

Raspberry PI cam Chinese edition

Wed Feb 26, 2020 12:39 pm

Good day fellas, have a problem with Raspberry Pi camera which I got from Aliexpress, seller cant give full datasheet, manufacturer too. I just want to control IR filter on it, to turn on/off night mode, by soft, not thru light sensor, without rebooting system. Camera based on OV5647 stone. Please help me! :cry:

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

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 1:25 pm

Provide a link to the Aliexpress page, otherwise we're having to guess.

The most common OV5647 with controllable IR cut filter is the Waveshare one - https://www.waveshare.com/rpi-ir-cut-camera.htm
Read the wiki for controlling the IR cut filter.

You can generally control the camera LED line via software, but it is not connected to the same GPIO on all variants of Pi, and on the Pi4 it is actually absent due to not being a requirement on the currently supported camera module (IMX219).
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.

TIbuk
Posts: 3
Joined: Mon Feb 24, 2020 10:25 am

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 2:29 pm

https://aliexpress.ru/item/33025061460. ... b201603_55
Here is the Link for camera. So its impossible to turn on/off night mode without rebooting system?

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 3:22 pm

So you set normal / NoIR mode by (un)setting disable_camera_led...

You can try if 'picamera' can do the same: https://picamera.readthedocs.io/en/rele ... ng-the-led
Or by using GPIO32 (GPIO5 on older Pi models): https://www.raspberrypi-spy.co.uk/2013/ ... ra-module/
Interestingly viewtopic.php?t=213170#p1314269 mentions GPIO8

No idea if these methods (still) work.

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

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 3:54 pm

If you want to know what GPIO the LED is connected to, the official source is https://github.com/raspberrypi/firmware ... t-blob.dts and look for the CAMERA_0_LED property for your particular board variant.
If it is listed as external, then it is on the GPIO expander. Internal is the same Broadcom pin numbering as used by most userland GPIO libraries.
It's never been on GPIO8.

Yes, PiCamera has a slightly icky mechanism to set the LED from your app. See https://picamera.readthedocs.io/en/rele ... Camera.led Please note the provisos.
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.

TIbuk
Posts: 3
Joined: Mon Feb 24, 2020 10:25 am

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 4:38 pm

Thanks a lot guys, I hope this will help, appreciate your help.

User avatar
HermannSW
Posts: 2653
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Raspberry PI cam Chinese edition

Wed Feb 26, 2020 5:07 pm

TIbuk wrote:
Wed Feb 26, 2020 2:29 pm
https://aliexpress.ru/item/33025061460. ... b201603_55
Here is the Link for camera. So its impossible to turn on/off night mode without rebooting system?
Product description from your link says no, but you should be able to change the camera led GPIO with eg. pigpio pigs command as well.
I have a similar camera at home, that uses a photo resistor to change between day and night mode.
night_mode.png
night_mode.png (87.28 KiB) Viewed 334 times
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

Return to “Camera board”