Paracitic Voltage Drain From Atmega Serial to Module?

I have an MP3 Player Module (DFPlayer Mini) connected to a Stand Alone Atmega328P. The MP3 Module is powered by a Buck Converter while the Atmega IC is powered from a 3V3 LDO.

The MP3 player should only have voltage when the Buck Converter is turned on (enabled) by the Atmega and yet I am measuring 0.2V on the MP3 Player's VCC Pin.

The Buck converter is definitely switched off but there's still 0.2V on that VCC line and the only place it can be coming from is the Serial Connection between the Atmega and the MP3 module.

I only have the TX pin connected (TX from Atmega to RX on MP3 Module) with a 10K resistor in series.

How can I stop this from happening?

0.2V doesn't seem like much but it's putting a noticeable drain on my low power figures.

Thanks!

pi_and_chips:
I have an MP3 Player Module (DFPlayer Mini) connected to a Stand Alone Atmega328P. The MP3 Module is powered by a Buck Converter while the Atmega IC is powered from a 3V3 LDO.

The MP3 player should only have voltage when the Buck Converter is turned on (enabled) by the Atmega and yet I am measuring 0.2V on the MP3 Player's VCC Pin.

The Buck converter is definitely switched off but there's still 0.2V on that VCC line and the only place it can be coming from is the Serial Connection between the Atmega and the MP3 module.

I only have the TX pin connected (TX from Atmega to RX on MP3 Module) with a 10K resistor in series.

How can I stop this from happening?

0.2V doesn't seem like much but it's putting a noticeable drain on my low power figures.

Thanks!

do the ATMega328P and the MP3 Player have a common ground?
They need to share the same ground.

pi_and_chips:
I have an MP3 Player Module (DFPlayer Mini) connected to a Stand Alone Atmega328P. The MP3 Module is powered by a Buck Converter while the Atmega IC is powered from a 3V3 LDO.

Thanks!

How does the Stand Alone Atmega328P enable the Buck Converter?

This would imply that the Stand Alone Atmega328P and the Buck Converter are connected in some way.
The Buck Converter is connected to the DFPlayer Mini.
Can you post a paper and pencil wiring/circuit diagram?

I still think it is a grounding issue.
What type of breadboard / perfboard are you using?
Can you post a photograph of the circuit on the breadboard / perfboard?

Do you have a link to the Buck Converter that you are using?

The TX pin from the Arduino can parasitically power your sound module. This pin is normally high.

Grumpy_Mike:
The TX pin from the Arduino can parasitically power your sound module. This pin is normally high.

Hi Mike!

Is there a way to stop it from happening?

I'm using Power Down Sleep mode on my Atmega and I've even tried writing the Serial Pins to Low while sleeping but I still get that 0.2V across the TX.

I'm trying to keep the power usage down to an absolute minimum.

Sleep when idle, wake up, do stuff, go back sleep.

Thanks! :slight_smile:

You need to disable the USART module inside ATMega to be able to drive the pins from SW (i.e. write it LOW). If you are using the default Serial I think Serial.end() does this. You need to turn it on via Serial.begin when you want to start the communication again.

The main problem is that on a lot of types of Arduino their is a 1K seriese resistor going to the USB to serial chip and that is pulled up, so no amount of playing with the USART co figuration is going to help with that one.

Grumpy_Mike:
The main problem is that on a lot of types of Arduino their is a 1K seriese resistor going to the USB to serial chip and that is pulled up, so no amount of playing with the USART co figuration is going to help with that one.

I did not know that. But OP uses standalone ATMega so he likely does not have USB/TTL chip onboard and no pull-ups are on TX/RX pins.

Hi guys and many thanks for replying!

In my haste to get the info down without writing out a wall of text, I forgot to mention that the MP3 player module is connected to Software Serial and not hardware serial. Sorry for that confusion!

I've had to draw up a quick and dirty schematic using paint because I usually do my schematics in Eagle in "board house" style which has been frowned upon here once or twice.

I've not drawn in the two 100nF decoupling caps on the Atmega's VCC pins but I do have them close to the pins. I also don't have a crystal since I'm running the Atmega at 3V3 @ 8Mhz Internal and lastly, I have also omitted the 10K resistor which pulls the Atmega Reset pin up to 3V3.

