In this advanced build, we show you how to machine your own electronics enclosure and build a sequencer based on the Adafruit Feather development board. This build highlights the multi-material capabilities of the Bantam Tools Desktop CNC Milling Machine, SVG support, and PCB milling support in the Bantam Tools Milling Machine Software! The sequencer is made up of three main components and materials: the base (walnut), the faceplate (anodized aluminum), and the circuit board (FR-1).
You’ll learn how to:
- Use the Manual Stock Location probing routine and get comfortable with the Automatic Stock Probing routine.
- Machine electronics using the Desktop CNC Milling Machine and the Bantam Tools software’s PCB milling support.
- Utilize the Bantam Tools software’s advanced SVG support.
- Program your synth using the Arduino IDE.
- Bantam Tools Desktop CNC Milling Machine
- Computer with Bantam Tools Desktop Milling Machine Software installed
- Arduino IDE program installed
- Probing pin, 1/4”
- Helical flat end mill, 1/4”, 35º
- Datron stepped end mill, 12 mm
- Flat end mill, 1/8”
- Flat end mill, 1/16”
- Flat end mill, 1/32”
- Flat end mill, 1/64”
- Metal engraving bit, 80º, 1/8” or engraving bit of your choice
- High-strength, double-sided Nitto tape
- ER-11 1/8” collet
- Removable spoilboard
- Low-profile PCB bracket (comes with removable spoilboard)
- Isopropyl alcohol, 91%
- Soldering iron
- Diagonal wire clippers
- USB cable
- Phillips-head screwdriver
- Anodized aluminum, 4”x5”x 0.25”
- Walnut, 4.25”x5.25”x.25”
- Double-sided FR-1, 4”x5”
- Adafruit Feather M4 Express
- Potentiometer, 10K (4)
- Mono audio jack, 3.5 mm Tactile button, 6 mm
- Resistor, 10K
- Female header, 1x16
- Female header, 1x12
- Male header, 1x16
- Male header, 1x12
- Screw, brass Phillips flat-head (8)
Note: You can use different materials for the enclosure, but remember to adjust the speeds and feeds in your Fusion 360 CAM setup accordingly.
- Bantam-Feather-Sequencer-Base-Enclosure.f3d file
- Bantam-Feather-Synth-Faceplate.svg file
- Bantam-Feather-Synth-Circuit-Board.brd file
A Note Before You Start Milling
The Fusion 360 project files we provide are programmed specifically for the tooling and materials listed above. If you don’t have these end mills or stock, you will need to adjust the speeds and feeds parameters for the tooling and stock you're planning to use before you post-process your G-code files and set them up in the Bantam Tools Milling Machine Software. For more insight into programming toolpaths in Fusion 360, see our Fusion 360 Workflows: Programming CAM support guide.
Part 1: Machining the Walnut Base
Step 1: Update your Fusion 360 Setup and generate your G-code files.
Launch Fusion 360 and go to File > Open > Open from “My Computer” > and then select the Bantam-Feather-Sequencer-Base-Enclosure.f3d file.
In the Manufacturing workspace:
- Right-click on Setup1 folder.
- Select Edit.
- Go to the Stock tab in the pop-up window.
- Using a pair of digital calipers, measure your walnut stock and enter the value of your X, Y, and Z dimensions that you entered into the Material tab of the Bantam Tools software.
Notice how we’ve offset the model from the top of the stock and have roughly centered the model from the X- and Y-axes.
Because you’ve updated the project file’s Setup, you’ll need to regenerate the toolpaths we’ve programmed. Right-click on the Setup1 folder and select Generate.
Now you can post-process each of these toolpaths as G-code files. One-by-one, select each toolpath and select Post Process––or go to Actions in the toolbar and click the Post Process icon. You’ll be prompted to name your files. We suggest naming the files so that they either match or are similar to the names we’ve used.
Step 2: Fixture and locate your walnut stock.
Go to the Jog tab, click the Install Tool button, and select the ¼” diameter probe. Insert your probing pin into the collet and perform a tool touch-off.
Next, go to the Material Setup tab and enter the X, Y, and Z dimensions of your stock—make sure they match the dimensions you entered in your Fusion 360 setup. Then, using the L-bracket and toe clamps, fixture the walnut stock for your base onto the T-slot bed. Make sure the toe clamps are nice and snug.
Now that you’ve installed your probe and fixtured your material, it’s time to locate your stock. In the Material Setup tab, go to the Material Placement dropdown menu, click the Material Offset Probing Routines button, and select Manual Stock location.
Follow the onscreen prompts in the pop-up window to locate your material. Carefully use the jog wheel to move your probe into position along the X, Y, and Z axes. Then specify which side of the tool you’re probing with for the particular axis, and click Set Zero. When you’re done, click OK.
Note: We like to place a thin piece of paper along each axis when using the Manual Stock Probing routine. When you can no longer move the paper between the stock and the end mill, that’s how you know to hit the appropriate Set Zero button.
Step 3: Import your G-code files into the Bantam Tools software and rough out your part.
Now that you’ve generated your G-code files, import the files into the Bantam Tools software. Here’s a full list of the files and the tools you’ll want to select for each of the files.
- 3D adaptive clearing pass – Helical 1/4” 35º flat end mill
- 2D contour 1002 – Helical 1/4” 35º flat end mill
- 2D contour 1003 – Helical 1/4” 35º flat end mill
- 2D contour 1004 – Helical 1/4” 35º flat end mill
- Facing – Datron 12 mm stepped end mill
- Dogbones – 1/16” flat end mill
Once you’ve set up your files, go to the Jog tab, click the Install Tool button, and select the Helical 1/4” 35º flat end mill from the dropdown menu. Follow the on-screen prompts to perform a tool touch-off.
Then, go to the Summary tab and select Mill All Files when you’re ready.
When it’s time to change your tooling, the Bantam Tools software will pause your job and prompt you to install the appropriate tool. Follow the on-screen prompts to install your tool and continue your job.
Step 4: Flip your part and face the top hat.
Depending on the size of your stock, you may notice how there’s leftover stock at the bottom of the model. If there’s no leftover stock, you can skip to the next step.
If you do need to machine away excess stock on the bottom of your model, you can program a facing toolpath in Fusion 360 or use our conversational CAM feature in the Bantam Tools software to machine away the excess stock.
When you’re ready to machine, remove your part from the Desktop CNC Milling Machine and flip it over so the base is facing upward. Then reinsert the part into the machine and. fixture it using the toe clamps and L-bracket (just as you did in Part 1, Step 2) .
Install your ¼” diameter probe and use the Manual Stock Location routine to locate your material. When you’re finished, go to the Jog tab and select your tooling (we used a Datron 12 mm stepped end mill when facing the top of the stock).
When you’re ready to mill, go to the Summary tab and select Mill Single File.
Before moving on to Part 2, vacuum out the Bantam Tools Desktop CNC Milling Machine and clean off the T-slot bed.Next, let’s machine the anodized aluminum faceplate.
Part 2: Machining the Anodized Aluminum
Step 1: Prep, fixture, and locate the anodized aluminum stock.
Let’s prep and load the anodized aluminum stock into the Desktop CNC Milling Machine. Navigate to the Material Setup tab. Using digital calipers, measure the dimensions of your stock and enter them into the X, Y, and Z values in the Material Size dropdown menu.
To hold the material to the bed, we’ll be using high-strength, double-sided Nitto tape. Double-sided tape is a great fixturing option for machining thin pieces of stock. And don’t worry, it’s strong––so strong that you may need 91% isopropyl alcohol to remove your part from the T-slot bed.
To prep your stock:
- Wipe down the T-slot bed using 91% isopropyl alcohol to ensure it’s clean.
- Press the material into place on the T-slot bed using the parallel as a backstop, and center it on the bed. This will allow you to machine below the top surface of the bracket without running into it. Make sure the surface of your anodized aluminum stock is clean (if not, clean it 91% isopropyl alcohol), and cover as much surface area as you can with a single layer of tape. Make sure the strips don’t overlap or wrinkle because this will affect your Z thickness.
- Remove the parallel when you’re finished.
- Place one of your parallels so that it’s up against the corner of the L-bracket.
- Remove the paper backing after applying.
Because we’re working with nonconductive stock, you’ll use the Manual Stock Location routine to configure the X and Y offset for your anodized aluminum faceplate. Follow the instructions outlined in Part 1, Step 2.
Step 2: Load your SVG file into the Bantam Tools software.
You’ll use the Bantam Tools software’s built-in SVG support to machine the custom faceplate. This allowed us to designate the internal and external cutouts, as well as the engraving, through color-coded our design.
To learn more about working with SVGs, check out these resources:
- Download the Illustrator SVG Quick Guide template.
- Download the Inkscape SVG Quick Guide template.
- Read our Classic & Advanced SVG Workflows support guide.
Load the Bantam-Feather-Sequencer-Faceplate.svg into the Bantam Tools software, and select the 1/32” flat end mill and 80º Metal Engraving Bit. Under the Toolpath dropdown menu, enter 0.003” for the Engraving Depth value. Also, be sure to turn on the Advanced SVG Support to tell the Bantam Tools software to interpret the color-coded SVG.
Step 3: Configure the plan placement.
Now that you’ve located your material and set up your SVG file, it’s time to configure your Z height and enter your plan placement. Plan placement routines allow you to align your plan to a point other than the default location of the top left corner of your stock.
Go to the Plan Setup tab, click the Plan Offset Probing Routines button, and select Manual Plan Location.og the ¼” probing pin along the X, Y, and Z axis and hit the Set Zero button as you go, just like you did when running the Manual Stock Location routine.
Step 5: Machine your faceplate.
Now that you’ve placed your plan, go to the Jog tab and install and locate your 80º metal engraving bit. Then, go to the Summary tab, review your job, and select Mill Single File.
The Bantam Tools software will prompt you to change out the 80º metal engraving bit and replace it with the 1/32” end mill to finish the job. Once you’ve inserted the 1/32” flat end mill, perform a tool touch-off and resume milling.
Once your job is finished, apply 90% isopropyl alcohol to break down the adhesive and carefully remove the faceplate from the T-slot bed using a scraper.
Vacuum out the machine and clean off the T-slot bed before machining the circuit board.
Part 3: Machining the Circuit Board
Step 1: Install the removable spoilboard onto the T-slot bed.
Last up is the PCB! Before you prep and fixture your FR-1 stock, you’ll need to install the removable spoilboard onto the T-slot bed. The spoilboard and PCB bracket make PCB milling even easier. If this is your first time installing the spoilboard, see our Fixturing support guide for a walkthrough.
Then, probe the PCB bracket by navigating to the Material Setup tab and completing the following steps:
- Install your PCB bracket so that the corner aligns with the front left corner of the spoilboard.
- Install a 1/4” or 1/8” probe and perform a tool touch-off.
- Go to the Fixturing dropdown menu. Under Bracket, click the Locate button and follow the prompts. You’ll need to jog the probe to the inner left corner of the bracket below the top surface of the bracket.
- Click Start, and the machine will then probe the PCB bracket.
Step 2: Prep and fixture the FR-1 to the spoilboard.
Use your digital calipers to measure the X, Y, and Z dimensions of your stock. Go to the Material Setup tab and enter the measurements into the Material Size dropdown menu.
Once again, you’ll use double-sided Nitto tape to fixture your stock to the spoilboard. Cover as much surface area as you can with a single layer of tape, and remember to make sure the strips don’t overlap or wrinkle because this will affect your Z thickness.
When you’re finished prepping your stock, place the stock onto the spoilboard so that it’s aligned to the left corner of the PCB bracket. Then click the Material Offset Probing Routines and select the Z-only Stock Location routine. This will ensure that the height of your stock is accurate and the thickness of your double-sided Nitto tape is accounted for.
Step 3: Set up your circuit board file in the
Bantam Tools software.
For this project we utilized the EAGLE integration that comes with the subscription package of our Bantam Tools software. This integration allows you to simply drag and drop .brd files right into the software, without having to use an outside CAM processor.
Note: If you’re not a software subscriber, don’t worry. You can still machine circuit boards using the Bantam Tools Desktop CNC Milling Machine. You’ll just need to use a free Gerber to G-code solution like FlatCAM first
Go to the Initial Setup tab to load your circuit board file and select the 1/32” Flat End Mill and the PCB Engraving Bit 0.005” tools. Then go to Toolpaths in the file’s dropdown menu and configure the following settings:
- Deselect “Outline”.
- Set Trace Depth to 0.003”.
Step 4: Install the 1/32” flat end mill and machine the top of the circuit board.
Now that you’ve set up your file, go to the Jog tab, and install and locate your 1/32” flat end mill. Then go to the Summary tab, review your job, and select Mill Single File when you’re ready. The Bantam Tools software will prompt you to switch out your 1/32” tool for the PCB engraving bit. Follow on the on-screen instructions and then continue milling your PCB.
Step 5: Flip your board and machine the bottom side of PCB.Repeat the steps outlined in Part 3, Step 2 to prep and fixture you stock. But this time, when you fixture the FR-1 to the spoilboard, align the board to the right corner of the PCB bracket. When you’re finished fixturing the stock, run the Z-only Stock Probing Routine.
Step 6: Adjust the file setting to machine the bottom side of the circuit board.
Go to the Initial Setup tab and adjust the following settings under Toolpaths in the file’s dropdown menu.
- For Side to mill, select “Bottom”.
- Select “Outline”.
- Make sure your Engraving Depth is still reading 0.003”.
Step 7: Install the 1/32” flat end mill and machine the bottom of the circuit board.
Finally, go to the Jog tab and install your 1/32” flat end mill. After you’ve performed your tool touch-off, head to the Summary tab for one final look at your job, and click Mill Single File.
Part 4: Assembling & Programming
Step 1: Solder the circuit board components.
Congrats! You’ve successfully machined the PCB board and enclosure, and now it’s time to assemble your Bantam Sequencer. Start by soldering the circuit board. Lay out your components and turn on your soldering iron.
Solder the components in the following order:
- Audio jack
- Tactile button
- Adafruit Feather
Here’s a look at the board schematic.
This is what the board will look like once you’ve soldered the components.
The design has five inputs in the form of four potentiometers and a tactile button. The components are centered around the Adafruit Feather M4 Express. There are exposed female headers for the M4 Express. The board will only fit in one direction, with the microUSB port facing to the left. The board has two 12-bit DAC pins allowing for stereo audio synthesis, although this project doesn’t use any stereo effects and delivers a mono signal to a 3.5mm mono audio jack.
If you look at the pinout of the M4 Express, you’ll see that we’re using analog pin A0 as our DAC/audio output and A2–A5 as our analog inputs. Our button connects to digital Pin 5. The base software for the device uses these inputs to control an auto-advancing sequence of notes. The knobs control the root note, the scale (it comes pre-programmed with the seven diatonic modes), the probability that the note will play, and the time delay between Notes and Tempo. Pressing the button will cycle through different waveforms/oscillator types.
Step 2: Assemble the synth components.
Alright, time to put all the pieces you machined using the Desktop CNC Milling Machine together! Place your circuit board into the walnut base so that the side with the Feather M4 Express is facing up. Next, tighten the screws into the dog bones to secure the circuit board. Then place the faceplate over the soldered components and again tighten screws into the corner holes to hold the faceplate in place.
Step 3: Program your Feather M4 Express using the Arduino IDE.
Follow this Adafruit Feather guide to get acquainted with the board and set up your Arduino IDE. For the SAMD board support (Adafruit version), Version 1.5.14 is verified to work. Version 1.6+ has introduced a problem that will break the code without generating any errors.
You’ll also need to install the following libraries:
- Adafruit fork of the PJRC Audio Library via the IDE
The code is broken up into two separate files:
featherSynth.ino. This primary code is divided into two sections: Setup and Loop. Setup runs once, while Loop cycles through continuously after the setup code has been executed. All of the code above the setup() function is required to call the library we’re using (Audio.h), call our reference file (scales.h), and initialize our global variables. All of the code below the main loop() are functions that are called from either within setup() or loop().
- Setup() contains code for setting audio memory allocation, pin assignment, and a function called oscillatorSetup() that is used for setting the initial values of our oscillators/envelopes, etc. These will mostly get overwritten by the loop; however, we want to define our instrument before the program begins to cycle.
- Loop() contains the bulk of our code. We have a function called buttonHandler() that is used for managing what we want to happen when we press the button. If you find this function, you can add further oscillator combinations. The potentiometer readings are assigned to the Feather pins here as well. If you want to change the order of the knobs, do it here.
- The nested for() loop is used to populate the rootScaled array. This determines what notes are in the sequence and the order that they’re arranged in. There are two arrangements to choose from, either climbing the scale or random selection. Only one can be used at a time.
- The probability-of-playing variable is compared to a random value between 0 and 100. Since probability-of-playing is also a value between 0 and 100, this is treated as a percentage. You can experiment with these values.
- The frequency is calculated using a formula that stems from MIDI note values which are a standard form of notation for relating to frequency. The frequency cutoff is currently assigned a 50% chance of being 7000 Hz or 2000 Hz. Experiment with these numbers.
- PlayOsc1() and playOsc2() functions take one argument (frequency), which is calculated via the bullet above. These functions also contain the methods for dictating the ADSR envelope values, which are hardcoded and can be adjusted and should be experimented with. The filter frequency cutoff and delayTime are also embedded in these functions, with delayTime being used to set the time between notes (the Tempo).
- The buttonHandler function counts the button presses and uses that count to cycle through the seven different oscillator combinations in the switch statement.
Scales.h. Scales.h is a reference file where we have all of our different scales stored. The base code has seven scales (each of the diatonic modes) spread out across two octaves, with the root note at each octave playing at a 3:1 ratio to everything else. This results in an 18-note array (an array with 18 indices). This would also need to be changed in the .ino sketch in the rootScaled array.
Currently, if the knob is turned all the way to the left, the Ionian (major) Scale is selected. As the knob is turned to the right, each scale from the array is played in the order that they’re presented in the scales.h file.
Once all of the dependencies have been installed and you’ve uploaded a trial sketch, upload the code that you’ve downloaded from the repository.
Have fun and go make some noise!