MM2001 board
The most up to date documentation of this board can be found here : carte MM2001
This site is linking to original documentation that is no longer accessible. However I finished to grab THE zip file with everything inside. Here it is for posterity : original backup MM2001.zip
Compatible with most "french" foam cutter softwares this board is able to :
- drive 4 unipolar steppers
- drive a hot wire
- interface with parallel port to jedicut or GMFC foam cutter softwares
It offers possibility to start/stop motors and to control hot wire temperature either with PC or manually.
A new version of this board (mainly firmware update) tried to get rid of the parallel port interface and needed the use of a devoted USB interpolator. The IPL5X project did this trick and did it very well!
However I wanted to control my foam cutter as I control my CNC : ie with Gcode. And this wasn't offered by IPL5X. Even though this software is fully open source and documented, the MM2001HL board would be "linked" to IPL5X and to other compatible foamcutter softwares... I really wanted something more "standard" using Gcode files.
As I already made a // port to FluidNC board I did try to reuse this board to interface it to my MM2001 board.
And here is the result with my machine performing a "test cut"
MM2001 interface
MM2001 is interfaced to external world via the parallel port
Here are the signals used:
pins are number on the parrallel port seen from external side of the MM2001 (male connector)
The female connector on the ESP32 board is connected following this schematics :
beware that the pins names are those of the Mach3 CNC interface... So they are not exactly those of the MM2001 (but who cares) ?
function | parallel port pin | ESP32 pin/name | I/O | comment |
Normal/PRGM | 1 | OUT1 | I | used to flash the firmware. Not used here |
DIR1 | 2 | STEPX | I | Dir signal motor 1 (pull up 5V) |
STEP4 | 3 | DIRX | I | Step signal motor 4 |
DIR2 | 4 | STEPY | I | Dir signal motor 2 (pull up 5V) |
STEP3 | 5 | DIRY | I | Step signal motor 3 |
DIR3 | 6 | STEPZ | I | Dir Signal motor 3 (pull up 5V) |
STEP2 | 7 | DIRZ | I | Step signal motor 2 |
DIR4 | 8 | STEPA | I | Dir Signal motor 4 (pull up 5V) |
STEP1 | 9 | DIRA | I | Step signal motor 1 |
TIMER | 10 | HOMEX | O | Timer signal not used (do not solder this pin) |
S_ECH1 | 11 | HOMEY | O | sampled hot wire signal (not used do not solder this pin) |
status Man/PC | 12 | HOMEZ | O | manual/PC switch status (not used do not solder this pin) |
NU | 13 | probe | X | not used |
NU | 14 | NU | X | not used |
NU | 15 | NU | X | not used |
CHAUFFE_PC | 16 | OUT3 | O | monitoring hot wire. (Not used do not solder this pin) |
Motor On/Off | 17 | OUT4 | I | enable motors. (do not connect works without this signal) |
gnd | 18-25 | gnd | ground |
MM2001 modifications
Interfacing my board to MM2001 should be a matter of configuration... well almost!
A few very simple modifications were needed.
5V to 3.3V considerations
My ESP32 is a 3.3V device while the MM2001 is 5V compliant. So a light "level shifter" was needed.
As I only want to pilot 4 unipolar motors and to control the hot wire, I can simply ignore most of the internal complexity of the MM2001.
The only level shifter needed (and probably not mandatory... as it works without) if for the DIR signals of the steppers. These signals are pulled up to 5V into the MM2001 via the RP1 resistor network.
so to avoid to drain the DIR outputs of the ESP32 I simply decreased the voltage of this resistor network by adding a simple led between pin1 and Vdd.
The 1.6V voltage drop of this led is enough to decrease the pull up from 5V to 5-1.6 = 3.4V which is safe for the ESP32.
Here is the result. Easy modification insn't it ? (I mounted this led on a jumper to possibly go back to the original 5V)
Now it time to track any other signals which could need level shift...
- TIMER signal was used to send an interrupt signal to the PC to synchronize motors. This signal is not needed with FluidNC so do not solder this pin on the ESP32 connector to avoid inputing 5V into the ESP32...
- Status Man/PC : gives the status of the switch. Totally useless. so do not solder this pin on the ESP32 connector to avoid inputing 5V into the ESP32...
- CHAUFFE_PC : was a sampling of hot wire PWM... Not really useful. so do not solder this pin on the ESP32 connector to avoid inputing 5V into the ESP32...
- Motor On/Off : this signal is also useless as the PIC is probably internally pulled up. The switch works well without this signal coming from the PC (ESP32)
The only left signal is thus S_ECH1 which is used to control the hot wire from the PC.
Hot wire control
On MM2001, hot wire was a complex stuff involving manual switches (Plus and Minus) as well as a PWM internally generated by the PIC and also controlled by the PC after filtering by the PIC...
All this is useless now. The only interesting thing is the electronics to power the wire.
The S_CHAUFFE signal is a PWM entering a LED (LD2) (to display power value) and entering an optocoupler which in turn switches On/Off the Q1 mosfet to which is connected the hot wire.
If you apply a PWM signal then the opto will "fade" more or less and give more or less juice to the wire. Simple!
What we will do is to use FluidNC GRBL Spindle (which can be a PWM) to replace all the PIC16F874 internal software. And we will use the port pin 11 to input this PWM into the MM2001.
The SW3 switch will be used to control "on/off" the hot wire. But the "manual" function of the MM2001 will not be used (S_CHAUFFE signal will be disconnected). The reason is that we can easily control the hot wire from FluidNC or any Gcode streamer. (either manually or via the GCode itself)
So:
- unsolder the S_CHAUFFE signal (pin1 of SW3)
- connect S-CHAUFFE1 signal to pin2 of the SW3 switch (led pin)
- connect port pin11 S_ECH1 to pin1 of SW3
- SW3 will still switch On/Off the hot wire (as before)
- the hot wire will be only controlled by the ESP32 via FluidNC (spindle signal)
- SW2 is disabled and should remain on Manual
You can now close the box, all the modifications are finished. It time to configure FluidNC
FluidNC configuration
This configuration is very simple, you just have to declare
- 4 motors (X, Y, Z, A)
- 1 spindle (to control the hotwire)
Here is the config.yaml file. You may need to tweak a litlle this file to adapt to your lead screws or to reverse sense of rotation. So use it as a template !
name: MM2001 start: must_home: false axes: x: steps_per_mm: 100 max_rate_mm_per_min: 200 acceleration_mm_per_sec2: 50 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.33:pu direction_pin: gpio.15:pu disable_pin: NO_PIN y: steps_per_mm: 100 max_rate_mm_per_min: 200 acceleration_mm_per_sec2: 50 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.26:pu direction_pin: gpio.12:pu:low disable_pin: NO_PIN z: steps_per_mm: 100 max_rate_mm_per_min: 400 acceleration_mm_per_sec2: 50 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.14:pu direction_pin: gpio.27:pu disable_pin: NO_PIN a: steps_per_mm: 100 max_rate_mm_per_min: 200 acceleration_mm_per_sec2: 50 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.15:pu direction_pin: gpio.25:pu disable_pin: NO_PIN stepping: engine: RMT idle_ms: 250 pulse_us: 4 dir_delay_us: 0 disable_delay_us: 0 PWM: output_pin: gpio.32 enable_pin: NO_PIN direction_pin: NO_PIN speed_map: 0=0.000% 100=10.000% 1000=100.000%
This being done, your foam cutter hardware and control board is finished.
It's now time to feed Gcode into your old new machine controlled by a modern laptop!