Prox / RFID
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Resume / Consulting
Contact Me

LDmicro Forum - Speed control of DC motor using Encoder

(you are viewing a thread; or go back to list of threads)

Speed control of DC motor using Encoder (by hari )
Can somebody help me out how to write ladder logic program to control dc motor using ENCODER i am using Atmega-8 micro-controller.
Mon May 19 2014, 03:20:52
(no subject) (by Boris)
What do You need.
Encoder is for the position not for speed.
This is speed control.
Mon May 19 2014, 07:13:10, download attachment Speed.ld
(no subject) (by hari )
if possible please give me position also
thanks for help
Mon May 19 2014, 08:01:03
(no subject) (by hari )
but this program is not read the encoder value and also how you increasing impuls block
Mon May 19 2014, 08:05:43
(no subject) (by Kamen Pecov)
Mon May 19 2014, 11:50:19
(no subject) (by MGP)
@Hari, we need more information, do you have a schematic?
To write a program, we need to know exactly what you want to do!
Mon May 19 2014, 15:03:19
(no subject) (by hari )
I have dc motor with encoder, i want to control the speed and direction of dc motor using encoder. i dnt have schematic but i am using dc motor given in link


Here is also given how to control dc motor using encoder


but i am not able to write in ladder logic. please help me if you want any other specification please let me know

thansk alot
Tue May 20 2014, 01:54:21
(no subject) (by MGP)
You cannot use this motor with encoder because LDmicro is too slow.
LDmicro can't handle 1330 counts per revolution.
You can use PWM without the encoder and a H-bridge for controlling the speed and direction.
Tue May 20 2014, 05:07:27
(no subject) (by hari )
with out encoder i have already done it. ok i will change my motor. still if possible can you write ladder program i want to use only one encoder for speed only..!!
Tue May 20 2014, 13:58:37
(no subject) (by Alex)
Hello, Do you have an example for speed control using h bridge L293D?
Mon Apr 29 2019, 20:26:21
(no subject) (by Alex)
i am using a 6v dc gear motor
Mon Apr 29 2019, 20:28:44, download attachment gear motor 6vdc.jpg
(no subject) (by Alex)
16f877a, 20Mhz crystal
Mon Apr 29 2019, 20:43:51
(no subject) (by Ziggy)
While it is true as MPG says LDmicro is slow, You can use encoder for speed and positional information within the limits of the loop cycle limits.

I am using an encoder and a divider so as to be able to divide only one bit stream down to a frequency the PLC will understand.

Typically, I think, the bit stream should be at most a quarter of the PLC loop frequency.
I intend to apply the signal to an input pin which will drive a counter to accumulate the pulses. Over a time frame it will provide speed and positional information without the direction feedback.

I hope to have this running during the coming week.

If i tun up crying... well be kind to me.

On a serious note a 16F84 was used in this fashion to establish a high speed servo amplifier.
Namely the counter input pin ( this time hardware counter within the micro was setup in this fashion with direction and count flags to update the hardware counter and generate control signals.

My quadrature cents worth.
Mon Apr 29 2019, 23:13:04
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):