Home Forums PID Control / Tuning PID control for motor

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • omsingh
    Participant
    Post count: 1

    i have a system in which i am using load cells output to drive two motors.load cell output is in range of 0-3.3V and according to output , i sample the analog through ADC in my program and according to the samples , motor speed is varying. but i have some problems regarding this because when i changed the load cell output , speed updation is not accurate, some time motor overruns.

    i am running motor according to the analog o/p given by load cell. i set the load value in my controller and according to that set value , load on the load cell is increased or decreased to attain the set value. for this motor speed should be increased or decreased.here i am facing difficulty to change motor speed according to load cell o/p.

    Brett
    Keymaster
    Post count: 101

    this question might be better served over at the diy-pid-control google group. this forum is more about the ospid specifically.

    but you posted here, so let’s see what we can do:

    looking at your code I don’t really see a separation of the proportional and integral terms i see “error = (P_CTRL)*error;” but then this entire term is summed to old_frequency. instead of output = P*error + I *Sum(error), it looks like you have output = sum(I*P*error).

    I would try to sort this out before going any further. about a year ago I posted a series of 7-8 posts detailing how I write a bullet-proof pid algorithm. it’s not going to be exactly what you need, since you’re using integer math and don’t have derivative, but maybe it can give you some ideas.

    hope this helps,
    Brett

    parneethas
    Participant
    Post count: 1

    Try to change load cell of your motor because load cell is directly proportional to the motor. If you increase the load at your load cell then the motor speed also increased. Similarly load decreased then the speed is also automatically decreased.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.