Skip to the content
PCBKitNew board
4 layers45.5 × 58 mmGashebelboard, the printed circuit board in 3D

Gashebelboard

WannSea/throttle

Gashebel Firmware

Size
45.5 × 58 mm
Copper layers
4
Thickness
1.6 mm
Parts
20
Nets
29
Pads
88
Tracks, vias
119, 22
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
20 Jun 2024
Updated
2 Aug 2026

Overview

Gashebelboard is an open-source printed circuit board by WannSea, from the WannSea/throttle repository on GitHub. It is a 4-layer board of 45.5 × 58 mm with 20 parts on 29 nets, routed with 119 tracks and 22 vias.

It is built around the TJA1043T. Its parts include 4 capacitors, 4 connectors, 3 ICs, 2 resistors and 1 diode. It belongs with the SAM D and SAM boards of this library.

Main components

1

README

README.md

WannSea Gashebel Firmware

Dieses Projekt nutzt das https://github.com/rp-rs/rp2040-project-template als Template.

Installation

Rust über https://rustup.rs/ installieren und anschließend ausführen:

sh
rustup target install thumbv6m-none-eabi
cargo install flip-link
cargo install --locked elf2uf2-rs

Build

Es gibt zwei Möglichkeiten:

  1. Den RP2040 mit gedrückter BOOTSEL-Taste per USB verbinden und die Firmware direkt bauen und flashen:

    sh
    cargo run
  2. Eine UF2-Datei bauen, die später manuell auf das RP2040-USB-Laufwerk kopiert werden kann:

    sh
    cargo build --release
    elf2uf2-rs target/thumbv6m-none-eabi/release/rp2040-project-template throttle.uf2

Info:

Green LED Blinking: Sending CAN throttle command Red LED: Lever Locked

Encoder / Hall

Der verwendete Encoder mit dem 5-poligen Stecker ist ein AS5600 und wird über I2C gelesen:

  • Board-Stecker: SDA, SCL, PWM/OUT, GND, 3V3
  • Am AS5600: VCC -> 3V3, GND -> GND, SDA -> SDA, SCL -> SCL
  • DIR habe ich fest mit VCC verbunden.
  • OUT/PWM wird von der Firmware aktuell nicht benutzt.

Veränderbare Parameter

Die wichtigsten Parameter stehen am Anfang von src/main.rs:

  • MAX_CURRENT_A: maximal ausgegebener Strom bei vollständig ausgelenktem Gashebel, aktuell 500.0 A.
  • DELAY_MS: Zeit zwischen zwei Ausgaben. 20 ms entsprechen 50 Hz.
  • ENCODER_ZERO_RAW: Raw-Wert des Encoders in der neutralen Hebelposition.
  • ENCODER_FORWARD_MAX_RAW: Raw-Wert bei vollständig nach vorne gedrücktem Gashebel.
  • ENCODER_REVERSE_MAX_RAW: Raw-Wert bei vollständig nach hinten gedrücktem Gashebel.
  • ENCODER_DEADZONE_COUNTS: Totzone von der Neutralstellung aus in jede Richtung. 50 bedeutet ungefähr 100 Counts Gesamttotzone.
  • PRETEND_HALL_PIN_ON: Bei true wird der Hall-/Kill-Cord-Eingang für Tests als dauerhaft vorhanden behandelt.
  • ENABLE_USB_LOGGING: Aktiviert bei true die Ausgabe der Encoderwerte über USB-Serial.

Die Encoder-Endwerte dürfen je nach Einbaurichtung des Sensors größer oder kleiner als ENCODER_ZERO_RAW sein. Entscheidend ist, dass die Werte an den tatsächlichen Endpositionen des Hebels eingetragen werden.

USB-Debug-Ausgabe

Bei aktiviertem ENABLE_USB_LOGGING wird beispielsweise folgende Zeile ausgegeben:

text
encoder raw: 2237, throttle_milli: 0, can: 00000116#00000000

Die drei Werte bedeuten:

  • encoder raw: unverarbeiteter 12-Bit-Messwert des AS5600 von 0 bis 4095.
  • throttle_milli: aus Kalibrierung und Totzone berechnete Gasstellung. -1000 entspricht dem einen Endanschlag, 0 der Neutralstellung und +1000 dem anderen Endanschlag.
  • can: Vorschau der tatsächlich gesendeten CAN-Nachricht im Format CAN-ID#Payload. 00000116 ist die SetCurrent-Nachricht für VESC-ID 22. Der achtstellige Payload enthält den vorzeichenbehafteten Stromwert als Ampere × 1.000. Im gesperrten Zustand ist dieser Payload immer 00000000.

