I have a custom data logger attached to a sensor being powered by a solar panel(charge controller and battery). I have a problem where I'm getting 10 milliVolt one sided spikes in my ADC readings as seen in the picture below.

I only encounter this problem when my logger is powered by the charge controller and only when the solar panel is plugged into the charge controller at the same time. (When it is only a battery and the charge controller, or when I'm running my system off of wall power and an adapter this problem doesn't occur.)

I have tried adding an off the shelf input filter as well as a low pass with big capacitors on the power input of the data logger to try and solve this since it seems to be an input power issue but it seems to have no effect whatsoever. These spikes are prevalent on all my ADC channels as well, so its not just the sensor.

Does anyone have any idea as to how I might go about reducing these spikes?

enter image description here

  • \$\begingroup\$ What are you measuring? I'm asking because the readings show 0-0.2, so I'm thinking it's not voltage, maybe current? Or power? Or...? \$\endgroup\$ Commented Sep 11, 2018 at 18:24
  • \$\begingroup\$ I'm measuring acceleration. The readings on the graph are the sensor voltage converted to m/s^2 by multiplying it by a factor of 14.1. \$\endgroup\$
    – ecehax
    Commented Sep 11, 2018 at 18:31
  • \$\begingroup\$ does the ground to the sensor also come from the same place? \$\endgroup\$
    – PkP
    Commented Sep 11, 2018 at 20:06
  • \$\begingroup\$ Yeah, my data recorder's ground isnt isolated from input ground. \$\endgroup\$
    – ecehax
    Commented Sep 11, 2018 at 20:12
  • \$\begingroup\$ What is the full scale value of the ADC? How many bits of resolution does it have? What are the units of the y axis in your graph...volts? \$\endgroup\$ Commented Sep 11, 2018 at 20:13

2 Answers 2


Since your charge controller is probably doing bursts of current into the battery you are getting large voltage changes across the battery (may be greater than a volt).
If the switching regulator you are using as the power supply for your MCU has insufficient power supply rejection ratio, then you will get variations in your power supply to the MCU.

You may also be using the MCU power supply to provide your A/D reference voltage (you don't say in the question) and this will produce noise on your conversions.

You should:

  1. Use a shunt regulator to provide your A/D reference. Something like a tL430 series shunt would work well. Run your MCU at say 5.2V and the shunt regulator to produce the A/D reference.
  2. Use a LDO linear regulator for the final stage of the power supply. For example use a switching regulator to go from 12V to 6V then an LDO to go from 6V to 5V.
  • \$\begingroup\$ I'm monitoring my battery voltage and during the brunt of the spike it peaks at 20 volts from 19.8. \$\endgroup\$
    – ecehax
    Commented Sep 11, 2018 at 18:44
  • \$\begingroup\$ @ecehax ….that is a lot. \$\endgroup\$ Commented Sep 11, 2018 at 18:48
  • \$\begingroup\$ My adc reference is a MAX6070. I dont think its a shunt. I have a 5 volt switching regulator going into my MCU(which is a beaglebone black). I believe that it has onboard LDOs(3.3 volt). I'm using it's power lines(it has vcc and v_adc lines) after that to power my adc and reference. \$\endgroup\$
    – ecehax
    Commented Sep 11, 2018 at 18:51
  • \$\begingroup\$ @ecehax Then I'd suggest #2 is your best bet. the MAX6070 is not shunt reference (at least not the output buffer) and it may be that your ripple is getting in via the ground and not from the supply. It does seem you know it's power supply problems since battery or separated supplies don't have the problem, so you need to look at both supply and ground conditions. \$\endgroup\$ Commented Sep 11, 2018 at 21:09

Is Conducted or Radiated?

The most common problem is poor common mode rejection of high V=LdI/dt pulses induced in nearby cables. Due to imbalanced cables and impedances for signal and ground, the induce CM noise is coupled equally in current but creates a differential voltage. Ground shift spikes are also common.

Common fixes are;

STP cables, careful ground selection that is not shifted with dI/dt from resistance or inductive lines, CM chokes , aka balun coils, like those used in telephony with very high balanced inductance to raise and Balance each line impedance asa differential pair, Instrument Amp differential input, cap feedthru lines with capacitance to ground, right angle cable orientation, better ground connections and supply decoupling and earth bonding to bypass ground noise to earth.

A layout of interference spectrum for conducted and radiated noise is needed.

Best bet:

Earth ground ADC logger, then apply all the others, as req’d. A good test engineer can find the noise source with A-B diff. 10:1 calibrated probes and an open then short circuit loop for radiated noise.


I once had to monitor low shunt current voltages for a 100kA zirc-steel diffusion bonder ( massive water cooled welder) for a circular tube welding for nuke reactors. The sensed cable type and orientation were critical.

  • \$\begingroup\$ @ Tony EE 100kA diffusion bonder....I bow my head in admiration of the fun you have had. "The sensed cable type and orientation were critical". Was the welding with DC? or with pulses? And if pulses, what was the risetime --- amps/second? Using Vinduce = 2e-7 * Area/Distance * di/dT, a sensor loop of 1cm by 100cm, 1 meter away, with 60Hz welding current at 100kA, produces 2e-7 * 1cm/meter * (100,000 * 377) = 0.07 volts in your sensor wiring. \$\endgroup\$ Commented Sep 12, 2018 at 4:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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