I copied the schematic below and when I ran the code from my laptop, it worked well but every time I unplug it to my laptop and connect an ac dc wall adapter, my Arduino smokes. Why does it smoke and how to fix it so that I can connect an AC/DC wall adapter to power my Arduino?
EDIT from the comments: My AC/DC adapter has 19.5V DC out.


  • disconnect the motor ... the arduino voltage regulator does not have enough capacity to run it .... disconnect the motor red wire from the arduino ... disconnect the top black wire on the relay from the arduino .... insert a battery between the motor red wire and the top relay black wire
    – jsotola
    Commented May 10, 2020 at 17:55
  • is there any way to power this up without the use of my laptop? Commented May 10, 2020 at 17:58
  • @VE7JRO the output voltage is 19.5 V and i am connecting it through the barrel jack Commented May 10, 2020 at 18:00
  • @jsotola can i still use or connect a wall adapter if I already connected it to a battery or no need? Commented May 10, 2020 at 18:03
  • 3
    19.5V on the barrel connector is too high, especially when powering a motor. It needs maybe half that. The "smoking" part is probably the voltage regulator on your Arduino.
    – StarCat
    Commented May 10, 2020 at 18:30

1 Answer 1


As already stated in the comments, the voltage of your power supply is the problem. The Arduino has a linear voltage regulator at the Vin pin. It dissipates the excess voltage as heat. The higher the supplied voltage, the lower the current, that you can draw before it overheats. The regulator on a genuine Arduino should go into thermal shutdown, while the regulators on most cheap clones will just get destroyed.

19.5V is too high for the Arduino. The Vin pin is meant for 6 to 12V max. You need a power supply, that can provide a voltage in that range. Or you can buy a regulated power supply, that directly gives you the 5V, that the Arduino needs.

Also you should be really carefull with powering the motor through the Arduinos 5V pin. Motors can easily draw a big amount of current. When drawing too much current through the Arduino (to be specific: through the voltage regulator or the protection diode), the same as explained above will happen. Only very small motors can be supplied through the Arduino. As you use a relay to control it, I guess the motor draws a lot of current. You need tp connect it directly to a fitting power supply, so that the current for it does not flow through the Arduino.

And always be sure, that the used parts can work with the voltage, that you want to supply, including the motor.

  • Sorry but can i use a wall adapter without an output of 12 V and still power up the motor and sensor? Commented May 10, 2020 at 22:14
  • What do you mean by without 12V? With what voltage instead. If you only have a supply with more voltage, you need to buy an extra voltage regulator to bring the voltage down. Be sure, that is is a switching regulator instead of a linear one, and that i can provide more that the needed current
    – chrisl
    Commented May 10, 2020 at 22:19
  • I'm sorry I meant with 12V, thank you but is it possible to power all this up with that output? Also how will I know how much output volts does my arduino needs to power this up? Sorry, I'm new to this and i really appreciate your answer Commented May 10, 2020 at 22:31
  • also i would also like to know how will i know the right voltage or power supply to make this work Commented May 11, 2020 at 7:10
  • You need to check, with which voltage your motor can work. Your supplier should have this information. Or - if you have one - look the the motors datasheet. The Arduino needs either 5V on USB/5V pin or 6V - 12V on the Vin pin. Get a power supply, that fulfills the requirements of the Arduino and the motor, and that can provide enough current for both your Arduino and the motor (plus a bit overhead). Then it should work
    – chrisl
    Commented May 11, 2020 at 10:16

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.