# How to determine servo signal encoding

I have a TowerPro SG90 servo which matches the "JR" brand wiring discussed here where the servo's 3 wires are as follows:

• Red is +
• Black is -
• Orange is signal

According to that article:

The motor of an analog servo receives a signal from the servo amplifier (inside the servo) at 30 times a second. This pulsing signal tells the servo motor when to start rotating and which way to rotate.

To me this means that the signal wire expects signals that are encoded with both directional and positional information. I'm wondering where I can find the correct signal encoding for my particular servo, or any other servo for that matter. The manufacturer site does not provide any data sheet.

• I found this "Position "0" (1.5ms pulse) is middle, "90" (~2ms pulse) is all the way to the right, "-90" (~1ms pulse) is all the way to the left." If you're using an Arduino: modmypi.com/raspberry-pi/hacking-and-prototyping/… (example sketch linked in there) – DigitalNinja Jun 11 '15 at 0:10
• Thanks @DigitalNinja (+1) - I'm (obviously) new to electronics and have to say that I'm thunderstruck at how all these tiny components (not just servos: LEDs, switches, etc.) seem to be lacking any manufacturer documentation whatsoever! Is this common of the electronics industry, or did I just pick a rotten servo model? I guess I stunned that the manufacturer doesn't clearly document this stuff on their site, and that it is left to the good will/open source community to reverse engineer the component! Am I crazy or is this the norm? – smeeb Jun 11 '15 at 0:14
• You're welcome. Any respectable manufacturer will have documentation. In my experience it's all over the board though. Some provide excellent documentation and others have useless documentation or none. I think it just depends on the manufacturer and the part. Found a link to the datasheet, and all it has for operation is what I already posted lol. Electrical specs are in there though. datasheet4u.com/datasheet-pdf/TowerPro/SG90/pdf.php?id=791970 – DigitalNinja Jun 11 '15 at 0:19
• Servo signaling is pretty much a standard, although nobody seems to want to admit to it. – Ignacio Vazquez-Abrams Jun 11 '15 at 0:21
• Thanks @IgnacioVazquez-Abrams (+1) - is there a name/link for this standard by any chance? Can you confirm from DigitalNinja's datasheet4u.com link that this servo complies with that standard? Thanks again! – smeeb Jun 11 '15 at 0:52