You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been testing using a Pi Camera v3 for a high-altitude balloon application, where there is a GPS receive in proximity to the raspberry pi. I've previously used Pi Camera v2's with only minimal GPS interference issues, however now I'm testing a Pi Camera v3, I find that as soon as image capture starts, the GPS loses lock.
My suspicion is that the larger sensor size of the v3 results in higher CSI data lane rates, which may have harmonic issues at GPS L1 frequencies (1575 MHz).
How would I determine what CSI rates are in use? I'm capturing full-resolution stills.
Is there any way to force the CSI rate? Again, I'm only interested in capturing the occasional (every few second) still image, not high FPS video...
I've switched back and forth between the Pi Camera v2 and v3, and am fairly certain the issue is more prevalent on the v3 camera.
Reacted by Edward Vielmetti, NotAFile, Luis Mita, Swarkin, Eliza Zhang and squeakbug
Just as confirmation of what's going on here, here's some measurements taken with a HackRF showing the RFI around the GPS L1 frequency when the v3 camera has started:
Here's the same measurement, but with a v2 camera:
In both cases, I use the following python commands to start up the camera:
All V4L2 sensor subdev drivers should advertise the CSI-2 link frequency/frequencies used via V4L2_CID_LINK_FREQ. Those are generally configured via device tree too for the case where the driver allows variation of them.
Those are both relying on the driver developer having calculated or been given the correct numbers based on the register settings, but I believe they are correct for both sensors.
In both cases the external oscillator feeding the camera module is 24MHz, but the PLLs may result in different frequencies internally.
Checking the information I have from Sony, the link frequency is correct as 450MHz for all modes.
The internal pixel clock varies based on mode, being 1488MHz for full res, and 1464MHz for binned. HDR mode is 1944MHz, so it might be worth seeing if switching HDR on reduces your interference issue.
Unfortunately HDR mode does not solve the problem. The interference changes from being essentially continuous to now being impulsive (presumably with the frame rate?), but is still very much present and causes as much of an issue as it did previously.
Is there any mechanism for adjusting these frequencies?
A chunk of the register settings in the driver configure the PLLs. In theory you can change them, but I'm afraid the documentation we have from Sony is under NDA, and it's not something that we would anticipate doing.
@dp111 Any thoughts? Worth a quick discussion on Monday.
I should note that putting Type-61 ferrites around each end of the camera cable brings the EMI down to the point that it's not taking out the GPS... but I suspect most users of this camera aren't going to have that kind of thing on-hand like I do.
It would certainly be better if it just didn't emit this in the first place.
I'm not 100% sure it's something within the camera module itself - I still suspect it's related to the data transfer from the camera itself.
@darksidelemm can you try adjusting your framerate to, say, 15fps (66ms duration) to see if/how that changes your interference? You can do this with something like:
Not yet... the hardware I was testing with has been embedded into a balloon payload box so I haven't had the chance to test it.
On that note, I did fly the PiCamera v3 on a balloon launch. With the ferrites it didn't affect the GPS, unfortunately the lens de-focused during the flight due to the cold (certainly out of specification, but still disappointing).
OK, have tried out a few FPS settings (default, 15fps, 1fps). Clearly the duration of the EMI is dependent on how long the data bus is transmitting imagery, but it's still present. I can't say that going to 1fps is a solution here...
Is there any way the CSI clock rate can be adjusted, to see if that shifts the frequency of the EMI around?
You can get the changes by running a sudo rpi-update command. Note, this will update you to the latest kernel and firmware, so please do keep a backup of your critical work on the sdcard if you need to before running this command.
Eventually the changes will filter into apt and our official images - probably a week or two for the former.
@darksidelemm - it's possible, but right now I don't have the resources to do it so will be lower on the priority list. However, can you email info@raspberrypi.com and quote this github issue and perhaps we can look into a quick short-term workaround.
I should note that I've been able to make the Pi Camera HQ usable in my application with a stock RPi Zero camera cable, but using the ferrite sleeves i've mentioned previously (Laird P/N: 28R0898-200), one near each end of the cable. You can see the layout of my high-altitude balloon payload in this image: https://twitter.com/vk5qi/status/1650750546922569733/photo/1
I am using a uBlox 8-series GPS with a patch antenna, with the antenna located approximately 15cm from the camera. The GPS maintains lock outside with a clear view of the sky, but does have issues inside where it would normally gain lock.
Without the ferrites the GPS does not gain lock however, so they seem to be critical to making it work with the current cable.
A belated comment but be aware that the ribbon cable used at high (L1) frequencies is also a transmission line. A transmission line (or practically any cable) will act as an antenna for its full and half EMI wavelengths. The "200 mm" ribbon cable is very close to the L1 wavelength. Ferrite beads will add reactance to the cable but altering the ribbon cable's length (moving it away from the L1 wavelength) should be an effective counter-measure to coupling. Don't shorten the cable to a half wavelength (100 mm in this case). For FCC / EMI /RFI product compliance, I always consider interconnecting cable lengths first and if a given cable length happens to correlate to an interfering wavelength, I will shield and / or add respective ferrite cores at the cable ends.
@RolandasRazma Practically speaking, from @lurch's links above, going to 300 mm will lower the effective coupling frequency. You don't want 100 mm due to it being close to L1's half wavelength. Imagine a full sine cycle (full wave) and a 1/2 sine cycle (half wave). A simple antenna of appropriate length is "tuned" if it's length matches the effective full or half wave length. If the imposing EM wave, internal or external, matches the antenna length then coupling is increased. This is true for reception and transmission. Fortunately GNSS receiver modules typically employ input SAW filters (high Q bandpass filters) to reject out of band and unwanted wavelengths since they have extremely high input sensitivity (140 dB+). This means you don't have to de-tune the antenna very much to reduce interference. RF is part art, part "magic" and I'm no expert. A rule of thumb for cable / antenna length for an effective frequency is: Frequency (in MHz) = c (speed of light or propagation in meters / sec) / l (length in meters). At the speed of light, it takes ~ 1 nanosecond to travel 1 foot. Real cables don't support propagation at the speed of light and may have speeds in the ~ 0.8 - 0.9 c range. Optimized cables can have higher speeds. Further coupling reduction can be achieved via shielding and / or ferrite cores as mentioned in this thread. In the end, you have to test it. Hard to argue with reality.
@naushir Any ideas when the HQ camera will have adjustable frequency as well? Using the camera jams all nearby phones' GPS as well, which is quite problematic.
@naushir Any ideas when the HQ camera will have adjustable frequency as well? Using the camera jams all nearby phones' GPS as well, which is quite problematic.
This is the problem with raising secondary issues under one issue in an issue tracker - the primary issue gets resolved and the issue closed. The secondary issue therefore gets lost.
@03vmate Please consider the 300 or 500 mm camera cables as an option. Cable lengths are discussed above. The 200 mm Standard - Mini Camera Cable normally provided may couple interference in the L1 band. Raspberry Pi states the camera cables are shielded but they really only have a ground plane on one side. This is helpful for transmission lines. My Samsung S21 doesn't have GNSS interference problems with my Pi 5 using a 200 mm camera cable. Not all phones are designed equally of course. Good luck.
@SChancey Used an FFC-HDMI adapter, so I can run fully shielded cable. Covered the camera and phi in copper tape as much as I could, but there was still significant interference. Adjusting the clock, even by just a few MHz would be nice to have, especially that a lot of other sensors support this.
@SChancey Used an FFC-HDMI adapter, so I can run fully shielded cable. Covered the camera and phi in copper tape as much as I could, but there was still significant interference. Adjusting the clock, even by just a few MHz would be nice to have, especially that a lot of other sensors support this.
It might be nice, but it isn't related to this issue which is regarding the v3 camera module.
Activity
darksidelemm commentedon Feb 18, 2023
Just as confirmation of what's going on here, here's some measurements taken with a HackRF showing the RFI around the GPS L1 frequency when the v3 camera has started:
Here's the same measurement, but with a v2 camera:

