Current advice, Nano

Hi!

I'm putting together a simple (and apparently popular!) Arduino project to trigger the DFPlayer mini module from a PIR sensor. I've done the prototype and coding and it's all fine, but I'm not sure how best to power it. I will be using an Nano (clone) for the processor, and the DFPlayer mini and this PIR sensor. I'll be using 1x 4 ohm 3W speaker and this 3W 5V stereo amplifier . The prototype works just fine running off the nano's 5V output, but this unit has to be permanently powered and switched on for several months, and I wondered about the current draw on the Nano regulator. I was naturally hoping to run everything from the 5V out - would another solution be safer?

Apparently the DFPlayer consumes around 50ma, the PIR sensor 50uA and the amplifier 16mA (with no load - I'm not sure how to work out the consumption of the amp when driving the speaker). I'll be running the Nano from a 1.1 amp 9v power adapter.

Thank you!

Don't run the Nano from a 9V power supply. Run everything from a 5V power supply, then the Nano's regulator won't be a problem because it won't be used. A 1A phone charger type power supply will be fine. Ideally find an older one with a mini-usb plug that connects directly to the Nano's socket.

On the other hand... Do you actually need the Nano at all? Could the PIR trigger the player directly?

The amp is 3W @ 5V, so the current will be around 3 / 5 = 0.6A = 600mA. So a 1A power supply should be enough.

A source of older 5V phone chargers with the right plug might be your local thrift or second hand store. I have gotten them there for less than $2.00 US each.

PaulRB:
Don't run the Nano from a 9V power supply. Run everything from a 5V power supply, then the Nano's regulator won't be a problem because it won't be used. A 1A phone charger type power supply will be fine. Ideally find an older one with a mini-usb plug that connects directly to the Nano's socket.

Briliant, thanks Paul. So, power the Nano via USB with a 1A 5V mini-USB charger, and run the other stuff from pin 27 (the 5V pin) from the Nano (because the 5V pin is connected to the V+ of the usb and thus the current is the same as the USB charger?)

PaulRB:
On the other hand... Do you actually need the Nano at all? Could the PIR trigger the player directly

That would be absolutely marvellous, but I'm not sure how to acheive it - my project requires the DFPlayer to alternate between play and pause. Any ideas?

groundFungus:
A source of older 5V phone chargers with the right plug might be your local thrift or second hand store. I have gotten them there for less than $2.00 US each.

Great stuff, thanks!

groundFungus:
A source of older 5V phone chargers with the right plug might be your local thrift or second hand store. I have gotten them there for less than $2.00 US each.

That's a bit rich! :astonished:

"Garage Sales" - I won't/ haven't needed to pay more than $1.00 in recent times - and that's Australian Dollars. They are so common. :grinning:

There is a tendency for people - and myself - to buy a new phone but keep using the old charger (but all are "Micro USB" nowadays except for the expensive ones).

power the Nano via USB with a 1A 5V mini-USB charger, and run the other stuff from pin 27 (the 5V pin) from the Nano (because the 5V pin is connected to the V+ of the usb and thus the current is the same as the USB charger?)

Yes. Would be a good idea to add a large cap close to the power pins of the amplifier module, e.g. 470 or 1000uF, to act as a reservoir.

my project requires the DFPlayer to alternate between play and pause.

Describe that in step by step detail.

PaulRB:
Yes. Would be a good idea to add a large cap close to the power pins of the amplifier module, e.g. 470 or 1000uF, to act as a reservoir.

Great, thanks. So, bridge the +ve and -ve amplifier power input with the cap?

PaulRB:
Describe that in step by step detail.

At the moment I'm measuring the HIGH output from the PIR sensor (connected to a digital pin on the nano), and using that to trigger a 'play' message to the MP3 player from the nano tx pin 1. A LOW output from the PIR triggers a 'pause' message.

ettdeuxdrei:
bridge the +ve and -ve amplifier power input with the cap?

Correct

ettdeuxdrei:
At the moment I'm measuring the HIGH output from the PIR sensor (connected to a digital pin on the nano), and using that to trigger a 'play' message to the MP3 player from the nano tx pin 1. A LOW output from the PIR triggers a 'pause' message.

Looking at the DFPlayer Mini's data sheet, Play and Pause are on the same "key"


So to implement this without an Arduino, a LOW pulse would have to be sent to the ADKEY1 pin via a 33K resistor when the PIR output goes HIGH and another LOW pulse when the PIR output goes LOW.

Something like this:
6dIdh.png
but generating a LOW pulse instead of a HIGH pulse. A second XOR gate could be used to invert the signal.

6dIdh.png

Thanks so much for the advice, and apologies for not replying sooner. That looks like an amazing solution, but I fear I don't yet have the electronics skills needed - ie I don't know how to create a suitable XOR gate for this circuit. Would be great to be able to implement it though!

Use a 74hc86 quad 2-input XOR gate.

EDIT: actually maybe a 74x136 quad 2-input XOR gate (open-collector) would be better, but I think they may no longer be manufactured. It would be better because it's output would act more like the switches with in the DFPlayer schematic. This would make things easier if you wanted to connect switches for other functions also.

Thank you so much!