SetDuty- und SetCurrent-Version

SetDuty-VersionAktuelle SetCurrent-Version
VESC SetDuty, CAN-ID 0x16VESC SetCurrent, CAN-ID 0x116
Payload: vorzeichenbehafteter Duty-Wert von −100.000 bis +100.000Payload: vorzeichenbehafteter Stromwert von −500.000 bis +500.000 (Ampere × 1.000)
50 Werte großes GlättungsfensterKeine Glättung und keine Rampe
Vollständige Rampe dauert ca. 1 SekundeAusgang folgt dem Gashebel unmittelbar
Ausgabe alle 20 ms / 50 HzAusgabe alle 20 ms / 50 Hz
Null und der gesperrte Zustand werden explizit gesendetNull und der gesperrte Zustand werden explizit gesendet
Encoder- und Hall-Auswertung wie in der aktuellen VersionEncoder- und Hall-Auswertung unverändert

Parts

20
QtyValueFootprintReferences
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_TopBottomH1, H2, H3, H4
210µCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1, C2
24.7nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3, C4
11.2KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
1120Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
15V ENJumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP1
1BOOT BUSgashebel:JST_B5B-XH-AJ2
1CAN TConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP3
1Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4
1ENCODERgashebel:JST_B5B-XH-AJ3
1Hallgashebel:JST_B3B-XH-AJ1
1LM78M05_TO252Package_TO_SOT_SMD:TO-252-2U4
1SM712_SOT23Package_TO_SOT_SMD:SOT-23D1
1Seeed Studio XIAO SAMD21gashebel:XIAO-SAMD21-RP2040-14P-2.54-21X17.8MM (Seeeduino XIAO)U2
1TJA1043TPackage_SO:SOIC-14_3.9x8.7mm_P1.27mmU3

Questions

How big is the Gashebelboard PCB?

It measures 45.5 × 58 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Gashebelboard use?

20 parts, built around the TJA1043T. 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.

Where can I download the Gashebelboard KiCad files?

From the WannSea/throttle repository on GitHub, at the commit this page was made from: the board is gashebel/gashebelboard.kicad_pcb and its schematic gashebel/gashebelboard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gashebelboard design in my own project?

Its repository states no licence, so its author keeps all rights: ask WannSea before reusing the design.

Similar boards

  • 2 layers68 × 32 mmIC2E ESC S50 DualSpool v1, the printed circuit board in 3D

    IC2E ESC S50 DualSpool v1

    AVIUS001/ic2e-esc-design-journey-public

    Public-safe Aerial8/IC2E ESC design-journey overview (no manufacturable IP)

    13 parts
  • 2 layers34 × 34 mmByteworker, the printed circuit board in 3D

    Byteworker

    Bytewerk/byteworker-kicad

    Our famous byteworker now available in Kicad

    65 partsCC-BY-SA-4.0
  • 2 layers127 × 73 mmAudio, the printed circuit board in 3D

    Audio

    cubitel/car-audio

    Fully digital car audio amplifier

    164 partsMIT
  • 4 layers28.5 × 42 mmSAMC21-Base, the printed circuit board in 3D

    SAMC21-Base

    HubertD/SAMC21-Base

    PCB holding a 36V DCDC, CAN Transceiver and ATSAMC21 microcontroller, meant for use with custom extension boards

    63 parts
  • 4 layers64.2 × 89.1 mmStarBridge Adapter, the printed circuit board in 3D

    StarBridge Adapter

    luishutterli/starbridge

    To make it easy for you to get started with GitLab, here's a list of recommended next steps.

    68 parts
  • 4 layers44.8 × 55.9 mmMain project, the printed circuit board in 3D

    Main project

    hackclub/OnBoard

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

    20 parts915
  • 4 layers22.9 × 50.8 mmLg hvac esp32, the printed circuit board in 3D

    Lg hvac esp32

    JanM321/esphome-lg-controller

    Wired controller for LG HVAC units using ESPHome and ESP32

    20 parts2920BSD
  • 4 layers23.3 × 21.6 mmSiw, the printed circuit board in 3D

    Siw

    loxodes/vna

    Under development open hardware microwave vector network analyzer

    20 parts205