Skip to the content
PCBKitNew board
2 layers90 × 53.1 mmLFRCircuit, the printed circuit board in 3D

LFRCircuit

siyad23/LFR1

A Line Following Robot with rotary encoder navigation and OLED display for menu interaction.

Size
90 × 53.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
38
Pads
101
Tracks, vias
173, 0
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
24 Mar 2025
Updated
3 Aug 2025

Overview

LFRCircuit is an open-source printed circuit board by siyad23, from the siyad23/LFR repository on GitHub, published under the MIT licence. It is a 2-layer board of 90 × 53.1 mm with 19 parts on 38 nets, routed with 173 tracks and 0 vias.

It is built around the L293D. Its parts include 4 diodes, 2 capacitors, 2 ICs and 1 connector. It belongs with the lEDs and displays and robots and motor control boards of this library.

Main components

1

README

README.md

Line Following Robot (LFR) with Rotary Encoder and OLED Display

This project is a Line Following Robot (LFR) system that uses a rotary encoder for menu navigation and an OLED display for user interaction. The system is built using an Arduino Nano and the Adafruit GFX library for the display.

TODO

  • Add double click feature
  • Stop the counter from changing when it enters another menu
  • Calibrate display calls a demo function
  • Speed display changes a actual variable
  • Add five more display item (exp:follow biasing turn or dmp, baising turn)
  • Add the dmp editing menu

Features

  • Rotary Encoder: Navigate through the menu using a rotary encoder.
  • Switch Input: A button is integrated with the rotary encoder for selection.
  • OLED Display: Displays a menu with options and icons.
  • Menu System: Includes options like "Calibrate," "Speed," and "DMP."
  • Debounce Logic: Ensures stable input from the rotary encoder and switch.

Components Used

  • Arduino Nano
  • Rotary Encoder
  • OLED Display (SH1106)
  • Push Button (integrated with the rotary encoder)

File Structure

  • main.cpp: The main entry point of the program.
  • init.h: Handles basic initialization of the system.
  • switch.h: Manages the rotary encoder and switch input.
  • logo.h: Contains bitmap data for menu icons.
  • display.h: Handles the OLED display and menu rendering.
  • platformio.ini: PlatformIO configuration file.

Installation

  1. Clone this repository to your local machine.
  2. Open the project in PlatformIO.
  3. Ensure the required libraries are installed:
  4. Connect the hardware components as described in the Wiring section.
  5. Upload the code to your Arduino Nano.

Wiring

ComponentArduino Pin
Rotary Encoder CLKD4
Rotary Encoder DTD5
Rotary Encoder SWD6
OLED Display SDAA4
OLED Display SCLA5

Usage

  1. Power on the system.
  2. Use the rotary encoder to navigate through the menu.
  3. Press the button on the rotary encoder to select an option.
  4. The OLED display will update based on the selected menu item.

Menu Options

  1. Calibrate: Displays the calibration icon and text.
  2. Speed: Displays the speed icon and text.
  3. DMP: Displays the DMP icon and text.

Code Overview

main.cpp

  • Initializes the system using basic_init(), switch_init(), and display_init().
  • Handles the rotary encoder input and updates the menu display.

switch.h

  • Manages the rotary encoder and switch input.
  • Includes debounce logic for stable input handling.

display.h

  • Renders the menu on the OLED display.
  • Uses the Adafruit GFX library for drawing text and icons.

logo.h

  • Contains bitmap data for the menu icons.

platformio.ini

  • Configures the PlatformIO environment for the Arduino Nano.
  • Specifies the required libraries and build flags.

Dependencies

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Adafruit for their excellent libraries and hardware.
  • PlatformIO for providing a powerful development environment.

Parts

19
QtyValueFootprintReferences
41N4001Diode_THT:D_DO-41_SOD81_P7.62mm_HorizontalD1, D2, D3, D4
3Battery_CellRactangularPad:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical_ractangularBT1, BT2, BT3
2100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2
2Motor_DCRactangularPad:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical_ractangularM1, M2
2~Connector_JST:JST_XH_B5B-XH-A_1x05_P2.50mm_VerticalRotaryEncoder1, SonarSensor3Array1
1L293DRactangularPad:DIP-16_W7.62mm_ractangularPadsU1
1OLED_128x64ScottoKeebs_Components:OLED_128x64J1
1~RactangularPad:PinSocket_1x08_P2.54mm_Vertical_ractangularINA1
1~Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalU2
1~RactangularPad:ArduinoNanoRactangularPadsArduinoNanoTypeC1
1~Connector_JST:JST_XH_B8B-XH-A_1x08_P2.50mm_VerticalIRSensor6Array1

Questions

How big is the LFRCircuit PCB?

It measures 90 × 53.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LFRCircuit use?

19 parts, built around the L293D. 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 LFRCircuit KiCad files?

From the siyad23/LFR repository on GitHub, at the commit this page was made from: the board is Circuit Design/PCBDesign/LFRCircuit/LFRCircuit.kicad_pcb and its schematic Circuit Design/PCBDesign/LFRCircuit/LFRCircuit.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LFRCircuit design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers178 × 145 mmUltra DB X51 v1, the printed circuit board in 3D

    Ultra DB X51 v1

    ExploreEmbedded/8051_DevelopmentBoard

    Design files and sample code for 8051 development Ultra Boards

    145 parts70
  • 2 layers84.3 × 58.4 mmEnocderDriver, the printed circuit board in 3D

    EnocderDriver

    NikodemBartnik/Small-Projects

    All of smaller projects (Arduino, PCBs, electronics, code)

    35 parts55
  • 2 layers56.4 × 72.6 mmRas pi hat, the printed circuit board in 3D

    Ras pi hat

    geno543/Redropi_highway

    the project aims to detect asteroids and meteor movement using high-quality cameras and radar detection methods using an AI model for accurate analysis, and it classifies bodies be in three categories: non-meteor…

    8 parts13
  • 2 layers87.5 × 70 mmLaberinto, the printed circuit board in 3D

    Laberinto

    CRM-UAM/CRMaze

    Open source robot for maze solving + line following

    34 parts12
  • 2 layers92.5 × 62.5 mmDropGenPCB, the printed circuit board in 3D

    DropGenPCB

    harrislab-brown/DropGen

    DropGen uses a fluid reservoir and a piezoelectric buzzer to precisely and repeatably dispense small droplets on demand.

    25 parts12CC-BY-SA-4.0
  • 2 layers47.5 × 49.5 mmElectronic, the printed circuit board in 3D

    Electronic

    zosko/magspoof

    Magspoof with Arduino Pro Micro

    5 parts11
  • 2 layers120.7 × 184.1 mmBeachRover circuit, the printed circuit board in 3D

    BeachRover circuit

    wizardofrobots/roverCode

    Jetson Nano powered Arduino Rover

    11 parts10
  • 2 layers90 × 53.4 mmOpenOx, the printed circuit board in 3D

    OpenOx

    hacklabkyiv/openox-pcb

    PCB design for OpenOx - open source oxygen concentrator

    43 parts7GPL-3.0