Powering Arduino and Effect Circuit From Same Supply

Started by pblw, September 24, 2016, 06:46:10 PM

Previous topic - Next topic

pblw

I was hoping someone could give me some advice. I am using an Arduino as a kind of LFO to control a pot in a simple effects circuit and am having some trouble with noise. If I power the Arduino from the USB of my laptop everything is fine but if I try to power it from the battery (via a L7805 regulator) along with the circuit I get a kind of low pitched whirling sound. I am currently trying a TMR 1-0511 DC-DC converter (hooked up as shown in the data sheet http://docs-europe.electrocomponents.com/webdocs/1216/0900766b8121689f.pdf via an inductor in series with the power in, a capacitor across the input terminals and a 220Pf capacitor linking the grounds) but am still getting the noise. I thought that being as TMR is isolated I would essentially have the same situation as with the laptop power. There are plenty of pedals that use 5v digital chips alongside  conventional analog circuits so I guess it is possible. What am I doing wrong? I have spent a fair amount of time googling for a solution and checked the forum, but I can't really find any info. Any help would be gratefully received.

karbomusic

#1
Most Arduinos can operate off of 9VDC due to the LM1117 regulator that is already onboard - I believe the VCC input goes through it but you might double check to make sure which power pin hits the regulator. I've done it on several occasions.

GiovannyS10

I am not sure about the kind of the noise you are having. Is a continuous buzz or only appear on the treble frequencies are exposed? By your definition, seems you are having too much power on your regulator, but is hard to say without see/listen the circuit and my bad English turn the things worse.
That's all, Folks!

"Are you on drugs?"
-ARSE, Duck.

www.instagram.com/allecto

amptramp

The spec sheet for your converter shows a 220 KHz switching frequency but it also says Pulse Frequency Modulation (PFM), meaning the frequency goes all over the place.  There is a possibility that the Arduino frequency and the converter frequency are beating and creating sum and difference frequencies that are in the audio band.  If the low-pitch whirling sound is varying at the same frequency as the LFO, you are getting some feedthrough of the current taken by the Arduino to generate the numbers that are used in the VFO.

Is your C1 an X7R ceramic or an electrolytic?  An electrolytic does very little at RF frequencies, so if that is what you have, your filtering is inadequate.

ElectricDruid

Quote from: pblw on September 24, 2016, 06:46:10 PM
I try to power it from the battery (via a L7805 regulator)

QuoteI am currently trying a TMR 1-0511 DC-DC converter (hooked up as shown in the data sheet http://docs-europe.electrocomponents.com/webdocs/1216/0900766b8121689f.pdf

Sorry, you've confused me. It's easily done. You say you're powering the circuit from a battery, with a 78L05 to get +5V, right? So what does the Traco DC-DC convertor do?
It also sounds like if the Arduino has a regulator on board, you should be *getting* 5V power for any external digital stuff from that board, not supplying 5V to it. No point having two regulators, and if there's one there already...

What you're trying is certainly possible. Many of my own designs use 5V PICs alongside analog circuits. I've generally found having separate 5V power from a 78L05 for the digital parts and uP is enough to keep noise away from the analog side.

HTH,
Tom

pblw

Thanks for the replies,


karbomusic: I am running through the 5v input not Vin.

ElectricDruid: I meant that I tried a regulator then the DC-DC converter. I was planning to build it in to an enclosure eventually with a 328P so I was using a regulator and feeding through the 5v input on the board.

GiovannyS10: The noise is as amptramp describes.

amptramp: I have tried a ceramic capacitor but it is still the same. I think it is a feed through of the current as you suggested. Is there any way I could deal with that?

Thanks again.

karbomusic

#6
Quotekarbomusic: I am running through the 5v input not Vin.

Then why wouldn't you use Vin and get 9V (pedal) and 5V (Arduino) if you can easily get it? Otherwise you are adding another regulator to do the job the existing one may already be able to do. Last time I did this, 9V went to the pedal circuitry and 9V to the Arduino and the Arduino took care of the 5V part both for powering it and supplying a regulated 5V.

pblw

I actually tried doing that first karbomusic, the problem was exactly the same. The fact that the noise was not present when using the USB power in that situation was what lead me to the DC-DC converter. To be fair the noise is not that bad, I have used filtering caps across the digital pot, the arduino power and the effect power and got rid of most of it but there is still a noticeable difference between the two scenarios (one being everything powered from a single 9v (which gives the whirling noise, albeit faint) and the other being the effect powered by 9v and arduino/digital pot powered by USB) regardless of the regulators and DC-DC converters. I am LFOing a filter circuit so the hum gets louder and quieter depending where the frequency of the sweep is which makes it stand out even more. I really like the sounds I am getting but the noise is really getting on my nerves.

karbomusic

Quote from: pblw on September 25, 2016, 08:06:18 PM
I actually tried doing that first karbomusic, the problem was exactly the same.

Ah, gotcha. :)

Transmogrifox

Is the prototype on a breadboard?  Might be a good layout fixes your problem.

Generally when mixing digital circuits with analog the biggest problems are ground and power supply currents from the digital side.  Not as frequently feed-through from some kind of digital control (like PWM LFO).

Good layout and a generous bank of decoupling capacitors on the digital chip helps. 

With a good PCB you would have your bulk capacitance (often electrolytic) then a 0.1uF and sometimes a 10nF or 2.   All depends on the power usage of your digital IC.

All of this requires decoupling caps placed very near digital IC and only one ground connection going back to DC source.  Sometimes some ferrite chip beads or resistors in series with power rails can help.

If you're hearing audio frequency stuff then you may need to beef up on larger electrolytic caps...try 2 or even 3 47 uF in parallel on the 5V supply.

For the lower frequency stuff is more efficient use of caps if you put as large of resistor from 9V as possible to LDO (or DC converter) and caps to hold it steady.  Then most of your currents are supplied directly from the local cap banks and do not come out of the power supply.

If using an external (USB) 5V source makes the problem go away then it seems likely that you're trying the right things if you're adding more and different caps to the power rails.  If you're hearing audio frequency noise, then you need to be filtering audio frequency currents.  It isn't always heterodyning -- sometimes it's simply power density modulation on the power source.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

pblw


ElectricDruid

Quote from: pblw on September 25, 2016, 08:06:18 PM
I am LFOing a filter circuit so the hum gets louder and quieter depending where the frequency of the sweep is which makes it stand out even more. I really like the sounds I am getting but the noise is really getting on my nerves.

How is this LFO being output? If it's using the Arduino's AnalogOut functions, it's PWM, and it's only done at a very low frequency, which is bound to chuck noise into the output. I don't know why that noise would be worse powered one way rather than the other, but it could be that the root cause of the noise is PWM rather than the power supply.

Just a thought.

HTH,
Tom