Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
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 )
Hi,
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 )
Hi MGP,
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

http://robokitsworld.com/index...oduct_info&products_id=380

Here is also given how to control dc motor using encoder

http://letsmakerobots.com/node/38636

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
(no subject) (by s.meiyazhakan)
H-bridge for controlling the speed and direction.
Mon Jun 24 2019, 12:48:44
(no subject) (by s.meiyazhakan)
H-bridge for controlling the speed and direction. example
Mon Jun 24 2019, 12:49:54
(no subject) (by Ihor Nehrutsa)
Currently, strictly speaking, ldmicro encoder makes sense only as a manual control device with not fast speed.
Currently ldmicro use a software algorithm with an LPC cycle time. This algorithm not for motor control.
Motor control needs an interrupt algorithm(not released now).
Fri Jun 28 2019, 16:08:01, download attachment 42972403-faae3fb2-8bb7-11e8-9d65-5c6e4d428b4e.png
DC MOTOR PWM AND DIRCTION CONTROL (by s.meiyazhakan)
sir IAM USING THIS CIRCUITE HOW TO GENARATE PWM SEND EXPLE
IN1 AND IN2 EXPLAIN..
Thu Dec 12 2019, 05:19:20, download attachment 20Amps-H-Bridge-DC-Motor-Driver-with-Current-and-Fault-Feedback-2.png
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):