Skip to content
Insoleaf edited this page Jan 1, 2018 · 61 revisions

Table of Contents


1.0 Maslow CNC Background

2.0 Maslow CNC Functional Block Diagram

2.1 Maslow CNC Motor Shield

2.1.1 Arduino I/O interface

2.1.2 H-Bridge Driver

2.1.3 Motor I/O Interface

3.0 Arduino Hardware

3.1 Interrupt Event Handling

1.0 Maslow CNC Background

The original kickstarter video outlined the Maslow CNC as a 4 x 8 foot CNC cutting machine designed to change the way you build everything from art projects to houses. Maslow lets you print things made from wood.

The intent of the Maslow CNC project is to allow people from all over the world to digitally collaborate to make amazing things.

The aim of the Maslow CNC project was to create a tool that was cheap, easy to use, inclusive and powerful.

To make this possible it was clear that the machine had to work with material in its native 4 x 8 foot form without taking up your entire garage or workshop.It needed to be affordable to purchase and ship. It had to be easy to assemble with no soldering, no programming and no fancy tools. It needed to be just as accurate as a person using power tools when cutting complex shapes.

Functionally Maslow uses gear reduced DC motors with encoders and a closed loop feedback system to give high accuracy and high torque.

Maslow comes as an easy to assemble kit, which includes every piece of hardware that you need expect two bricks, two sheets of ply and three 2x4’s. In addition if you don’t already own one you will need to purchase a fixed base router.

Maslow can be put together in a weekend using only a Phillips screwdriver, a pair of pliers and a handsaw.

Maslow connects to your Mac, Windows or Linux computer using a standard USB port

Building things digitally is the future and the Maslow team believe that it should be for everyone. This is an important technology and they have made the choice not to patent it. All of the designs, PCB layout, Firmware and Software are available for free on their website to anyone in the world.

The teams hope is that When you design something to print you are encouraged to share your digital files so that anyone can benefit from it.

2.0 Maslow CNC Functional Block Diagram

The purpose of this wiki page is to provide the community with a visual aid with respect to the functional components of the Maslow CNC System in the form of a high level Function Block Diagram. It is hoped this will aid understanding, facilitate continuous improvement, promote widespread adoption of the system and reduce the time it takes to start making the projects of the future.

Each of the key building blocks of the Maslow CNC system are outlined in the Function Block Diagram shown in Figure 1. Further detail will be provided for each of the building blocks for those members of the community that want to understand the nitty gritty of how everything works so that they may adapt the system to suit their needs or use it as a guide when trouble shooting.

overview

Figure 1

2.1 Maslow CNC Motor Shield

The Maslow CNC Motor Shield is the bridge between the Maslow CNC firmware running on an Arduino Compatible Mega 2560 and the DC motors that are to be controlled.

The Maslow CNC Motor Shield is composed of the following functional blocks

  • Arduino I/O Interface
  • H-Bridge Driver
  • Motor I/O interface

Figure 2 details the electronic schematic of the Maslow CNC Motor Shield v1.2. Please be aware that depending on the PCB version of your Maslow CNC Motor Shield there are different pin mappings. These will be detailed in the Arduino I/O interface section. Don't be too concerned if the schematic looks a little daunting as we will be going over the functional components that will provide the necessary clarity to understand how it all works. .

overview

Figure 2

2.1.1 Arduino I/O interface

The Arduino I/O interface consists of pins on the Arduino board that are made available to the Maslow CNC Motor Shield. Some of these will be programmed as outputs and some as inputs.

Depending on the PCB version of your Maslow CNC Motor Shield there are different pin mappings.

A summary of the different pin mappings for each version of the PCB are listed below

Pin Name PCB Version 1.0 Pin PCB Version 1.1 Pin PCB Version 1.2 Pin
Encoder 1A 18 20 20
Encoder 1B 19 21 21
Encoder 2A 2 19 19
Encoder 2B 3 18 18
Encoder 3A 21 2 2
Encoder 3B 20 3 3
IN1 9 6 4
IN2 8 4 6
IN3 11 9 7
IN4 10 7 9
IN5 12 10 11
IN6 13 11 12
ENA 6 5 5
ENB 7 8 8
ENC 5 12 10
AUX1 17 17 17
AUX2 16 16 16
AUX3 15 15 15
AUX4 14 14 14

