Shop OBEX P1 Docs P2 Docs Learn Events
Motor control, motor to work as a servo — Parallax Forums

Motor control, motor to work as a servo

Sutton MurraySutton Murray Posts: 88
edited 2006-10-06 19:24 in BASIC Stamp
Me again

Another project of mine. At work we are running Shanck Dynamometers to test diesel engines. Loads on the power head(to monitor the strength of the diesel engine)·are controlled using a servo motor. The servo motor in turn is controlling a valve opening and closing only at an angle of +/- 180 degrees. This gives the different loads against the diesel engine and makes it possible·to monitor the power given by the·engine.·The problem is the servo is not a servo motor but a normal DC motor(28 volt 5 amps) with a Potentiometer connected to the rotating shaft to give the shafts current position. The original blown electronics controlled the motor as a servo. Pulses are send to the motor in a positive direction an back in a negative direction. Pulse width forward and back wards are the same keeping the motor shaft in a still position. Changing·the pulse width slightly in one diretion for a short period of time will move the shaft slightly, operating as a normal servo. I have tried and to some extend are winning using a 555 putting out positive and negative pulses to the motor. With lack of 555 knowledge i am getting stuck with the 555 pulsing details.·The shaft is either vibrating or not moving as planned.·Can any one help Any other quicker way to hook this up with the stamp. Note this project is not price limited.sad.gif
·

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-10-03 19:43
    You can probably get the same result by feeding the motor with an H-bridge and then feed the control of the H-bridge with either the 555 timer circuit or use a Stamp. How was the pulse width varied before?

    This reminds me of the old "dither" circuits used in the voltage regulators of hydro-electric generators. The +/_ voltage applied to the motor kept the control arms from sticking in one postion because they were always moving.

    Sounds like an interesting project, theres nothing like the rumble of a big diesel under full load!!

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-10-03 20:05
    What does Shanck say about all this? (since this is not a price limited project)

    Usually, trying to replace another vendor's electronics -- especially in a life-critical application like a Dynamometer load test -- is not a good idea.
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-10-03 21:19
    My 555 project is driving the H-bridge. The H-bridge is the only way i know to get the motor turning clock and ant-clock wise. Shanck used to be in this country and my understanding is that the comany was sold off to another in Europe(not supporting the product). Some loose running around guys do still try to fix the units. But unfurtunatly they are not winning on the these Dynamometers. Two of our units are standing due to this. Two other units have been replaced with a company that modified them with their own new electronics. Luck us now this company also died. No support any more.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-10-03 22:06
    You'll need the 555 to be set up to give variable pulse widths, with a constant frequency. At equal pulse widths, the motor stands still, as you've noted. Change the relative widths and the motor will advance or reverse. I think I have a circuit from an old electronic cookbook if you'd like to go that way. I'll try to dig it up and post.

    Hopefully, you have a good idea of what the pulse repetition rate is. No matter, if the frequency is too high the motor will vibrate but not move, and if too low,
    the motor will move too far during each cycle.

    As has been stated previously, this will require careful implementation so as not to damage people or machinery.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Kirk FraserKirk Fraser Posts: 364
    edited 2006-10-03 22:18
    I am interested in this project because you are using a DC motor which I understand is just as good as servomotors. Since you say price is not limited, there is a likely solution at http://www.battlekits.com/controllers.htm which they developed to run high performance DC motors for robot control. However if you are interested in a Stamp solution, I would like to discuss this further, the problem being I am also not an expert.

    First, I don't know what an H-Bridge is. The thing I have is a circuit developed with help from Tracy, another Stamp user to run a hydraulic valve which has two coils, one for forward and the other reverse, in proportional mode. I am not sure but maybe it can be adapted using 5 of the one-amp driver transistors to handle your 5 amp motor with no pulses at all -- just direct drive. One side would be connected in forward and the other in reverse with diodes to make sure there is no leakage between the sides. Then you just program the Stamp to take whatever you have for input and proportionately apply it to the appropriate side, only one side at a time. If you want to try this, I can post a circuit.

    Another tip is Stamps are known to be useful for PWM (pulse width modulation) circuits and I think they have some online or in a tutorial book along with H-Bridge info. That may also require using 5 times the drivers or some other driver transistor to mate your 5 amp motor.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-10-03 23:42
    ·· Here are two circuits to use as building blocks for PWM control. The second one is probably what you need in terms of constant frequency and variable rate. I used it when I was working on an an electric vehicle controller back in the 80's.

    ·· I can't claim to have developed them, but unfortunately I don't have a good reference as to who did.

    ·· If desired, you could have a stamp on the front end to deal with safety interlocks and provide a point of operator interface.

    · Regards,

    ·



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-10-04 14:24
    Tom

    Thanks for the diagram, i definitly will be trying it out. By the sounds of it, it must be the type of circuit used for this type of control even the age mentioned also corrospond with the equipment. Thanks again.


    Kirk

    Thanks for the link, i will be analysing the units better, but as far as i can tell these units will work. As to the circuit you mentioned. I will never say no if you are to post it to me, it will be greatly appreciated. Thanks

    I should have joined this forum long ago. I am quite amazed at the help i am getting, thanks all.
  • Kirk FraserKirk Fraser Posts: 364
    edited 2006-10-04 23:06
    After thinking further, my solution seems to require more parts than Tom's solution·and it would require using the Stamp to emit alternating signals much like your 555 solution·to hold the motor in a specific position, otherwise it would just keep turning or have no resistance to turning in the opposite direction.·

    The advantage is having more complete control with the ability to vary·amplitude as well as duration of pulses.· You don't need it in your application but here's the circuit in case you want to give it a try.· It would be much cheaper than the link I posted but the 555 solution will be cheaper yet and quicker to build.

    To make this circuit work with your motor·you have to add some diodes to make each·half of the output correspond to reverse and forward on your motor and you must either use a higher power transistor or several more of the ones indicated to total 5 amps.
    1670 x 2347 - 262K
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-10-05 13:35
    Kirk

    Many thanks for your circuit, i can't thank you enough for the help.
    Question on your circuit. What was this circuit originally used for? Also is 12 bit resolution needed for such application, will a 8 bit do, just curious, not that i want to change it. The pot in my application will only work at an angle of 180 degrees. Another thing, the clock in your ciucuit. What clock is this?
    Thanks again for the circuit
  • Kirk FraserKirk Fraser Posts: 364
    edited 2006-10-05 18:47
    Sutton,

    The circuit will soon be used for a rotary hydraulic actuator swing test. The 12 bit resolution is to get as accurate as possible. With 8 bits you get a maximum accuracy of one position in 256 but with 12 and regulated & referenced power, extra filtering capacitors, and input averaging I get one position in 360 which at 3' swing is an error of an inch or two I can live with but don't like. I received more suggestions from the manufacturer which I'll discuss in my own thread soon with hope of increasing accuracy to tenths of a degree. You don't need that accuracy so 8 bits should be fine.

    The clock is the one available from Parallax. It was purchased just in case I need it to supply timing to the calculus formula used to smooth the swing ends and maximize power in the middle of the stroke. You don't need it at all in your application.

    This circuit was way over my head but Tracy and others helped me get it designed and working on this forum so I believe in following their example and helping others here as I can.

    Kirk
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-10-06 19:24
    Kirk i can only thank you again, thanks.
    Tracy has also helped me with another probleme of mine so i am thanking him again, thanks.
Sign In or Register to comment.