Shop OBEX P1 Docs P2 Docs Learn Events
Need ideas on 2 line PID controller , I think? — Parallax Forums

Need ideas on 2 line PID controller , I think?

sport270sport270 Posts: 82
edited 2013-11-13 05:13 in Propeller 1
I have 2 hydraulic cylinders for motion control. They are both controlled by 4port 3 way proportional valves. Each valve assembly has 2 solenoid ( one for out, one for in). I need a control that reads a sensor and compares it to a set point and then if above or below determines which solenoid to send a pwm output that is proportional to the error. And I need to control 2 circuits like this simultaneously. Will be on 12v automotive type application.

Comments

  • ReachReach Posts: 107
    edited 2013-11-11 20:01
    I'm not sure what you asking for but I am very fluent in PId control, so ask me questions if you like. The propeller can do this task and if you need a circuit board made please PM me and ill be happy to provide one for you.

    I would imagine a PCB would include a propeller, solenoid control and various D/a A/d ic's including Voltage references for precision / accuracy. The code would be simple then again your post is brief.

    Good day. :)
  • MicksterMickster Posts: 2,694
    edited 2013-11-12 07:02
    I have 2 hydraulic cylinders for motion control. They are both controlled by 4port 3 way proportional valves. Each valve assembly has 2 solenoid ( one for out, one for in). I need a control that reads a sensor and compares it to a set point and then if above or below determines which solenoid to send a pwm output that is proportional to the error. And I need to control 2 circuits like this simultaneously. Will be on 12v automotive type application.

    I wonder how a regular DC motor amplifier would work, using diodes to switch between the two opposing solenoids. This experiment is on my own to-do list.

    Question: Are you looking to control the position/velocity of the cylinders or the spool position of the prop-valve?
  • sport270sport270 Posts: 82
    edited 2013-11-12 11:33
    the two valves control a pair of double acting hydraulic cylinders. each having a proportional solenoid for each direction. a pair of 0-5v potentiometers are on the attachment and the sensor values are compared to a setpoint 0-5vdc potentiometer. and thus if the sensor is higher than the setpoint the down solenoid would be sent a 12vdc pwm signal in proportion to the error. and if the sensor is below set point, the the output goes to up solenoid and again pwm signal in proportion to error.
  • sport270sport270 Posts: 82
    edited 2013-11-12 11:50
    sorry, that wasnt really an answer to your question. I would say position & velocity of cylinder. This is simply a height control for a equipment attachment. a sensor is mounted on each side and the cylinder moves it up / Down to keep it at the selected height.
  • MicksterMickster Posts: 2,694
    edited 2013-11-13 05:13
    Absolute breeze for the Prop. You simply need an analog input (code in OBEX), PWM output (code in OBEX), decide what current you need to drive the solenoids and select the appropriate driver. Plenty of PID objects to try or you might even get away with a simple gain-break loop, similar to what Harprit does in his "Programming The Propeller With Spin" book.
    However, if the two cylinders need to be in sync or follow a particular motion profile, you will need something more sophisticated.
Sign In or Register to comment.