summaryrefslogtreecommitdiff
path: root/OpenPLC_version_1/Experiments/2_Motor-PLC/motor.rst
blob: bcb5ba47dc18afabfef21ce188d96a4f7741ed31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
DC motor
========

Overview
--------

DC Motor, like the general purpose motors, are used in providing high RPM for rotation purposes, like for a pulley or in lifting action. Motors, are generally heavy duty, which means, connecting it directly to the controller pins may end up frying it up! So, to source higher
current, transistors or motor driver ICs are used. These are great as they can be easily used to turn your motor in either direction, just by giving digital high or low to the input pins of L293D Motor Driver IC. The easy part is, controlling the speed can be done by just changing the voltage bias given to the driver IC. 

Components required
-------------------

OpenPLC board

DC motor

Switch ON motor
---------------

In this experiment using an input switch, PLC turns on the motor connected to it. Motor is driven by l293d as explained above. L293d inputs are conncted to controller pin number 19 and 20. The switch is connected to pin number 1.

To run motor we always need two coils on ldmicro and one should be 'set' and other 'reset'. If we swap the coil status motor will run in opposite direction.

Motor-on-off
------------

We now know how to turn on a motor, Similarly we can turn it Off by giving another input. To stop motor, status of both the coils should be Reset, So in new rung we can give a switch and reset both the coils.
Anothr switch is connected to pin number 2.