Chapter 3 Software Installation and Options for Maslow Control
This section discusses finding and installing the latest software for controlling the Maslow system. The system operates with two required pieces: The microcontroller / controller (Arduino Mega or Arduino Due for M2) and the interface system that is some other computer the controller connects to via USB. The user interface is a program executing on the interface system and it can either be Web Control or Ground Control for the Maslow and CNCjs / Makerverse for the M2.
GroundControl is the original Maslow control software written by Bar. It runs on a host computer such as a PC or Mac and allows the user to manually move the sled, and upload gcode to run programmed cuts. Development on GroundControl has been discontinued as WebControl is better (even Bar will tell you that). WebControl runs as a server and the user can interact with it through a web browser pointed at the interface system IP address on port 5000 (192.168.1.x:5000 where is is the local ip address for examlple).
Makerverse is a fork of the CNCjs repository developed to interface with GRBL CNC controllers for various systems but customized for Maslow M2 systems. Makerverse, WebControl, and GroundControl perform the same function which is to send gcode files line by line to the Maslow or M2 controller. The controller moves the motors and keeps track of the sled location and calibration information. Designing and generating gcode will be covered in the workflow section discussed in Chapter 4.
Maslow Controller Firmware (CLASSIC Arduino MEGA 2560)
The easy way:
- start webcontrol
- settings -> Maslow settings and select the serial port. if you don’t see the right one, press the refresh arrows to the right.
- click the actions menu and then press one of these buttons:
select “stock” for the standard calibration or “holey” for the holey calibration. EIther will work. Follow the instructions on the web page actions / calibration section for calibration.
the hard way:
The Arduino mega 2560 runs compiled C source code that is available [here (MaslowCNC)] (https://github.com/MaslowCNC/Firmware) or [here (Madgrizzle)] (https://github.com/webcontrolcnc/Firmware). This is what needs to happen: You will need to download the source code, unzip it into a folder. Install the Arduino program if not already installed, Open the source code in the Arduino program. Set up the target device to match your controller, compile the source code, and transfer it to the Arduino.
On the github download pager are instructions for setting up the Arduino Integrated Development Environment (IDE). Before following those instructions, click on the green CLONE button.
To save a copy of the repository, select Download Zip.
Unzip the file into a directory and then follow the instructions.
Using Arduino IDE
- Download Arduino IDE 1.8.1 or higher
- Install Arduino IDE and run Arduino IDE
- Navigate menus: File, Open
- In the file chooser navigate to the cloned repository and choose the “cnc_ctrl_v1.ino” file to open
- Navigate menu: Tools, Board, change to “Arduino/Genuino Mega or Mega 2560”
- Plug in your Arduino USB cord, select where to find it in Arduino with Tools -> Port
- Navigate menu: Sketch -> Upload (or use the right arrow on the toolbar).
When completed, the arduino program should say “upload complete.”
Ground Control used to be the standard method for you as the user to control and communicate with Maslow, but it’s discontinued. Please use Web Control.
Web Control is a python program that runs a web server so user interaction with Maslow is with a web browser either on the same machine or connected to the same network. The machine running Web Control is connected to the Maslow via USB. Web Control can be served from most common computers and operating systems including single board computers like the raspberry pi or other linux operating system variants. To date, it does not run on android or ios, though android and ios devices can be used to control the Maslow by viewing the web page.
General Installation Overview
- visit the webcontrol github page maintained by @madgrizzle for the archive or go to the [webcontrol-pi github page] (https://github.com/WebControlCNC/webcontrol-pi/releases) for a complete image.
- click on the release version
- download the appropriate version for your operating system
- use the file:
A. unzip the file, for example:
tar -zxvf “file name” (in linux)
B. or image the file to your SD card using an appropriate sd tool. (check google for sd card image instructions and raspberry pi), set up wifi network information or it will boot in AP mode.
- in the webcontrol folder, execute webcontrol (click on it or call it via command line: python webcontrol)
Installing on the Raspberry Pi
There are two version of Web Control: the “docker” version and the pyinstaller version. It is recommended that the pyinstaller version be used because it is easier to upgrade. To get web control you can download it as a compressed archive file and install manually, or pull a docker image or an image for an SD card.
To set up your RPI, you have a few options for the basic OS called Raspian:
raspian Lite (current version is Buster)
raspian (version is Buster when this was written)
The lite version is a command line interface (CLI) with no visual desktop, just the cursor and looks like a terminal window. The CLI version is often used for systems without a monitor that is managed remotely via SSH. The full version has a visual desktop and is preferred if you have a touchscreen or monitor, keyboard, and mouse attached.
If you download the image, you simply flash the image to your sd card, set up your network interface and go.
Archive File Installation
If you chose to do the archive file installation, open a terminal window if you are on the desktop version or simply type in the command line (don’t type the "$ ". It represents a command line command):
mkdir webcontrol cd webcontrol
go to github.com/webcontrolcnc/releases and copy the link to the latest release.
Then use wget to download the latest release “similar to” the link, but NOT the link here:
then you unpack/unzip/untar the archive (your file name will vary)
tar -zxvf webcontrol-0.932-rpi-singledirectory.tar.gz
(932 is the version as of today. Verify the newest version here). Run the program:
cd webcontrol ./webcontrol & disown %1
Web control as a service
once you are certain it functions and you want it to run whenever the rpi is on, you can make it run automatically as a service
$sudo nano /etc/systemd/system/Maslow.service
You can name it whatever you want. Maslow.service, webcontrol.service… totally your call.
paste this in that file and adjust the Description, working directory, ExecStart if necessary:
then exit and save with CTRL+X, Y, Enter
to start it, type
sudo systemctl start Maslow if it works, then enable it and it will start automatically when you reboot. sudo systemctl enable Maslow
if you change the “Restart = never” line to “restart=always” then it will try to restart whenever it crashes, but it won’t allow itself to shut down when you click on the upgrade link. you will have to manually stop it.
Once you have the server side running, if you are on command line, you are done for now. To open the web browser on your desktop version, use your mouse to open the webpage and use “http://localhost:5000” as the web page address and you should be able to interact with it.
Type $ ifconfig in a terminal window, you can get your IP address and use that on your phone with :5000 at the end and control Maslow from your phone via webcontrol. Do the same on your design computer (whatever the type) and you can upload gcode to it. Import your groundcontrol.ini file using the actions->import button in webcontrol, to avoid recalibrating.
Adding SAMBA file share server to drag and drop gcode files
Another nice option is if you set up /home/pi/.WebControl/gcode as a shared SAMBA folder (instructions here), and give that folder permissions, you can open the folder from your design computer and drag and drop your gcode in without uploading via the web page. This is not entirely necessary, but I find it easy to do. More recently, when I generate gcode, I have it save there directly so no copying or uploading is required.
FYI: settings and information are stored in the hidden .WebControl folder in a file named webcontrol.json
Upgrading from Ground Control: in your ground control folder, locate your groundcontrol.ini file and using the web page, upload the information to webcontrol. That should do it.
if you have more than one webcontrol machine, you can copy the webcontrol.json file between the systems to avoid recalibrating.
Web Control offers a number of features such as triangular calibration, optical calibration, holey calibration, quick configure, test motors/encoders, the ability to set up buttons or LED’s (when using raspberry pi) and even an shutdown button to turn off the raspberry pi.
All of the software in this section is free and the source code is available to modify if a specific feature is desired, and you don’t know how to add it, you can learn or you can post and ask if anyone else would be interested in it as well and maybe someone will add it.
This is a video shared by “Graham Builds Stuff” on the facebook page that shows how to do it:
M2 Controller Firmware (Summer 2020 release with Arduino DUE)
The M2 is a MakerMade product released in 2020 that includes a prebuilt high speed z axis instead of the router base and a 32bit controller. The software to run it is different than the classic maslow.
Systems purchased from MakerMade ship with firmware preloaded, but if needed, the firmware can be found on the included usb drive or at the github repository here. This GRBL compliant 32 bit processing system can be interfaced with CNCjs that has been forked and is now called makerverse and is described below. The arduino Due has a high clock speed, more pwm outputs, and a true usb port connected to it in addition to the USB serial adapter port. The firmware is GRBL compliant with Maslow specific code, but includes acceleration planning among other things. This is important because it allows high precision for repeatable cutting.
then download the zip
extract the zipped file (don’t click into it)
open the .ino file with the arduino IDE
Plug Due into your computer with the PROGRAM port (the one closer to the middle of the board)
install the avr 32 bit boards in arduino IDE
if you don’t have Arduino ARM as an option, click Boards Manager instead and install Arduino Arm
select the board as the due and the programming port
Select the proper port where your due shows up
press the right arrow at the upper left of the arduino ide to select Upload. It will take several seconds to compile and then upload the new firmware to the due. then try again.
Makerverse is the renamed software MakerMade adapted from CNCjs for the arduino due firmware that replaces webcontrol and groundcontrol. It communicates with a grbl board upgrade posted by idocull in 2019. Makerverse is a customized fork specifically intended for the M2, though it ihas since been adapted and can be used with both M2 and Maslow classic systems. Interestingly, both systems simultaneously can be used as well.
Makerverse will be available via app stores, but is still in development. It has been shown to work on raspberry pi, windows, linux, macos or anywhere Nodejs can run. Follow the instructions at the github page for installation of the development environment.
Calibration for the M2 is different than the classic Maslow.
before you start:
- mark the center of your work space with a pencil or a drill hole
- move the sled to the exact center with the bit over that part
- know the distance from motor to motor, 8:00 to 4:00 ($83 - in mm)
- know the distance from the work piece to your motor height
(motor height work space offset - $84 - in mm)
- know the work dimensions in mm
You will download some software, then you will start it, it will update, then you will have to “add” your machine. should be easy, you’ve likely done it already. The calibration will be different.
There are 2 parts:
- Updating the arduino Due with new firmware (get it here). Flash it with arduino IDE you can download for windows. Make sure you install the arduino 32 library that has the arduino due programming port selected as the board.
- Download Makerverse here and when you install and run it the first time, check the box to enable prereleases.
Please review the page on the github site here (scroll down past file list) to be familiar with the calibration process… just kidding. I looked and there is nothing on calibration in the documentation and I was going to help with it, so this is my first draft. Lets see how well you can follow it. You can try it out and tell me how bad the doc sucks so I can fix it and then we all win.
so in windows, you will download the file from the link above and grab the file for windows highlighted above and click on it. It will extract it in its own folder after you give it permission:
click on more info
then click on run anyway
It will install:
Once installed it will run and should show up in your default web browser:
The home page:
the settings page:
- on the home page
A. Select your Due on whatever port it is available
B. Select 38400 as the baud rate
C. click connect (do NOT check the box for hardware flow control
- the main page should open and you will see the work space and your system should go immediately to calibration, but it may not. if it is not connected say the second time you open it, to establish connection, if the connect button is blue, click it:
If you see a red close button, then you are connected.
If it does not, then click the bullseye “calibrate” button highlighted above.
- Calibration should look like this:
A. Enter your ring radius
B. Enter your Chain configuration (off bottom for bungee / spring ----- off top for dangling weights)
C. Press NEXT STEP and it will save the values.
D. Enter your stock width (2438.4 is the default. My system is 4’x4’, so different)
E. Enter your stock height
F. Press NEXT STEP
and walk through the details of each step.