top of page

How to interface a DC motor with Arduino UNO using TinkerCAD?

Updated: Mar 19

Table of Contents :


Introduction :

The speed of the DC motor, in general, is directly proportional to the supply voltage, thus if the supply voltage (let's say V) is reduced to half of the initial value, then the speed of the DC motor will also become half of the initial value of speed. But practically it is not feasible to change the supply voltage every single time in order to control the speed of the DC motor. Speed of the DC motor can be regulated using Pulse Width Modulation (PWM) by #interfacing the DC motor with #Arduino UNO.

Duty Cycle is defined as the ratio of the digital 'high' period to the total sample period.

Duty Cycle = Ton/(Ton+Toff)

In this article, we will interface a DC motor with an Arduino UNO using TinkerCAD #simulation software. Simulating a circuit before implementing the circuit manually helps to visualize the connections and it also provides the output under different conditions and constraints which would help to cross-check the output of the circuit implemented manually.

A list of components required to implement the circuit both manually and using TinkerCAD are given below.

Hardware Requirements:

1.Breadboard :


A #breadboard is a flat piece of wood that is provided with holes that allow users to build a circuit including the components and connections without the need for soldering due to which it is reusable and finds its best usage for the students who are new to build circuits. The holes in any horizontal line will be in series whereas the vertical holes remain at an equipotential state. There are different sizes of breadboards available in the market which include "full size", "half-size" and, "mini size" breadboards.

You can purchase breadboard here.

2. Arduino UNO:

The Arduino is a programmable #microcontroller, it's an open-source electronics proto-type platform. It interacts with the user by receiving input with the aid of sensors and provides the output employing LED, buzzer, etc.,

cc,arduino,arduino projects,arduino uno
Arduino UNO

In order to know more about the Arduino UNO, go through this article.

You can purchase Arduino UNO here.

3. DC Motor:

It is a type of electrical machine that converts electrical energy into mechanical energy. It takes electrical power through direct current and converts this energy to mechanical rotation.

DC motor price:

DC motors are highly versatile devices used in a wide range of applications, and DC Motor prices can vary depending on factors such as power rating, brand, and quality. Before purchasing a DC motor, it's essential to consider the DC motor price to ensure it fits your budget and requirements. Additionally, understanding the different types of DC motors available is crucial for selecting the right one for your specific application.

Types of DC Motor:

There are several types of DC motors, each designed to cater to different needs. The most common types include brushed DC motors, brushless DC motors, and stepper motors. Brushed DC motors have been widely used for years and are relatively simple, but they require maintenance due to the brushes that wear out over time. Brushless DC motors, on the other hand, offer higher efficiency and longer lifespan, as they eliminate the need for brushes, making them ideal for many modern applications. Stepper motors are known for their precise control and are commonly used in applications where accurate positioning is crucial.

Working principle of DC Motor:

To better understand the working principle of a DC motor, it's helpful to study a DC motor diagram. A typical DC motor consists of two main components: a stator (stationary part) and a rotor (rotating part). The stator contains field windings that produce a magnetic field, while the rotor holds conductors (armature) that carry current. When an electric current flows through the armature, it interacts with the magnetic field created by the stator, generating a force that causes the rotor to rotate.

The working principle of a DC motor is based on two fundamental principles: Faraday's law of electromagnetic induction and the Lorentz force principle. According to Faraday's law, when a conductor (armature) carrying current is placed in a magnetic field (stator's field), it experiences a force. This force is perpendicular to both the current direction and the magnetic field, causing the rotor to rotate. The Lorentz force principle states that when a current-carrying conductor is placed in a magnetic field, it experiences a force perpendicular to both the current direction and the magnetic field direction. These two principles working together create the rotational motion in a DC motor.

Understanding the working principle of DC motors is essential for anyone interested in electronics, robotics, or engineering. Whether you're looking to purchase a DC motor or explore the inner workings of these devices for educational purposes, delving into the intricacies of DC motors is a fascinating and valuable journey.

DC Motor diagram :

DC Motor Diagram
DC Motor Diagram

motor,electric motor,dc motor price ,brushless dc motor,dc motor diagram ,,types of dc motor working principle of dc motor,dc motor working
DC Motor

You can purchase dc motor here.

4.Jumping Wires:

Jumper wires are used to establish connections between different components in the circuit.

jumping wires,jumping wire price,jumper cable wire,
Jumping wires

You can purchase Jumping wires here.

5. Resistor:

Resistor as the name signifies, opposes the flow of electrons. The Resistor is a passive element and has two terminals. They are basically used to monitor the current flow and also as voltage dividers. The #resistor that we would use in this circuit is a 220-ohm resistor and the color code for this resistor is Red, Red, Brown & Gold.

resistor symbol ,resistor definition ,what is resistor,types of resistor ,resistor color code calculator

You can purchase resistors here.

6. Transistor:

The Transistor is a semiconductor device that is basically used to amplify or switch electronic signals. It consists of three layers of semiconductor material and it has three terminals namely Base, Emitter, and Collector. #NPN transistor is used in this circuit.

transistor,pnp transistor,npn transistor

You can purchase transistors here.

7. Diode:

#Diode is a two-terminal electronic device that primarily conducts current in one direction (i.e it will have negligible resistance in one direction and very high resistance in the other direction). It contains two layers of semiconductor material.

Diode,what is diode,diode definition,diode symboltypes of diode,application of diodediode meaning
pn junction diode

You can purchase diodes here.

Software Requirements :

TinkerCAD Software:

tinkercad,3d ,autodesk student,tinkercad login ,tinker,

It is an easy-to-use online simulation software that is equipped with all the essential components which are required to build the circuit and analyze it.

To access the TinkerCAD platform, users can perform a TinkerCAD login using their registered account credentials. By visiting the official TinkerCAD website ( and entering their username and password, users gain access to the versatile online simulation software. The TinkerCAD login process allows individuals to create, design, and simulate circuits, projects, and 3D models in a virtual environment. Whether you're a student, educator, hobbyist, or engineer, TinkerCAD's user-friendly interface provides a seamless experience for bringing electronic and mechanical designs to life. Get started today with a TinkerCAD login and explore the endless possibilities of electronics and 3D modeling.

Circuit Connection :

Circuit connection involves the following steps :

  • Initially, PIN number 3 of the Arduino UNO is used to supply the PWM signal to the base of the NPN transistor via a 220-ohm resistor.

  • The Collector of the transistor is connected to terminal 1 of the DC motor.

  • The Emitter of the transistor is connected to the ground.

  • Terminal 1 of the DC motor is also connected to the diode which is further connected to the 5V supply.

  • Terminal 2 of the DC motor is directly connected to the 5V supply.

  • Power to the circuit will be provided by the Arduino UNO.

Code :

NOTE: To simulate the circuit in #TinkerCAD the default code present in the window needs to be removed and copy-paste the downloaded code.

Working :

To start with first visit the TinkerCAD website. Create an account and move to the circuits section. By clicking on create a new circuit, you will be driven to a window where you can build the circuit. It will be equipped with all the components required and you can just drag the elements necessary and connections can be made using jumper wires.

To know more about TinkerCAD, you can just surf through the website or you can watch the video.

Upload the code in the code section and start simulating to check the output of your circuit.

Watch the video attached below for a clear understanding of how the connections are made and the simulation procedure.

Video By - Harshit Gupta

Check the Project working video here - How to interface a DC motor with Arduino Uno || tinkercad

Simulation software plays a leading role in designing huge circuits which help to understand, analyze and provide outputs for a large set of input values which would be hectic doing it manually. It helps in avoiding any damage to the hardware by going beyond the rated value.

Validate your new circuit ideas and know the scope and boundaries of your circuit.


See Also:

Follow us :

Please do follow us i.e #learnelectronicsindia to get daily updates about new blogs, videos, courses, quizzes, and contests.

Check us :

Click on the below links for internship and other opportunities:

2 comentarios

LearnElectronics India's explanation is spot-on. Great work!

Me gusta

Anushka Gupta
Anushka Gupta
25 jul 2023

This blog post is a real gem! I've been wanting to experiment with Arduino and DC motors, and this article by Learn Electronics India was exactly what I needed. It guided me through the entire process with ease, and the explanations were so well-written that I felt confident throughout the project. Thank you for empowering learners like me.

Me gusta