Skip to content

Latest commit

 

History

History
216 lines (150 loc) · 13.8 KB

File metadata and controls

216 lines (150 loc) · 13.8 KB

IBT-2 Motor Driver Hat Circuit — Documentation

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)


1. Purpose of This Document

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:

  • Future batches can understand why the board is designed the way it is, not just what it looks like.
  • Anyone can assemble, repair, or debug a board without needing to ask the original designers.
  • The next redesign has a documented baseline instead of starting from scratch or reverse-engineering the KiCad files.

2. Background: How the IBT-2 Driver Works

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.
  • Only 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.

3. What the Hat Circuit Does

Each "hat" sits electrically between the ESP32 control shield and an IBT-2 module. Per motor channel, it:

  1. Takes RPWM and LPWM logic signals from the ESP32 shield.
  2. Passes them through to the IBT-2's RPWM/LPWM pins.
  3. Drives status LED(s) off the PWM lines, so activity is visible without a scope or multimeter.
  4. Supplies a permanent 5V HIGH to R_EN/L_EN so the driver is always enabled.
  5. Leaves R_IS/L_IS unconnected (not used).

4. Design History: v1 (21 Batch) to v2 (23 Batch)

v1 — Legacy design (21 Batch)

  • One discrete hat board per IBT-2 module (i.e., 6 separate boards for 6 motors).
  • Used vias to connect top and bottom copper layers.
  • No ground copper fill — ground routed as traces only.
  • Functionally correct, but harder to manufacture, more cabling to manage (one connector pair per motor), and more fragile mechanically.

v2 — Current design (23 Batch)

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.


5. Board Layout: 6-in-1 Consolidated Hat

  • All 6 IBT-2 channel interfaces are laid out on a single PCB, arranged in a 2x3 matrix (confirm physical orientation with photo).
  • Two 8-pin JST connectors (J2, J3) carry all required signals between this board and the ESP32 shield (down from 6 separate connector pairs in v1).
  • Each of the 6 channel blocks is otherwise identical: RPWM/LPWM in, status LEDs, R_EN/L_EN tied to 5V, R_IS/L_IS unused.

[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]


6. Individual Single-Channel Hat Boards

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]


7. Assembly Process

This is the critical section for anyone building or repairing a v2 hat board.

7.1 Resistor/diode "via replacement" soldering

Because this design removes plated vias in favor of using existing component leads as the layer-to-layer connection:

  1. Identify the designated via-replacement resistors and diode on the board (per channel: two resistors and one diode, per the original design notes).
  2. Pin 1 of each of these components must be soldered on both the top and bottom copper layers. This is what electrically replaces a via at that location.
  3. Do not clip these leads flush after soldering the first side — leave enough lead length exposed to solder the second side as well.
  4. Visually inspect both sides after soldering to confirm solder has properly wetted the pad on both layers, not just one.

[Photo needed: close-up of the via-replacement resistor/diode leads soldered on both layers]

7.2 Ground stitching

  1. Locate the ground via points on the board (used to stitch top and bottom ground fill together).
  2. Solder these using spare resistor legs or short lengths of small-gauge copper wire, passed through the hole and soldered flat on both the top and bottom layers.
  3. This ties the top and bottom ground copper pours into a single, lower-impedance ground plane.

[Photo needed: close-up of a ground stitching point]

7.3 General assembly notes

  • [Open item — please confirm preferred solder order, e.g., do via-replacement components first, then remaining components, then ground stitching last, or whatever sequence has worked best in practice.]

8. Connector Pinout

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 ...

9. Component Connection Table

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.


10. Bill of Materials (BOM) — 6-in-1 Consolidated Hat Board

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.


11. KiCad Project Files

  • 3D design: [file name / location — please provide]
  • PCB / schematic (KiCad) — 6-in-1 board: [file name / location — please provide]
  • PCB / schematic (KiCad) — individual single-channel board: [file name / location — please provide]
  • Recommended: keep this repo's file structure as:
    /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.md
    

12. Known Limitations / Notes for the Next Generation

  • R_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.
  • The resistor-leg via replacement (Section 7.1) saves a manufacturing step but depends on careful hand assembly — worth evaluating whether reintroducing real vias is worth it if the board ever moves to a more automated assembly process.
  • [Add any other lessons learned once the boards have been field-tested]

13. Open Items — Please Provide

To finalize this document, please share:

  1. Photos — top/bottom of the assembled 6-in-1 board, a close-up of the via-replacement soldering, a close-up of a ground stitch point, and (if available) a v1-vs-v2 comparison photo.
  2. KiCad project files (or at least their file names/paths) for the 6-in-1 board, the individual single-channel board, and the 3D model.
  3. JST connector pinout — which signal is on which pin, for both J2 and J3.
  4. LED mapping and resistor values — which of the 3 LEDs per channel correspond to RPWM, LPWM, and (if applicable) a third status; and the actual resistance values used (the KiCad export only lists generic "R" and "LED" values, not specific parts).
  5. Physical orientation of the 2x3 matrix (2 rows x 3 columns, or 3 rows x 2 columns) and which motor (e.g., M1–M6, or FL/FR/ML/MR/RL/RR) maps to which position.
  6. Any preferred assembly order (e.g., solder via-replacement components before or after populating other parts?).
  7. BOM for the individual single-channel hat board, if you'd like it included in Section 10 alongside the 6-in-1 BOM.

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.