Author Topic: Motor Speed control  (Read 20860 times)

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Motor Speed control
« Reply #15 on: June 09, 2011, 12:20:20 PM »
Hi. thanks for the reply. Why is the A and B phase output not applicable? Can I put the flip flop onto the 2 phase before feeding to the hsc of the plc? Both phase will be lowered and plc may be able to read the signa?

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Motor Speed control
« Reply #16 on: June 09, 2011, 02:50:23 PM »
I assume that if you are using a quadrature encoder (A and B phase outputs) that you are building some nature of servo positioning system.

Using a simple circuit such as what can be done with a CD4013 or CD4040 to divide the incoming frequency of both phases by 4 will not preserve the phase relationship of the original A and B signals. This will confuse the crap out of the quadrature decode mechanism in the PLC.  

If you are using a quadrature encoder and "looking" at only a single phase, then I assume that you are only interested in counting shaft revolutions.  If this is the case then, I'd ask, "why are you using an expensive encoder when a cheaper one would be fine?".

If you are only interested in counting shaft revolutions, and cannot use a more appropriate encoder, then a simple divide by 4 circuit might be a reasonable method to better match your system to the PLCs capabilities.

Gary d






can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Motor Speed control
« Reply #17 on: June 10, 2011, 07:46:12 AM »
Hi Gary, you right. I'm trying to build a servo positioning system using the 888. When I first had the idea, people were telling me that the positioning system can only be built with better and more expensive PLC. So I'm currently trying to prove them wrong. Any idea how to do it? If there's no solution, then maybe I will have to use a linear scale with the PLC to get the linear position. Any experience with linear scale output? thanks.

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Motor Speed control
« Reply #18 on: June 10, 2011, 02:14:19 PM »
I'd suggest using stepper motors.  The PLC provides very good support for steppers. You will probably need an external stepper driver to handle converting the PLC step and direction signals to the high current drive required by most steppers.

If you are looking for very low cost, RC servos are the cheapest approach to moving stuff that i've ever found.  The PLC's PWM system can be tricked into controlling these servos.  

Are you trying to build a multiple-axis system? If this is the case then you should listen to the people.  I consider this to be beyond the capabilities of the PLC unless you spend big money on external hardware.

Gary d

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Motor Speed control
« Reply #19 on: August 02, 2011, 10:37:10 AM »
Hi Gary, thanks for the information. Can you show me how to use CD4013 or CD4040 to divide a single phase by 4 or 2? I'm only interested with counting the number of revolutions of the shaft. Beggers cannot be choosers. Have to make do with what's on the ground. thanks.

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Motor Speed control
« Reply #20 on: August 02, 2011, 06:21:06 PM »
Can,

This schematic is typical for a divide by 4 circuit using a CD4013 (dual d f/f).

The CD4013 works well with voltages from 5 to 15 VDC.  The diagram shows 12VDC.

A typical optical isolator is used for interfacing your encoder to the CD4013.  If you encoder can operate on the same supply voltage as the CD4013 you can probably eliminate this circuitry.  If the output from the optical isolator is "noisy" or slow to rise, you may need to add additional circuitry between the optical isolator and the CD4013.

I show a single section of a ULN2003 to interface to the PLC logic. Even if your PLC were running at the same voltage (12V) as the CD4013, you will still need something like the ULN2003. The CD4013 cannot sink enough current to wiggle the PLC inputs.

If you only need to divide by 2 then connect the ULN2003 input to the directly to CD4013 pin #1. Connect CD413 pin #11 to GND.

Not shown on this diagram are supply bypass capacitors.  These are typically used to ensure that electrical noise from external sources is suppressed and will not disturb this logic and to avoid any noise generated by the CD4013 (not a real big issue with CD4XXX devices...) from causing issues with other circuitry.

Good Luck,

Gary D

   
« Last Edit: August 03, 2011, 03:51:20 PM by garysdickinson »