Skip to the content
2 layers90 × 68.3 mmMakerLab, the printed circuit board in 3D

Filabot Automatic Recycling Machine (FARM): a closed-loop embedded system for automated plastic recycling and filament production.

Size
90 × 68.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
51
Pads
149
Tracks, vias
355, 39
Pours
3
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
17 Apr 2026
Updated
27 Apr 2026

Overview

MakerLab is an open-source printed circuit board by LycosNoctis, from the LycosNoctis/F.A.R.M repository on GitHub. It is a 2-layer board of 90 × 68.3 mm with 42 parts on 51 nets, routed with 355 tracks and 39 vias.

It is built around the ADUM1250AR and 1N4148W. Its parts include 13 resistors, 11 capacitors, 6 ICs, 3 connectors and 2 diodes. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

F.A.R.M. — Filabot Automatic Recycling Machine

F.A.R.M. (Filabot Automatic Recycling Machine) is a senior design project focused on automating filament production on a Filabot-style plastic recycling and extrusion system. The project uses closed-loop embedded control to monitor filament diameter and adjust machine behavior in real time.

The goal of this repository is to organize the firmware, hardware design files, parts list, and operating documentation in one place so future collaborators can understand, build, test, and improve the system.


Project Overview

F.A.R.M. is designed to help maintain a consistent filament diameter during extrusion. A digital diameter gauge provides feedback to an Arduino Nano Every. The Arduino processes the sensor readings and controls two MCP4725 DAC outputs:

  • Winder control — adjusts pulling force and filament tension
  • Extruder control — adjusts material flow behavior through a slower trim system

The firmware uses feedback from the diameter sensor to reduce overshoot, undershoot, and unstable oscillations around the target filament diameter.


Main Features

  • Closed-loop filament diameter control
  • Support for 1.75 mm and 3.00 mm nozzle configurations
  • Arduino Nano Every firmware
  • MCP4725 DAC-based analog output control
  • Sensor frame decoding from a Mitutoyo-style digital gauge
  • PID-style feedback control
  • State-machine based safety behavior
  • Easy-load mode for safer manual startup and threading
  • Hold-last-valid-output behavior during brief sensor glitches
  • Reacquire behavior after bad or unstable sensor data
  • Slow extruder trim for long-term correction
  • Near-target tapering to reduce oscillation
  • KiCad hardware design files
  • Organized parts list
  • Operational instruction manual

Repository Structure

text
F.A.R.M-main/
├── Firmware/
│   ├── 1.75mm Nozzle Code/
│   │   └── 1.75mm_F.A.R.M_Code.INO
│   ├── 3.00mm Nozzle Code/
│   │   └── 3mm_F.A.R.M_Code.INO
│   └── Arduino IDE Setup instructions/
│       └── ArduinoIDE_setup_for_Nano.txt
│
├── Hardware/
│   ├── Kikad/
│   │   └── MakerLab/
│   │       ├── MakerLab.kicad_sch
│   │       ├── MakerLab.kicad_pcb
│   │       ├── MakerLab.kicad_pro
│   │       ├── MakerLab3dimage.png
│   │       └── supporting library / report files
│   │
│   ├── Parts List/
│   │   └── Organized Final Parts List.xlsx
│   │
│   └── Schematic_PCB/
│       ├── MakerLab.kicad_sch
│       └── NEW_Makerlab.kicad_pcb

Firmware

The firmware is split into two main versions based on nozzle size.

1.75 mm Nozzle Firmware

text
Firmware/1.75mm Nozzle Code/1.75mm_F.A.R.M_Code.INO

This version targets standard 1.75 mm filament production.

Default target:

cpp
const float TARGET_MM = 1.75f;

3.00 mm Nozzle Firmware

text
Firmware/3.00mm Nozzle Code/3mm_F.A.R.M_Code.INO

This version is adapted for 3.00 mm filament production. It follows the same general control structure as the 1.75 mm version, but the target diameter and tuning values are adjusted for the larger nozzle size.


Control Logic Summary

The firmware uses a closed-loop control system based on the measured filament diameter. The system continuously compares the filtered diameter reading to the target diameter and adjusts machine outputs to reduce the error.

Basic control idea:

text
error = target diameter - measured diameter

In the firmware, this is calculated as:

cpp
eFilt = TARGET_MM - filtMM;

A positive error means the filament is too thin. A negative error means the filament is too thick.

The controller uses PID-style behavior:

  • Proportional control responds to the current diameter error.
  • Integral control corrects long-term steady-state error.
  • Derivative control responds to the trend or rate of change in filament diameter.
  • Near-target tapering reduces controller aggressiveness close to the setpoint.
  • Anti-windup protection prevents the integral term from building up too far when outputs are saturated.

The winder is the main fast correction actuator. It changes pulling force, which affects whether the filament becomes thinner or thicker. The extruder is adjusted more slowly through a trim system that helps correct long-term drift and bias.


Main Firmware States

