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:
Newer systems vs classic systems
- Arduino DUE: 32 bit (used in M2)
- Arduino MEGA: 8 bit (used in everything else - sometimes referred to as the classic)
Some systems arrive with preloaded firmware. If you want to be up to date with the latest patches and bug fixes, the firmware can be found here:
- Arduino DUE DUE firmware only works with makerverse
- Arduino MEGA MEGA firmware works with makerverse or webcontrol, but must have the correct firmware version for makerverse.
pull the firmware from the github repository by ([makerverse example] (http://github.com/makermadecnc/MaslowDue))
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 has since been adapted and can be used with both M2 and Maslow MEGA (classic) systems. Interestingly, both systems simultaneously can be used as well.
Makerverse has been shown to work on raspberry pi, windows, linux, macos. It is nodejs based and the code is open for inspection on the github page. Follow the instructions installation of the runtime or development environment.
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:
Set up your machine
- Click on the home icon in the upper left to see this screen:
- Click Connect to a new machine button
- Select your machine type
- This example uses a MEGA it is on a raspberry pi, so the connection port is ttyACM0, 18" sled
- click connect and it should show the machine parameters of interest, current firmware (whether a newer version is required - this one has a beta test of 51.29 on it, 51.28 is the minimum for the mega) verify your x, y and z maximum and minimum settings. and adjust the name if necessary and click CREATE WORKSPACE
- The workspace that was named “classic” shows the label in the upper left and the shuttle commands are disabled until the system communication is open. If the box for automatic connection is unchecked, the blue open button must be used to establish connection to the system. Pressing connect, the system may ask if this is a new system. If it is, or has just been flashed, then wiping the memory is recommended.
it will prepare your system
and then put you straight into the calibration routine (see calibration prep and calibration below)
If the system is just being set up in makerverse, but was calibrated previously, then when connected, the motors will whine unless put to sleep. to enable the shuttle functions, use the red reset button followed by the yellow unlock button. If this is the first connection, then proceed immediately to calibration get get set up. If the system is already calibrated (calibration is stored on the controller memory), then it should be good to go.
Calibration prep 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
- reset chains and move the sled to the exact center with the bit over that part marked in #1
- know the distance from motor to motor, sprocket gears at 8:00 on left motor to 4:00 on right motor ($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
- If your system didn’t automatically start calibration, you can start it by pressing the bullseye button that says calibrate next to it 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.