DC Motor Speed Control by Android
DC Motor Speed Control by Android
Abstract:-
Interfacing DC motor to the microcontroller is a very important concept
in many industrial and robotic applications. By interfacing DC motor to
the microcontroller, we can control the direction of the motor, control the
speed of the motor. This article describes you, Speed Control of DC
Motor using Arduino nano with the help of Bluetooth Android controller.
Block Diagram:-
Hardware Requirements:-
S Name of Resource Qty. Remark
No
1 ATmega328pMicrocontroller 1
2 HC-05 Bluetooth module 1
3 12Vadaptor 1
4 L298 Motor Driver 1
5 0PCB 6x4 normal 2
6 12 V DC jack female 1
7 Header pin 40 point male 1
straight
8 header pin 40 point female 1
straight
9 5V DC Motor 1
Controller Working:-
This system DC motor Controller by Android is developed to control the
speed of the DC motor in clockwise direction. For this DC motor is interfaced
to the Arduino nano. A Bluetooth modem is used to receive PWM commands.
When an Android device sends commands, it is received by the Bluetooth
modem which then sends the commands to the microcontroller. The
microcontroller the controls the DC motor through motor driver. The entire
system is powered by 12V DC adapter. The android application is used to
control the entire system. Thus the speed of the motor can be increased or
decreased in clockwise direction with the help of this android application.
Components Specifications:-
1)ATmega328p Microcontroller: -
The ATmega328 is a single-chip microcontroller created by Atmel in
the megaAVR family (later Microchip Technology acquired Atmel in 2016). It
has a modified Harvard architecture 8-bit RISC processor core.
The Atmel 8-bit AVR RISC-based microcontroller combines
32 KB ISP flash memory with read-while-write capabilities, 1 KB EEPROM,
2 KB SRAM, 23 general-purpose I/O lines, 32 general-purpose
working registers, 3 flexible timer/counters with compare modes, internal and
external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, 6-channel 10-bit A/D converter (8 channels
in TQFP and QFN/MLF packages), programmable watchdog timer with
internal oscillator, and 5 software-selectable power-saving modes. The device
operates between 1.8 and 5.5 volts. The device achieves throughput
approaching 1 MIPS/MHz
ATmega-328 has 32KB internal flash memory. ATmega328 has 1KB
Electrically Erasable Programmable Read-Only Memory (EEPROM). This
property shows if the electric supply supplied to the micro-controller is
removed, even then it can store the data and can provide results after providing
it with the electric supply.
This is the DC motor, which can be used in any DIY project or in the small toys. With an
operating voltage range of 3V-6V this motors can be operated using two AA batteries or
with a 5V USB power supply.
Features:
1)Operating Voltage Range: 3 to 6VDC
2)Maximum RPM: 10000
2)Shaft Diameter: 1.65mm
4(Weight: 15 gm per motor
Software Requirement:-
Arduino IDE
Arduino is a both an open source software library and an open-source breakout board for the
popular AVR micro-controllers. The Arduino IDE (Integrated Development Environment) is
the program used to write code, and comes in the form of a downloadable file on the Arduino
website. The Arduino board is the physical board that stores and performs the code uploaded
to it. Both the software package and the board are referred to as "Arduino."
What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a
Twitter message - and turn it into an output - activating a motor, turning on an LED,
publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to
complex scientific instruments. A worldwide community of makers - students, hobbyists,
artists, programmers, and professionals - has gathered around this open-source platform, their
contributions have added up to an incredible amount of accessible knowledge that can be of
great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping,
aimed at students without a background in electronics and programming. As soon as it
reached a wider community, the Arduino board started changing to adapt to new needs and
challenges, differentiating its offer from simple 8-bit boards to products for IoT applications,
wearable, 3D printing, and embedded environments. All Arduino boards are completely
open-source, empowering users to build them independently and eventually adapt them to
their particular needs. The software, too, is open-source, and it is growing through the
contributions of users worldwide.
Circuit Diagram:-
Codi
ng:-
int in1=2;
int in2=3;
#define enA 6
void setup()
{
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(enA,OUTPUT);
Serial.begin(9600);
}
void loop()
{
if(Serial.available()>0)
{
byte pwm = Serial.read();
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
analogWrite(enA,pwm);
delay(50);
}
10.0) Application
Following are the applications of the DC motor speed control by Android.
1. This project can be used in industries and security, application.
2. This project is easy to use .