StatePurpose
TIMEOUTSafe fallback when sensor data is missing or stale
NO_FILAMENTSafe state when no usable filament is detected
EASY_LOADManual loading mode for startup and threading filament
HOLD_LASTTemporarily freezes the last valid outputs during sensor glitches or bad frames
DEADBANDHolds outputs steady when the filament is close enough to the target
LARGE_ERRORRecovery mode for large but valid diameter errors
PID / PI ControlNormal closed-loop control around the target diameter

Recovery / Reacquire Behavior

The firmware also includes a reacquire process, but this is not a true operating state. It is a temporary validation phase used after bad sensor data, easy-load behavior, no-filament detection, sensor glitches, or stale readings.

During reacquire, the firmware waits for several believable sensor readings before trusting the measurement again and returning to normal control.


Hardware Summary

The system uses an Arduino Nano Every as the main controller. The Nano reads the diameter gauge signal and communicates with MCP4725 DAC modules over I2C.

Main Hardware Components

  • Arduino Nano Every
  • Digital diameter gauge / SPC-style sensor input
  • MCP4725 DAC modules
  • Winder motor control interface
  • Extruder motor control interface
  • Custom PCB designed in KiCad
  • Supporting discrete components listed in the parts list

Important Firmware Hardware Settings

cpp
const uint8_t ADDR_WINDER_DAC   = 0x64;
const uint8_t ADDR_EXTRUDER_DAC = 0x65;

const byte PIN_CLK = 3;
const byte PIN_DAT = 2;

The gauge clock and data pins are used to capture the digital gauge bitstream. The DAC addresses are used to send output commands to the winder and extruder control channels.


Sensor Decoding

The firmware decodes a digital gauge signal into a filament diameter measurement in millimeters. The sensor stream is captured using an interrupt on the clock pin.

The decoding process includes:

  • Detecting sensor frame boundaries
  • Searching for a valid header
  • Decoding LSB-first nibbles
  • Validating BCD digit fields
  • Confirming metric mode
  • Applying decimal-place scaling
  • Rejecting impossible or unstable readings

This helps prevent bad sensor frames from causing sudden motor output changes.


Arduino IDE Setup

The firmware is intended for the Arduino Nano Every.

Required Board Package

Install the Arduino megaAVR board package:

text
Tools → Board → Boards Manager → Search "megaAVR" → Install Arduino megaAVR Boards

Then select:

text
Tools → Board → Arduino megaAVR Boards → Arduino Nano Every

Required Libraries

Install the following library from the Arduino Library Manager:

text
Adafruit MCP4725

When prompted, install all dependencies, including:

text
Adafruit BusIO

The full setup notes are available here:

text
Firmware/Arduino IDE Setup instructions/ArduinoIDE_setup_for_Nano.txt

Uploading Firmware

  1. Open the correct .INO file for the nozzle size being used.
  2. Confirm that the board is set to Arduino Nano Every.
  3. Confirm that the correct COM port is selected.
  4. Verify/compile the sketch.
  5. Upload the sketch to the Nano.
  6. Open the Serial Monitor at:
text
115200 baud

A message similar to the following may appear during upload:

text
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description

This is a known warning for the Nano Every upload backend and is not necessarily a firmware failure if the upload completes successfully.


Hardware Design Files

KiCad project files are located in:

text
Hardware/Kikad/MakerLab/

Important files include:

text
MakerLab.kicad_pro
MakerLab.kicad_sch
MakerLab.kicad_pcb
MakerLab3dimage.png

Additional schematic and PCB files are also stored in:

text
Hardware/Schematic_PCB/

Parts List

The organized final parts list is located at:

text
Hardware/Parts List/Organized Final Parts List.xlsx

Use this spreadsheet to review the major electrical and mechanical components used in the project.


Operational Manual

The system operating instructions are located at:

text
Operational Manual/Operational Instruction Manual.docx

This document should be used when setting up, operating, or demonstrating the machine.


Basic Operating Workflow

  1. Verify all wiring and hardware connections.
  2. Confirm the correct firmware version is loaded for the nozzle size.
  3. Power the system according to the operational manual.
  4. Use easy-load/startup behavior to feed material safely.
  5. Watch the Serial Monitor for sensor readings and state changes.
  6. Allow the controller to stabilize around the target filament diameter.
  7. Monitor filament diameter, winder behavior, and extruder behavior during testing.
  8. Shut down the machine safely after testing is complete.

Tuning Notes

The firmware contains several tuning constants for adjusting system behavior, including:

  • Target diameter
  • Deadband and hysteresis limits
  • PID gain values
  • Winder baseline voltage
  • Extruder baseline voltage
  • Winder output floor
  • Sensor timeout values
  • Reacquire thresholds
  • Extruder trim range
  • Slew-rate limits
  • Soft-start timing
  • Debug output settings

Most tuning values are near the top of each firmware file and are heavily commented to help future users understand what each value does.


Debugging

Debug output can be controlled using the debug switches near the top of the firmware.

Example:

