-1

I'm trying to implement the circuit as shown with an arduino nano. The project runs fine when powered via USB port of the arduino. However, the code freezes when connected to an AC adapter. When switched back to power supply via USB, the code does not run and resetting the board has no effect. The board starts to work again only when the code is re-uploaded.

Tried the following to troubleshoot the issue with no success.

  1. Changed the power supply
  2. Tried with a blink sketch and an example code of U8glib
  3. Eliminated the MOSFET's Q1 & Q2 to simplify further

The only other component in question seems to be the buck converter connected between the AC adapter and the nano board. But it is rated for 5V,3A and should not be of concern I believe. Appreciate your inputs.

Edit:Uploaded a blink sketch to the nano. Works ok over the USB power. But it starts resetting randomly when connected to the power supply. Swapped the buck converter with an LDO and it seems to work flawlessly. The output of the buck converter reads about 5.18V and according to the Atmega328p datasheet, it can accept upto 5.5V. Could the problem be associated with the switching frequency of the buck?(The stated switching frequency is about 500kHz) P.S- I'm using the nano clone. Not sure if it adheres to the original parameters as stated in the Atmega datasheet. enter image description here

12
  • what happens if you unplug the nano from the circuit?
    – jsotola
    Jul 16, 2022 at 16:31
  • Unfortunately, can't uplug the nano as it is soldered onto the PCB.
    – KRP
    Jul 16, 2022 at 17:49
  • That the code has to be re-uploaded to get it to work sounds strange. Maybe show your software. Does it have a line like while ( ! Serial ) ; ?
    – 6v6gt
    Jul 16, 2022 at 19:08
  • I'm using the same code as given in the following link.github.com/nppc/Heater12VControl/blob/master/Arduino/… However, the problem persists even with simpler codes as well.
    – KRP
    Jul 16, 2022 at 20:20
  • What is the rating of the power supply. What is the power supply and converter voltages when running off power supply?
    – Gil
    Jul 16, 2022 at 21:48

1 Answer 1

0

Is the buck converter properly filtered?

Many ebay/amazon supplies are done too cheaply. While LEDs will run from practicaly anything with at-least some sign of correct specs, combination of back converter trying to keep-up with changing current and compensate to achieve correct voltage, while voltage regulator is adjusting and as such changing the consumption characteristics... dependant on buck converters changes. MCU requirements for clean supply are lot greater them that of LEDs. Bunch of suitable capacitors after the buck converter, but before the arduino might do it. Hopefuly somebody better then me in that area might advice you bout capacitor values. mine rough guess would be 100nF of about 20V.

2
  • I think the buck converter module has a capacitor at the output. According to the datasheet, it's rated around 20uF-60uF.
    – KRP
    Jul 18, 2022 at 7:30
  • try holding ones legs next to the input (its normal for Amazon/ebay sellers to take description from other listing without checking)
    – Tomas
    Jul 18, 2022 at 10:32

Your Answer

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

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