In both cases, I use the following python commands to start up the camera:
6by9 commentedon Feb 18, 2023
All V4L2 sensor subdev drivers should advertise the CSI-2 link frequency/frequencies used via V4L2_CID_LINK_FREQ. Those are generally configured via device tree too for the case where the driver allows variation of them.
v4l2-ctl -d /dev/v4l-subdev0 --list-ctrls-menushould give you the list, orhttps://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/imx708.c#L38
https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/imx219.c#L48
Those are both relying on the driver developer having calculated or been given the correct numbers based on the register settings, but I believe they are correct for both sensors.
In both cases the external oscillator feeding the camera module is 24MHz, but the PLLs may result in different frequencies internally.
6by9 commentedon Feb 18, 2023
Checking the information I have from Sony, the link frequency is correct as 450MHz for all modes.
The internal pixel clock varies based on mode, being 1488MHz for full res, and 1464MHz for binned. HDR mode is 1944MHz, so it might be worth seeing if switching HDR on reduces your interference issue.
darksidelemm commentedon Feb 18, 2023
OK, I can try this out and see if it moves the EMI somewhere else, however HDR mode loses me the resolution that I'm after.
Is there any mechanism for adjusting these frequencies?
darksidelemm commentedon Feb 19, 2023
Unfortunately HDR mode does not solve the problem. The interference changes from being essentially continuous to now being impulsive (presumably with the frame rate?), but is still very much present and causes as much of an issue as it did previously.
6by9 commentedon Feb 19, 2023
A chunk of the register settings in the driver configure the PLLs. In theory you can change them, but I'm afraid the documentation we have from Sony is under NDA, and it's not something that we would anticipate doing.
@dp111 Any thoughts? Worth a quick discussion on Monday.
darksidelemm commentedon Feb 19, 2023
I should note that putting Type-61 ferrites around each end of the camera cable brings the EMI down to the point that it's not taking out the GPS... but I suspect most users of this camera aren't going to have that kind of thing on-hand like I do.
It would certainly be better if it just didn't emit this in the first place.
I'm not 100% sure it's something within the camera module itself - I still suspect it's related to the data transfer from the camera itself.
naushir commentedon Feb 19, 2023
@darksidelemm can you try adjusting your framerate to, say, 15fps (66ms duration) to see if/how that changes your interference? You can do this with something like:
lurch commentedon Feb 19, 2023
This reminds me of https://www.stuffaboutcode.com/2014/01/raspberry-pi-gps-helmet-cam.html where the solution was to wrap the CSI-cable in tinfoil 😃
naushir commentedon Mar 1, 2023
@darksidelemm did you have a chance to look at the results with reduced framerates?
darksidelemm commentedon Mar 1, 2023
Not yet... the hardware I was testing with has been embedded into a balloon payload box so I haven't had the chance to test it.
On that note, I did fly the PiCamera v3 on a balloon launch. With the ferrites it didn't affect the GPS, unfortunately the lens de-focused during the flight due to the cold (certainly out of specification, but still disappointing).
I'll try and get to this this weekend.
darksidelemm commentedon Mar 2, 2023
OK, have tried out a few FPS settings (default, 15fps, 1fps). Clearly the duration of the EMI is dependent on how long the data bus is transmitting imagery, but it's still present. I can't say that going to 1fps is a solution here...
Is there any way the CSI clock rate can be adjusted, to see if that shifts the frequency of the EMI around?
Screenshots of results:



