A few months ago I retrofitted an old foam cutter based on a MM2001 hardware.
This system works quite well, but the unipolar stepper motors are very weak and prevent any fast motion... which is "annoying" when the hot wire is at one end of the machine and you want to go to the opposite side...
So why not building a brand new controller with the following requirements :
- able to drive a hot wire
- equiped with 4 bipolar steppers
- driven by standard polulu shields
- and with an ESP32 MCU
- FluidNC driven
- able to "eat" gcode produced by any "foam cutter" software
Let's go it's an easy project which shouldn't cost more than 20$ (without motors) !
Electronics
Schematics
This schematics is extremly simple as it implements 4 times the basic way to use a polulu driver
Apart from the steppers, the only useful part is the hotwire. It's a 1m long 0.3mm nichrome wire which is fine tuned powered by a PWM under 40V (same PSU for the steppers).
- PWM is produced by a two stages mosfets setup
- the big BUZ11 takes care of the power line
- the small 2N7000 is powered at 5V and its gate is triggered by GPIO32 of the ESP32
- 5V supply is delivered by the USB cord plugged into the ESP32 and by an external supply for polulus and hotwire
Finally I have added two home switches inputs (homeX and homeY) although they are useless for a foam cutter!
And exposed a few more pins of the ESP32 to be used (or not) for future projects!
PCB
I have designed a nice and compact PCB allowing to "shield" the drivers and the ESP32 modules.
The PCB was kindly sponsored by PCBWay and is as usual of excellent quality.
You can order it here: PCBWay shared project. It's cheap, delivered very fast and so professional looking!
and if you are new to PCBWay please use this affiliated link : https://pcbway.com/g/o35z4O
Soldering this board is fairly simple.
Here is the result:
Software
This board is directly compatible with FluidNC firmware. So we will only focus on FluidNC configuration.
If you don't know how to install FluidNC, please refer to this log : https://hackaday.io/project/193659-lets-convert-a-dc-motor-into-a-stepper-one/log/225300-installing-fluidnc
Configuring FluidNC is not totally simple but if you follow the documentation it is feasible without too much difficulties.
Here is the config.yaml file for my machine.
name: 4 axis hot wire cutter
start:
must_home: false
axes:
x:
steps_per_mm: 200
max_rate_mm_per_min: 1000
acceleration_mm_per_sec2: 10
max_travel_mm: 1000
motor0:
limit_all_pin: NO_PIN
limit_neg_pin: NO_PIN
limit_pos_pin: NO_PIN
hard_limits: false
pulloff_mm: 1
standard_stepper:
step_pin: gpio.13
direction_pin: gpio.15:low
disable_pin: NO_PIN
y:
steps_per_mm: 200
max_rate_mm_per_min: 1000
acceleration_mm_per_sec2: 10
max_travel_mm: 1000
motor0:
limit_all_pin: NO_PIN
limit_neg_pin: NO_PIN
limit_pos_pin: NO_PIN
hard_limits: false
pulloff_mm: 1
standard_stepper:
step_pin: gpio.12
direction_pin: gpio.14:low
disable_pin: NO_PIN
z:
steps_per_mm: 200
max_rate_mm_per_min: 1000
acceleration_mm_per_sec2: 10
max_travel_mm: 1000
motor0:
limit_all_pin: NO_PIN
limit_neg_pin: NO_PIN
limit_pos_pin: NO_PIN
hard_limits: false
pulloff_mm: 1
standard_stepper:
step_pin: gpio.27
direction_pin: gpio.26:low
disable_pin: NO_PIN
a:
steps_per_mm: 200
max_rate_mm_per_min: 1000
acceleration_mm_per_sec2: 10
max_travel_mm: 1000
motor0:
limit_all_pin: NO_PIN
limit_neg_pin: NO_PIN
limit_pos_pin: NO_PIN
hard_limits: false
pulloff_mm: 1
standard_stepper:
step_pin: gpio.25
direction_pin: gpio.33:low
disable_pin: NO_PIN
stepping:
engine: RMT
idle_ms: 250
pulse_us: 20
dir_delay_us: 0
disable_delay_us: 0
user_outputs:
digital0_pin: NO_PIN
digital1_pin: NO_PIN
digital2_pin: NO_PIN
digital3_pin: NO_PIN
PWM:
output_pin: gpio.32:low
enable_pin: NO_PIN
direction_pin: NO_PIN
disable_with_s0: false
s0_with_disable:...
Read more »