← Home
Docs/Hardware/Assembly & Wiring

Assembly & Wiring Guide

Putting the car together is straightforward: you 3D print the open-architecture chassis, mount the hardware, and plug your electronics modules into the labeled female headers on the EVDrive PCB.

Follow these steps in order so you don't accidentally plug anything in backwards.


0. 3D Printing & Chassis Preparation

Before wiring the electronics, prepare your mechanical platform:

  1. Download the CAD files: Grab the official files from the Chassis Downloads Page (use .STEP to modify in Fusion 360/Onshape, or .STL for direct slicing).
  2. Slicing recommendations:
    • Filament: PETG or Tough PLA (PETG provides superior impact strength).
    • Infill: 35% – 45% (Gyroid or Grid pattern) to dampen stepper motor vibration.
    • Walls / Perimeters: 4 to 5 perimeters (minimum 1.6mm thickness) for strong screw threads.
    • Layer height: 0.20mm. Print flat with no supports needed.
  3. Threaded Inserts & Hardware:
    • Press M3 x 4mm brass heat-set inserts into the motor mounting holes, PCB standoff locations, and front pusher mount using a soldering iron (or thread M3 machine screws directly into the plastic).
  4. Mounting Motors & Drive Hardware:
    • Fasten the dual NEMA 17 pancake stepper motors using M3 x 8mm screws.
    • Press-fit the 12mm ball caster into the rear socket.
    • Slide your 3" wheels onto the motor axles and secure them.
  5. Screw in the Modular Front Bottle Pusher:
    • Screw your customized front bottle pusher into the front M3 mounting holes. Verify that its contact points have rounded edges (R>7mmR > 7\text{mm}) and push at the bottle's center-of-mass without cupping or gripping.
  6. Side & Top Mounting Grid:
    • Use the M3 holes along the left and right sides to bolt on balance counterweights, and install 25mm standoffs for the top deck plate to hold your optical sights and start switch.

1. Socketing the Modules

TMC2209 Stepper Drivers (U3 & U4)

  • Watch the orientation! StepStick drivers can be plugged in backwards if you aren't paying attention, which will instantly toast the driver.
  • Look at the pin labels on the bottom of your TMC2209 module: find GND and DIR.
  • Match them with the GND and DIR silkscreen labels printed next to the socket headers on the EVDrive board (U3 is Motor A / Left, U4 is Motor B / Right).
  • Install the small aluminum heatsinks that came with the drivers onto the top of the main IC.

ESP32-S3 DevKit (U2)

  • Make sure the USB-C port faces towards the edge of the board for easy cable access.
  • Which USB port to use: The official ESP32-S3-DevKitC-1 has two USB-C ports. Always plug your cable into the LEFT port (labeled UART) for uploading firmware and viewing the Serial Monitor. The right port is native USB/OTG.
  • Gently press the pins into the dual female headers until fully seated. Don't force it - make sure no pins bend outwards. If the pin rows don't line up with the socket, you may have a clone with non-standard header spacing.

MPU-6050 Gyro Module (U1)

  • Plug the MPU-6050 into the dedicated 8-pin center header.
  • Ensure the axis indicator arrow printed on the breakout board points toward the front of your car (the driving direction).

2. Stepper Motor Wiring (J7 & J8)

The 4-pin stepper motor headers on the PCB are routed in this exact pin order:

Pin 1: 1B∣Pin 2: 1A∣Pin 3: 2A∣Pin 4: 2B\text{Pin 1: } \mathbf{1B} \quad\vert\quad \text{Pin 2: } \mathbf{1A} \quad\vert\quad \text{Pin 3: } \mathbf{2A} \quad\vert\quad \text{Pin 4: } \mathbf{2B}

Matching your motor coil wires:

Standard NEMA 17 stepper motors have two internal phase coils:

  • Phase A (Coil 1): Pair of wires connected to 1A and 1B.
  • Phase B (Coil 2): Pair of wires connected to 2A and 2B.

To verify wire pairs with a multimeter, set it to resistance/continuity mode. When touching the two wires of the same coil, you will see a small resistance (~2 to 5 ohms) or hear a beep.

Direction tip: If a motor spins the opposite way when driving forward, you can either swap one coil pair (e.g., swap wires 1A and 1B in the connector) or invert the DIR pin in software.


