0
\$\begingroup\$

This circuit uses an Arduino Nano and a DFRobot DFPlayer Mini to read from two load cells and then play some audio and turn on some LEDs when the weights match a specific criteria.

This works well when it is powered through a USB cable connected to the Arduino Nano. However, when powered using a 5V, 3A DC adapter, nothing works. I can see the power led turn on and the lights on the Arduino go on but the sketch doesn’t work as expected. Any idea why this would be the case?

EDIT 1: I tried powering the board using a 5V Meanwell SMPS (LRS-35-5) but still no joy.

enter image description here

\$\endgroup\$
8
  • \$\begingroup\$ We can't know that. Which kind of adapter you have, regulated, unregulated? If regulated, is it a linear supply or switch mode supply? Is it grounded or floating? Does it have common mode voltage, i.e. does it hurt if you touch adapter ground and mains earth? Details are missing. Also you made the Arduino sketch and know what it should do, at what line of code it hangs, and why it can't continue from it. You don't post it here so we can't see it. Also your 100uF capacitor exceeds the rated USB capacitance by 10x so it does not have to work with USB either as it it exceeds the allowable range. \$\endgroup\$
    – Justme
    Commented Aug 29 at 18:29
  • \$\begingroup\$ I’m not sure what adapter it is. Just that it’s a wall wart bought in a local store. The USB ports are just power outlets to power the speaker. \$\endgroup\$ Commented Aug 29 at 18:35
  • 1
    \$\begingroup\$ Does your program err "sketch" use serial communications? It may be hung up waiting for a response. Maybe try a simple 'hello world' LED blink sketch. \$\endgroup\$ Commented Aug 29 at 18:43
  • 4
    \$\begingroup\$ @electrophile sorry but we can't work with "just a random item bought from local store". Consider the adapter being a car. Would anyone know why my car does not work if I simply say it's a just a blue car - being e.g. diesel or EV is important. You need to provide make/model, link to a product page or photos about it, to even guess what it might be and how it might work and why your project does not work with it. \$\endgroup\$
    – Justme
    Commented Aug 29 at 18:44
  • 1
    \$\begingroup\$ @kruemi The USB in the circuit above are only power outlets when connected to the adapter. AFAIK, the USB on the Nano is protected using an in-series diode. \$\endgroup\$ Commented Sep 2 at 8:28

1 Answer 1

0
\$\begingroup\$

I can't know what the problem is but here are at least a few potential reasons based on looking at your circuit.

You are connecting a 5V MCU to a 3.3V chip. If your MCU expects any kind of response back from the chip, 3.3V signal may not be high enough for the 5V MCU to see it. Powering the circuit with a separate 5V supply is a worse scenario because it powers the 5V MCU directly, the USB scenario is a bit less worse because it powers the MCU via a diode which makes the MCU voltage lower and it can detect the 3.3V signal because it's in the guaranteed operation limits.

One option is that there is too much capacitance. You have 200uF for some unknown purpose. It may take too long to charge and voltage rises slowly, so the MCU starts up before it has enough voltage to run at the speed required and it executes garbage. Since the 5V supply can provide 7A it may not be the issue.

But you have a 7A switch mode power supply and it should be able to charge up the 200uF quite rapidly at start. The next problem might be that it's a switch mode power supply with extremely light load compared to the 7A rating. It may have too much switching ripple and noise.

And you also did not disclose how you connected the power supply to mains, as you needed to do that yourself. It must be wired to a three prong plug with earth, for safety and the mains filtering to be functional. And it must be connected to an earthed mains receptacle too. Without earth, the supply output will have common mode noise at mains frequency and at the switching frequency.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.