naushir commentedon Mar 2, 2023
There is no way at present to do this. We will have to talk with the Sony sensors team to discuss if/how this would be possible.
darksidelemm commentedon Mar 2, 2023
OK, thanks for that. Please do, as I expect this is going to affect more than just me...
aallan commentedon Mar 2, 2023
I've added a
[NOTE]block in the camera documentation pointing at this issue in case others stumble across it.35 remaining items
naushir commentedon Apr 5, 2023
You can get the changes by running a
sudo rpi-updatecommand. Note, this will update you to the latest kernel and firmware, so please do keep a backup of your critical work on the sdcard if you need to before running this command.Eventually the changes will filter into apt and our official images - probably a week or two for the former.
darksidelemm commentedon Apr 24, 2023
It's worth noting that the PiCamera HQ appears to have exactly the same EMI issue as the Pi Camera 3, with strong EMI present on 1575 MHz.
Are there similar settings changes available for the HQ camera to shift the clock rates around?
naushir commentedon Apr 24, 2023
@darksidelemm - it's possible, but right now I don't have the resources to do it so will be lower on the priority list. However, can you email info@raspberrypi.com and quote this github issue and perhaps we can look into a quick short-term workaround.
athtest800 commentedon Apr 30, 2023
Is it possible to also fix the same problem for Camera HQ (imx477 overlay)?
I have serious problems while using this camera and GPS.
darksidelemm commentedon Apr 30, 2023
I should note that I've been able to make the Pi Camera HQ usable in my application with a stock RPi Zero camera cable, but using the ferrite sleeves i've mentioned previously (Laird P/N: 28R0898-200), one near each end of the cable. You can see the layout of my high-altitude balloon payload in this image: https://twitter.com/vk5qi/status/1650750546922569733/photo/1
I am using a uBlox 8-series GPS with a patch antenna, with the antenna located approximately 15cm from the camera. The GPS maintains lock outside with a clear view of the sky, but does have issues inside where it would normally gain lock.
Without the ferrites the GPS does not gain lock however, so they seem to be critical to making it work with the current cable.
SChancey commentedon Feb 1, 2024
A belated comment but be aware that the ribbon cable used at high (L1) frequencies is also a transmission line. A transmission line (or practically any cable) will act as an antenna for its full and half EMI wavelengths. The "200 mm" ribbon cable is very close to the L1 wavelength. Ferrite beads will add reactance to the cable but altering the ribbon cable's length (moving it away from the L1 wavelength) should be an effective counter-measure to coupling. Don't shorten the cable to a half wavelength (100 mm in this case). For FCC / EMI /RFI product compliance, I always consider interconnecting cable lengths first and if a given cable length happens to correlate to an interfering wavelength, I will shield and / or add respective ferrite cores at the cable ends.
RolandasRazma commentedon Feb 1, 2024
@SChancey very interesting, could you elaborate please? How to select correct lengths? You mentioning not to shorten it to 100mm, why is that?
lurch commentedon Feb 2, 2024
Luckily, our cables are available in a range of lengths! 😅
https://www.raspberrypi.com/products/camera-and-display-cable/
https://www.raspberrypi.com/products/camera-cable/
SChancey commentedon Feb 2, 2024
@RolandasRazma Practically speaking, from @lurch's links above, going to 300 mm will lower the effective coupling frequency. You don't want 100 mm due to it being close to L1's half wavelength. Imagine a full sine cycle (full wave) and a 1/2 sine cycle (half wave). A simple antenna of appropriate length is "tuned" if it's length matches the effective full or half wave length. If the imposing EM wave, internal or external, matches the antenna length then coupling is increased. This is true for reception and transmission. Fortunately GNSS receiver modules typically employ input SAW filters (high Q bandpass filters) to reject out of band and unwanted wavelengths since they have extremely high input sensitivity (140 dB+). This means you don't have to de-tune the antenna very much to reduce interference. RF is part art, part "magic" and I'm no expert. A rule of thumb for cable / antenna length for an effective frequency is: Frequency (in MHz) = c (speed of light or propagation in meters / sec) / l (length in meters). At the speed of light, it takes ~ 1 nanosecond to travel 1 foot. Real cables don't support propagation at the speed of light and may have speeds in the ~ 0.8 - 0.9 c range. Optimized cables can have higher speeds. Further coupling reduction can be achieved via shielding and / or ferrite cores as mentioned in this thread. In the end, you have to test it. Hard to argue with reality.
RolandasRazma commentedon Feb 2, 2024
@SChancey thanks for elaborating, make sense
03vmate commentedon Mar 2, 2024
@naushir Any ideas when the HQ camera will have adjustable frequency as well? Using the camera jams all nearby phones' GPS as well, which is quite problematic.
6by9 commentedon Mar 3, 2024
This is the problem with raising secondary issues under one issue in an issue tracker - the primary issue gets resolved and the issue closed. The secondary issue therefore gets lost.
I've raised raspberrypi/linux#6004 to track it.
SChancey commentedon Mar 3, 2024
@03vmate Please consider the 300 or 500 mm camera cables as an option. Cable lengths are discussed above. The 200 mm Standard - Mini Camera Cable normally provided may couple interference in the L1 band. Raspberry Pi states the camera cables are shielded but they really only have a ground plane on one side. This is helpful for transmission lines. My Samsung S21 doesn't have GNSS interference problems with my Pi 5 using a 200 mm camera cable. Not all phones are designed equally of course. Good luck.
03vmate commentedon Mar 3, 2024
@SChancey Used an FFC-HDMI adapter, so I can run fully shielded cable. Covered the camera and phi in copper tape as much as I could, but there was still significant interference. Adjusting the clock, even by just a few MHz would be nice to have, especially that a lot of other sensors support this.
6by9 commentedon Mar 4, 2024
It might be nice, but it isn't related to this issue which is regarding the v3 camera module.