How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
Rachel De Barros Rachel De Barros
52.7K subscribers
351,136 views
0

 Published On Nov 28, 2023

Embark on a journey from a Arduino coding novice to a prop animation wizard with our comprehensive guide on wiring and controlling a 12V motor with Arduino! You'll be able to program just about any motor, including using Arduino to control a 12V wiper motor, one of the most popular motor choices for DIY motorized props.

This easy Arduino motor control tutorial is specially crafted for beginners who have never written a line of code but are eager to dive into the world of DIY motorized props and robots to program realistic motor movements. Whether you're planning a theatrical setup, a unique art installation, or your next Halloween prop character, this Arduino motor control tutorial is your perfect starting point.

πŸ› οΈ Step by Step Arduino Motor Control Guide:
β€” A beginner-friendly introduction to Arduino and its potential in motor control.
β€” A clear walkthrough of wiring a 12V motor to an Arduino using a motor driver module along with power requirements.
β€” Easy-to-understand code examples that you can use and modify for programming your own custom prop movements.

πŸ”— Full Tutorial with Code Examples: https://racheldebarros.com/arduino-mo...

πŸ”— Identify Wiper Motor Wires: https://racheldebarros.com/how-to-wir...

πŸ”— Join the Engineering Artists Community: https://racheldebarros.com/community

🎬 Video Chapters: How to Control a 12V Motor with Arduino
0:00 - Intro
1:01 - Why You Can't Directly Connect Motors to Arduino Microcontrollers
1:48 - Intro to Motor Driver Modules
3:40 - How to Choose a Motor Driver Module
4:30 - XY-160D Motor Driver Module Pinout
6:38 - Intro to the Arduino Uno Microcontroller
8:04 - How to Wire a Motor Driver Module to an Arduino Uno
10:25 - How to Wire a 12V Motor to a Motor Driver Module
11:40 - How to Wire a Power Supply to a Motor Driver Module
12:14 - Intro to the Arduino IDE
13:22 - Defining Arduino Pins
15:12 - Setting Pin Modes
17:39 - Code Example: Spin the Motor
20:02 - How PWM Determines Motor Speed
21:27 - Code Example: Change the Direction of Rotation
22:20 - Code Example: Set Different Speeds
23:27 - Code Example: Animate the Motor Directions
28:03 - Code Example: Animate the Motor Speed
37:07 - Code Example: Randomize the Motor Speed
39:52 - Code Example: Randomize Motor Speed & Direction
42:04 - Code Example: Randomize Motor Speed, Direction & Timing
43:15 - Wrap up
43:31 - Read the Full Tutorial with Code Examples
43:51 - Join the Community

Build Along:
πŸ›’ 12V Wiper Motor: https://amzn.to/3GfO1sQ
πŸ›’ XY-160D Motor Driver Module: https://amzn.to/46rwGHT
πŸ›’ Arduino Uno (or off-brand clone): https://amzn.to/49SfApx
πŸ›’ Breadboard Jumper Wires (Dupont-style): https://amzn.to/3FUrZvn

πŸ”— Download the Arduino IDE (free): https://www.arduino.cc/en/software

πŸ’¬ Have any questions or want to share your own experiences with coding Arduino motor movements? Drop a comment below – I love hearing from you!

πŸ‘ If you find this video helpful, please hit that like button and consider subscribing to my channel for more animatronics/robot tutorials, tips, and tricks. Your support helps me create more content like this!

Some links included here are to affiliate sites. If you purchase something through them, I may earn a small commission β€” which costs you nothing! I am very grateful for your support when you use my links to make a purchase.

#arduino #animatronics #halloweenanimatronics #dcmotor #arduinocode #livecoding

#arduino #arduinotutorial #motors #12Vmotors #halloweenanimatronics #halloweenprops

show more

Share/Embed