I have a BYJ48 stepper motor and an ULN2003A motor driver shield shield.
In many tutorials I read:
do not to draw current from the 5V on the Arduino rail, but use an external power source, since the motor can draw quite some current
Which of these options to they mean by this?
Connect an external power adapter to the Arduino and connect the ULN2003A board to the Vin pin and GND on the Arduino
or
Connect the motor shield itself to an external power adapter and connect it to the + and - pin on the motor shield
or perhaps both are valid solutions?
The board I use is this one.
-
Link to the product you refer to?Andy aka– Andy aka2018年02月20日 18:05:13 +00:00Commented Feb 20, 2018 at 18:05
-
ebay.nl/itm/… I added it to the my question as wellBas van Dijk– Bas van Dijk2018年02月20日 19:17:27 +00:00Commented Feb 20, 2018 at 19:17
-
1You are missing a connection from the green wire to the Arduino GND.Transistor– Transistor2018年02月20日 19:35:24 +00:00Commented Feb 20, 2018 at 19:35
-
I don't see the schematic for the motor driver.Nick Alexeev– Nick Alexeev2018年02月20日 21:29:33 +00:00Commented Feb 20, 2018 at 21:29
-
1@alcor bought it from arduino-tutorials.net/r/ZsECKh I also made a tutorial about this motor with the power from an external power supply arduino-tutorials.net/tutorial/…Bas van Dijk– Bas van Dijk2020年03月08日 11:26:31 +00:00Commented Mar 8, 2020 at 11:26
1 Answer 1
There are two things you need to do:
- Prevent the motor drawing its power from the micro-controller board.
- Make sure that all the grounds are connected but avoiding motor current return through the micro-controller board.
schematic
simulate this circuit – Schematic created using CircuitLab
Figure 1. A good wiring configuration. The heavy wires carry the motor current.
Note that there is one ground connection between the micro-controller and the motor system. The return current for the 12 V supply does not pass through the micro-controller board.
-
Ok, what I have now is that the Arduino powered via the USB connection. The motor shield is complete independent powered with a 5V adapter. As shown on the eBay picture, there is a + and - pin on the driver board. This is where I connected the external power supply to. I did not connect the ground of the Arduino with the - pin in any way as shown in the picture.Bas van Dijk– Bas van Dijk2018年02月20日 19:24:20 +00:00Commented Feb 20, 2018 at 19:24
-
And? Does it work or not? You need to connect the GND/- as I have shown for correct operation, otherwise there is no return path from the micro outputs 0 to 4.Transistor– Transistor2018年02月20日 19:27:46 +00:00Commented Feb 20, 2018 at 19:27
-
Yeah it does work, but I still have my question. Since another option is to connect the external power supply directly in my Arduino and connect the motordriver + and - pin to the Vin and GND on the ArduinoBas van Dijk– Bas van Dijk2018年02月20日 19:30:27 +00:00Commented Feb 20, 2018 at 19:30
-
Read my answer again. I explained why not to do that twice.Transistor– Transistor2018年02月20日 19:31:37 +00:00Commented Feb 20, 2018 at 19:31
-
Perhaps I misunderstood "Prevent the motor drawing its power from the micro-controller board." I thought you referred to the USB provided 5V. For 12V I understand, but my motor is powered by 5V which the Arduino should be able to handle. This made me think I could power the Arduino as well as the motor on the external power supply.Bas van Dijk– Bas van Dijk2018年02月20日 19:37:41 +00:00Commented Feb 20, 2018 at 19:37