Wiki source code of A4WD1 & AL5 Arm Tutorial for PS2 Control (BotBoarduino)
Last modified by Eric Nantel on 2023/01/30 10:21
Hide last authors
![]() |
14.1 | 1 | {{html wiki="false" clean="true"}} |
![]() |
12.1 | 2 | <body> |
3 | <table border="0" cellpadding="0" cellspacing="0" > | ||
4 | <tbody><tr> | ||
5 | <td valign="top" align="left"><b><font size="2" face="Verdana">A4WD1 | ||
6 | Tutorial for PS2 Control v1.0<br> | ||
7 | (This document can also be used as a basis for the BotBoarduino Autonomous Kit)</font></b> | ||
8 | <p><b><font size="2" face="Verdana">Updated | ||
9 | <!-- #BeginDate format:Am3 -->04/05/2012<!-- #EndDate --> | ||
10 | <!--webbot | ||
11 | bot="Timestamp" i-CheckSum="12501" endspan --> | ||
12 | </font></b></p> | ||
13 | <p><font face="Verdana" size="2"><b>Safety first!</b> | ||
14 | Wear eye protection and never touch a powered robot!</font></p> | ||
15 | <p><font size="2" face="Verdana">Note: Do not use Loctite or thread locks | ||
16 | on the assembly. They are not necessary and may cause damage to the Lexan.</font></p> | ||
17 | <p><font size="2" face="Verdana">Note: This guide follows the assembly | ||
18 | guide. The Sabertooth has already been installed.</font></p> | ||
19 | <p><font size="2" face="Verdana"><b>Software:<br> | ||
20 | </b> -Arduino (<a href="http://www.arduino.cc/en/Main/Software">download</a>)</font></p></td> | ||
![]() |
15.1 | 21 | <td align="center" valign="top" width="320"><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/a4wd1p03.jpg" border="2" hspace="10" ><br> |
![]() |
12.1 | 22 | <b>Image of A4WD1.</b></font></td> |
23 | </tr> | ||
24 | <tr> | ||
25 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font> | ||
26 | <hr color="#808080"> | ||
27 | </td> | ||
28 | </tr> | ||
29 | <tr> | ||
30 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
31 | </tr> | ||
32 | <tr> | ||
33 | <td valign="top" align="left"><p><b><font size="2" face="Verdana">Step | ||
34 | 1. Mounting the BotBoarduino</font></b><font size="2" face="Verdana"><br> | ||
35 | Add the four standoffs for the BotBoarduino to the robot's top panel as shown. Use four .250" hex socket head screws.</font></p> | ||
36 | <table border="0" > | ||
37 | <tbody><tr> | ||
38 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
39 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
40 | </tr> | ||
41 | <tr> | ||
![]() |
15.1 | 42 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/4250hscs.gif" ></b></font></td> |
43 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/4375hns.gif" ></b></font></td> | ||
![]() |
12.1 | 44 | </tr> |
45 | </tbody></table> | ||
46 | </td> | ||
![]() |
15.1 | 47 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/a4wd1p01.jpg" border="2" hspace="10" ><br> |
![]() |
12.1 | 48 | Figure 1.</font></td> |
49 | </tr> | ||
50 | <tr> | ||
51 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
52 | </tr> | ||
53 | <tr> | ||
54 | <td valign="top" align="left"><p><b><font size="2" face="Verdana">Step | ||
55 | 2.</font></b><font size="2" face="Verdana"><br> | ||
56 | Install the BotBoarduino as shown, using four of the .250" 4-40 screws. | ||
57 | </font> </p> | ||
58 | <table border="0" > | ||
59 | <tbody><tr> | ||
60 | <td ><font size="2" face="Verdana"><b>4 x</b></font></td> | ||
61 | <td > </td> | ||
62 | </tr> | ||
63 | <tr> | ||
![]() |
15.1 | 64 | <td ><font face="Verdana" size="2"><b><img border="2" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/4250hscs.gif" ></b></font></td> |
![]() |
12.1 | 65 | <td > </td> |
66 | </tr> | ||
67 | </tbody></table> | ||
68 | </td> | ||
![]() |
15.1 | 69 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/a4wd1p02.jpg" border="2" hspace="10" ><br> |
![]() |
12.1 | 70 | Figure 2. Add the Microcontroller <br>(Bot Board or BotBoarduino)</font></td> |
71 | </tr> | ||
72 | <tr> | ||
73 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
74 | </td> | ||
75 | </tr> | ||
76 | <tr> | ||
77 | <td valign="top" align="left"><font size="2" face="Verdana"><b>Step 3. Connecting Sabertooth to the BotBoarduino</b><br> | ||
78 | The Sabertooth 2x10 R/C was primarily designed to be connected to a remote | ||
79 | control receiver. It has a BEC (battery elimination circuit) that puts | ||
80 | 5vdc on the red wires to power the receiver. Because the BotBoarduino has | ||
81 | its own power supply, it is necessary to bypass the BEC.</font> | ||
82 | <p><font size="2" face="Verdana">Use an exacto knife to <b>carefully</b> | ||
83 | pry the black tab up and slip the red wire out of the black housing as | ||
84 | shown in Figure 3.</font></p> | ||
85 | <p><font size="2" face="Verdana">Bend the red wires up and use electrical | ||
86 | tape to cover them as shown. This will prevent accidental shorts.</font></p> | ||
87 | </td> | ||
![]() |
15.1 | 88 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/stbec.jpg" border="2" hspace="10" ><br> |
![]() |
12.1 | 89 | Figure 3.</font></td> |
90 | </tr> | ||
91 | <tr> | ||
92 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
93 | </tr> | ||
94 | <tr> | ||
95 | <td valign="top" align="left"><b><font size="2" face="Verdana">Step | ||
96 | 4.</font></b><font size="2" face="Verdana"><br> | ||
97 | Refer to Table 4 and the schematic (Figure 5) for BotBoarduino and Sabertooth wiring connections. Double check your wiring. Make sure the red battery wire goes to the (+) terminal!</font></td> | ||
98 | <td align="center" valign="top" > | ||
99 | <div align="center"> | ||
100 | <center> | ||
101 | <table border="0"> | ||
102 | <tbody><tr> | ||
103 | <td > | ||
104 | <table border="1" bordercolor="#000000" > | ||
105 | <tbody><tr> | ||
![]() |
16.1 | 106 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Bot |
![]() |
12.1 | 107 | Board Jumpers & Connections</font></td> |
108 | </tr> | ||
109 | <tr> | ||
![]() |
16.1 | 110 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
111 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">6vdc | ||
![]() |
12.1 | 112 | battery to VS</font></td> |
113 | </tr> | ||
114 | <tr> | ||
![]() |
16.1 | 115 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Enable</font></td> |
116 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Speaker</font></td> | ||
![]() |
12.1 | 117 | </tr> |
118 | <tr> | ||
![]() |
16.1 | 119 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Enable</font></td> |
120 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">A, | ||
![]() |
12.1 | 121 | B, C Button</font></td> |
122 | </tr> | ||
123 | <tr> | ||
![]() |
16.1 | 124 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
125 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">VS | ||
![]() |
12.1 | 126 | to VL</font></td> |
127 | </tr> | ||
128 | <tr> | ||
![]() |
16.1 | 129 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Sabertooth |
![]() |
12.1 | 130 | Connections</font></td> |
131 | </tr> | ||
132 | <tr> | ||
![]() |
16.1 | 133 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
134 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">12vdc | ||
![]() |
12.1 | 135 | battery</font></td> |
136 | </tr> | ||
137 | <tr> | ||
![]() |
16.1 | 138 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Ch1</font></td> |
139 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Bot | ||
![]() |
12.1 | 140 | Board II P0</font></td> |
141 | </tr> | ||
142 | <tr> | ||
![]() |
16.1 | 143 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Ch2</font></td> |
144 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Bot | ||
![]() |
12.1 | 145 | Board II P1</font></td> |
146 | </tr> | ||
147 | </tbody></table> | ||
148 | </td> | ||
149 | </tr> | ||
150 | <tr> | ||
151 | <td > | ||
152 | <p align="center"><font size="2" face="Verdana">Table 4</font></p></td> | ||
153 | </tr> | ||
154 | </tbody></table> | ||
155 | </center> | ||
156 | </div></td> | ||
157 | </tr> | ||
158 | <tr> | ||
159 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
160 | </tr> | ||
161 | <tr> | ||
162 | <td valign="top" align="left"><p><font size="2" face="Verdana"><b>Step | ||
163 | 5.</b><br> | ||
164 | Set the Sabertooth switches to the settings listed in Table 5 and Figure | ||
165 | 5.</font> </p> | ||
166 | <div align="center"> | ||
167 | <center> | ||
168 | <table border="0"> | ||
169 | <tbody><tr> | ||
170 | <td > | ||
171 | <table border="1" bordercolor="#000000" > | ||
172 | <tbody><tr> | ||
![]() |
16.1 | 173 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">Sabertooth |
![]() |
12.1 | 174 | Settings</font></td> |
175 | </tr> | ||
176 | <tr> | ||
![]() |
16.1 | 177 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">1</font></td> |
178 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Enable | ||
![]() |
12.1 | 179 | Mixed Mode</font></td> |
180 | </tr> | ||
181 | <tr> | ||
![]() |
16.1 | 182 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">2</font></td> |
183 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable | ||
![]() |
12.1 | 184 | Exponential</font></td> |
185 | </tr> | ||
186 | <tr> | ||
![]() |
16.1 | 187 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">3</font></td> |
188 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Non-Lithium | ||
![]() |
12.1 | 189 | Mode</font></td> |
190 | </tr> | ||
191 | <tr> | ||
![]() |
16.1 | 192 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">4</font></td> |
193 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">R/C | ||
![]() |
12.1 | 194 | Flip Mode</font></td> |
195 | </tr> | ||
196 | <tr> | ||
![]() |
16.1 | 197 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">5</font></td> |
198 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable | ||
![]() |
12.1 | 199 | Autocalibrate</font></td> |
200 | </tr> | ||
201 | <tr> | ||
![]() |
16.1 | 202 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">6</font></td> |
203 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">Disable | ||
![]() |
12.1 | 204 | Timeout</font></td> |
205 | </tr> | ||
206 | </tbody></table> | ||
207 | </td> | ||
208 | </tr> | ||
209 | <tr> | ||
210 | <td > | ||
211 | <p align="center"><font size="2" face="Verdana">Table 5</font></p></td> | ||
212 | </tr> | ||
213 | </tbody></table> | ||
214 | </center> | ||
215 | </div> | ||
216 | </td> | ||
![]() |
15.1 | 217 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/st10rc01.gif" border="2" hspace="10" ><br> |
![]() |
12.1 | 218 | Figure 5.</font></td> |
219 | </tr> | ||
220 | <tr> | ||
221 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
222 | </td> | ||
223 | </tr> | ||
224 | <tr> | ||
225 | <td valign="top" align="left" colspan="2"> | ||
226 | <p align="center"><font size="2" face="Verdana"><b>Schematic - Figure 5.<br> | ||
![]() |
15.1 | 227 | <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/botboarduino-sabertooth.jpg" ><br> |
![]() |
12.1 | 228 | Schematic - Figure 5.</b></font></p> |
229 | </td> | ||
230 | </tr> | ||
231 | <tr> | ||
232 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
233 | </td> | ||
234 | </tr> | ||
235 | <tr> | ||
236 | <td valign="top" align="left"><font face="Verdana" size="2"><b>Step | ||
237 | 6. Programming the BotBoarduino</b><br> | ||
238 | Download the <a href="http://www.arduino.cc/en/Main/Software" target="blank" rel="nofollow">Arduino Software</a>. Install and run the program on your PC. The goal here is to load a program into the editor and program the BotBoarduino with the code. </font></td> | ||
239 | </tr> | ||
240 | <tr> | ||
241 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
242 | </td> | ||
243 | </tr> | ||
244 | <tr> | ||
245 | <td valign="top" align="left"><font face="Verdana"><b><font size="2">Step 7.</font></b><font size="2"><br> | ||
246 | Now it's time to set up the A4WD1 for PS2 R/C control. The code supports a pan and tilt and gripper, but they are optional. The Pan and Tilt is installed on the front of the top panel, and the gripper is installed on | ||
247 | the front of the base. If you are adding a pan and tilt and gripper, you will need to change the power bus jumpers according to Table 9 and Schematic 10.</font><p></p> | ||
248 | <p><font face="Verdana" size="2">Note: Refer only to Figure 9 for connection information. The cable colors in the picture may be outdated. Note that the 6.0V power supply is only needed if you also plan to operate servos using the BotBoarduino. | ||
![]() |
15.1 | 249 | </font></p><p align="center"><font face="Verdana" size="2"><img bordercolor="#000000" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/BotBoarduino-PS2-Connections.jpg" align="center"><br> |
![]() |
12.1 | 250 | <font size="2" face="Verdana">Figure 9. PS2 receiver connections to BotBoarduino <br> Note jumper placement has changed.<br>6V supply is only needed if you plan to use servos. </font></font></p><font face="Verdana" size="2"> |
251 | </font></font></td> | ||
252 | <td align="center" valign="top" > | ||
253 | <div align="center"> | ||
254 | <center> | ||
255 | <table border="0"> | ||
256 | <tbody><tr> | ||
257 | <td > | ||
258 | <table border="1" bordercolor="#000000" > | ||
259 | <tbody><tr> | ||
![]() |
16.1 | 260 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><font size="2" face="Verdana">BotBoarduino Jumpers</font></td> |
![]() |
12.1 | 261 | </tr> |
262 | <tr> | ||
![]() |
16.1 | 263 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
264 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">I/O | ||
![]() |
12.1 | 265 | 1-5 Power Bus to VS</font></td> |
266 | </tr> | ||
267 | <tr> | ||
![]() |
16.1 | 268 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
269 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">I/O | ||
![]() |
12.1 | 270 | 6-9 Power Bus to 5v</font></td> |
271 | </tr> | ||
272 | <tr> | ||
![]() |
16.1 | 273 | <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><font size="2" face="Verdana">Connect</font></td> |
274 | <td align="center" bordercolor="#C0C0C0" bgcolor="#FFFFFF"><font size="2" face="Verdana">I/O | ||
![]() |
12.1 | 275 | 10-13 Power Bus to VS</font></td> |
276 | </tr> | ||
277 | </tbody></table> | ||
278 | </td> | ||
279 | </tr> | ||
280 | <tr> | ||
281 | <td > | ||
282 | <p align="center"><font size="2" face="Verdana">Table 7-1</font></p></td> | ||
283 | </tr> | ||
284 | </tbody></table> | ||
285 | </center> | ||
286 | </div> | ||
287 | </td> | ||
288 | </tr> | ||
289 | <tr> | ||
290 | <td valign="top" align="left" colspan="2"><br class="pb"> | ||
291 | </td> | ||
292 | </tr> | ||
293 | <tr> | ||
294 | <td valign="top" align="left"><font face="Verdana"><b><font size="2">Step | ||
295 | 11.</font></b><font size="2"><br> | ||
296 | </font></font><font size="2" face="Verdana">Copy and paste this text into the Arduino program (<a href="https://raw.github.com/Lynxmotion/Rovers/master/Rover_2WD_PS2/Rover_2WD_PS2.ino" target="_blank">A4WD1 + PS2 Arduino Sample Code</a>). | ||
297 | Connect the BotBoarduino to the computer via USB cable. Within the Arduino program, under "Tools", select the board type (Arduino Duemilanove w/328) and COM port (This is computer specific). | ||
298 | You will want to set the bot on something so | ||
299 | that the wheels aren't touching the ground.</font> | ||
300 | <p><font size="2" face="Verdana">Before running the program turn on the | ||
301 | PS2 controller. When the program is run it will turn most PS2 game | ||
302 | controllers to analog mode automatically. If your controller | ||
303 | does not automatically go into analog mode, you will need to do so | ||
304 | manually.</font></p></td> | ||
![]() |
15.1 | 305 | <td align="center" valign="top" ><font size="2" face="Verdana"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/wheeled-tracked/a4wd1-al5-arm-for-ps2-bbu/WebHome/a4wd1p04.jpg" border="2" hspace="10" ><br> |
![]() |
12.1 | 306 | Figure 11.</font></td> |
307 | </tr> | ||
308 | <tr> | ||
309 | <td valign="top" align="left" colspan="2"><font size="2" face="Verdana"> </font></td> | ||
310 | </tr> | ||
311 | </tbody></table> | ||
312 | </body> | ||
![]() |
14.1 | 313 | {{/html}} |