Can someone explain how RC servos/ESC works, want to control brush less motor
rwgast_logicdesign
Posts: 1,464
Im interested in trying to control my motors using servo style commands, I know a servo uses a pot to determine its posistion, ill be using shaft encoders so im sure that will make up for the pot... Im just curious i know the hb25 does this without motor encoders but only to brushed motors. Is there some kind of IC in a servo/ECS interpreting the pulses what is going on here??!!! Ive read a but ton of articals about how servos work with no explanation of the acuall pulsing and postioning system. Im tempted to order a product called open servo which is an attiny based board you throw in your servo, just so i can see whats going ont...
If this is just some crazy feat its no big deal if i cant pull this off easily but i really want to know how rc commands work.
If this is just some crazy feat its no big deal if i cant pull this off easily but i really want to know how rc commands work.
Comments
A RC receiver (or microcontroller) sends pulses to a servo 50 times a second. The pulse is usually between 1000us and 2000us with 1500us being the center position of the servo.
If an ESC is reversable (or if it's a continuous rotation servo) then 1500us will tell the motor to stop. Pulses further away from 1500us will make a normal servo move to a position proportional to the how differnt the pulse is from 1500 us or if it's an ESC or CR servo it pulse further away from 1500us will make the servo/motor turn faster.
maybe im just overthinking this... idk if what im asking even makes much seanse. what bothers me is an hb can send rc pulses to a brushed motor without an encoder and some how it posistions like a servo.. how is this done
I'm pretty sure you don't got it all. A servomotor isn't pulsed. A RC-servo includes an electronic with a H-bridge. This electronik compares the pot-position with the pulse-length of the incoming control-pulses.
Whenever the calculation pot-position - pulse-length is unequal to zero the H-bridge will be "activated" to move the axle of the servo TOWARDS the position the axle should be according to the pulse-length. As the axles starts turning the pot is turned too and the pot-position gives feedback continuosly and the difference between is-position and the should-position decereases. If is-position has reached the should-position the power to the motor is switched of. Now f.e. if you try to turn the axle manually you create a difference between is and schould and the control-eclectronic will detect it immediatly and will switch on the motor-voltage in that polarisation to get the axle back to its should-position. So a normal servo has an analog feedback-control with a (somehow digital) input-signal: the pulses.
Now if you use encoders you have to count the encoderpulses and have to detect the rotation (clock- or counter-clockwise) to add or substract the encoder-pulses to get the actual is-position of the motor-axle
comparing the actual is-position with your should-position switching the H-bridge plus-minus or minus-plus (= reverse polarisation) depending on the SIGN of the result of the difference between is-pos and should-pos.
Again: the pulses enter the control-circuit and NOT the motor. The motors voltage is switched ON / OFF depending on is there or is there no diference between is-pos and should-pos.
So next step is to tell us what your project is. Especially do you want to use dc-motors you already have or would you have to buy the motors?
Depending on several specs (like needed torque needed max rpm) of your application -- using stepper-motors might be a much easier solution than dc-motors with encoders.
best regards
Stefan
It doesn't position the motor. It just tells the motor how fast to turn and in which direction. CR servos also don't have position feedback.
You can make a DIY servo with a motor/h-bridge and poteniometer. A microcontroller using an ADC reads the pot and the pulses in. If the pot position doesn't agree with the pulse received, then it powers the motor to turn toward the desired position. This is all easier said than done and often needs a PID loop to control the motor appropriately.
So your saying that a CR Servo and hb25 do not stop at a posistion and hold like a regular servo? ie if i pulsout 750 to a CR it will not set the posistion to 12 oClock and hold for as long as i pulse it. becuase thats what i was so hung up on how the hb25 could do this having no feedback, also i fail to see the point of a CR servo over a motor if the posistion can not be set..
A standard hobby servo will hold an angular position because the internal feedback loops is at equilibrium - no error.
Google Search - How do servos work?
Basically, I used the rising edge of the input signal to short a cap to ground, then as long as it was high, I integrated a constant current into the cap. When the signal went low, I turned on a buffer to charge a second cap to that voltage level. From what I can tell, this is the critical part of the circuit that you're missing/not understanding.
From there, I was actually driving a stepper motor, so I had a 555 timer running at about 50Hz driving into the count pin of an up/down 4-bit counter, and I ran the two lower bits through an XOR gate to get a grayscale count, and used the two outputs of that to drive a pair of transistors (since it was a monopolar stepper, and didn't need full bridge drive). The up/down pin of the counter was controlled by a comparator that compared the charge of the second capacitor to the output of a potentiometer that I actually used as the bearing on one side of the arm.
That implies that your software is driving the motor so you know what phase is on.
The triple 560k in series reduse the voltage over each resistor as it can get up to 100v in emf kickback.
I don't know the value of the feedback resistor.