Skip to the content
PCBKitNew board
2 layers74.7 × 69.1 mmThrottle tune, the printed circuit board in 3D

onversion of an old gasoline lawn tractor to an electric vehicle

Size
74.7 × 69.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
51
Nets
40
Pads
142
Tracks, vias
279, 10
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
20 Aug 2024
Updated
19 Aug 2025

Overview

Throttle tune is an open-source printed circuit board by Jonny999999, from the Jonny999999/throttle-tune repository on GitHub. It is a 2-layer board of 74.7 × 69.1 mm with 51 parts on 40 nets, routed with 279 tracks and 10 vias.

It is built around the ATMEGA8A-PU, LM358N and LM7805, with the BC547 and IRF5305PBF among its other parts. Its parts include 13 capacitors, 12 resistors, 10 connectors, 3 ICs and 2 transistors. It belongs with the robots and motor control boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

5

README

README.md

Throttle Tune – Throttle Adapter for BLDC Motor Controllers

A microcontroller-based board with a PWM-based analog output (RC filter + buffer) to emulate a DAC. The goal is to improve throttle response and add configurable driving modes to cheap BLDC motor controllers (e.g. 3000 W BLDC "go-kart kit" controllers).

Currently it is used in the electric Kettcar conversion with a 3000 W BLDC drive, this board fixes the controller’s unusable throttle mapping and makes the vehicle smooth and controllable adding a lot of flexibility.

Control box with the custom pcb connected between throttle and motor controller
Contains: PCB, key switch, battery indicator, several UI switches


Problem

Cheap BLDC controllers (such as KT-style 3000 W kits) have several issues:

  • No configuration options at all
  • Speed levels provided by the controller are usually defined poorly
  • Only ~2 cm (~60 %) of gas pedal travel is actually used
  • Jerky, hard-to-control acceleration (tiny pedal movements cause extreme changes in power - positive feedback when accelerating thus pressing the pedal more makes this even worse)

Using only the original setup makes smooth low-speed driving or child-friendly operation nearly impossible


Solution

The Throttle Tune board sits between the analog throttle pedal (or handle) and the motor controller.
It rescales, filters, and manipulates the signal (fading, modes...) while adding safety and convenience features.


Features

Firmware

  • Throttle remap: use full pedal range (configure in/out ranges)
  • Ramp-up / fade: prevents stuttering, smoother control (configurable max rate of change)
  • Speed modes: 3 levels + hidden "Sport" mode (highly configurable - several parameters on per-mode-basis)
  • Reverse scaling: reduced throttle in reverse
  • Buzzer alerts: startup-, reverse-, mode switch beeps

Hardware

  • ATmega8 microcontroller
  • Custom DAC output (0–5 V) to motor controller (implementation: PWM output -> lowpass -> buffer)
  • CNC-milled single-sided PCB
  • Through-hole components (easy to build/repair)
  • 3D-printed enclosure
  • Inputs: Hall pedal, reverse switch, speed selector
  • Outputs: DAC to controller, buzzer

Hardware

Schematic

pcb_throttle-tune/export/schematic.pdf

Layout

PCB Photo


Example Applications

Electric Kettcar

Documentation: pfusch.zone/electric-kettcar

Wiring of PCB between pedal and controller (right) and the finished vehicle (left).


Electric Lawn Tractor (temporary use-case)

Documentation: pfusch.zone/electric-lawn-tractor

Throttle Tune board inside in box on top of the motor controller, battery powered (earlier project - initial but temporary use).


Repository Content

  • pcb_throttle-tune/ – KiCad project, schematic, layout exports
  • fw_throttle-tune/ – AVR firmware (ATmega8)
  • doc/images – photos of the build and control box

Usage

Wiring

See pcb_throttle-tune/export/layout.pdf for what needs to be connected to which terminals.

Adjust thresholds

Several config options (macro variables) are defined at the top of main.c (see detailed comments). These include controller start/max voltage, pedal min/max voltage, idle voltage, etc.
To calibrate:

  • Wire everything up
  • Enable DEBUG_UART_DEBUG_OUTPUT_ENABLED
  • Build and flash the firmware
  • Connect a USB-UART adapter (header pins next to mcu, TX + GND are enough)
  • Play with the throttle and observe the UART logs to determine the values
  • Adjust the macros in main.c accordingly, compile, flash, try again

Configure / Adjust modes

Driving modes are selected via 2 GPIO pins, each with its own config in the modeConfigs[] array.
Parameters can be tuned per mode using this struct:

c
//=============================
//==== Mode configuration =====
//=============================
typedef struct {
    const char *name;
    uint8_t maxPercent;     // percent of max possible speed applied at full throttle
    uint8_t maxPercentReverse;
    uint8_t beepCount;      // count beeped when entering this mode
    uint16_t rampUpStep;    // max duty increment per interval (max 1023)
    uint16_t rampUpIntervalMs; // note: must be larger than cycle time (consider when UART used alot)
    uint8_t pedalAverageWindowSize; // window size of the moving average to smooth pedal input (0 = disabled)
    // Future: pedal averaging, throttle curve, etc.
} kettcarConfig_t;

See comments in main.c and adjust as needed.

Build & Flash

Install Requirements
bash
yay -S avr-gcc avr-libc make
Build
bash
cd fw_throttle-tune/
make
Flash

