Hi,
I'm using a Feather nRF52840 Express with several analog sensors. I've noticed that even without initializing BLE and turning off all but one sensor attached to the Feather, I see a 4Hz sine wave on my analog signal. I am thinking that either part of the power or timer system on the nRF itself may be the culprit. I have disabled the connection LED which was running at 250ms intervals but the noise still persists. Does anyone have a suggestion as to where to start looking in the nRF or Bluefruit source code to spot the issue?
Thanks!
Matt
4Hz Noise from Feather?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 4Hz Noise from Feather?
Hrm.. never heard of that before.
What's the amplitude of the sine wave?
What's the amplitude of the sine wave?
- stantheman286
- Posts: 12
- Joined: Fri Sep 07, 2012 9:56 pm
Re: 4Hz Noise from Feather?
Hi Mike,
I can try and translate the sensor readings into a voltage amplitude, but the best way I've been able to display it is with a low frequency FFT (1-50Hz). Here's our device using the Feather normally (using BLE and transmitting data to an app):
I generally have noticed issues around 4Hz and its harmonics, but you can see there are several other frequencies that are pretty high (we'd like to be in the 2-3dB range for most).
Turning BLE off greatly reduced the noise, but that's not much use haha. I noticed that switching the nRF softdevice to use the RC oscillator while leaving the main Nordic chip on the LFXO seemed to help quite a bit. Here's that FFT:
I posted on Nordic's site as well:
https://devzone.nordicsemi.com/f/nordic ... 460#320460
Let me know your thoughts, perhaps there's some additional tweaks we can do?
Best,
Matt
I can try and translate the sensor readings into a voltage amplitude, but the best way I've been able to display it is with a low frequency FFT (1-50Hz). Here's our device using the Feather normally (using BLE and transmitting data to an app):
I generally have noticed issues around 4Hz and its harmonics, but you can see there are several other frequencies that are pretty high (we'd like to be in the 2-3dB range for most).
Turning BLE off greatly reduced the noise, but that's not much use haha. I noticed that switching the nRF softdevice to use the RC oscillator while leaving the main Nordic chip on the LFXO seemed to help quite a bit. Here's that FFT:
I posted on Nordic's site as well:
https://devzone.nordicsemi.com/f/nordic ... 460#320460
Let me know your thoughts, perhaps there's some additional tweaks we can do?
Best,
Matt
- stantheman286
- Posts: 12
- Joined: Fri Sep 07, 2012 9:56 pm
Re: 4Hz Noise from Feather?
Hi Mike,
One follow-up quesiton, we are using the Adafruit nRF52 0.20.1 BSP. Is there a benefit from a power management or noise perspect to upgrade to one of the newer releases? I checked the release notes, but didn't see anything in particular related to our issues.
Best
Matt
One follow-up quesiton, we are using the Adafruit nRF52 0.20.1 BSP. Is there a benefit from a power management or noise perspect to upgrade to one of the newer releases? I checked the release notes, but didn't see anything in particular related to our issues.
Best
Matt
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 4Hz Noise from Feather?
We haven't seen any issues with noise ourselves, so we haven't tuned or optimized for it.
The harmonics above look like you may be getting an RC charge/discharge curve. Those are easy to mistake for a sine wave, especially at low amplitude. The additional noise across all bands looks like what I'd call 1/f noise, which is fundamental and really hard to get rid of.
There are only three possible ways for the noise to enter your signal though: resistive coupling, capactive coupling, or inductive coupling. Capacitive and inductive coupling are usually high-frequency problems, so my first guess is that this is resistive.
As a baseline, what's the resolution of your signal and your 0db level.. am I looking at 10db-ish of microvolts or volts?
The harmonics above look like you may be getting an RC charge/discharge curve. Those are easy to mistake for a sine wave, especially at low amplitude. The additional noise across all bands looks like what I'd call 1/f noise, which is fundamental and really hard to get rid of.
There are only three possible ways for the noise to enter your signal though: resistive coupling, capactive coupling, or inductive coupling. Capacitive and inductive coupling are usually high-frequency problems, so my first guess is that this is resistive.
As a baseline, what's the resolution of your signal and your 0db level.. am I looking at 10db-ish of microvolts or volts?
- stantheman286
- Posts: 12
- Joined: Fri Sep 07, 2012 9:56 pm
Re: 4Hz Noise from Feather?
Hi Mike,
Yea I figured it'd be really hard to get rid of a portion of this noise but we're trying our best. You're looking at 0-15dB of raw PPG data which is a 18-bit ADC value (0-262144). I uploaded a sample image of the raw data before the FFT is taken.
Best,
Matt
Yea I figured it'd be really hard to get rid of a portion of this noise but we're trying our best. You're looking at 0-15dB of raw PPG data which is a 18-bit ADC value (0-262144). I uploaded a sample image of the raw data before the FFT is taken.
Best,
Matt
- Attachments
-
- raw ppg.png (66.48 KiB) Viewed 102 times
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 4Hz Noise from Feather?
Hmm.. normally I’d call the little hiccups at the low edge inductive ringing, but Earth isn’t big enough for a wire that rings at 4Hz. 60Hz power line noise has a wavelength of 5e6 kilometers (‘bout 20% longer than than the distance from the Earth to the moon).
That means we’re probably looking at two different signals getting mixed together.
Can you post a photo showing your hardware and connections? The most common source of resistive coupling is some amount of shared resistance in two or more current loops, with the VCC and GND rails being the first suspects. For low-noise work, you want to use a star topology for all power connections: every circuit gets its own VCC and GND wires, and the current loops should only meet at the terminals of the power supply.
It’s also normal to have separate analog and digital power nodes.. basically adding inductor-capacitor filters between the analog and digital sections.
The idea is to deliberately modulate the input with a square wave before amplifying it, then demodulating the amplified output by subtracting the amplified square wave. There are several ways to do it, but this is a simple one:
When the square wave is low, the switches connect the input of C1 and the output of C2 to the current output. That’s the calibration phase. When the square wave is high, the switches connect the input side of C1 to input and the output side of C2 to integrating capacitor Cint.
The voltage at C1’s input changes by the difference between the input and the current output. The voltage at C2’s output changes by an amount proportional to the change at C1, increasing or decreasing the voltage across Cint. Any DC offset through A1 gets cancelled by connecting C1 and C2 to the same voltage during the calibration phase. Any DC offset between the input and output of A2 gets cancelled by connecting the output side of C2 to A2’s output during the calibration phase.
A1 usually has gain of about 1000, and Cint is the same amount bigger than C2. The end result is that amplifiers with a few millivolts of offset error can produce a signal with only a few microvolts of error, and almost no drift over time. Any noise on the input or in the amplifiers gets averaged out in the capacitors, so choppers have essentially zero 1/f noise.
Every precision and low-drift op amp contains some variation of that circuit.
The chopping process also works as a narrow-band filter: if you match the frequency of the square wave that controls the switches to a frequency that’s causing problems, the capacitors will sample the unwanted frequency at the same position every cycle. The AC input turns into a small DC offset (the average voltage of the unwanted wave over that interval) in the output signal.
That means we’re probably looking at two different signals getting mixed together.
Can you post a photo showing your hardware and connections? The most common source of resistive coupling is some amount of shared resistance in two or more current loops, with the VCC and GND rails being the first suspects. For low-noise work, you want to use a star topology for all power connections: every circuit gets its own VCC and GND wires, and the current loops should only meet at the terminals of the power supply.
It’s also normal to have separate analog and digital power nodes.. basically adding inductor-capacitor filters between the analog and digital sections.
There’s a well-known and good way of elimiating low-frequency noise if your application can tolerate it: chopping.stantheman286 wrote:Yea I figured it'd be really hard to get rid of a portion of this noise but we're trying our best.
The idea is to deliberately modulate the input with a square wave before amplifying it, then demodulating the amplified output by subtracting the amplified square wave. There are several ways to do it, but this is a simple one:
When the square wave is low, the switches connect the input of C1 and the output of C2 to the current output. That’s the calibration phase. When the square wave is high, the switches connect the input side of C1 to input and the output side of C2 to integrating capacitor Cint.
The voltage at C1’s input changes by the difference between the input and the current output. The voltage at C2’s output changes by an amount proportional to the change at C1, increasing or decreasing the voltage across Cint. Any DC offset through A1 gets cancelled by connecting C1 and C2 to the same voltage during the calibration phase. Any DC offset between the input and output of A2 gets cancelled by connecting the output side of C2 to A2’s output during the calibration phase.
A1 usually has gain of about 1000, and Cint is the same amount bigger than C2. The end result is that amplifiers with a few millivolts of offset error can produce a signal with only a few microvolts of error, and almost no drift over time. Any noise on the input or in the amplifiers gets averaged out in the capacitors, so choppers have essentially zero 1/f noise.
Every precision and low-drift op amp contains some variation of that circuit.
The chopping process also works as a narrow-band filter: if you match the frequency of the square wave that controls the switches to a frequency that’s causing problems, the capacitors will sample the unwanted frequency at the same position every cycle. The AC input turns into a small DC offset (the average voltage of the unwanted wave over that interval) in the output signal.
Please be positive and constructive with your questions and comments.