Pancake CNC

Video Block
Double-click here to add a video by URL or embed code. Learn more

Overview

I’ve designed and built a CNC to print a pancake. My aim was to:

  • Integrate a microcontroller on a custom PCB

  • Stand up remote command and telemetry

  • Over engineer and have fun doing it

CNC Design

The CNC is designed with two rotational degrees of freedom. This design was chosen over a gantry setup for storage compactness and an opportunity to solve inverse kinematic problems.

Pump and Fluids Design'

Pancake batter pumping and routing was designed for ease of cleaning. A single, silicone tube runs from a mixing bowl, through a peristaltic pump, and to the tip of the CNC. A nozzle is formed by deforming the end of the tube. Only my food safe tube contacts the batter. The tube is easily removed from the device and washed.

Documentation

My GitHub repo contains (PancakeCNC):

  • Source code for the CNC controller and ground station

  • PCB CAD files for the CNC controller PCB

  • Design documentation, including a channelization and bill of materials

The mechanical CAD is viewable on OnShape

Avionics Design

The avionics design is comprised of the following components:

  • A custom CNC controller PCB: Hosts and ESP32-s3, provides 5v and 3v buses.

  • Three off the shelf stepper motor drivers

  • An external 12 volt DV power supply

CNC Controller PCB

A custom PCB provides a breakout for an ESP32-s3 module.

Software Design

Firmware

The pancake CNC application runs on top of Free RTOS. Seven threads control the CNCs operation:

  • A simple safety thread: Monitors the limit switches and controls power to the stepper driver enable pins.

  • Wifi Handler: Establishes and maintains a local network connection.

  • Cmd And Tlm: Aggregates, packetizes, and transmits telemetry to an Influx DB instance. Monitors for commands pushed to an Influx DB instance.

  • Motor Control: Parses CNC GCode, runs guidance routines, and commands motors.

  • 3 x Stepper Motor Control: Three hardware timer + interrupt pairs control the stepper motor step signal.

Ground Software

Telemetry and commands are routed through Influx DB Cloud. Grafana Cloud is used to monitor and plot telemetry from the CNC.

Commands are written to the Influx DB instance via a local, python based command terminal. This python terminal allows for manual commanding as well as execution of a pre-built gcode file.