You are on page 1of 15

CHAPTER 4

HARDWARE DESIGN AND SOFTWARE IMPLEMENTATION

4.1.Overall Block Diagram


Blade Motor 12 V Battery

Relay

Motor- 4
Arduino
Android
Bluetooth Nano LM – 298
App
module Atmega H – Bridge Module
HC - 06 Motor- 3
328

Motor- 1 Motor- 2

Figure 4.2 Overall block diagram of grass cutter robot with Bluetooth module
4.2.Block Operation

The android application from the smart phone controls the operation of grass
cutter robot. Android application sends signals that are commanded by user to
Bluetooth module. Bluetooth module sends received signals to Arduino Nano
(ATmega 328P) microcontroller. Arduino Nano controls the operation of relay
ON/OFF condition that controls cutting motor and controls the L298N H-Bridge
Module that controls the DC motors from moving part. All of the system is powered
by 12V DC battery.

4.3.Circuit Diagram
RX
Bluetooth TX
HC-06 GND
VCC 3.3V

+5V VCC NO +
GND NC Motor
D13 D12 IN COM -
3V3 D11
RLF D10
D9
A1 D8
A2 D7
A3 D6
A4 ARDUINO D5
A5 NANO D4
A6 AT MEGA D3
A7 328 D2

+5V 5V GND
RST RST
GND RXO
VIN T X1

L 298 N +
+ H-Bridge MOT OR 4
MOT OR 1 Out 1 Out 4 -
-

- -
Out 2 Out 3 MOT OR 3
MOT OR 2
+ +
12V GND 5V IN1 IN2 IN3 IN4

+12V +5V

Figure 4.3 Circuit diagram of grass cutter robot


4.4.Running time Calculation of battery

The running time of the grass cutter robot depends on the power from the
battery. This thesis use 12V ,5.4 A/h battery. So, calculation for the running time is
the following.

Time in hours vehicle can run ( Time);


Ah = 5.4 A- hours from the battery
Robot uses, A = 0.6 A ( Current )
Time =Ah / A
= 5.4Ah / 0.6A
= 9h

From the upper calculation, the running time of the grass cutter robot is 9
hours.

4.5.Software Implementation

The software implementation is the Arduino IDE based software environment.


A program written with the Arduino IDE is called a sketch. Sketches are saved on the
development computer as text files with the file extension .ino. Arduino Software
(IDE) pre-1.0 saved sketches with the extension. The sample workspace of Arduino
Software (IDE) is shown in figure (4.3).

A minimal Arduino C/C++ program consist of only two functions:

 setup(): This function is called once when a sketch starts after


power-up or reset. It is used to initialize variables, input and output
pin modes, and other libraries needed in the sketch.
 loop(): After setup() function exits (ends), the loop() function is
executed repeatedly in the main program. It controls the board until
the board is powered off or is reset.

Figure 4.3 Sample workspace of Arduino Software (IDE)


4.6.Program (Coding)

Firstly, the program writing for the grass cutter robot starts with the definition
of devices’ pin (Figure 4.4). And then, declaration of the input/output for all system
devices and checking the serial data are written at void setup () (Figure 4.5). If serial
data is getting, all of the system of the robot is operated by the serial data from
Bluetooth module. Operation states for the grass cutter robot are written in void loop
()(Figure 4.6).

Figure 4.4 Definition of devices pins

Figure 4.5 Definition of INPUT/OUTPUT devices

Figure 4.6 Operation program for the grass cutter robot


4.7.Program Flowchart
Start

Interface with
arduino

Read the
command from
the arduino
bluetooth RC
car appliication

Is forward Yes Car moves


direction? forward.

Is backward Yes Car moves


direction? backward.

No

Is left Yes
Car moves left.
direction?

No

Is right Yes
Car moves right.
direction?

No

No If the user want


to stop motion?

Yes

Stopping the
motion of car..

No Is switch on to the
blade of system?

Yes

Cut the grass

End

Figure 4.7 Flow chart of the grass cutter robot


4.8.Explanation on Flowchart

The steps of the programming flow chart of the grass cutting robot are following.

First step: The initialization of the system input and output devices.

Second step: Reading the commands from the serial data of Arduino Bluetooth
RC car android application.

Third step: Operating of the movement of the robot is written.

Fourth step: operation of the grass cutting section of the robot is written.

Final step: All of the process is completed, all of the running system are stopping.
4.9.

Simulation Progress

Proteus Simulation

It is a software suite containing schematic, simulation as well as PCB


designing.

 ISIS is the software used to draw schematics and simulate the circuits
in real time.The simulation allows human access during run time,thus
providing real time simulation.
 ARES is used for PCB designing.It has the feature of viewing output
in 3D view of the designed PCB along with components.
 The designer can also develop 2D drawings for the product.

Features

ISIS has wide range of components in its library. It has sources, signal
generators, measurement and analysis tools like oscilloscope, voltmeter,
ammeter etc., probes for real time monitoring of the parameters of the circuit,
switches, displays, loads like motors and lamps, discrete components like
resistors, capacitors, inductors, transformers, digital and analog Integrated
circuits, semi-conductor switches, relays, microcontrollers, processors, sensors
etc.

ARES offers PCB designing up to 14 inner layers, with surface mount


and through hole packages. It is embedded with the foot prints of different
category of components like ICs, transistors, headers, connectors and other
discrete components. It offers Auto routing and manual routing options to the
PCB Designer. The schematic drawn in the ISIS can be directly transferred
ARES.

