Firmware for a custom built machine which winds and cuts cable to a specific length using an esp32 controller on a custom pcb
  • C++ 73.4%
  • C 25.4%
  • CMake 1.1%
Find a file
2024-04-04 22:34:14 +02:00
cad CAD: Add assembly of all parts (for website) 2024-03-23 22:26:14 +01:00
components Revert 8 commits (approach with stepper lib dropped) 2023-04-25 19:16:38 +02:00
docs Add control-pcb schematic, Add screenshots modbus tests 2024-03-13 16:40:47 +01:00
img Rework README, Minor changes to function-diagram 2024-03-14 14:01:24 +01:00
main Add dynamic-winding-length depending on targetLength 2024-03-17 09:41:24 +01:00
pcb Add filter-pcb for denoising stepper signals 2023-03-02 23:12:52 +01:00
testing/cnc-guide Add C-project for simulating axis in commandline 2023-03-02 23:35:24 +01:00
.gitattributes Add CAD-files, wire-labels, docs/datasheets 2022-09-29 19:39:56 +02:00
.gitignore Outsource global variables, Optimize comments 2024-03-10 12:55:13 +01:00
CMakeLists.txt Rework README, Minor changes to function-diagram 2024-03-14 14:01:24 +01:00
connection-plan.drawio Update Connection-plan: Measure voltage, Details, Color 2024-03-13 16:31:07 +01:00
connection-plan.drawio.pdf Update Connection-plan: Measure voltage, Details, Color 2024-03-13 16:31:07 +01:00
function-diagram.drawio Rework README, Minor changes to function-diagram 2024-03-14 14:01:24 +01:00
function-diagram.drawio.pdf Rework README, Minor changes to function-diagram 2024-03-14 14:01:24 +01:00
README.md Merge branch 'dev' - cable-guide functional 2024-03-14 14:09:32 +01:00
sdkconfig Adjust parameters cable-guide 2024-03-09 22:26:26 +01:00
wire-labels.fods Add CAD-files, wire-labels, docs/datasheets 2022-09-29 19:39:56 +02:00

Overview

Firmware and documentation of a custom built machine that winds and cuts cable to certain lengths.
Extensive details about this project can be found on the website: pfusch.zone/cable-length-cutter

Photo machine

Photo of the built machine

Current Features

  • Measure length using rotary encoder
  • Wind to set length while start-button is pressed
  • Automatic wire cutter
  • Control interface:
    • 2x 7-Segment display showing lengths and notifications
    • Buzzer for acoustic notifications
    • 4 Buttons and Potentiometer for setting the target length
    • Reset and Cut Button
  • Stepper motor controlling a linear axis guiding the cable while winding
  • Store last axis position at shutdown

Usage

Panel Layout

Electrical Details

For detailed documentation of all electrical aspects, see connection-plan.pdf.

Printed Parts

All designed and 3D-printed parts can be found in the cad/ folder. These parts were designed using FreeCAD.

Components

Custom pcb with ESP-32 microcontroller

See connection-plan.pdf

Rotary encoder LPD3806-600BM-G5-24C

- Pulses: 600 p/r (Single-phase 600 pulses /R,Two phase 4 frequency doubling to 2400 pulses)
- Power source: DC5-24V
- Shaft: 6*13mm/0.23*0.51"
- Size: 38*35.5mm/1.49*1.39"
- Output :AB 2phase output rectangular orthogonal pulse circuit, the output for the NPN open collector output type
- Maximum mechanical speed: 5000 R / min
- Response frequency: 0-20KHz
- Cable length: 1.5 meter
- size: http://domoticx.com/wp-content/uploads/2020/05/LPD3806-afmetingen.jpg
- Wires: Green = A phase, white = B phase, red = Vcc power +, black = V0

Variable Frequency Drive T13-400W-12-H

See docs/vfd/

Stepper-driver TB6600

See docs/stepper-driver_TB6600-Manual.pdf

Linear Axis with Nema-12 28HB40 Stepper

See connection-plan.pdf

Installation

For this project ESP-IDF v4.4.4 is required (with other versions it might not compile)

#download esp-idf
yay -S esp-idf 
#alternatively clone the esp-idf repository from github and do `git checkout release/4.4`

#run installation script in installed folder
/opt/esp-idf/install.sh

Build

Set up environment

source /opt/esp-idf/export.sh

(run once per terminal)

Compile

cd board_single
idf.py build

Flash

  • connect FTDI programmer to board (VCC to VCC; TX to RX; RX to TX)
  • press REST and BOOT button
  • release RESET button (keep pressing boot)
  • run flash command:
idf.py flash