Skip to the content
4 layers99.6 × 98.3 mmAnlog LFR, the printed circuit board in 3D

PID control with analog electronics

Size
99.6 × 98.3 mm
Copper layers
4
Thickness
1.6 mm
Parts
148
Nets
84
Pads
398
Tracks, vias
1,028, 245
Pours
23
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Oct 2026
Updated
10 Oct 2026

Overview

Anlog LFR is an open-source printed circuit board by aaariyann, from the aaariyann/Analog-Line-Follower repository on GitHub. It is a 4-layer board of 99.6 × 98.3 mm with 148 parts on 84 nets, routed with 1,028 tracks and 245 vias.

It is built around the MCP6004T-I/SL(MS), AP63205WU and LM339, with the QRE1113GR, AO3400A and SS14 among its other parts. Its parts include 69 resistors, 21 capacitors, 10 switches, 9 ICs and 2 diodes.

Main components

6

README

README.md

Analog Line Follower

A line follower where the steering loop has no microcontroller in it. Ten reflective sensors go in, two motor PWM signals come out, and everything in between is op-amps, resistors and one comparator.

Status: schematic complete in KiCad. Not simulated or fabricated yet. This repo will be updated as that happens.

Why analog

Most line followers read sensors with an ADC, run a PID loop in code and write PWM. I wanted to see how far the same idea goes when the loop is built from circuits you can probe with a scope. There’s no sampling delay or loop rate to tune around, and every signal in the controller is a voltage you can look at. It also makes the PID terms very direct: Kp, Ki and Kd are trimmer pots on the board.

How it works

Sensing. Ten QRE1113 reflectance sensors, each buffered by an op-amp so the later stages don’t load them. Position error. The right-side signals are inverted around a 2.5 V reference, then all ten are summed with weighted resistors (100k down to 20k). Sensors farther from center pull harder. A pot sets overall gain and another trims the center offset. PID. Separate P, I and D op-amp stages feed a summer. The integral stage is built but left unpopulated by default, so the first version runs as PD. Speed and steering. A base-speed pot is added to the PID output for one motor and subtracted for the other. PWM. A triangle oscillator around 5 kHz is compared against each motor’s duty voltage by an LM339. Drive. Two AO3400A MOSFETs switch the motors low-side, with flyback diodes. Power. An AP63205 steps 12 V down to 5 V. A buffered divider provides the 2.5 V reference.

Test points are placed on the key signals (error, P, I, D, PID output, triangle, duty, PWM) so each stage can be checked on its own.

Parts

10 × QRE1113GR sensors 7 × MCP6004 quad op-amps 1 × LM339 comparator 1 × AP63205 buck regulator 2 × AO3400A MOSFETs, 2 × SS14 diodes Trimmers for Kp, Ki, Kd, gain, offset and base speed

What I want to check next

Simulate the PID response and the triangle/PWM stage. Confirm the LM339 input range is comfortable with the triangle peak. Check PWM edge speed at the gates. Add reverse or braking, and handling for junctions and dashed lines, if the base design works well.

Parts

