Wiki source code of RC Servo Mid Position Tutorial
Last modified by Eric Nantel on 2023/01/20 11:38
Hide last authors
![]() |
1.1 | 1 | {{html wiki="false" clean="true"}} |
![]() |
10.1 | 2 | <body><table border="0" cellpadding="0" cellspacing="0" > |
3 | <tbody><tr> | ||
4 | <td valign="top" ><font size="2" face="verdana"><b>Servo Mid Position Tutorial.</b></font> | ||
5 | <p><font size="2" face="verdana"><b><!--webbot bot="Timestamp" startspan s-type="EDITED" s-format="%m/%d/%Y" -->03/25/2008<!--webbot | ||
6 | bot="Timestamp" i-checksum="12594" endspan -->.</b></font></p> | ||
7 | <p><font size="2" face="verdana"><b>By James Frye.</b></font></p> | ||
8 | <p><font size="2" face="verdana">Building Lynxmotion kits requires adjusting the servo to its mid position (center of rotation). In order to | ||
9 | move the servo's output shaft to its mid position, the servo needs to receive 1.5mS, positive-going pulses every 20mS. This tutorial will cover | ||
10 | creating the necessary pulses from off-the-shelf controllers.</font></p></td> | ||
![]() |
12.1 | 11 | <td align="center" valign="top" width="320"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/sm150.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 12 | <font size="2" face="verdana"><strong>Too cool</strong></font><font size="2" face="verdana"><strong>!</strong></font></td> |
13 | </tr> | ||
14 | <tr> | ||
15 | <td colspan="2"> </td> | ||
16 | </tr> | ||
17 | <tr> | ||
18 | <td valign="top" ><font size="2" face="verdana"><b>Connecting Power.<br> | ||
19 | </b>The first step in getting your SSC-32 or Bot Board ready to control servos is to provide voltage. This is accomplished using either our | ||
20 | BATC-01 battery cable or our WH-01 battery cable with switch. If your cable has tinned ends, cut off the tinned part and strip the plastic cover | ||
21 | off about 1/4" from the new end. The reason for doing this is the screw terminals can't properly tighten down on a tinned wire. Remember, | ||
22 | the red wire is (+) and the black wire is (-).</font> | ||
23 | <p><font size="2" face="verdana">For now, make sure the VS=VL jumper is installed, but you may be instructed to remove it later. Attach a | ||
24 | charged 6.0-7.2vdc battery to the connector and turn on the switch. The green LED should light on the board if all is well. If not, quickly | ||
25 | remove the battery pack and double check your work!</font></p></td> | ||
![]() |
12.1 | 26 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos00.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 27 | <font size="2" face="verdana">With Battery.<br> |
28 | </font></td> | ||
29 | </tr> | ||
30 | <tr> | ||
31 | <td colspan="2"> </td> | ||
32 | </tr> | ||
33 | <tr> | ||
34 | <td valign="top" ><font size="2" face="verdana"><b>SSC-32.<br> | ||
35 | </b>To allow custom servo positioning on powerup, the servo controller does not automatically generate pulses.</font> | ||
36 | <p><font size="2" face="verdana">Apply 6-7.2vdc to the VS1 terminal and install the following jumpers: VS=VL, VS1=VS2, Both baud for 115.2k, TX | ||
37 | and RX to enable DB9 port.</font> <font size="2" face="verdana">Connect a DB9 cable from the board to a free serial port.</font></p> | ||
38 | <p><font size="2" face="verdana">You can <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/ses-software/lynxterm/" target="_blank">download</a> and run | ||
39 | Lynx SSC-32 Terminal. Change the port to your Com port. Click on "All = 1500". Plug a servo into any port with the black wire closest | ||
40 | to the outside of the board. The servo controller will generate these pulses until powered down. Another way is the software method: #0 P1500 | ||
41 | <cr>. This will generate pulses on the channel following the "#" only. More information is available in the SSC-32 manual.</font></p> | ||
42 | <p><font size="2" face="verdana">If you are using RIOS-01 or SEQ-01, both programs have this function built in. Consult the users manual for | ||
43 | more information.</font></p></td> | ||
![]() |
12.1 | 44 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos06.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 45 | <font size="2" face="verdana">SSC-32.<br> |
46 | </font></td> | ||
47 | </tr> | ||
48 | <tr> | ||
49 | <td colspan="2" > <br class="pb"> | ||
50 | </td> | ||
51 | </tr> | ||
52 | <tr> | ||
53 | <td valign="top" ><font size="2" face="verdana"><b>Bot Board / BASIC Atom.<br> | ||
54 | </b>Apply 6-7.2vdc to the VS connector and install the VS=VL jumper. Also install the VS jumper for the first four I/O pins. Program the Atom | ||
55 | with the following code to generate the pulses on I/O Pin 0. Plug the servo into I/O Pin 0 with the black wire closest to the outside of the | ||
56 | board.<br> | ||
57 | <blockquote> | ||
58 | <div style="padding: .5em; color: black; line-height: 1.1em; border: 1px solid black;"> | ||
59 | <font face="Courier New" size="2">low p0<br> | ||
60 | start:<br> | ||
61 | pulsout p0,1500<br> | ||
62 | pause 20<br> | ||
63 | goto start</font> | ||
64 | </div> | ||
65 | </blockquote> | ||
66 | </font></td> | ||
![]() |
12.1 | 67 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos03.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 68 | <font size="2" face="verdana">BASIC Atom.<br> |
69 | </font></td> | ||
70 | </tr> | ||
71 | <tr> | ||
72 | <td colspan="2" > </td> | ||
73 | </tr> | ||
74 | <tr> | ||
75 | <td valign="top" ><font size="2" face="verdana"><b>Bot Board / BASIC Atom Pro.<br> | ||
76 | </b>Apply 6-7.2vdc to the VS connector and install the VS=VL jumper. Also install the VS jumper for the first four I/O pins. Program the Atom | ||
77 | with the following code to generate the pulses on I/O Pin 0. Plug the servo into I/O Pin 0 with the black wire closest to the outside of the | ||
78 | board.<br> | ||
79 | <blockquote> | ||
80 | <b>IDE v8.0.1.3+</b> | ||
81 | <div style="padding: .5em; color: black; line-height: 1.1em; border: 1px solid black;"> | ||
82 | <font face="Courier New" size="2">enablehservo<br> | ||
83 | hservo [0\0\0]<br> | ||
84 | start:<br> | ||
85 | goto start</font> | ||
86 | </div> | ||
87 | </blockquote> | ||
88 | </font></td> | ||
![]() |
12.1 | 89 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos04.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 90 | <font size="2" face="verdana">BASIC Atom Pro.<br> |
91 | </font></td> | ||
92 | </tr> | ||
93 | <tr> | ||
94 | <td colspan="2" > </td> | ||
95 | </tr> | ||
96 | <tr> | ||
97 | <td valign="top" ><font size="2" face="verdana"><b>Bot Board / BASIC Stamp 2 / BS2-E.<br> | ||
98 | </b>Apply 6-7.2vdc to the VS connector and install the VS=VL jumper. Also install the VS jumper for the first four I/O pins. Program the BS2 | ||
99 | with the following code to generate the pulses on I/O Pin 0. Plug the servo into I/O Pin 0 with the black wire closest to the outside of the | ||
100 | board.<br> | ||
101 | <blockquote> | ||
102 | <div style="padding: .5em; color: black; line-height: 1.1em; border: 1px solid black;"> | ||
103 | <font face="Courier New" size="2">start:<br> | ||
104 | pulsout 0,750<br> | ||
105 | pause 20<br> | ||
106 | goto start</font> | ||
107 | </div> | ||
108 | </blockquote> | ||
109 | </font></td> | ||
![]() |
12.1 | 110 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos05.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 111 | <font size="2" face="verdana">BASIC Stamp.<br> |
112 | </font></td> | ||
113 | </tr> | ||
114 | <tr> | ||
115 | <td colspan="2"><br class="pb"> | ||
116 | </td> | ||
117 | </tr> | ||
118 | <tr> | ||
119 | <td valign="top" ><font size="2" face="verdana"><b>SSC-12.<br> | ||
120 | </b>Apply 6-7.2vdc to the red and black wires. If powered correctly, the green LED will illuminate. The pulses are automatically generated. Plug | ||
121 | a servo into any port with the black wire closest to the outside of the board.</font></td> | ||
![]() |
12.1 | 122 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos02.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 123 | <font size="2" face="verdana">SSC-12.<br> |
124 | </font></td> | ||
125 | </tr> | ||
126 | <tr> | ||
127 | <td colspan="2" > </td> | ||
128 | </tr> | ||
129 | <tr> | ||
130 | <td valign="top" ><font size="2" face="verdana"><b>Mini SSC-II.<br> | ||
131 | </b>Connect a 9vdc battery to the SSC power input and apply 4.8-7.2vdc to the SVO power input. If powered correctly, the green LED will | ||
132 | illuminate. The pulses are automatically generated. Plug a servo into any port with the black wire closest to the outside of the board.</font></td> | ||
![]() |
12.1 | 133 | <td align="center" valign="top" ><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-servos/ses-lynxmotion-rc-servo/rc-servo-mid-position-tutorial/WebHome/smpos01.jpg" border="2" hspace="10" width="320" height="240"><br> |
![]() |
10.1 | 134 | <font size="2" face="verdana">Mini SSC-II. <br> |
135 | </font></td> | ||
136 | </tr> | ||
137 | </tbody></table> | ||
138 | </body> | ||
![]() |
1.1 | 139 | {{/html}} |