Here is how I made a simple circuit to control a DC Motor using Arduino. You can use this circuit with simple and short code to automate a DC motor from Arduino.
H-Bridge Integrated Circuit
The motor coil uses a relatively high current that Arduino cannot directly supply. That’s why we use this HBridge Integrated Circuit L293D.
This IC Integrated Circuit can drive two DC Motors in two directions for each motor.
Note:
This tutorial can be applied to the Arduino motor shield using the same code and configuration.
Connection
The IC has two identical elements to control two motors. We connect it using this simple circuit to power it, enable each element from Arduino and then wait for the action input signal from Arduino.
You can use this input signal to power the motor On or Off. And if you apply this signal on the other input from the same IC channel you get the motor to move in the opposite direction.
Code
As for the code we use a simple code you can get even from the Arduino LED Blink example. This example makes one Arduino PIN High and thus it drives the motor in one direction.
For driving the motor in the opposite direction, we have copied the Blink example one more time on another PIN to drive it in the opposite direction.
Here is the Tinkercad simulation that shows us how the circuit and code are running.
Recent Posts
- My Six Years Old Son Wanted to Build His own Flying CarBuilding My Son’s Dream: A Flying Car with Tinkercad and Arduino Ever since my 6-year-old son could talk, he’s been fascinated by the idea of flying cars. He would sketch designs, build models with his toys, and talk about how one day he would soar above the ground in a car with wings. His dream… Read more: My Six Years Old Son Wanted to Build His own Flying Car
- How I made My Kids #Arduino #Flying Car #Tinkercad Dream #Aviation #AeroArduinoIntroduction: Welcome to a new project from AeroArduino, where we turn dreams into reality! In this exciting project, we’re bringing to life a childhood dream of creating an Arduino flying car using TinkerCAD. If you haven’t subscribed yet, be sure to hit that subscribe button to stay updated with our latest projects. Circuit Connection: Let’s… Read more: How I made My Kids #Arduino #Flying Car #Tinkercad Dream #Aviation #AeroArduino
- Easy #Tinkercad #Arduino distance measurement using ultrasonic sensor #AeroArduino
- Building a Smart Ultrasonic Car With Code Blocks on TinkercadToday, I want to share an exciting project that brings together ultrasonic sensors, motors, and a sprinkle of programming magic to create a Smart Ultrasonic Car. Imagine a little robotic vehicle that can sense its surroundings and make decisions on the fly – that’s exactly what we’re diving into! The Heart of the Project: Ultrasonic… Read more: Building a Smart Ultrasonic Car With Code Blocks on Tinkercad
- Super Simulation for Accelerometer with Arduino in TinkercadIntroduction The world of electronics education often relies on simulation software to bridge theoretical knowledge and practical application. TinkerCAD stands as a prominent platform for simulating electronic components, aiding enthusiasts and learners in experimenting virtually. In this tutorial, we’ll explore how to overcome the absence of an accelerometer component in TinkerCAD by using a creative… Read more: Super Simulation for Accelerometer with Arduino in Tinkercad
- Monitoring Soil Moisture with Arduino and LCD: A Step-by-Step GuideHow to Build Step-by-Step Arduino Soil Moisture Sensor With Tinkercad Simulation – DIY Guide on AeroArduino
- Revolutionizing Aircraft Ground Handling: The Advantages of Remotely Controlled TugsIntroduction: The aviation industry has witnessed minimal innovation in aircraft tugs, resulting in outdated and inefficient ground handling operations. However, the advent of remotely controlled aircraft tugs has the potential to transform ground handling practices. These advanced tugs offer numerous advantages over traditional counterparts, including increased efficiency, improved safety, and reduced environmental impact. In this… Read more: Revolutionizing Aircraft Ground Handling: The Advantages of Remotely Controlled Tugs
- The Mighty Antonov AN-22: Revolutionizing Cargo Transportation in the SkiesIntroduction: In the realm of aviation, where technological advancements continually push boundaries, the Antonov AN-22 shines as a true marvel. With its massive size and unparalleled cargo-carrying capabilities, this iconic propeller aircraft has carved its name in the annals of aviation history. Join us as we delve into the world of the Antonov AN-22 and… Read more: The Mighty Antonov AN-22: Revolutionizing Cargo Transportation in the Skies