Servo Assistance - Please
Posted: Mon Apr 13, 2020 5:20 pm
Hi
Never had cause to use a servo before so I'm completely new to the subject. I obtained a few MG90S a while back and I'm only now starting to play.
My understanding of how a servo operates, and if I am wrong please correct me, is that it needs a train of pulses to set/hold its position and the position is dependent on the width of the pulse. From datasheets and forums I believe the pulse width to be 1mS - 2mS, corresponding to minimum and maximum rotation accordingly (1.5mS would have it in the mid position).
Fair enough and armed with the above I downloaded the example code which simulated exactly as I expected. The servo moved a total of 180 degrees. The datasheet for the MG90S implies that it operates as above and has a maximum rotation (from minimum) of 180 degrees so I connected things up in hardware.
I checked the output with a scope (before connecting to the servo) and all good. It was outputting a pulse of expected width and this could be adjusted between limits using the Pot (note I set the controller minimum and maximum to 1mS and 2mS from default).
I then connected the servo. However when I adjust the Pot to vary the output from 1mS to 2mS, I get a maximum rotation of only 90 degrees not the expected 180 suggested in the datasheet or in simulation.
Am I (yet again) doing something stupid or have I completely misunderstood things?
Aware that sending incorrect pulses can damage servo's, but not caring as these little units are so cheap and it's fun to break things anyway, I set off at a different angle (pun intended). I first modified the component to output a maximum of 3mS, sent it to the chip and noted what happened. I would get rotation up to a pulse width of 2.6mS. Anything above and it didn't move, and anything below caused it to rotate in the opposite direction. From that I took it to be that the maximum rotation is achieved at 2.6mS. Similarly I lowered the minimum value and found the minimum pulse width to be 500uS.
With these values entered into the component the simulation again gave 180 degrees rotation and when downloaded the servo now moves ~180 degrees. So why the huge discrepancy from datasheet and example code? Is it that the servo is just too cheap to be accurate (I got five for under a tenner delivered), actually uses different pulse widths to that expected or am I completely misunderstanding things?
Regards
Never had cause to use a servo before so I'm completely new to the subject. I obtained a few MG90S a while back and I'm only now starting to play.
My understanding of how a servo operates, and if I am wrong please correct me, is that it needs a train of pulses to set/hold its position and the position is dependent on the width of the pulse. From datasheets and forums I believe the pulse width to be 1mS - 2mS, corresponding to minimum and maximum rotation accordingly (1.5mS would have it in the mid position).
Fair enough and armed with the above I downloaded the example code which simulated exactly as I expected. The servo moved a total of 180 degrees. The datasheet for the MG90S implies that it operates as above and has a maximum rotation (from minimum) of 180 degrees so I connected things up in hardware.
I checked the output with a scope (before connecting to the servo) and all good. It was outputting a pulse of expected width and this could be adjusted between limits using the Pot (note I set the controller minimum and maximum to 1mS and 2mS from default).
I then connected the servo. However when I adjust the Pot to vary the output from 1mS to 2mS, I get a maximum rotation of only 90 degrees not the expected 180 suggested in the datasheet or in simulation.
Am I (yet again) doing something stupid or have I completely misunderstood things?
Aware that sending incorrect pulses can damage servo's, but not caring as these little units are so cheap and it's fun to break things anyway, I set off at a different angle (pun intended). I first modified the component to output a maximum of 3mS, sent it to the chip and noted what happened. I would get rotation up to a pulse width of 2.6mS. Anything above and it didn't move, and anything below caused it to rotate in the opposite direction. From that I took it to be that the maximum rotation is achieved at 2.6mS. Similarly I lowered the minimum value and found the minimum pulse width to be 500uS.
With these values entered into the component the simulation again gave 180 degrees rotation and when downloaded the servo now moves ~180 degrees. So why the huge discrepancy from datasheet and example code? Is it that the servo is just too cheap to be accurate (I got five for under a tenner delivered), actually uses different pulse widths to that expected or am I completely misunderstanding things?
Regards