2.1.2 H-Bridge Driver

The purpose of the H-Bridge Driver is to allow the Maslow CNC firmware running on the Arduino to control the direction and speed of motor rotation.

The Maslow CNC firmware determines the required direction of rotation and speed of individual motors based on where the machine has been asked to move (cutting path). These move commands are sent to the Maslow CNC Firmware from the PC Based Ground Control Software in the form of CNC G-Codes which describe the desired cutting path. These are interpreted by the CNC Firmware and digital signals are sent to the H-Bridge driver IC. On the H-Bridge driver chip, each motor is allocated 2 digital inputs for the Motor State (Forward, Reverse, Freewheel, Halt) and 1 digital input to control the motor speed .

In the context of DC Motor Speed Control, the voltage applied to the DC Motor is directly proportional to the motor speed. In the Digital Domain the speed of the motor can be controlled by regulating the effective or average voltage that the motor sees by applying a technique known as pulse width modulation. This is illustrated in Figure 3. It shows that by varying the width of the on pulse for a fixed period the effective supply rail voltage seen by the motor can be changed and hence the speed of the motor can be controlled.

overview

Figure 3

For those not familiar with Pulse Width Modulation (PWM) lets go over some basics that will explain how it works. More detail of how this signal is generated will be provided in the Firmware sections of this Wiki.

A pulse is an electronic signal that is of finite duration, has a beginning and end and a time from beginning to end that can be measured. These finite pulses have a finite length in time which is considerably small. We refer to Ton as the finite length of time the electrical signal was present i.e held in the high state (ON, Logical "1"). We refer to Toff as the finite length of time the electrical signal was not present i.e held in the low stage (OFF, Logical "0").

When the electrical signal is held in the high state (ON, Logical "1") for a fixed period of time 'Ton' without changing the frequency of the signal we say the width of the pulse has been modulated and hence the name Pulse Width Modulation. You will see in Figure 4 that there are is a pulse train where the width of the pulse has been varied and in the context of DC motor control that the Average Voltage that will be seen by the motor can be varied by changing the width of the pulse for a fixed Period (T) or fixed frequency (F=1/T)

overview

Figure 4

If the Electric Signal changes from Ton to Toff with continuous and equal intervals of time we say the pulse is periodic and its period is equal to at the amount of time the signal was present (Ton) plus the amount of time the electric Signal was not Present (Toff).

Period = T = Ton + Toff

Another electrical measurement you may of heard of is frequency. Frequency is how many times on a per second basis something is happening. In the case of PWM how many times the pulse when ON and OFF on any given second. Taking the inverse of the Period (T) we get frequency of the PWM signal

Frequency = 1/T = 1/(Ton+Toff)

The frequency of the electrical signal that is Pulse Width Modulated (PWM) is an important concept that needs to be understood as the system receiving the PWM signal (in this case the motor) will be tolerant of a particular frequency and intolerant of other frequencies which may may have undesired effects on the system receiving the PWM signal.

By maintaining a fixed period between the ON/OFF signal any change to the time on (Ton) must also result in a change to the time off (Toff). This is very important as it provides us with a measurement of the Duty Cycle (DC) which is the percentage of how much time the electric signal was on (Ton) compared to the total Period (Ton+Toff). The duty cycle is measured as a percentage

Duty Cycle = (Ton/(Ton+Toff))*100%

As a rule of thumb as the amount of time (Ton) of the signal increases so does the Duty Cycle percentage.

overview

Figure 5

The L298P H-Bridge Driver Chip provides a very simple digital interface for controlling the Speed and direction of a Connected Motor. The Maslow CNC Motor Shield has two ST L298P H-Bridge Driver Chips. Each Driver Chip can Control two DC motors independently meaning that is possible to control up to four DC motors from the Motor Control Shield. Figure 5 is a schematic of the internal composition of the L298P h-Bridge Driver. The markup on this schematic is used to explain

overview

Figure 5

2.1.3 Motor I/O Interface

Coming Soon

3.0 Arduino Hardware

Coming Soon

3.1 Interrupt Event Handling

Work in progress overview

Clone this wiki locally