PiCrawler / Hardware & Servos
Hardware & Servos
Owner-confirmed Robot HAT V4 identity, channel mapping, power and mechanical boundaries.
Hardware identity & Inventory
Inventory records describe expected holdings. They do not establish installation on this robot or physically verified current condition. Kit and contained-part quantities must not be added together.
PiCrawler 4 CN0488D verified
user reported physical evidence · club owned · physical function not tested.
SunFounder PiCrawler kit · ownership: owned · expected quantity 1. Purchased kit-container count; excluded from component-unit aggregate.
Assembled quadruped verified
user reported physical evidence · club owned · physical function not tested.
PiCrawler robot assembly · ownership: owned · expected quantity unresolved. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Assembly correctness and saved calibration
Raspberry Pi 5 4 GB verified
user reported physical evidence · club owned · physical function not tested.
Raspberry Pi 5 4GB · ownership: owned · expected quantity 1. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Board revision, cooling, boot
SanDisk 32 GB microSD verified
user reported physical evidence · club owned · physical function not tested.
- All present installed software and card health
Robot HAT V4 verified
user reported physical evidence · club owned · physical function not tested.
Robot HAT V4 — visually confirmed by club owner. Inspected 2026-10-24; reported 2026-10-25. Owner-reported visual identification only; no new PCB photograph, MCU marking, firmware revision, electrical measurement, calibration capture or motion test supplied.
- MCU marking, firmware and electrical revision
- Current installation, calibration and physical function
Twelve SunFounder Metal Gear Pro servos verified
user reported physical evidence · club owned · physical function not tested.
- Exact labels, health, stall-current specification
Li-ion 7.4 V 2000 mAh pack verified
user reported physical evidence · club owned · physical function not tested.
- Health, connector topology, charge arrangement
Installed front camera, exact model unresolved unresolved
user reported physical evidence · club owned · physical function not tested.
- Sensor marking, cable and current capture
Stock ultrasonic ranger verified
user reported physical evidence · club owned · physical function not tested.
- Carrier revision and echo-level conditioning
HAT onboard speaker verified
user reported physical evidence · club owned · physical function not tested.
- Current audio routing and playback
GY-521 MPU-6050 candidate verified
canonical inventory · club owned · physical function not tested.
GY-521 MPU-6050 inertial sensor module · ownership: owned · expected quantity 3. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
Classic ESP32 bridge candidate verified
canonical inventory · club owned · physical function not tested.
ELEGOO ESP-WROOM-32 development board · ownership: owned · expected quantity 3. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
Pico bridge candidate verified
canonical inventory · club owned · physical function not tested.
Raspberry Pi Pico · ownership: owned · expected quantity 2. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
Pico 2 W bridge candidate verified
canonical inventory · club owned · physical function not tested.
Raspberry Pi Pico 2 W · ownership: owned · expected quantity 1. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
SSD1309 OLED candidate verified
canonical inventory · club owned · physical function not tested.
2.42-inch SSD1309 128×64 OLED Display Module (I²C) · ownership: owned · expected quantity 1. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
Remote P5 panel candidate verified
canonical inventory · club owned · physical function not tested.
P5 Indoor RGB LED Matrix Panel, 64×32 · ownership: owned · expected quantity 2. Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.
- Carrier electrical compatibility and mounting
External USB microphone unresolved
source documentation · addition not confirmed · physical function not tested.
- Acquisition, USB/audio compatibility and mounting
Hardware architecture and identity boundaries
The physical platform separates application computing from actuator support. The Raspberry Pi is a complete computer with a processor, RAM, operating system, storage and networking. The HAT is an expansion board connected to its 40-pin header. The servos are separate powered actuators. A Python package is none of these things: it is software that tells the computer how to use the electrical interfaces.
Confirmed and inferred hardware
| Subsystem | Club evidence | Exact identity state | What remains to inspect |
|---|---|---|---|
| Kit | PiCrawler 4 / CN0488D, supplied label and purchase facts | VERIFIED by user report | Photograph box/model label for local provenance |
| Compute | Raspberry Pi 5, 4 GB | VERIFIED by user report | Board revision, cooling and present boot state |
| Storage | SanDisk 32 GB microSD | VERIFIED by user report | Image, partitions, OS, health and installed files |
| Control/power | Robot HAT layout and generation | V4 — owner visually confirmed, reported October 25, 2026 | MCU marking and electrical revision |
| Actuation | Twelve Metal Gear Pro servos | VERIFIED family/count by user report | Each label, horn indexing, wiring, health and any replacements |
| Camera | Front camera visibly present | Camera present; sensor UNRESOLVED | Board marking, ribbon, --list-cameras output |
| Ranger | Ultrasonic module present | Generic module identity VERIFIED | Exact revision, connector and echo-level protection |
| Audio | HAT onboard speaker | Speaker presence VERIFIED | Speaker revision and current routing |
| Energy | Label: Li-ion, 7.4 V, 2000 mAh | VERIFIED label by user report | Connector topology, charger compatibility and battery health |
“Verified” in this table names evidence quality, not live electrical testing. Kit containers and their parts must not be added together as separate ownership discoveries. The unchanged live club inventory has canonical IDs for the kit, assembly, Pi and expansion components. This package references those IDs rather than creating a new club inventory.
Signal and power responsibilities
The 40-pin header carries 3.3 V logic, power and multiplexed peripheral functions. On the owner-confirmed V4, the Pi reaches the HAT MCU over I2C. P0–P11 are MCU PWM output channels, not Raspberry Pi GPIO pin numbers. D0–D3 instead map to Pi GPIO lines. ADC channels are read through the MCU because Raspberry Pi itself does not provide a stock general-purpose analog input bank. I2S clocks/data originate on the Pi for the speaker path.
The battery is the robot's energy source. A DC-DC stage produces the board's 5 V supply. High-current actuator loading can disturb that supply even when the Python code is logically correct. The CSI ribbon carries camera signals and camera power through the camera interface; it is not connected to one of the HAT's servo headers. USB is a sensible independent interface for a microphone or MCU bridge because it does not consume the already assigned GPIO signals.
Inspection that will reduce uncertainty fastest
Take readable top/bottom photographs of the HAT, then close-ups of its revision and MCU marking. Record every connector before disconnecting anything. Trace the twelve servo plugs against the channel table in SERVO_AND_LEG_ARCHITECTURE.md. Photograph the battery label and its three-contact connector without probing or shorting its pins. Photograph camera marking and both ribbon ends with power off. A board revision that differs from V4 changes this package's electrical assumptions and must be reconciled before wiring an expansion.
Source evidence: user-evidence, club-inventory, hat-v4-hardware, hat-v4-features, pc-camera-doc, pi-hardware.
Robot HAT V4: what it actually does
The owner-confirmed V4 combines functions that would otherwise require several boards: power conversion and charging, servo PWM, analog inputs, two DC-motor ports, Pi GPIO breakout, peripheral connectors and an I2S speaker path. PiCrawler uses the twelve servo channels; the DC-motor ports are not the devices moving its legs. Do not mistake the existence of a Motor class for a stock leg motor interface.
MCU and I2C boundary
V4 documentation names an Artery AT32F413CBT7 and gives I2C address 0x14. Exact MCU marking on this robot is uninspected. The documentation's 200 MHz capability is a chip maximum, while the driver and PWM register explanation use a 72 MHz timer calculation. These are different claims. This package retains the driver's 72 MHz arithmetic as a source fact; it does not declare the installed MCU's actual clock or firmware version. V5 documentation names the same part with different clock/flash figures, so a physical marking plus the manufacturer's ordering table should outrank a copied prose specification.
robot_hat/pwm.py probes addresses 0x14, 0x15 and 0x16 across supported board families. A discovered response is not sufficient to identify V4 physically. Its channel command is a register plus a high and low byte. Channel duty registers start at 0x20; prescaler registers begin at 0x40 and timer periods at 0x44. A servo's channel does not have an entirely independent frequency: channels 0–3, 4–7 and 8–11 share timer groups. PiCrawler occupies all three groups at nominal 50 Hz. Repurposing one channel for a variable-frequency buzzer could alter a leg's servo signals.
ADC reads use a distinct register protocol. ADC("A0") through A3 access external analog inputs; A4 is the battery divider. External ADC channels are 12-bit and use a 3.3 V reference in the documented model. They are not suitable for an unconditioned 5 V or battery-voltage signal. The battery calculation is approximately raw / 4095 × 3.3 × 3. Voltage is useful telemetry, but it is not a coulomb-counting fuel gauge or a measurement of individual servo current.
Pi-side pin allocation
| V4 function | BCM GPIO / interface | Consequence |
|---|---|---|
| I2C SDA / SCL | GPIO2 / GPIO3, bus 1 | Shared with HAT MCU and expansion devices |
| D0 / D1 / D2 / D3 | 17 / 4 / 27 / 22 | D2/D3 used as stock sonar trigger/echo in examples |
| MCU reset | GPIO5 | Resetting MCU is an active operation |
| SPI MOSI / MISO / SCLK / CE0 / BSY | 10 / 9 / 11 / 8 / 6 | Linux SPI/GPIO path; no reviewed added-device wiring here |
| UART TX / RX | GPIO14 / GPIO15 | 3.3 V UART, not RS-232 |
| I2S BCLK / LRCLK / data out | 18 / 19 / 21 | Used by speaker audio |
| Speaker enable | GPIO20 in current V4 software profile | Do not use V5's GPIO12 profile |
| USR / RST / LED | 25 / 16 / 26 | User inputs/status, not guaranteed emergency stops |
| DC-motor directions | 23 / 24 | V4 two-motor mode |
These are function mappings, not connector-position instructions. Verify labels and orientation on the actual board. The V4 page calls out twelve PWM headers but elsewhere says “four sets”; it also contains inconsistent motor-channel wording. The dedicated motor table and driver establish PWM13 for motor 1 and PWM12 for motor 2. Record discrepancies rather than inferring additional exposed servo channels.
Power, audio and charging
V4 manufacturer figures describe a 6.0–8.4 V battery input, 5 V / 3 A output and USB-C charging input rated 5 V / 2 A. The motor-output rating is 1.8 A per motor channel; it is not a per-servo allowance. The nominal speaker figure is mono 8 ohm / 1 W. These documentation ratings cannot be multiplied to infer that the system can simultaneously supply twelve stalled servos plus a fully loaded Pi 5. POWER_AND_ELECTRICAL.md treats the shared power budget separately.
The speaker requires a configured Linux I2S/ALSA path. Current source's V4 audio profile uses hifiberry-dac and speaker enable GPIO20. A generic HAT pinout showing GPIO20 as unconnected conflicts with this software/audio behavior; preserve that discrepancy and inspect the PCB, rather than wire GPIO20 to an expansion based on the generic row. The board has output audio, but no V4 onboard microphone is established. USB microphone input remains an expansion option.
V4 versus V5: choose by project need
| Item | V4 evidence | V5 evidence | Relevance to this crawler |
|---|---|---|---|
| PWM headers | Twelve | Twelve | No increase in stock leg DOF |
| DC-motor channels | Two | Four | Not a locomotion upgrade for existing servo legs |
| Onboard microphone | None in V4 audio profile | I2S microphone | A USB microphone can enable voice without replacing V4 |
| Servo-zero button | Not documented on V4 | Dedicated double-press zero/disable behavior | Must not become a V4 recovery instruction |
| WS2812 connector | No V4 dedicated feature established | Dedicated connector sharing SPI MOSI | Changes pin-sharing constraints |
| Documented 5 V output | 3 A | 5 A | Potential power advantage, requiring full board/pack review |
| Audio profile | GPIO20 / hifiberry-dac | GPIO12 / googlevoicehat-soundcard | Existing audio setup is revision-specific |
| Identification | No recognized V5 EEPROM => software defaults to V4 | Recognized HAT EEPROM | A software fallback is not physical confirmation |
Do not upgrade solely because V5 is newer. V4 can support movement, range sensing, camera, networking, logging and voice through an external microphone. Neither version adds joint encoders, foot contact sensors or stock stabilized gait control. A swap requires mechanical fit, connector mapping, current budget, audio changes and preserved calibration review. Its benefit should answer a measured limitation first.
Source evidence: hat-pwm, hat-adc, hat-device, hat-audio, hat-v4-hardware, hat-v4-features, hat-v4-mcu, hat-v5-hardware, hat-v5-features, artery-guide. Numeric documentation conflicts remain open in unknowns.json.
Twelve servos: channel, joint and sign
Each leg has three servos. In the control array, the first angle is the knee-related bending angle beta, the second the upper-link/hip bending angle alpha and the third the horizontal yaw angle gamma. coord2polar() returns alpha, beta, gamma, but do_step() reorders them to beta, alpha, gamma before sending them through set_angle(). This swap is a major source of confusion when reading the code.
Exact default channel mapping
| Physical leg | UI number | Python index | Array positions | HAT channels in array order | Direction multipliers |
|---|---|---|---|---|---|
| Right front | 1 | 0 | 0,1,2 | P9,P10,P11 | +1,+1,-1 |
| Left front | 2 | 1 | 3,4,5 | P3,P4,P5 | +1,+1,+1 |
| Left rear | 3 | 2 | 6,7,8 | P0,P1,P2 | +1,+1,-1 |
| Right rear | 4 | 3 | 9,10,11 | P6,P7,P8 | +1,+1,+1 |
PIN_LIST supplies the channel order. The leg names are explicit in the current single-leg example. These are HAT P-channel identifiers, not BCM pins or physical 40-pin positions. Verify each plug in the real assembly; a cable on the wrong channel can make correct equations actuate the wrong joint.
From angle to pulse
The source Servo layer uses nominal 50 Hz and maps -90 to +90 degrees to 500–2500 microsecond pulses, with zero at 1500 microseconds. At 50 Hz the period is approximately 20 ms. The short high pulse encodes the target; its width matters, not merely a motor-style power duty percentage. PWM registers and timer settings are sent to the HAT MCU over I2C. Linux schedules angle updates, while the MCU repeats pulses.
Robot.servo_write_all() applies direction[i] × (origin_positions[i] + target[i] + offset[i]). It then reaches Servo.angle(), which clamps its final value to -90..90. Therefore an offset can cause an additional final clamp even when PiCrawler's coordinate solver and pre-offset joint limiter accept the target. A diagram should label commanded angle, calibrated angle and final pulse as three different values.
Initialization is motion
Constructing Picrawler() resets the MCU, creates servo objects, reads offsets and writes initial angles. The base constructor initializes servos one at a time with 0.15-second spacing to reduce the sudden current demand. Picrawler's alternating direction multipliers are assigned after the base initialization. Constructor behavior is therefore not equivalent to a verified, collision-safe stand command. Even a script whose first explicit line is a sensor read can move legs if it first creates a crawler.
Speed is an interpolation parameter
Robot.servo_move() clamps speed to 0..100. Its nominal movement time is 1000 - 9.9 × speed milliseconds, then lengthened if the maximum requested angle change would exceed its source constant max_dps=428. It divides the interval into nominal 10 ms increments and changes all commanded joint positions linearly. The speed value is neither cm/s nor a percentage of actual measured walking speed. At speed zero the requested move is slow, not disabled.
The driver is open loop at the Pi boundary. Its servo_positions list is the software's command history. It cannot tell whether a servo stalled, lagged, slipped a horn or was disconnected. The small internal position controller typical of a hobby servo does not make PiCrawler's locomotion a sensed closed-loop control system.
An offline source probe also confirms that moves whose largest absolute change is below one degree can be dropped because int(max(absdelta)) becomes zero. This is relevant to small correction experiments: a very small new target may update higher-level coordinate state without producing a new actuator command. The finding is a source-logic result and has not been tested on this robot.
Source evidence: pc-core, pc-single-leg, hat-robot, hat-servo, hat-pwm; validation/offline-results.json.
Power: one supply serves a computer and twelve actuators
The user-observed pack label says Li-ion, 7.4 V and 2000 mAh. A conventional two-series-cell lithium-ion pack is nominally 7.4 V and typically reaches 8.4 V when fully charged. Its nominal energy calculation is 7.4 V × 2 Ah = 14.8 Wh. That is stored-energy arithmetic, not a runtime prediction: usable energy, converter loss, Pi load, motion and battery condition determine actual duration.
The shared budget
The owner-confirmed V4 documentation lists 6.0–8.4 V battery input, a nominal 5 V / 3 A output and USB-C charging input rated 5 V / 2 A. Those ratings describe a board specification, not twelve independent 3 A servo channels. The Pi, servos, speaker and additions compete within the real supply/wiring/thermal limits. A DC-motor channel's 1.8 A rating must not be repurposed as a per-servo stall-current claim.
Pi 5's official USB-C power specification includes 5 V / 5 A capability, while the HAT's V4 supply is documented differently. This does not by itself prove the recovered robot cannot function; it shows why headroom and load testing matter. At simultaneous startup, large angle changes or a stalled joint, the actuator load can pull the rail down and reset the computer. The base driver spaces initial servo writes and limits movement rates partly to reduce abrupt demand, but software pacing cannot manufacture missing current capacity.
No authoritative stall-current rating for the exact twelve installed Metal Gear Pro servo revisions was established in this pass. Do not multiply guessed hobby-servo figures into a declared maximum draw. Obtain servo markings/datasheets and measure representative motion current using suitable equipment before redesigning power. Do not place an ordinary meter's current range across a battery; that creates a short.
Brownout and mechanical faults can look like software faults
A repeated reboot during standing, servos returning unexpectedly to center, corrupted writes or intermittent sensor errors may have an electrical cause. Record battery voltage at rest and during controlled loads, Pi undervoltage/throttling status, temperature and timestamps. Inspect connectors, cable resistance and stalled joints. A full battery indicator is only a coarse pack-voltage clue; it does not establish low internal resistance or individual-cell health.
Power loss while Linux writes to microSD can corrupt storage. A normal software shutdown is preferable when the robot is stable. An immediate physical cutoff remains appropriate for a stall, pinch or uncontrolled motion. A shutdown command cannot serve as a fast guaranteed emergency stop through a Wi-Fi connection.
Charging and connector identity
The V4 manufacturer page describes a three-pin battery connection with the middle contact used for cell balancing and a USB-C charging path. It also describes charging indicators and protections. Those protections are not permission to use an unknown pack or reverse a connector. Verify the actual HAT revision and battery topology first, then use a matching specified input source. The HAT USB-C connector and Pi USB-C power connector are different system entry points.
Do not assume a laptop USB connection provides sufficient power for actuators, or that plugging two independent supplies into an assembled robot is safe. Separate actuator/Pi supplies require a deliberate review of grounds, backfeed, polarity, protection and permitted connection points. No added external-power wiring is authored here. An engineer should establish a real budget and isolation/protection scheme before a higher-current modification.
Practical first-session limits
Use an inspected pack and verified charging arrangement. Keep initial tests brief and low-speed with the body supported. Stop if a servo grinds/stalls, wiring or battery becomes hot, or the Pi resets under motion. Let faults guide inspection before repeating the same startup. Extra cameras, microphones, displays and compute-heavy tasks add both electrical and mechanical load; qualify them one at a time.
Source evidence: user-evidence, hat-v4-features, hat-v4-hardware, hat-v4-battery, hat-robot, pi-five. Runtime and aggregate servo current remain unmeasured.
Mechanics: the body and four leg chains
The crawler's aluminum chassis carries the Pi, HAT, battery, camera and sensor. Each leg is a serial mechanism with a horizontal yaw joint and two joints forming a bending plane. The servos are geared rotary actuators, not continuously rotating wheel motors. Three commanded joint angles determine a toe coordinate in a local leg model. Four such models are mounted in different orientations around the body.
Model lengths and physical lengths
PiCrawler source uses A=48, B=78 and C=33 in its inverse-kinematics model. These are nominal geometric lengths in the coordinate scale used by the kit, treated as millimetres in this package. A is the short bending-plane segment, B the longer segment and C the horizontal offset before that plane. The gait uses a nominal 77 mm body-side separation. These values are software constants, not measurements of this specimen. A loose horn, replaced linkage or different assembly can invalidate the assumed geometry.
Inspect distances between rotation axes rather than simply measuring an aluminum part's outer length. A servo case, horn and mounting offset can make the rotation-axis distance differ from the apparent part length. The toe coordinate originates at the leg root's yaw axis in the geometric model. Record how that model attaches to the actual chassis before using it for a URDF or a physical workspace plot.
Why a pose can be mathematically reachable but unsuitable
Two-link trigonometry can find an angle pair while the assembled leg still collides with the chassis or another leg. Servo electrical angle clamping is not a collision model. A toe position can also move the center of mass outside the remaining support region. Geared hobby joints have backlash and compliance; the physical toe may sag or lag while the driver's commanded coordinate is unchanged.
For a supported test, check each horn's indexing, secure fasteners and freely moving joints with power removed. Do not force a powered servo shaft by hand. A leg that binds or grinds is not corrected by continually increasing an offset. Find the assembly problem before repeated motion heats the servo or destabilizes the supply.
Payload and stability experiments
No numerical payload rating is established for this exact assembled robot. Extra sensors, brackets and cables alter total mass and center of gravity. A display on a tall stalk creates different tipping leverage than the same mass near the chassis. A new battery changes both mass and energy behavior. Plan experiments in terms of a known added mass, mounting position, stance, surface and motion, then record outcomes. Avoid presenting a theoretical torque calculation as a certified payload limit.
A good mechanics project is a repeatability study: mark a toe target, command it repeatedly from different directions and compare the measured endpoints. Direction-dependent error can reveal backlash; load-dependent error can reveal compliance; stable bias can indicate calibration. Those are separate effects, and only measurement distinguishes them.
Source evidence: user-evidence, pc-core, hat-robot, hat-servo. Mechanical consequences are engineering deductions, not bench observations.
Continue
Meeting checklist · Source library · Modification atlas · All project proposals