Wiki source code of BRAT Biped Mech PS2 Tutorial

Last modified by Eric Nantel on 2026/04/06 13:13

Hide last authors
Eric Nantel 22.1 1 {{html wiki="false" clean="false"}}
2 <style>
3 .asm { font-family: Verdana, Helvetica, sans-serif; font-size: 14px; max-width: 960px; }
4 .asm-step { background: #fff; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; }
5 .asm-step-header { background: #F5A800; display: flex; align-items: stretch; justify-content: space-between; }
6 .asm-step-name { padding: 0.6rem 1rem; font-weight: bold; font-size: 15px; color: #2C1A00; }
7 .asm-step-num { background: #1a1a1a; color: white; padding: 0.6rem 1.1rem; font-weight: bold; font-size: 15px; display: flex; align-items: center; white-space: nowrap; }
8 .asm-step-body { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 1rem; align-items: flex-start; }
9 .asm-step-text { flex: 1 1 250px; font-size: 13px; line-height: 1.6; }
10 .asm-step-figure { flex: 0 1 280px; text-align: center; }
11 .asm-step-figure img { max-width: 100%; height: auto; border: 1px solid #ccc; border-radius: 4px; }
12 .asm-step-figure span { display: block; font-size: 12px; color: #666; margin-top: 0.3rem; }
13 .asm-figures { display: flex; flex-wrap: wrap; gap: 0.75rem; }
14 .asm-fullwidth { padding: 1rem; border-top: 1px solid #eee; font-size: 13px; overflow-x: auto; }
15 .ref-table { border-collapse: collapse; font-size: 12px; }
16 .ref-table th { background: #ccc; border: 1px solid #aaa; padding: 0.3rem 0.6rem; text-align: center; }
17 .ref-table td { border: 1px solid #ddd; padding: 0.3rem 0.6rem; text-align: center; }
18 .ref-table tr:nth-child(odd) td { background: #f9f9f9; }
19 .ref-table tr:nth-child(even) td { background: #fff; }
20 .asm-warning { color: #c00; font-weight: bold; }
21 .asm h1 { font-size: 18px; margin-bottom: 0.25rem; }
22 </style>
23
24 <div class="asm">
25
26 <!-- Header -->
27 <div style="padding: 0.5rem 0 1rem 0; display:flex; flex-wrap:wrap; gap:1.5rem; align-items:flex-start;">
28 <div style="flex:1 1 300px;">
29 <h1 class="asm">PS2 Biped BRAT Mech Tutorial</h1>
30 <p><b>Updated December 20, 2011</b></p>
31 <p><span class="asm-warning">Safety first!</span> Wear eye protection and never touch a powered robot!</p>
32 <p><b>Hardware required:</b> Bot Board II, BASIC Atom Pro 28, wireless PS2 controller/receiver, two PicoSwitches (DE-03).</p>
33 <p><b>Software &amp; downloads:</b></p>
34 <ul style="padding-left:1.2rem; margin-top:0.25rem; line-height:1.8;">
35 <li>BASIC Micro Studio</li>
36 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/mechosf.zip">BRAT Servo Offset Finder Program</a></li>
37 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bmech1-2.zip">PS2 Mech Control Code v1.2</a></li>
Eric Nantel 20.1 38 </ul>
Eric Nantel 22.1 39 <p style="margin-top:0.75rem;"><b>Overview:</b> This tutorial shows how to build a BRAT-based mech using the components used in this build. This is not the only approach — if you use different components you may need to modify the code and assembly instructions. Have fun and experiment!</p>
40 </div>
41 <div style="text-align:center; flex:0 1 280px;">
42 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm14.jpg" style="max-width:100%; border:1px solid #ccc; border-radius:4px;">
43 <p style="font-size:12px; color:#666; margin-top:0.3rem;"><b>Biped BRAT Mech.</b></p>
44 </div>
45 </div>
46
47 <!-- Step 1 -->
48 <div class="asm-step">
49 <div class="asm-step-header">
50 <div class="asm-step-name">BRAT Mech — Orient U-Channel</div>
51 <div class="asm-step-num">Step 1 / 15</div>
52 </div>
53 <div class="asm-step-body">
54 <div class="asm-step-text">
55 <p>Depending on how the aluminum channel was installed on your BRAT, you may need to change it. Orient the channel as shown in Figure 1 — if yours differs, you will need to rebuild it.</p>
56 </div>
57 <div class="asm-step-figure">
58 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm03.jpg">
59 <span>Figure 1.</span>
60 </div>
61 </div>
62 </div>
63
64 <!-- Step 2 -->
65 <div class="asm-step">
66 <div class="asm-step-header">
67 <div class="asm-step-name">BRAT Mech — Verify Rebuilt Configuration</div>
68 <div class="asm-step-num">Step 2 / 15</div>
69 </div>
70 <div class="asm-step-body">
71 <div class="asm-step-text">
72 <p>After rebuilding, make sure your robot matches Figure 2 before proceeding to Step 3.</p>
73 </div>
74 <div class="asm-step-figure">
75 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm04.jpg">
76 <span>Figure 2.</span>
77 </div>
78 </div>
79 </div>
80
81 <!-- Step 3 -->
82 <div class="asm-step">
83 <div class="asm-step-header">
84 <div class="asm-step-name">BRAT Mech — Attach ASB-24 Bracket</div>
85 <div class="asm-step-num">Step 3 / 15</div>
86 </div>
87 <div class="asm-step-body">
88 <div class="asm-step-text">
89 <p>Attach an ASB-24 bracket to the aluminum channel as shown using 2-56 screws and nuts. The bracket will be off-centre, but the servo horn will be centre-aligned.</p>
90 </div>
91 <div class="asm-step-figure">
92 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm05.jpg">
93 <span>Figure 3.</span>
94 </div>
95 </div>
96 </div>
97
98 <!-- Step 4 -->
99 <div class="asm-step">
100 <div class="asm-step-header">
101 <div class="asm-step-name">BRAT Mech — Install Turret Rotation Servo</div>
102 <div class="asm-step-num">Step 4 / 15</div>
103 </div>
104 <div class="asm-step-body">
105 <div class="asm-step-text">
106 <p>Attach a suitable servo to the ASB-24 — an HS-645 is recommended. In testing, the turret was unstable with HS-475 or HS-485 servos. Remove the servo horn. This servo rotates the gun platform turret. Plug it into <b>P11</b> on the Bot Board II.</p>
107 </div>
108 <div class="asm-step-figure">
109 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm06.jpg">
110 <span>Figure 4.</span>
111 </div>
112 </div>
113 </div>
114
115 <!-- Step 5 -->
116 <div class="asm-step">
117 <div class="asm-step-header">
118 <div class="asm-step-name">BRAT Mech — Build Gun Platform Turret</div>
119 <div class="asm-step-num">Step 5 / 15</div>
120 </div>
121 <div class="asm-step-body">
122 <div class="asm-step-text">
123 <p>The gun platform turret uses the add-on base rotate (ABR-01). A MPSH-01 supports the camera; HUB-08s attached to ASB-06s support the guns.</p>
124 <p>Use 2-56 screws and nuts to attach brackets via the innermost holes as shown. Use a 5/64" drill bit to add holes for the outermost screws. <span class="asm-warning">Drill carefully — ensure everything is aligned properly before drilling!</span></p>
125 <p>Use 2-56 screws and nuts to attach the HUB-08s to the ASB-06s.</p>
126 </div>
127 <div class="asm-step-figure">
128 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm08.jpg">
129 <span>Figure 5.</span>
130 </div>
131 </div>
132 </div>
133
134 <!-- Step 6 -->
135 <div class="asm-step">
136 <div class="asm-step-header">
137 <div class="asm-step-name">BRAT Mech — Mount Guns</div>
138 <div class="asm-step-num">Step 6 / 15</div>
139 </div>
140 <div class="asm-step-body">
141 <div class="asm-step-text">
142 <p>Use the airsoft barrel mechanism version of the gun (NOT the IR version). <span class="asm-warning">If you use different guns, you may need to modify the code — the assembly instructions may not apply.</span> Gun wiring is covered in Step 12.</p>
143 <p>Drill the centre hole of the HUB-08s to .25" to accommodate the gun mounting posts. File or cut down the ridges on the posts to fit into the HUB-08. Attach the guns to the HUB-08s using epoxy — hold or clamp firmly and allow plenty of time to set before proceeding.</p>
144 </div>
145 <div class="asm-step-figure">
146 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm10.jpg">
147 <span>Figure 6.</span>
148 </div>
149 </div>
150 </div>
151
152 <!-- Step 7 -->
153 <div class="asm-step">
154 <div class="asm-step-header">
155 <div class="asm-step-name">BRAT Mech — Attach Turret to Servo</div>
156 <div class="asm-step-num">Step 7 / 15</div>
157 </div>
158 <div class="asm-step-body">
159 <div class="asm-step-text">
160 <p>Use the servo horn screw to attach the gun platform turret to the HS-645 servo. This completes the mechanical assembly. The next steps calibrate the software to the servos.</p>
161 </div>
162 <div class="asm-step-figure">
163 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm11.jpg">
164 <span>Figure 7.</span>
165 </div>
166 </div>
167 </div>
168
169 <!-- Step 8 -->
170 <div class="asm-step">
171 <div class="asm-step-header">
172 <div class="asm-step-name">BRAT Mech — Configure Bot Board II</div>
173 <div class="asm-step-num">Step 8 / 15</div>
174 </div>
175 <div class="asm-step-body">
176 <div class="asm-step-text">
177 <p>Set up the Bot Board per Table 8 and Figure 8. <span class="asm-warning">The buttons MUST be enabled to proceed.</span></p>
178 </div>
179 <div class="asm-step-figure" style="flex: 0 1 auto;">
180 <table class="ref-table" style="width:auto; margin-bottom:0.5rem;">
181 <tr><th>Bot Board I/O</th><th>Connection</th></tr>
182 <tr><td>P4</td><td>Left Ankle</td></tr>
183 <tr><td>P5</td><td>Left Knee</td></tr>
184 <tr><td>P6</td><td>Left Hip</td></tr>
185 <tr><td>P7</td><td>Right Ankle</td></tr>
186 <tr><td>P8</td><td>Right Knee</td></tr>
187 <tr><td>P10</td><td>Right Hip</td></tr>
188 <tr><td>P11</td><td>Turret Rotation</td></tr>
189 <tr><th colspan="2">Bot Board II Jumper Settings</th></tr>
190 <tr><td>Enable</td><td>A, B, and C buttons</td></tr>
191 <tr><td>VS</td><td>I/O Groups 4–7 and 8–11</td></tr>
192 <tr><td>Enable</td><td>SPKEN (Speaker Enable)</td></tr>
193 </table>
194 <span>Table 8.</span>
195 </div>
196 </div>
197 <div class="asm-fullwidth">
198 <p style="font-weight:bold; margin-bottom:0.4rem;">Figure 8 — Bot Board II wiring diagram</p>
199 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratmec2.gif" style="max-width:100%; border:1px solid #ccc; border-radius:4px;">
200 </div>
201 </div>
202
203 <!-- Step 9 -->
204 <div class="asm-step">
205 <div class="asm-step-header">
206 <div class="asm-step-name">BRAT Mech — Find Servo Offsets</div>
207 <div class="asm-step-num">Step 9 / 15</div>
208 </div>
209 <div class="asm-step-body">
210 <div class="asm-step-text">
211 <p>Download and install BASIC Micro Studio. Download the <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/mechosf.zip">BRAT Servo Offset Finder Program</a>, load it into the IDE, and program the Atom Pro. Use the buttons to adjust:</p>
212 <ul style="margin-top:0.5rem; padding-left:1.2rem;">
213 <li><b>A</b> — decrease servo offset by 5µs</li>
214 <li><b>C</b> — increase servo offset by 5µs</li>
215 <li><b>B</b> — change which servo is being adjusted, and save offsets (order shown in Figure 9)</li>
216 </ul>
217 <p>If the Speaker is enabled, pressing B plays a tone that rises in pitch as you cycle through servos and drops to a longer lower tone when returning to Start.</p>
218 </div>
219 <div class="asm-step-figure">
220 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/mechosf1.jpg">
221 <span>Figure 9 — Offset finder sequence.</span>
222 </div>
223 </div>
224 </div>
225
226 <!-- Step 10 -->
227 <div class="asm-step">
228 <div class="asm-step-header">
229 <div class="asm-step-name">BRAT Mech — Calibrate to Neutral Position</div>
230 <div class="asm-step-num">Step 10 / 15</div>
231 </div>
232 <div class="asm-step-body">
233 <div class="asm-step-text">
234 <p>Place the robot as close to neutral as possible and turn it on. It should hold the position resembling Figures 10-1 through 10-3. If any joint is off by more than 15°, remove the servo horn, rotate to align, and reattach. Use the A, B, and C buttons to fine-tune.</p>
235 <p>Note: HS-422 hip servos may oscillate when lifted — normal and minimal when walking. Higher voltage worsens this. HS-475, HS-485, HS-645 servos do not exhibit this effect.</p>
236 <p><span class="asm-warning">After adjusting all servos to match Figures 10-1 through 10-3, pressing B saves the offset values to the Atom Pro's EEPROM.</span></p>
237 </div>
238 <div class="asm-figures">
239 <div class="asm-step-figure">
240 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/brat10.jpg">
241 <span>Figure 10-1 (front view).</span>
242 </div>
243 <div class="asm-step-figure">
244 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/brat07.jpg">
245 <span>Figure 10-2 (side view).</span>
246 </div>
247 <div class="asm-step-figure">
248 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/brat04.jpg">
249 <span>Figure 10-3 (rear view).</span>
250 </div>
251 </div>
252 </div>
253 </div>
254
255 <!-- Step 11 -->
256 <div class="asm-step">
257 <div class="asm-step-header">
258 <div class="asm-step-name">BRAT Mech — Load PS2 Mech Control Code</div>
259 <div class="asm-step-num">Step 11 / 15</div>
260 </div>
261 <div class="asm-step-body">
262 <div class="asm-step-text">
263 <p>Download the <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bmech1-2.zip">PS2 BRAT Mech Code v1.2</a>, load it into the IDE, and program your BRAT.</p>
264 </div>
265 </div>
266 </div>
267
268 <!-- Step 12 -->
269 <div class="asm-step">
270 <div class="asm-step-header">
271 <div class="asm-step-name">BRAT Mech — Wire the Guns</div>
272 <div class="asm-step-num">Step 12 / 15</div>
273 </div>
274 <div class="asm-step-body">
275 <div class="asm-step-text">
276 <p>Repeat this wiring for each gun. Use heat shrink as needed. Refer to Table 12 and Figure 12 for connections.</p>
277 <p><b>Motor wiring:</b> The gun's black motor wire goes directly to ground. The red wire connects to one side of the PicoSwitch; run a wire from the other side of the PicoSwitch to (+) on the Bot Board II.</p>
278 <p><b>Internal switch wiring:</b> Cut a 24" servo extender cable in half and strip the ends. Strip extra length on the RED wire and solder a 10kΩ resistor onto it. Solder both the yellow wire and the other end of the resistor to one side of the switch. Solder the black wire to the other side.</p>
279 </div>
280 <div class="asm-step-figure" style="flex: 0 1 auto;">
281 <table class="ref-table" style="width:auto; margin-bottom:0.5rem;">
282 <tr><th>Bot Board II</th><th>Mech Component</th></tr>
283 <tr><td>P16 (AX0)</td><td>Right gun PicoSwitch</td></tr>
284 <tr><td>P17 (AX1)</td><td>Right gun internal switch</td></tr>
285 <tr><td>P18 (AX2)</td><td>Left gun PicoSwitch</td></tr>
286 <tr><td>P19 (AX3)</td><td>Left gun internal switch</td></tr>
287 </table>
288 <span>Table 12.</span>
289 </div>
290 </div>
291 <div class="asm-fullwidth">
292 <p style="font-weight:bold; margin-bottom:0.4rem;">Figure 12 — Gun wiring diagram</p>
293 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratmech.gif" style="max-width:100%; border:1px solid #ccc; border-radius:4px;">
294 </div>
295 </div>
296
297 <!-- Step 13 -->
298 <div class="asm-step">
299 <div class="asm-step-header">
300 <div class="asm-step-name">BRAT Mech — PS2 Control Reference</div>
301 <div class="asm-step-num">Step 13 / 15</div>
302 </div>
303 <div class="asm-step-body">
304 <div class="asm-step-text">
305 <p>The PS2 control commands are shown in Table 13. Note: the command set has changed slightly from the PS2 control tutorial — read the table carefully.</p>
306 </div>
307 <div class="asm-step-figure" style="flex: 0 1 auto;">
308 <table class="ref-table" style="width:auto;">
309 <tr><th>PS2 Button</th><th>Command</th></tr>
310 <tr><td>Left Joystick</td><td>Walk forward/backward and turn</td></tr>
311 <tr><td>Right Joystick</td><td>Aim gun platform</td></tr>
312 <tr><td>X</td><td>Return robot to home position</td></tr>
313 <tr><td>△</td><td>Toggle switch connected to P0</td></tr>
314 <tr><td>L1</td><td>Shoot with left gun</td></tr>
315 <tr><td>R1</td><td>Shoot with right gun</td></tr>
316 <tr><td>D-pad Up</td><td>Get up from face-down position</td></tr>
317 <tr><td>D-pad Down</td><td>Get up from back-down position</td></tr>
318 <tr><td>Start</td><td>Enable/Disable standby rest mode (enabled by default)</td></tr>
319 <tr><td>Select</td><td>Change stride length</td></tr>
320 </table>
321 <span style="margin-top:0.4rem;">Table 13.</span>
322 </div>
323 </div>
324 </div>
325
326 <!-- Step 14 -->
327 <div class="asm-step">
328 <div class="asm-step-header">
329 <div class="asm-step-name">BRAT Mech — Mount Camera</div>
330 <div class="asm-step-num">Step 14 / 15</div>
331 </div>
332 <div class="asm-step-body">
333 <div class="asm-step-text">
334 <p>A lightweight IP wireless camera (not 2.4GHz) is recommended — the TRENDnet TV-IP110W was used in this build. Remove the camera's outer casing to reduce weight and attach it to the MPSH-01 using double-sided foam tape. Power the camera from a 7.4VDC LiPo battery with a 5VDC switching regulator.</p>
335 </div>
336 <div class="asm-step-figure">
337 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm12.jpg">
338 <span>Figure 14.</span>
339 </div>
340 </div>
341 </div>
342
343 <!-- Step 15 -->
344 <div class="asm-step">
345 <div class="asm-step-header">
346 <div class="asm-step-name">BRAT Mech — Make Ammo Holders</div>
347 <div class="asm-step-num">Step 15 / 15</div>
348 </div>
349 <div class="asm-step-body">
350 <div class="asm-step-text">
351 <p>There are many ways to make ammo holders. Small tupperware containers work well — cut holes to match the guns and secure them to the guns with double-sided foam tape.</p>
352 </div>
353 <div class="asm-step-figure">
354 <img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-robots-kits/ses-v1-robots/ses-v1-bipeds/brat-biped-ps2-mech/WebHome/bratm13.jpg">
355 <span>Figure 15.</span>
356 </div>
357 </div>
358 </div>
359
360 </div>
Eric Nantel 1.1 361 {{/html}}
Copyright RobotShop 2018