Connect avr controller using USBASP V2.0 ISP programmer using the 10pin connector on the pcb

bash
cd fw_throttle-tune/
make                # compile firmware first
sudo make upload    # flash to MCU via USBasp

Note: Be sure to recompile before flashing, or you may upload an old build...


TODO (future hardware rev)

  • Add TVS diode
  • Add buzzer footprint (currently wired to spare pin and implemented in firmware, but not documented in pcb design)
  • Drop unused terminals (see notes design)
  • Add reverse polarity protection
  • Add onboard buck converter to be used with e.g. 72V directly not requiring external converter

Parts

51
QtyValueFootprintReferences
7100nFCapacitor_THT:C_Disc_D7.0mm_W2.5mm_P5.00mmC5, C6, C8, C9, C11, C12, C13
3220kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR9, R10, R11
2330nCapacitor_THT:C_Disc_D8.0mm_W5.0mm_P5.00mmC1, C2
23k9Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R8
25k6Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R3
2nopopCapacitor_THT:C_Disc_D8.0mm_W5.0mm_P5.00mmC3, C10
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4
110uFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC4
122kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR7
13-speed-IN: COM, sw-fast, sw-slowTerminalBlock:TerminalBlock_bornier-3_P5.08mmJ1
13-speed-OUT: COM, sw-fast, sw-slowTerminalBlock:TerminalBlock_bornier-3_P5.08mmJ4
1330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
1330nFCapacitor_THT:C_Disc_D8.0mm_W5.0mm_P5.00mmC7
147kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR12
1500kPotentiometer_THT:Potentiometer_Piher_PT-10-V10_VerticalRV1
15VConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP6
15V controllerConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP8
15V out, GNDTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ9
168kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
19VConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP9
19V supply batt: GND, 9VTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ10
1ATMEGA8A-PPackage_DIP:CERDIP-28_W7.62mm_SideBrazed_LongPads_SocketIC1
1BC547Package_TO_SOT_THT_AKL:TO-92_Inline_Wide_CBEQ2
1DACConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP10
1GNDConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP7
1IRF5305Package_TO_SOT_THT:TO-220-3_VerticalQ1
1ISPConnector_IDC:IDC-Header_2x05_P2.54mm_VerticalP1
1LM358NPackage_DIP:DIP-8_W7.62mm_LongPadsU2
1LM7805Package_TO_SOT_THT:TO-220-3_VerticalU1
1PWMConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP1
1Throttle-OutConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP3
1UART [TX, RX, GND]Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ5
1force-onJumper_AKL:Jumper_P2.54mm_D0.7mmJP1
1gas-pedal-IN: GND, Analog, 5V-motorctlTerminalBlock:TerminalBlock_bornier-3_P5.08mmJ2
1gpio-reserveTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ7
1pedal-filteredConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP5
1pedal-inConnector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_VerticalTP4
1reserve, REVERSE-SWTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ8
1throttle-OUT: GND, Analog, 5V-motorctlTerminalBlock:TerminalBlock_bornier-3_P5.08mmJ3

Questions

How big is the Throttle tune PCB?

It measures 74.7 × 69.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Throttle tune use?

51 parts, built around the ATMEGA8A-PU, LM358N, LM7805 and BC547. 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 Throttle tune KiCad files?

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

Can I use the Throttle tune design in my own project?

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

Similar boards

  • 4 layers160 × 100 mmV2.1 board ecar isolated, the printed circuit board in 3D

    V2.1 board ecar isolated

    Jonny999999/electric-kart

    Firmware and pcb's for custom built electric kart

    116 parts
  • 2 layers52.4 × 78.4 mmOptoCounter, the printed circuit board in 3D

    OptoCounter

    synthetic65535/OptoCounter

    Электронный счетчик импульсов

    51 parts
  • 2 layers108.7 × 63.5 mmRaspiCar, the printed circuit board in 3D

    RaspiCar

    phaenovum/RaspiCar

    A model car equipped with a Raspberry Pi, intended for experimenting with tools and algorithms for autonomous navigation

    71 parts
  • 2 layers203.2 × 135.9 mmPreamp, the printed circuit board in 3D

    Preamp

    oco2000/AVRForth

    Forth for AVR microcontrollers

    75 parts4GPL-3.0
  • 2 layersBbesc kiCad 1stAttempt, the printed circuit board in 3D

    Bbesc kiCad 1stAttempt

    jakeread/tesc

    in-progress motor controller, towards accessible closed-loop control

    59 parts16
  • 2 layers120 × 75 mmPCB FLM FTE-12V, the printed circuit board in 3D

    PCB FLM FTE-12V

    EngLuizs/Fonte_Linear_12V

    Fonte linear regulada ajustável (12V/1A) com telemetria digital integrada. Desenvolvida com ESP32, KiCad e PlatformIO para monitoramento local (LCD) e remoto (Web Server Wi-Fi).

    55 parts1MIT
  • 4 layers184.2 × 169.5 mmSB mini II, the printed circuit board in 3D

    SB mini II

    simonboak/SB-mini-II

    A homebrewed Apple II clone

    97 parts76MIT
  • 2 layers242 × 60 mmRoothubs, the printed circuit board in 3D

    Roothubs

    gkiefer/home2l

    The Home2Ls - Smart Tools for a Private Home

    178 parts21