3. Setting Driver Vref (Motor Current)

Before running the motors under load, check the reference voltage (Vref) on the tiny potentiometer on each TMC2209:

  • If Vref is too low, the motors will skip steps during acceleration.
  • If Vref is too high, the pancake motors will get hot and waste battery power.

4. Mounting & Wiring AS5600 Encoders

The AS5600 reads the magnetic field angle from a diametrically magnetized circular magnet on the end of the wheel axle.

Wiring the 4-pin Headers:

Connect a 4-wire cable between the AS5600 breakout board and the EVDrive PCB:

Encoder PinEVDrive Header PinHeader Function
VCCPin 1+3V3 logic power
GNDPin 2Common ground
SCLPin 3I2C Clock (J1 uses GPIO 2, J2 uses GPIO 42)
SDAPin 4I2C Data (J1 uses GPIO 1, J2 uses GPIO 41)

Encoder direction: If the encoder is stepping backwards, you can simply flip it in software :)

Reading encoder angles: You will need to manage step jumps when it completes a full revolution, like 4096 -> 0 and record either raw steps or full revolutions in your code!

Magnet Alignment:

  1. Superglue the circular magnet into the center hole of the stepper motor. It must rotate on-axis without wobbling.
  2. Screw on the encoder with the encoder mount print.

5. Power & Voltage Converters

WARNING: DOUBLE CHECK POLARITY! Always verify polarity with a multimeter before plugging in battery leads or screwing in terminal wires. Even though the board has onboard reverse-polarity MOSFETs (Q1 and Q2), hooking power up backwards repeatedly or with raw high currents can damage the protection circuit. Double check that Positive goes to (+) and Ground goes to (-)!

  1. Buck Converter (5V Logic):
    • Connect your battery pack input to the LM2596 buck converter.
    • Adjust the potentiometer on the buck converter until its output measures 5.0V.
    • Wire the 5V output into terminal block J5 (5V IN).
    • This rail is protected by the 2A fuse (F2) and reverse-polarity MOSFET (Q2).
  2. Boost Converter (12V Motors):
    • Wire the battery into your XL6009 boost converter.
    • Adjust the output to 12V.
    • Wire this output to terminal block J4 (12V IN).
    • This rail is protected by the 5A fuse (F1) and reverse-polarity MOSFET (Q1).

Note on Bypass Jumpers: If you ever need to bypass the onboard fuses in a pinch, solder jumpers JP1/JP3 (for 12V) and JP2 (for 5V) are provided on the PCB.


6. Power Rail LED Diagnostics & Troubleshooting

The board features status indicator LEDs for each voltage rail:

  • D2 (12V Rail): Turns on when motor power is active.
  • D4 (5V Rail): Turns on when 5V logic power is active.
  • D3 (3.3V Rail): Turns on when the onboard 3.3V LDO regulator is active.

CRITICAL WARNING: If you short something, connect a wire wrong, or hear a click/pop and one of these voltage rail LEDs shuts off, you have blown an onboard fuse (F1 or F2) or shorted a component. Disconnect battery power immediately! Do not keep trying to run it. Contact us for troubleshooting help and replacement fuses or modules.

Battery Voltage Sag Warning

If your battery reads 12V while sitting idle, but the voltage drops significantly (for example, dropping to 9V or 10V) the instant you arm the motors in code, and jumps right back up when you disarm them, your TMC2209 drivers are drawing too much current.

  • Lower the Vref potentiometer on top of each TMC2209 driver slightly using a small screwdriver.
  • Excessive current causes pancake motors to overheat quickly and robs your battery of run time.

7. First Power-On Checklist

Before running any test drive:

  1. Check that TMC2209 drivers are oriented with GND and DIR on the correct side.
  2. Verify that both 5A (F1) and 2A (F2) fuses are firmly seated in their fuse clips.
  3. Double check power polarity with a multimeter before connecting to J5 (5V) and J4 (12V).
  4. Power on the rails. Verify that onboard LEDs D2 (12V), D3 (3.3V), and D4 (5V) light up solid.
  5. Plug the USB cable into the LEFT port (UART) and upload the starter sketch to confirm sensor communication.
  6. Mount the 1/4" wooden dowel vertically in the front clamp extending to within 1.0 cm of the floor (required for official timing and distance measurement).