2
\$\begingroup\$

I am using the ACS709 current sensor together with an Arduino board to measure the charge/discharge current of a large battery connected to an UPS.

I noticed a strange noise pattern in my DC measurements, which seems to be 50 Hz. I guess it must be the UPSs inverter, which draws power in such a way.

My goal is to get rid of that pattern and get reading similar to what my multimeter can measure.

I have read both the documentation for ACS709 and the FAQ on their website, but being a complete newbie in electronics I have a number of questions:

I understand that I probably need to add a capacitor to the FILTER pin of ACS709, but I am not sure which capacitor should I choose.

In the FAQ they provide a formula and an example table for different capacitances, which reduce bandwidth.

What is "bandwidth" in this case? The amount of measurements per second?

I only want to measure the mean current flowing at most once per second.

Which capacitor should I choose?

--- Follow up ---

I found this equation for a low-pass RC filter:

$$ f_c = \frac{1}{2\pi RC} $$

Solving for C gives:

$$ C = \frac{1}{2\pi Rf_c} $$

According to the docs the ACS709 already has a built in resistor of 1700 Ohms. Choosing the frequency = 0.5 Hz gives me:C = 0.1872 mF

Is that a correct calculation? The result seems large. In the docs all examples are in the nF range.

I want to choose mono-polar electrolytic capacitors, because the ACS709 output should have polarity in only one direction. Is that the correct choice?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ If it is not too late, you may want to add a multi-stage external filter to the signal between the output of the ACS chip and your ADC. In other words, if your board layout is not done yet. If it is done, then see what you can accomplish following Brian's answer. \$\endgroup\$
    – user57037
    Commented Mar 1, 2017 at 7:36
  • \$\begingroup\$ Its not done yet. It is in a "breadboard" state. \$\endgroup\$
    – Eiver
    Commented Mar 2, 2017 at 11:12
  • \$\begingroup\$ In the doc examples, were the bandwidths proportionally larger? \$\endgroup\$
    – user16324
    Commented Mar 2, 2017 at 12:03
  • \$\begingroup\$ Yes, they were, so the calculation seems to be correct. I was just surprised how large these caps are, even if I use several smaller ones. \$\endgroup\$
    – Eiver
    Commented Mar 2, 2017 at 12:57
  • 1
    \$\begingroup\$ If I wanted to filter it down to 0.5 Hz, I would use a two stage RC followed by an op-amp buffer. 33k, 10 uF, followed by 330k and 1uF, then op-amp with gain of 1. The op-amp will probably be cheaper than the 220uF cap you are going to need. Op-amp needs to have very low input leakage and high DC input impedance. \$\endgroup\$
    – user57037
    Commented Mar 2, 2017 at 17:19

2 Answers 2

2
\$\begingroup\$

You're thinking along the right lines but you obviously have no experience with mixed analog/digital systems. "amount of measurements per second" has a name : sample rate.

And there is a very well known relationship between analog bandwidth and sample rate called the Shannon (or Nyquist) Sampling Theorem. Searching "sample rate vs bandwidth" should set you on the right path to finding much more information should you need it.

Choose a sample rate - you already have.

Choose a suitable bandwidth to match that sample rate.
I'd keep it simple and choose 0.5Hz for 1 sample/second, giving a sample rate exactly twice the bandwidth.

Choose a capacitor to give that bandwidth.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. Your answer pointed me in the right direction. I did the calculation and updated the question to be more specific. \$\endgroup\$
    – Eiver
    Commented Mar 2, 2017 at 11:58
1
\$\begingroup\$

Your calculation of \$ C = 187\,\mu F \$ is correct. This values is very large compared to given examples, because of the very very low bandwidth of \$ 0.5\,Hz\$. Remember the ACS709 is designed for a bandwidth up to \$120\,kHz\$. You should perhaps think about using the largest cap with is specified in datasheet (\$1\,\mu F \$) and add a further low-pass filter.

Anyway you should use ceramic capacitors instead of electrolyte caps. These are more suitable for filter application.

\$\endgroup\$
2
  • \$\begingroup\$ If I were to build a custom filter, could I use a much bigger resistor (say 10 or even 100 times larger) in order for the cap to be smaller? \$\endgroup\$
    – Eiver
    Commented Mar 2, 2017 at 12:50
  • \$\begingroup\$ @Eiver, yes. See my comment above. \$\endgroup\$
    – user57037
    Commented Mar 2, 2017 at 17:20

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.