Guidance to build a switch for Arduino power sources

Hello guys,

It’s been a while I’ve been conjecturing and searching about this idea, but could not devise a solution for.

Brief problem description: I am using the external ADC ADS1115 with Uno being powered via a DC wall adapter. I am having big trouble with 60 Hz noise (electric network frequency of my country). When powering with a power bank, the noise is gone, so I isolated the source coming from the DC adapter. Already tried to use big fat caps (4700uF) between DC adapter lines, but it did not reduce the noise to the extent I need. I can’t power all the time from battery because I need at least 7 days continuous running, my sketch draws 35 mah, and I can’t get my hands on high charge rechargeable batteries.

My intended solution: power the device mainly using the DC adapter, but only during the ADS 1115 somehow automatically disconnect the DC adapter, connect rechargeable batteries and power via them. When sampling is not going on, the DC adapter could recharge the batteries.

Do you guys thing it is possible? Could you point me in some directions? I am kinda lost on how to accomplish this.

Best regards

You’ve already identified the problem, why not just fix it? It sounds like you have a bad power supply so I’ll ask, what is it? An unknown origin wall-wart?

Do you have a multimeter? A scope?

Use a 5volt cellphone charger with USB socket, and connect the USB cable of the Uno to that.
Leo..

Hey guys, thanks for the quick answers.

WattsThat:
what is it? An unknown origin wall-wart?

Do you have a multimeter? A scope?

Exactly! An unknown origin (there is a label, but from a supplier I never heard of). I only have a basic multimeter (the cheapest you buy in your local store). You see, I tried some noise reduction solutions I found around: big capacitors, RC filters, wrapping in aluminium foil, checking for ground loops... They all reduce the noise to some extent, but not to the one it would be really nice for my application.

The only way I could guarantee such reduction was with a power bank. Since my application cycle is sample from ADS1115 for 90 seconds and sleep for 5 minutes, I thought I could simplify my battle with the noise with this hybrid solution of batteries with wall-wart... Buuut, if it is too difficult to implement the required hardware, I might continue to look at something else

Wawa:
Use a 5volt cellphone charger with USB socket, and connect the USB cable of the Uno to that.
Leo..

Hey Wawa, just two questions:
1 - Does supplying power via USB adds some noise protection late rather than from DC plug? I.e. does the Uno board has noise protection in UBS that it doesn't have on DC? I ask because I am working with a stripped version of Uno, with ATMega328p mounted on a perfboard... To follow your suggestion I would need to implement the same circuitry the board has on USB side.

2 - Do you think the noise will reduce because of the phone adapter (presumably higher quality) or because of other factor? Because I do seem to recall I tried this while prototyping, but without success in the noise reductiin

What I am afraid of is that I could be wanting a noise reduction that would be impossible with a wall-wart, even a high-quality one... But I know I do get it with batteries! As I can't run solely from batteries (too much $$$ and time to get hands on good batteries), I though about this hybrid solution that I don't know if it is possible

An Uno has a polyfuse (with some resistance) and a 47uF cap on the USB supply.
That "RC filter" could remove some HF noise (not mains hum).

I think we need to see your setup (pictures and schematic), and the label on the supply.
Leo..

I was curious about the supply as I had a similar problem with a transducer right into an Uno analog input. My situation was that my system ran fine when powered by the computer via the usb jack. When powered by a 9v Chinese wall wart, I had 60Hz noise so bad my signal was unusable. I tried powering with a decent 12v linear supply and had the same problem. I tried a bunch filtering techniques, nothing changed the input behavior.

I started analyzing the supplies and determined the only difference was earthing. The dc common of the Arduino being earthed when power from usb, it was not when on the separate supplies. I wasn’t comfortable earthing the Arduino dc common for fear of ground loops with other I/O on the board so the solution was simple: a .22uf 400v film cap between dc common and earth completely cured the noise. The value wasn’t really critical, I just wanted a higher voltage capable device just in case. With that cap in place, the analog was rock solid with at least five different brands of wall warts I had on hand.

WattsThat:
… so the solution was simple: a .22uf 400v film cap between dc common and earth completely cured the noise. The value wasn’t really critical, I just wanted a higher voltage capable device just in case. With that cap in place, the analog was rock solid with at least five different brands of wall warts I had on hand.

Great! I did not try earthing, and when powering from USB to PC, while prototyping, a 60Hz hum was there, which I think is from my PC. I am kind of lost on how to earth my current setup, below there are more infos about the setup.

Wawa:
I think we need to see your setup (pictures and schematic), and the label on the supply.
Leo…

I don’t have the boards and wall-wart with me now, but will have later today. For now, I will post a simplistic schematic (doing the CAD professional schematics is hard for me, I am not familiar with them). But if you want more info I can make one more complete when I have the boards with me. Later will post the wall-wart label and circuit photo.

The circuit is build upon a perfboard like this (that’s why I drew the CCC and GND lines around the circuit).

EDIT:
I also attached the photos from DC wall-wart. Unfortunately I can’t take photos from the actual circuitry now, because the boards are running a test right now and I have glued them with tapes inside boxes for protection… Trying to remove them for photos might mess with the test. As soon as I can I will post the circuit photo.