I am building a RC car which increase its speed to compensate any obstacle on its way.

A simple 4 wheel RC car, with current sensor on the two front wheels, when an obstacle is placed in front of the car, the car slows down if the obstacle is heavy and may stop if the obstacle is very heavy. my question is how can i take the input of the current sensor to increase the Motor's speed to try to compensate for the added obstacle.

  • 1
    Your question title uses the words "servo motor". Are you sure that the car's drive is using servo motors. It seems unlikely. In any case, you probably mean "How to increase motor's power to maintain velocity at various loads" not increase it. – Transistor Apr 8 at 13:12
  • I was immediately thinking of a compound winding but I think they don't do those on RC car motors. – Oldfart Apr 8 at 15:08

You could interpret this as feedback loop control problem. Say you have a sensor that can give you the speed of the car (e.g. an encoder on the wheels axis). Using control theory and a PI compensator, you can stabilize the RC car speed to a given, constant, value. A block representation of what you are trying to achieve is given below.

enter image description here

The gist of the PI controller is that it drives the error signal to zero for any constant or step-wise constant reference. To implement a PI controller circuit, all you need to do is achieve, with op-amps, the following transfer function.

$$ PI(s) = K_p + \frac{K_i}{s} $$

Where Kp and Ki are adjustable gains. If you have very broad constraints (e.g. current consumption or time which takes for the speed to stabilize don't have to be optimized), these gains can be adjusted purely through experimentation, without much need for control systems theory. If you wish for an optimized solution, then you are in for some studying. Wikipedia link on PID controllers.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.