148
QtyValueFootprintReferences
1710KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR301, R302(DNP)1, R303, R304, R305, R308, R309, R310, R311, R312, R313, R314, R315, R401, RD1, RI2 +1
15100KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR100, R111, R112, R113, R114, R115, R116, R117, R118, R119, R120, R200, R306, R406, R411
124.7KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR201, R202, R203, R204, R205, R206, R207, R208, R209, R210, R316, R317
12TestPointTestPoint:TestPoint_Pad_D2.0mmCOM_A1, COM_B1, D_1, I_1, P_0, PID_0, PWM_A1, PWM_B1, TRI1, VBASE_1, VERROR_0, VREF_0
10220Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR101, R102, R103, R104, R105, R106, R107, R108, R109, R110
10QRE1113GROptoDevice:OnSemi_CASE100CYS1, S2, S3, S4, S5, S6, S7, S8, S9, S10
9100nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC100, C101, C102, C103, C104, C105, C106, C200, CB2
7MCP6004T-I/SLPackage_SO:SOIC-14_3.9x8.7mm_P1.27mmU1, U2, U3, U4, U5, U6, U7
6, , , , ,
61uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC500, C501, C502, C503, C504, CI1
4100kPotentiometer_SMD:Potentiometer_Bourns_3224W_VerticalGAIN_0, KD_0, KI_0, KP_0
333KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR307, R404, R409
210KPotentiometer_SMD:Potentiometer_Bourns_3224W_VerticalBASE_0, OFF_0
210RResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR501, R502
210uFCapacitor_SMD:CP_Elec_5x5.4C1, C2
21MResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1000, RI1
22.2KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR211, R212
220KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR402, R407
222uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC4, C5
224KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR403, R408
251KResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR405, R410
2AO3400APackage_TO_SOT_SMD:SOT-23-3Q1, Q2
2SS14Diode_SMD:D_SMAD1, D2
110nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderCD1
110uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3
115nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC301
14.7nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderCD3
14.7uInductor_SMD:L_7.3x7.3_H3.5L1
1AP63205WUPackage_TO_SOT_SMD:TSOT-23-6U9
1LM339Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU8

The 140 most common of 148 parts.

Similar boards

  • 4 layers90 × 60 mmVW MTC1, the printed circuit board in 3D

    VW MTC1

    Sajeevanveeriah/Ataxia-Monitor

    Real-Time Ataxia Monitor

    154 partsUnlicense
  • 2 layers70 × 60 mmResistojetV1, the printed circuit board in 3D

    ResistojetV1

    SimonDaniel605/Development-of-a-Resistojet-Thruster

    This project involves the development of a resistojet thruster for nanosatellite station-keeping.

    143 partsMIT
  • 2 layers76.2 × 165.1 mmMicrowave, the printed circuit board in 3D

    Microwave

    Tektronica/embedded

    Monorepo - home to embedded projects

    67 parts
  • 4 layers230 × 84.9 mmDrunkDashboard v2, the printed circuit board in 3D

    DrunkDashboard v2

    drunkbatya/DrunkDashboard

    STM32 powered pixel automotive dashboard

    223 parts1GPL-3.0
  • 12 layers68 × 40 mmTeresina Rack, the printed circuit board in 3D

    Teresina Rack

    marcoallegretti/Teresina-Rack

    The goal is an open, self-fabricatable Daisy Patch SM-compatible Eurorack submodule: the same carrier interface and libDaisy application compatibility through a small Teresina firmware variant.

    214 parts
  • 2 layers42 × 34 mmL6230driver, the printed circuit board in 3D

    L6230driver

    mwuerms/rollin

    a self balancing robot, "rolling around"

    57 partsMIT
  • 2 layers100 × 100 mmTC SENSOR BUFFER REVA, the printed circuit board in 3D

    TC SENSOR BUFFER REVA

    hankenken/Train_control

    現在の開発は LattePanda 3 Delta 864・Windows 10・USBカメラ2台による検証ソフトです。 Windows用の導入・操作手順を参照してください。撮影・画像処理・画面表示・進路選択を本体上で行う試作で、実機出力はありません。

    42 parts1
  • 2 layers90.2 × 48.3 mmEl macho, the printed circuit board in 3D

    El macho

    AgustinPrietoValdez/competition-robots

    Custom competition robots — maze/micromouse (MISA), sumo (TATAMI 1) & mini-sumo (RUCHO). KiCad PCBs, STM32/Arduino firmware, Fusion 360. National champion & international prizes — by EDNAROBOTICS.

    35 partsMIT

Questions

How big is the Anlog LFR PCB?

It measures 99.6 × 98.3 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Anlog LFR use?

148 parts, built around the MCP6004T-I/SL(MS), AP63205WU, LM339 and QRE1113GR. 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 Anlog LFR KiCad files?

From the aaariyann/Analog-Line-Follower repository on GitHub, at the commit this page was made from: the board is Anlog_LFR.kicad_pcb and its schematic Analog_LFR.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Anlog LFR design in my own project?

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