Starting New Design

Step 1: Open ISIS software and select New design in File menu
Step 2: A dialogue box appears to save the current design. However,
we are creating a new design file so you can click Yes or No depending on the
content of the present file. Then a Pop-Up appears asking to select the
template. It is similar to selecting the paper size while printing. For now
select default or according to the layout size of the circuit.

Step 3:An untitled design sheet will be opened, save it according to your wish,it is
better to create a new folder for every layout as it generates other files supporting
your design. However, it is not mandatory.
Step 4:To Select components, Click on the component mode button.

Component Mode

Step 5: Click On Pick from Libraries. It shows the categories of components


available and a search option to enter the part name.
Step 6: Select the components from categories or type the part name in
Keywords text box.

Example shows selection of push button. Select the components


accordingly.
Step 7: The selected components will appear in the devices list. Select the
component and place it in the design sheet by left-click.

4.10.Simulation and results

The testing of the grass cutter robot with Bluetooth module simulates at the
Proteus software. Firstly, components to be used are searched in components mode,
terminal mode, and instruments sections. And then, picked components are placed and
connected them. If all of the connection of components are checking right or wrong. If
all connection is right, user open Arduino software and run the program. After
running program, HEX file path copies from the Arduino software. This path is pasted
to the edit component mode of microcontroller. All of the above steps are completed,
simulation is starting. The results of the simulation are shown in figure 4.8.

The simulation for the grass cutter robot operation is used Proteus simulation
software. At the running of simulation, virtual terminal is used for checking the
receiving signals from Bluetooth module.

Figure 4.8. (a) Forward condition of the grass cutter robot at simulation
Figure 4.8. (b) Reverse condition of the grass cutter robot at simulation

Figure 4.8. (c) Right condition of the grass cutter robot at simulation

Figure 4.8. (d) Left condition of the grass cutter robot at simulation

Figure 4.8. (e) Pump motor ON condition of the grass cutter robot at simulation
Figure 4.8. (f) Pump motor OFF condition of the grass cutter robot at simulation

Figure 4.9 Final results for the simulation of grass cutter robot

4.11 Hardware testing and resulting

The hardware testing of the grass cutter robot with Bluetooth module includes
the following steps.

 Testing forward and reverse movement of DC motors (300rpm) with L298N


motor driver
 Testing the grass cutting DC motor(6000rpm) with relaymodule
 Paring HC06 Bluetooth module and Bluetooth application on android phone
 All system are wiring and test driving of the grass cutter robot

4.11.1 Testing forward and reverse controlling of grass cutter robot

The testing of the forward and reverse controlling of grass cutter robot uses
four DC motor (300rpm), L298N motor driver and Arduino Nano microcontroller.
The positive and negative of the left-side two dc motor are connected with parallel
and the positive line of the motors are connect the OUT1 of the L298N motor driver.
The negative line of the motors are connect the OUT2 of the L298N motor driver. The
positive and negative of the right-side two dc motor are connected with parallel and
the positive line of the motors are connect the OUT3 of the L298N motor driver. The
negative line of the motors are connect the OUT4 of the L298N motor driver.

The control signal pins of the L298N motor driver is connected to the Arduino
Nano microcontroller. When microcontroller provides the signals, motor driver drives
forward and reverse movement and left turning and right turning movement. The
control process of motor forward and reverse movement is shown in table 4.1. The
movement of the robot is shown in figure 4.11.

Table 4.1 Motor driving control

IN1 IN2 IN3 IN4 Motor movement

HIGH LOW HIGH LOW FORWARD

LOW HIGH LOW HIGH REVERSE

HIGH LOW LOW HIGH LEFT-TURNING

LOW HIGH HIGH LOW RIGHT-TURNING

LOW LOW LOW LOW STOP

12V OUT1
GND OUT2
L298 MOTOR
5V DRIVER - +
OUT3 Right DC
12V
IN1 IN2 IN3 IN4 OUT4 motors

5 6 9 10 Left DC
12V - motors
GND ARDUINO Nano

Figure 4.10 Circuit Diagram for moving section


Figure 4.11 Forward ,Reverse, Left-turning and Right-turning of grass cutter
robot

4.11.2. Testing the grass cutting DC motor(6000rpm) with relaymodule

The testing of grass cutting motor is controlled with Arduino Nano and Relay
module. When microcontroller is not provided any signals to relay module, relay
module doesn’t operates cutting motor. If microcontroller is provided any signals to
relay module, relay module operates cutting motor. The operation of the cutter motor
driving is shown in figure 4.12.

Figure 4.12 Cutter motor driving with relay ON/OFF


4.11.3. Paring HC06 Bluetooth module and Bluetooth application on android
phone

Paring HC06 Bluetooth module and Bluetooth application on android phone is


needed to control the whole system of the grass cutter robot. The paring is manually
choice and searching the name “HC06” that the name of Bluetooth module. After
paring devices, android application is ready to control robot. The testing of the
Bluetooth module paring states are shown in figure 4.13. Bluetooth RC car controller
software for android smart phone is shown in figure 4.14.

Figure 4.13.Bluetooth module paring and testing

Figure 4.14.Bluetooth RC Controller for smart phone

4.11.4 Wring and test driving

After above the testing is completed, all the system of the robot start to
running. Grass cutter robot operates under the commands of the user. User controls
the operation of robot with android app at smart phone. The testing of the grass cutter
robots operation is shown in figure 4.13.
Figure 4.14 Testing results of the grass cutter robot

You might also like