3
\$\begingroup\$

I am using the NRF52832 and code it with arduino. I am reading A0 to get a signal from a sensor at 1m cable length.

schematic

simulate this circuit – Schematic created using CircuitLab

If I disconnect the sensor from the board, the analog input drop to zero. (Of course, the pull down is doing its job)

But once I connect the sensor, in the console, the analog input read 0,0,0,0,0 then 192 and come back to 0,0,0,0... (arduino analog signal goes from 0 to 1025)

What I have tried so far:

  • Add a 1pF capacitor in parallel of R1.. but not luck, it doesn't cancel the noise.
  • Change R1 value to 10kohm resistor but it appear to increase the noise
  • Adding a ferrite bead to the sensor cable (doesn't change anything)

I also tried this amplifier :

enter image description here

How can I avoid this noise ?

\$\endgroup\$
  • \$\begingroup\$ Did you place the amplifier near the piezo or near the ADC? \$\endgroup\$ – Edgar Brown Feb 16 at 21:35
  • \$\begingroup\$ on the sensor (neat the piezo) \$\endgroup\$ – Christophe Gudlake Feb 16 at 21:36
  • 1
    \$\begingroup\$ use a battery to power the mcu. \$\endgroup\$ – analogsystemsrf Feb 17 at 1:59
  • 1
    \$\begingroup\$ what your amplifier does right is bias the gate of the mosfet positively; what it neglects that actually, the source impedance of the mic is in the same order of magnitude as the biasing resistor - so, you'll not get much amplification out of this. For reasons of simplicity, I'd go and: · do a midpoint voltage divider with two 10 MΩ to bias your voltage around 2.5V · use a low input current opamp to buffer the signal. Less worrying about the operational points of your MOSFET, more output = input · amplification. \$\endgroup\$ – Marcus Müller Feb 17 at 8:18
  • 1
    \$\begingroup\$ I changed the power supply from USB(coming from my PC) to a battery.. magically, no more noise inducted into the piezo signal. Since the vcc cable was near the piezo signal.. it inducted noise into it. I ordered a scope yesterday.. I was tired to do blind debugging. I will come back with further explanation soon. Thanks to @analogsystemsrf for this awesome and simple suggestion. \$\endgroup\$ – Christophe Gudlake Feb 17 at 16:44
2
\$\begingroup\$

Your piezo has an extremely high source impedance; what you need to do is use an amplifier as a buffer, close to the sensor, to increase the drive strength. No way your piezo can drive a whole meter of line; you'll be mostly seeing noise.

Capacitively loading the piezo is the opposite of helpful.

\$\endgroup\$
  • \$\begingroup\$ I edited my post with the amplifier I also tried.. still get the noise. \$\endgroup\$ – Christophe Gudlake Feb 16 at 20:07
2
\$\begingroup\$

In order to amplify sensitive, high-impedance sources, you could do the following:

schematic

simulate this circuit – Schematic created using CircuitLab

Idea is:

  1. make sure the biasing of the piezo output doesn't load the piezo too badly
  2. use a high-input-impedance opamp configuration to amplify and more importantly buffer the signal
  3. use a local supply with a modern LDO to minimize noise that gets coupled into the supply line of your cable
  4. use a termination resistor in the order of source impedance (i.e. output impedance of your opamp) to make sure energy is actually sunk into your MCU end, and to load the virtual noise current source.
  5. Use microphone cable, which is a shielded thing – it even exists with two cores (one for 5V, one for your signal, GND on the shielding).

If you don't need gain, you can omit the R4-R5(C4) virtual ground, and R3-R6, and just replace it with a straight Vout->V⁻ loopback, giving you a unity-gain voltage buffer.

The current I in the above schematic is the sum of the current needed to create the two virtual grounds (R1-R2 and R4-R5; the latter clearly dominates), as well as the supply current of the opamp, which itself is dominated by the current it sinks into Rterm.

So, rough calculation, it's 3.5 mA for the biasing and less than 3.3 mA that can be sunk into Rterm, so about 7mA in total.

That means that you could add 100 Ω in series with U1's input, should you need more supply voltage noise reduction. The resulting voltage drop would still allow U1 to stabilize its output.

The question whether TLV07 is an appropriate opamp is hard to answer. Generally, an opamp with a lower output impedance would be desirable, but that usually comes at the cost of lower input impedance or higher noise. However, using a stronger driving opamp would allow you to reduce Rterm, e.g. to 50Ω, and that would greatly improve noise immunity. It's all a trade-off.

\$\endgroup\$
  • \$\begingroup\$ It's an awesome suggestion, I will need some time to design the sensor board and try it. \$\endgroup\$ – Christophe Gudlake Feb 17 at 16:51
1
\$\begingroup\$

It sounds like EMC. If you have two separate wires of one meter long, try to twist them, this will greatly reduce the noise.

Turn off the LED light or move away from other switching electronics (computers, screens, adapters, etc.)

\$\endgroup\$
  • \$\begingroup\$ I twisted the ground signal around the piezo signal, made sure I was at a great distance from any other switching around the cable. doesn't change the problem persist. But thanks it was a really good idea! \$\endgroup\$ – Christophe Gudlake Feb 16 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.