cpp
#define DBG_STARTUP         1
#define DBG_FRAME_EVENT     0
#define DBG_DECODE_SUCCESS  0
#define DBG_DECODE_FAIL     0
#define DBG_FILTER          0
#define DBG_STATE_CHANGE    1
#define DBG_STATUS_PERIODIC 1
#define DBG_BASELINES       1
#define DBG_EXTRUDER_TRIM   1

For normal operation, keep noisy debug options disabled. Enable only the specific debug messages needed for testing.

The Serial Monitor can be used to observe:

  • Current firmware state
  • Filtered filament diameter
  • Diameter error
  • PID gain behavior
  • Winder output code and voltage
  • Extruder output code and voltage
  • Sensor decode success/failure counts
  • Reacquire behavior
  • Hold-last events
  • Extruder trim events

Safety Notes

This project controls moving mechanical parts and heated extrusion equipment. Before operating the machine:

  • Keep hands, clothing, and loose objects away from moving parts.
  • Verify wiring before powering the system.
  • Do not leave the machine unattended during testing.
  • Monitor temperature, extrusion behavior, and filament movement.
  • Use the operational manual as the main safety and startup reference.
  • Shut down the system immediately if the winder, extruder, or sensor behaves unexpectedly.

Project Status

This repository represents the current working version of the F.A.R.M. senior design project. The firmware and hardware files are intended for continued testing, tuning, and documentation by the project team.


Team

text
- Alex Anta
- John Hoellen
- Wyatt Morrison
- Yakob Adera

License

No license has been selected yet.

Parts

42
QtyValueFootprintReferences
8.1ufCapacitor_SMD:C_0603_1608MetricC2, C3, C4, C5, C7, C8, C9, C10
64.7kResistor_SMD:R_0603_1608MetricR1, R2, R3, R4, R5, R6
310ufCapacitor_SMD:C_0603_1608MetricC11, C12, C13
31kResistor_SMD:R_0603_1608MetricR8, R9, R12
2100Resistor_SMD:R_0603_1608MetricR18, R117
2100kResistor_SMD:R_0603_1608MetricR7, R11
2ADuM1250Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU1, U2
2Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ1_drive1, J2_extuder1
2MCP4725xxx-xCHMCP4725A2T_E_CH:SOT-23-6_MCU3, U4
2MCP6001-OTMCP6001T_E_LT:SOT65P210X110-5NU5, U6
11N4148WDiode_SMD:D_SOD-123FD1
1AVR-ISP-10Connector_IDC:IDC-Header_2x05_P2.54mm_VerticalJ3
1Arduino_Nano_EveryModule:Arduino_NanoA1
1G6K-2Relay_THT:Relay_DPDT_Omron_G6K-2P-YK1
1LEDLED_SMD:LED_0603_1608MetricD2

The 37 most common of 42 parts.

Similar boards

  • 2 layers155 × 114 mmIOExpansion, the printed circuit board in 3D

    IOExpansion

    ja1umi/MUTIF09Project

    Various design materials for building my 8-bit-microprocessor-based single board computer(s)

    198 parts10MIT
  • 2 layers175 × 172.2 mmControl board, the printed circuit board in 3D

    Control board

    ljufa/rsplayer_hardware

    kicad files for rsplayer music player hardware

    105 parts2MIT
  • 2 layers38.5 × 59 mmDual dps-1200FB, the printed circuit board in 3D

    Dual dps-1200FB

    Grobzi/dual-dps-1200FB

    Arduino project for monitoring DPS 1200FB PSUs

    23 parts1GPL-3.0
  • 4 layers100 × 77 mmAO V2, the printed circuit board in 3D

    AO V2

    Synthron/SynPLC

    STM32-based PLC system

    160 parts1
  • 2 layers100 × 85 mmLED 16x24V REG4 VERSION B, the printed circuit board in 3D

    LED 16x24V REG4 VERSION B

    80morpheus/KNX_Dimmer

    W = Single CW = Cold/Warm White RGB = RGB RGBW = RGB+White RGBCW = RGB+Cold/Warm White

    78 parts
  • 2 layers48 × 32.4 mmI2c signal isolator, the printed circuit board in 3D

    I2c signal isolator

    juarendra/Open-Embedded-Breakouts

    Collection of open-source embedded breakout board designs (KiCad). I2C Signal Isolator, and more.

    27 parts
  • 2 layers119.4 × 119.4 mmEsp32-pool controller, the printed circuit board in 3D

    Esp32-pool controller

    niko34/esp32-pool-controller

    Contrôleur automatique de piscine ESP32 avec gestion pH, ORP, température, filtration, éclairage, app web locale, MQTT (HomeAssistant auto-discovery), API

    93 partsMIT

Questions

How big is the MakerLab PCB?

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

What parts does the MakerLab use?

42 parts, built around the ADUM1250AR and 1N4148W. 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 MakerLab KiCad files?

From the LycosNoctis/F.A.R.M repository on GitHub, at the commit this page was made from: the board is Hardware/Kikad/MakerLab/MakerLab.kicad_pcb and its schematic Hardware/Kikad/MakerLab/MakerLab.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MakerLab design in my own project?

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