3
\$\begingroup\$

I'm working on a hobby Arduino project to create an audio visualizer using an LED strip. I'm using the MSGEQ7 to separate the signal into 7 bands, then send it to a Wemos D1 Mini. I started by constructing the following schematic based on the typical application diagram as found on the last page of the MSGEQ7 datasheet here

Basic MSGEQ7 Schematic

Assembled on a breadboard, it works as expected with a few noise spikes here and there that can probably be filtered out on the software side. Where do these voltage spikes come from? Originally, I wanted to forego the DC jack and power the MSGEQ7 from the 5V pin on the Wemos (with the Wemos powered via USB), however, if I remember correctly, powering it via a DC jack/12V wall-wart + 7805 5V regulator resulted in less of these voltage spikes.

I want to protect the A0 input that's rated at 3.3V max, and research online has led me to what I believe is called a Zener clipper pictured below.

3.3V Zener Clipping Schematic

Should I protect the analog input or does this seem like over engineering? How do I decide on the value of R1?

Here's the final schematic after working in the clipper.

enter image description here

The frequency of the noise spikes increased a bit after adding this clipper (I arbitrarily used a 56 ohm resistor for R1), it still seems like it could be filtered out software side, but am I somehow able to reduce these spikes by redesigning the circuit?

\$\endgroup\$
2
  • \$\begingroup\$ I'd add some bulk capacitance on the 7805 input. Currently there's nothing there to handle the inductance of the potentially long power cable. 100nF on the 7805 output close to the 7805 itself. Breadboard itself is far from ideal and might also be causing some of these issues. \$\endgroup\$ Commented Dec 31, 2018 at 11:40
  • \$\begingroup\$ Thanks for the recommendation @Unimportant. I added two 0.1uF ceramic capacitors to the input and output of the 7805 similar to C1 and C2 pictured here but it actually made the noise worse. I also tried adding just C1, just C2, and then both and they seemed equally bad. \$\endgroup\$
    – oats
    Commented Dec 31, 2018 at 21:13

1 Answer 1

1
\$\begingroup\$

Using an input/output capacitor with a linear regulator is good practice (Capacitor Sizes for 7805 Regulator). You can check the datasheet to make sure there aren't stability issues with capacitors with low ESR or high capacitance values (Choosing capacitors for a linear voltage regulator).

Filtering for noise is a whole discussion that would require more information about what you are seeing and how you are measuring the noise. You want to make sure you know if the noise is "real" or not. Common mode rejection and the ground clip lead loop are common sources of false noise.

Instead of using a zener to clip the voltage, you could employ a voltage divider that scales the output from 0-5V to 0-3.3V instead (137kohm & 267kohm: http://www.ti.com/download/kbase/volt/volt_div3.htm).

The optional buffer opamp reduces the loading on the divider and makes the measurement more accurate.

\$\endgroup\$
3
  • \$\begingroup\$ thanks, I'll try the voltage divider route. I'm measuring the spikes by printing the result of analogRead() for A0. I followed some example code to quickly switch between the 7 bands on the multiplexed output of the MSGEQ7, but I didn't think to just leave the band selection on the one that I'm interested in. I'll give that a shot too and see if it's any different. What is "false noise"? These spikes are getting read by the arduino so they seem very real. \$\endgroup\$
    – oats
    Commented Dec 31, 2018 at 22:45
  • \$\begingroup\$ @oats make sure you are waiting min 36usec to read after you switch channels since that is the min settling time \$\endgroup\$
    – Young
    Commented Dec 31, 2018 at 22:47
  • 1
    \$\begingroup\$ yup! I'm following this code as an example \$\endgroup\$
    – oats
    Commented Dec 31, 2018 at 22:48

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.