Custom pcb for controlling the electric components of a tractor
with a microcontroller.
During the restoration of an IHC-tractor a custom pcb was developed and built to replace the broken relay based control.
The electric system of this tractor has quite some complex logic which was originally implemented using several relays. Because the original setup was significantly damaged over 57 years of extensive use, I decided to rebuild the control by developing a custom circuit board with a microcontroller as core component for easy extendability.
Reasons for this project
- Saving several separate original components, thus saving money and reducing the chance of faults:
- Flasher unit for blinker
- Flasher unit for warning lights
- Wiper control unit
- Special relay for high beam
- Special indicator switch
- 3x relay for brake light logic
- Much less wires, since all the logic is done by one pcb
- Flexible logic
- New features:
- Low voltage alarm
- Acoustic blinker signal
- Custom horn signals/presets
- Option for more features by just upgrading the firmware
Course of action
- Stable and regulated 5V supply
- Buzzer for acoustic signals
- Connector for programming
- Protected Inputs against electrical interference
- 6x digital input (switch to GND)
- 3x digital input (switch to 12V)
- Analog input to measure the input voltage
- 2x 17A Mosfet output (GND)
- 8x 16A Relay output (12V)
After analysing the existing system and planning the required features a schematic was developed: Finished Schematic
- Atmega8 microcontroller
- 8-Channel mosfet array (ULN2803APG)
- 8x 12V 16A Relay
- 2x mosfet (IRFZ24N)
- Wago pcb terminals
- PCB size: 100x160 mm
According to the created Schematic the PCB-layout was designed for a single sided PCB, using as few bridges as possible. 3D model of the PCB
Finished PCB layout
Instead of sending the files to a professional PCB manufacturer, I decided to produce it myself using the isolation milling method.
With the help of the layout and schematic the correct components can be soldered onto the pcb.
After all the components were soldered, evaluated and the first test was successful, the back side of the board was coated with a plastic layer for insulation and protection against corrosion.
The firmware for this pcb was programmed using the following components:
- C++ and C: Programming languages
- GCC: Compiler
- Cmake: Software for controlling the compilation process
- AVRDUDE: Software for flashing the Atmel AVR microcontroller
- USB ISP Programmer: Hardware used as interface between pc and pcb
A git repository with the source code can be found on github.
In order to integrate the created pcb into the tractor, the following steps were executed:
- Identify and label the present wires
- Rewire the two dashboard panels
- Create wire harnesses with new and existing connectors
- 3d-print a housing
- Build a bracket to mount the housing in the tractor
- Integrate a new fusebox
Bottom side of rewired dashboard panels
Wiring the pcb according to plan