Motion control safety feature

Discussion in 'The Projects Forum' started by paulepc, May 9, 2014.

  1. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    I posted this in the wrong forum so reposted here.

    The project receives a PWM signal that goes through a u/Controller which outputs .5 volts to 3 volts this needs to be converted to +/- 10 volts to drive a motion controller driving servo motors. my circuit simulates what I need.

    My problem is if there is no signal coming out of the u/controller I need the output to be zero volts, this makes sure the motion controller cannot move therefore safe.

    So what I need is to disable the circuit or switch off the output and pull it to ground if the input drops below .5 volts

    I am stuck on this I would really appreciate some help.

    Paul
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    In the normal servo motor system this would be a closed loop system, so there would be no reason or desire to cease the ±10vdc control signal?
    IOW the ±10vdc is continuously active.
    If you do wish to position then disable the drive, it may be a better idea to have a disable input on the drive itself that would turn off the active motor drivers.
    Max.
     
  3. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    I do have that feature. but I have had the rig spin when I have lost connection or simple turn the u/C off
    Paul
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    It is very hard to obtain zero motion or drift when the loop has lost control.
    This is why most commercial systems have this safety built into the system, a watchdog or some system is used in either the emergency stop or shut down motion circuitry in the event that power etc to the controller is lost.
    Max.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,748
    4,796
    What does the microcontroller output when it is turned off? In other words, if you measure the voltage on the output of the microcontroller, how can you tell whether it is one or off. Is it set up specifically so that the lowest active output if 0.5V, or does that just happen to be the lowest output it is able to achieve? Is the microcontroller output analog, or digital? Is the +/- 10V analog or digital? Could you sketch what you want the input-output relationship to look like?
     
  6. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Yes but on the attached circuit I only need to shut down the outgoing voltage to ground. I didn't think was that difficult.
    If the input goes below .5 the output goes to zero, I think it's just a digital switch, but I seem to crack it.
    Thanks for the input.
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    I still don't think it is a good idea to keep the drive active when the control has been lost.
    Max.
     
  8. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    It's should become inactive, this is a belt and braces approach to try and cover all eventualities. Just trying to be extra careful. This project is basically finished, I just need to have the output off circuit and I can get the PCB's made.
    Paul
     
  9. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    You could use a comparator like an LM339 to monitor the output of the first op amp and force the input of the second op amp to ground if it is below 1.5 volts. There would still be a few 100 mv on the 10 volt line, but maybe that is ok?
     
  10. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    In my mind the drive will not necessarily become inactive just by taking the ±10vdc to 0v, in theory maybe.
    I am just used to setting motion card operated servo's up and either the drive power is removed or a inhibit input is used when the control loop is no longer closed for some reason. ;)
    Max.
     
  11. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    Yep.
    Forget my idea I didn't notice the voltage was above and below ground.
     
  12. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    When the u/C is off there is zero volts.Its all analogue, the output I can get is .1 of a volt but I programmed the u/C to .5 volts to give me a margin to work with i.e. 0 to .5.volts.
    the +/-10 volts is analogue.
    I thought about a comparator but on the simulation I done it's either off or on. when it's on I need the signal to swing up and down through the op amp. However I have never built a comparator, only recently reading about them
     
  13. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Max when the u/c is on it will output an enable signal to the motion controller so if it goes off the motion controller should disable itself. but if the u/c is on and I lose the signal between the u/C and the op amps the it is still active that's why I am trying to built in extra safety measures.

    Thanks all please keep it coming.
     
  14. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    If a servo system then obviously you have a feedback element of some kind, encoder etc?
    Then in that case the usual thing that occurs is that the controller detects a following error that is larger than the allowed value and shuts off the enable.
    It is rare to anticipate losing the analog signal somewhere between the controller and the drive, it there a reason for this concern?
    Max.
     
  15. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    The encoder feedback is between the servo and motion controller, so if I want to jog an axis I would apply a analogue voltage to the analogue in on the motion controller which would move the axis. So if by way of an op amp error a analogue voltage appears on the motion controller then the motion controller will regard this as a jog command.

    I don't think this is difficult question, but I may be wrong of course.
     
  16. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Not on the controllers I use, if the motor moves when its not supposed to (spurious move command) then the controller would perceive this as an error?
    My typical systems are similar in concept, the loop is closed between the motor encoder and the controller, the drive is operated in the torque mode and does not receive any other feed back in the PID loop.
    Max.
     
  17. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    Starting to be a lot of stuff for a safety circuit, but at least it should fail safe.
    You could use a comparator to detect the low voltage from the micro - maybe from the output of the first op amp. You could then add an analog switch between the input of the second op amp and the output of the first one. If you add say 100k to ground on the input of the second op amp when the comparator tells the switch to open the output would then go to ground. If this doesn't make sense let me know and I'll draw a picture tomorrow.

    http://www.mouser.com/ds/2/256/DG417-DG419-10577.pdf
     
  18. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Well done ronv! sounds just what I need, I have ordered some today. I was not aware of a analogue switch.

    Thank you!
    Paul.
     
  19. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Does this do what you want?
     
  20. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Thanks for the circuit To be honest I don't know if it is what I am looking for. I will study it for a bit to get my head round it.
    What software is it?
    Paul
     
Loading...