Shop OBEX P1 Docs P2 Docs Learn Events
pid position control — Parallax Forums

pid position control

I want to make pid position control for dc motor.I will use incremental encoder for feedback and lmd 18200 h bridge for driving dc motor.I check obex there is no this kind of object .are there any one who have some idea on coding 

Comments

  • Check the Internet / Google for PID controllers & code examples.  There are a lot to choose from.  My engineering experience says to buy a PID controller unit, or get a good used one for cheap.   You will be getting the case, circuitry, driver /relay, display and numerous configurations in a all-in-one package.  You should be able get something for about $50, and be up and running in a couple of hours.
  • sorry.I dont need any hardware.I need
  • only modify the object name is pid  encoder which writen by Kwabena Agyeman .I m reading encoder without any problem.but driving on lmd 18200 have problems.help please
  • pls help me on assably of this file.I dont find way for working on lmd 18200.my mean to configure dir and pwm signals 
  • PID motor control in the real world is a major undertaking.  You have to be willing to roll up your sleeves and invest a lot of time and energy into tweaking code to fit your needs.  This is not something you can get a quick answer for. 
  • I want to make pid position control for dc motor.I will use incremental encoder for feedback and lmd 18200 h bridge for driving dc motor.I check obex there is no this kind of object .are there any one who have some idea on coding 


    This does exist in the OBEX. The author is Craig Weber (crgwbr).

    The only strange thing he did was to have the same K for KP, KI, KD but this is easily rectified. One forum member addressed  this issue and the thread title included "enhanced PID....", IIRC but I could not locate the thread.

    I attempted something similar using Propbasic but I need encoder frequencies beyond what the Prop can handle so I decided to use dedicated motion chips from jrkerr.com. The chips have a serial interface, 2.5MHz encoder frequency (with filtering) and handle trapezoidal motion profiling.





  • If I understand the OP's question, I think he's just looking for help in modifying Kye's code to use different control pins.
    I don't recall if Kye uses two direction control pins or one. I think the OP is asking for the code to use a different number of direction control pins.
  • Oh, I use Antiphase PWM on the 18200 which is explained well on the datasheet. No need for direction control pins.
Sign In or Register to comment.