
Hat circuit x1
muhaimin44/hat_circuit
This README documents the design, function, and assembly of the IBT-2 "hat" circuit boards used to drive the rover's wheel motors. It exists so that:

This README documents the design, function, and assembly of the IBT-2 "hat" circuit boards used to drive the rover's wheel motors. It exists so that:
Hat circuit x6 is an open-source printed circuit board by muhaimin44, from the muhaimin44/hat_circuit repository on GitHub. It is a 2-layer board of 165.6 × 79.2 mm with 51 parts on 48 nets, routed with 192 tracks and 38 vias.
Its parts include 24 diodes, 18 resistors and 8 connectors.
Project: Altair Mars Rover — Islamic University of Technology (IUT) Subsystem: Drive motor control (IBT-2 / BTS7960 driver interface boards) Revision: v2 (23 Batch redesign) — replaces v1 (21 Batch legacy design) Status: Draft — pending final photos and a few confirmations (see "Open Items" at bottom)
This README documents the design, function, and assembly of the IBT-2 "hat" circuit boards used to drive the rover's wheel motors. It exists so that:
The IBT-2 (built around the BTS7960 dual half-bridge IC) is a high-current motor driver module. It exposes 8 pins:
| Pin | Name | Function |
|---|---|---|
| 1 | VCC | 5V logic supply for the driver's internal logic (separate from motor power, which connects directly to the module's B+/B- terminals, not this header) |
| 2 | GND | Logic ground |
| 3 | R_EN | Right-side (forward) half-bridge enable |
| 4 | L_EN | Left-side (reverse) half-bridge enable |
| 5 | RPWM | PWM signal — drives motor in one direction |
| 6 | LPWM | PWM signal — drives motor in the other direction |
| 7 | R_IS | Right-side current sense (analog feedback) |
| 8 | L_IS | Left-side current sense (analog feedback) |
Design decisions for Project Altair's use case:
R_EN / L_EN are tied permanently HIGH (5V) on the hat circuit. Altair does not need to disable individual half-bridges independently — the driver is always "armed," and direction/speed is controlled entirely through RPWM/LPWM.R_IS / L_IS are not used. These pins exist to let a microcontroller measure motor current (useful for stall detection or closed-loop speed control), but Altair's current firmware does not measure motor speed or current, so these pins are left unconnected.RPWM and LPWM are actually routed off the hat board to the ESP32 shield. Each hat circuit also drives status LEDs, so a quick visual check shows whether a given motor channel is receiving a PWM signal.Each "hat" sits electrically between the ESP32 control shield and an IBT-2 module. Per motor channel, it:
RPWM and LPWM logic signals from the ESP32 shield.RPWM/LPWM pins.R_EN/L_EN so the driver is always enabled.R_IS/L_IS unconnected (not used).Same core functionality as v1, with the following upgrades:
| Improvement | v1 (Legacy) | v2 (Current) |
|---|---|---|
| Layer-to-layer connection | Plated vias | Resistor/diode legs act as vias — selected component leads are soldered on both top and bottom layers, removing the need for a separate via |
| Ground return | Trace-routed | Copper pour / ground fill on the board for a lower-impedance, more robust ground plane |
| Board count | 6 separate single-channel hats | Merged into one board hosting all 6 IBT-2 interfaces, arranged in a 2x3 matrix (individual single-channel boards are still available — see Section 6) |
| Cabling | One connector pair per motor (6 pairs total) | Two 8-pin JST connectors total for all 6 channels — significantly simpler cable management |
Why this matters for the next generation: the "resistor-legs-as-via" trick and the merged 2x3 board are the two biggest structural changes. Anyone revising this board again should understand both before changing the layout, since they affect the assembly procedure (see Section 7) as much as the schematic.
[Photo needed: top view of the full 2x3 assembled board] [Photo needed: bottom view showing soldered resistor/diode legs] [Photo needed: v1 vs v2 side-by-side for comparison]
In addition to the 6-in-1 consolidated board described above, individual single-channel hat PCB files are also included in the repository. These implement the same circuit as one channel of the 6-in-1 board (same IBT-2 interface, same status LEDs, same R_EN/L_EN tie-high, same via-replacement technique) but as a standalone single-IBT-2 board.
Why they exist: not every part of the rover needs six motors driven together. Some wheels only require one IBT-2 per side. For those cases, a single-channel hat board is simpler to install, cheaper to fabricate on its own, and easier to swap out if only one channel needs replacing — without disturbing the shared 6-in-1 board.
Relationship to the 6-in-1 board: functionally identical building block. The 6-in-1 board is effectively six of these merged onto one PCB with shared JST connectors.
Location in repo: [please confirm folder/file name for the individual hat KiCad project]
This is the critical section for anyone building or repairing a v2 hat board.
Because this design removes plated vias in favor of using existing component leads as the layer-to-layer connection:
[Photo needed: close-up of the via-replacement resistor/diode leads soldered on both layers]
[Photo needed: close-up of a ground stitching point]
Two 8-pin JST connectors (J2, J3) link the 6-in-1 board to the ESP32 shield. Each channel also connects to its IBT-2 module through a dedicated 2x4 pin header (J1, J4–J8).
Pending confirmation — pin order/assignment for both JST connectors needs to be filled in here (see Open Items). Suggested table to complete:
| Connector | Pin # | Signal | Notes |
|---|---|---|---|
| J2 | 1 | ||
| J2 | 2 | ||
| J2 | ... | ||
| J3 | 1 | ||
| J3 | ... |
This describes how the component groups connect functionally. It is based on the circuit description above; a full per-pin netlist would need to be exported from the schematic if a more exact reference is required.
| From | To | Signal(s) | Purpose |
|---|---|---|---|
| ESP32 shield | J2 / J3 (8-pin JST-XH) | RPWM, LPWM for all 6 channels (shared across two connectors) | Motor direction/speed control signals into the board |
| J2 / J3 | Per-channel RPWM/LPWM net | RPWM, LPWM | Distributes the shared connector's PWM lines to the correct channel |
| Per-channel RPWM/LPWM net | Status LED (through current-limiting resistor) | RPWM, LPWM | Visual indication of PWM activity per channel |
| Per-channel RPWM/LPWM net | J1 / J4–J8 (2x4 header), pins 5–6 | RPWM, LPWM | Passes the signal on to the IBT-2 module |
| 5V rail | J1 / J4–J8 (2x4 header), pins 3–4 | R_EN, L_EN | Permanently enables both IBT-2 half-bridges |
| Via-replacement resistors (2 per channel) | Top and bottom copper layers | — | Pin 1 soldered on both sides ties the top and bottom nets together in place of a via |
| Via-replacement diode (1 per channel) | Top and bottom copper layers | — | Same via-replacement function as the two resistors above |
| Ground stitch points | Top and bottom ground copper pour | GND | Soldered with spare resistor legs / copper wire to unify the ground plane |
Note: the BOM (Section 10) shows 3 LED positions per channel, but only RPWM and LPWM indicators were described. Please confirm what the third LED per channel indicates (for example, a power/enable indicator) so this table can be made fully accurate.
Exported from KiCad and tidied up below. This covers the 6-in-1 board; the individual single-channel board (Section 6) uses the same component types at one-sixth the quantity, with its own BOM to be added once available.
| Reference Designators | Qty (Total) | Qty per Channel | Component | Footprint | Notes |
|---|---|---|---|---|---|
| D1, D2, D3, D5, D6, D7, D9, D10, D11, D13, D14, D15, D17, D18, D19, D21, D22, D23 | 18 | 3 | LED | LED_THT:LED_D3.0mm | Status indicators; confirm which of the 3 per channel map to RPWM / LPWM / other (see Section 9) |
| D4, D8, D12, D16, D20, D24 | 6 | 1 | Diode | Diode_THT:D_T-1_P10.16mm_Horizontal | Via-replacement diode, soldered on both layers (Section 7.1) |
| J1, J4, J5, J6, J7, J8 | 6 | 1 | 2x4 pin header | Connector_PinSocket_2.54mm:PinSocket_2x04_P2.54mm_Vertical | Connects each channel to its IBT-2 module's 8-pin header |
| J2, J3 | 2 | shared (not per channel) | 8-pin JST-XH socket | Connector_JST:JST_XH_B8B-XH-A_1x08_P2.50mm_Vertical | Carries combined signals for all 6 channels to/from the ESP32 shield |
| R1–R18 | 18 | 3 | Resistor | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | Includes 2 via-replacement resistors and 1 LED current-limiting resistor per channel; exact resistance values not present in this export (see Open Items) |
Total component count for the 6-in-1 board: 18 LEDs, 6 diodes, 6 IBT-2 headers, 2 JST connectors, 18 resistors.
/hardware
/kicad
/hat_x6 -> 6-in-1 board schematic + PCB project files
/hat_single -> individual single-channel board schematic + PCB project files
/3d -> mechanical/3D model files
/images -> photos referenced in this README
README.mdR_IS/L_IS (current sensing) are currently unused on both board variants. If a future batch wants stall detection or closed-loop speed control, these pins are already present on the IBT-2 and would just need to be routed and read by the ESP32's ADC.To finalize this document, please share:
Once you send these over, I'll drop the photos into the doc, fill in the pinout and BOM tables, and tighten up anything that needs correcting.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 18 | LED | LED_THT:LED_D3.0mm | D1, D2, D3, D5, D6, D10, D11, D13, D14, D15, D17, D18, D19, D21, D22, D23 +2 |
| 18 | R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2, R3, R4, R5, R6, R7, R10, R11, R12, R13, R14, R15, R16, R17, R18 +2 |
| 6 | Conn_02x04_Odd_Even | Connector_PinSocket_2.54mm:PinSocket_2x04_P2.54mm_Vertical | J1, J4, J5, J6, J7, J8 |
| 6 | D | Diode_THT:D_T-1_P10.16mm_Horizontal | D4, D8, D12, D16, D20, D24 |
| 2 | Conn_01x08_Socket | Connector_JST:JST_XH_B8B-XH-A_1x08_P2.50mm_Vertical | J2, J3 |
| 1 | LOGO | logos:altair_logo | G*** |

muhaimin44/hat_circuit
This README documents the design, function, and assembly of the IBT-2 "hat" circuit boards used to drive the rover's wheel motors. It exists so that:

davidphilipbarr/Sweep
Sweep - a small promicro based keyboard inspired by the Ferris.


W0rthlessS0ul/nRF24_jammer
The nRF24 jammer is a powerful tool that requires an ESP32 and configurable numbers of NRF24 modules to assemble.

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!


Neumi/open_echo
Open Source echo sounder / depth sounder / SONAR for bathymetry and research. Arduino based and compatible.


vsfteam/vsf
Versaloon Software Framework -- a tiny preemptive-capable event-driven incremental software framework for embedded systems
It measures 165.6 × 79.2 mm and has 2 copper layers, 1.6 mm thick.
51 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the muhaimin44/hat_circuit repository on GitHub, at the commit this page was made from: the board is hat_circuit_x6/hat_circuit_x6.kicad_pcb and its schematic hat_circuit_x1/hat_circuit.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask muhaimin44 before reusing the design.