With TMRPCM to play WAV files. I also have a police siren for RC car (works like a servo):
Problem is when siren is on and blinking it causes a lot of noise in my speaker. I tried a couple RC filters with different R & C values, I could mitigate the problem but not eliminate it. Can you please advise on how to make a proper filter.
Sorry I’m on the phone I can’t send any schematics but I’ll try to describe my circuit:
Arduino Micro
Siren has 3 pins: VCC, GND and signal (pin 12).
Amp has 3 pins: VCC, GND and input (pin 9).
All VCC connected to Arduino’s +5V pin.
Think about where the current supplying power/ground to the logic devices runs - it any of that shares a wire
with the currents to the audio components you can be directly injecting noise into the audio path, unless
that wire and its connections are massive and have vanishingly low resistance. Wires are low value resistors,
and resistors turn current noise into voltage noise...
Usually the best scheme is separate voltage regulators for analog and digital parts, and many DAC and ADC
chips have entirely separate power and ground pins for analog and digital. Learn about star-grounding.
Failing that good RC supply filtering can help, but start at 220uF and go up - low audio frequencies require
large capacitance values. 22 ohm and 4,700uF is likely to make a huge difference in most cases, but you
can only afford 22 ohms in line with the supply for low power circuitry, not a power amp.
Please note I won't make any PCB. I'm soldering a perfboard just like showed in the breadboard view above. Blue wires are jumpers on top of the board and copper wires are soldered tracks below it.
So as far as I understand MarkT's it would suffice to break VCC (most left pin) and GND (most right pin) from audio amp (4 pins in the top of the board) and connect it directly to power input (2 pins below arduino).
Is that correct ?
Please note power source is a regulated 5.2V or 6V so it wouldn't be a problem for the amp.
And you can't put 5.2V or 6V into Vin and expect the Arduino regulator to generate a proper 5V, BTW, as
the regulator has 1.5V or so of dropout (this may depend on the exact board you have though).
MarkT:
And you can't put 5.2V or 6V into Vin and expect the Arduino regulator to generate a proper 5V, BTW, as
the regulator has 1.5V or so of dropout (this may depend on the exact board you have though).
Can I put 5,2V in 5V pin and feed everything from there ?