As you can see, everything shares the same common ground. On my actual PCB, I am using double sided FR4 and have used Vias where ever possible to connect top and bottom ground planes as well.

After milling out the PCB board, the first thing I do is go round the PCB with a multimeter either on Buzz or Ohms and look for bad tracks, shorts, breaks etc. Then as I'm soldering in the components, I check each one as I solder it to make sure I've got no bridges, shorts etc until all components are in.

Then, I power up the PCB with no ICs or modules and check I've got voltages where they should be etc and then gradually start adding the IC's and modules, testing as I go so as not to blow anything up :slight_smile:

I try to be meticulous and methodical in my PCB building and catch any build / soldering issues early if I can. And it was as I got to adding the MP3 player module when I noticed the current consumption went up despite the buck converter not being on and then I discovered this 0.2V floating around on the MP3 Module's VCC pin. Remove the MP3 and there's no voltage there at all.

Even if I disconnect the Buck converter from the circuit, there's still 0.2V leaking across via the TX Pin on the Atmega IC.

I did contemplate using a pull down resistor to keep the pins pulled low until needed but with the 10K series resistor already in place, I figured that would constitute a voltage divider and would for want of a better description, weaken the signal (Voltage Levels).

I'm also now wondering if this problem I'm having with voltage leaking across the serial pin also relates to another issue I'm having with putting my Atmega into Sleep Mode - which I thought might be a separate problem but now might not be?
Help with Low Power Sleep Mode on Atmega328P - Project Guidance - Arduino Forum
To get round the voltage drain across the Serial Pins issue, I tried to write all the pins I use for Serial comms (hardware and Software) to LOW in Setup, then I write them HIGH when needed and back to LOW again before putting the Atmega to sleep for 16 seconds per time.
However what seems to be happening is, the Atmega will be in Low Power Sleep when it's first powered up and will remain there drawing 190uA UNTIL the atmega has to wake up, talk to the modules and do stuff and THEN go back sleep. It doesn't appear to be going back sleep properly.
After the atmega has done something and goes back sleep, it then insists on drawing 4mA in standby from there on in. I can see the current fluctuating as it wakes up and goes back sleep every 16 seconds or so but the current doesn't drop back down to 190uA
So I figure now that these two issues are connected and it all relate to the serial pins and them leaking voltage across to the MP3 as well as not being turned off after being used properly leading to a high current consumption.

If I could find a way of stopping the voltage leaking across the serial pin to the MP3 (because that's the only module it happens with) and a way to turn off All the serial pins in use (hardware and software) then I think that would solve the problem.

Sorry for the rather long winded post, I'm just trying to get as much info down as possible so it helps you guys to help me :slight_smile:

Thanks again!!!!!!!

Are you sure the voltage is leaking from Mega to the module? Digital circuits often "consume" pAs when voltage is low meaning any filtering cap present in the buck converter and/or module itself takes loooong to discharge to 0V. Did you measure voltage drop over the 10k resistor? If the module is really phantom powered via the USART you should find large voltage on in. Also what is voltage on TX pin when it should be sleeping?

Hi,

It looks like I was correct and this issue with the voltage on the Serial pin and the other issue I mentioned with not being able to get the Atmega to sleep properly are connected.

I did some experiments and I have documented my results here in the other thread Help with Low Power Sleep Mode on Atmega328P - #6 by pi_and_chips - Project Guidance - Arduino Forum (saves cross posting and confusion).

Long story short, I now write all the pins as OUTPUT LOW in the Setup function. I now only change the pin modes and starting states just before I need to use them. Similarly, I only call serial begin when I need it and then call serial end when I'm done. The last thing I do is write all the pins as OUTPUT LOW again before finally putting the atmega to sleep.

Now I'm getting a more or less consistent standby currentof 360uA and NO voltages on the serial pins or the MP3 Player's VCC pin.

I did notice an odd thing happen when the Atmega had woken up, activated the module and was put back to sleep in that the standby current dropped to 190uA for a few seconds and then stabilised at 360uA - which I can't work out but I'm a lot closer to my low power target now than I was before so thank you all for the help so far!!!!!

Thanks!!!