In this project build, we show you how to make your own ATtiny Arduino programmer shield. This essential component allows you to plug in and program ATtiny chips through Arduino IDE. This project requires very little setup and milling time to achieve a finished product. Let’s get started!
Tools and Materials
- Bantam Tools Desktop PCB Milling Machine
- Computer with Bantam Tools Desktop Milling Machine Software installed
- Arduino IDE program installed
- Probing pin, 1/8"
- Flat end mill, 1/32"
- PCB engraving bit, 0.005"
- Alignment bracket
- Soldering iron
- Diagonal wire clippers
- USB cable
- PCB blank, FR-1, single-sided
- Tape, high-strength, double-sided
- Pitch headers, 2.54mm (32)
- Resistors (3)
- LEDs (1 red, 1 green, 1 yellow)
- Dip socket, 2x4
- Dip socket, 2x7
- Capacitor, 10uF
- Download the ATtiny-Jig-Final-Bantam-Tools.brd file.
Step 1: Import your file.
In the Bantam Tools software, in the Initial Setup tab, click Import and select ATtiny-Jig-Final-Bantam-Tools.brd. Then, select the 1/32" Flat End Mill and the 0.005" PCB Engraving Bit. Your mill time will vary depending on the speeds and feeds recipe you use. For this operation, we used the following recipes.
For the 1/32" flat end mill:
- Feed Rate: 59 in/min
- Plunge Rate: 15 in
- Spindle Speed: 25,000 RPM
- Stepover: 49%
- Pass Depth: 0.010 in
For the 0.005" PCB engraving bit:
- Feed Rate: 4.00 in/min
- Plunge Rate: 5.00 in
- Spindle Speed: 25,000 RPM
- Stepover: 50%
- Pass Depth: 0.006 in
If you’d like to adjust your speeds and feeds to match ours, go to the Settings tab and click Open Tool Library. Select the tool you want to customize, click Copy, name your new tools, and then input the speeds and feeds recipes. You can learn more about customizing your Tool Library here.
Step 2: Set up your job.
Before you fixture your material, need to install and locate the PCB alignment bracket. After you attach the alignment bracket, go to the Jog tab and select Install Tool. Insert your 1/8" probing pin and follow the on-screen prompts to perform a tool touch-off.
Now go to the Material Setup tab and click the Material Offset Probing Routines button, select Locate PCB bracket, and follow the instructions on the screen. Using the alignment bracket will ensure that your FR-1 is perfectly squared in the front left corner.
Note: If you haven’t installed the alignment bracket before, follow the steps in this support guide.
With the alignment bracket installed, it’s time to set up your job. We’re going to run through this setup quickly. If you need more guidance on how to load your tool and enter information into the Bantam Tools Milling Machine Software, refer to the Light-Up PCB Badge project.
- Hook up the Desktop PCB Milling Machine and open the Bantam Tools Desktop Milling Machine Software.
- Home the mill.
- Double-check to make sure it says Bracket in the Material Setup tab.
- Go to the Jog menu and click Install Tool. Remove the probing pin, insert the 1/32" flat end mill with the bit fan attached, and locate the tool.
- Measure and enter dimensions in the X, Y, and Z values under Material. Then apply high-strength, double-sided Nitto tape on one side of the PCB, and place it onto the spoilboard so it aligns with the left corner of the alignment bracket.
Step 3: Start milling.
Ready? Click Start Milling.
Remember, this job will require a tool change. When prompted, install the 0.005" PCB engraving bit with the bit fan attached, locate the tool, and select Start Milling to finish the board.
Step 4: Solder the components.
Alright, it’s time to solder! Grab your components and your soldering iron. It’s easiest to solder the components in the following order:
- 2x4 or 2x7 dip socket
- 2.54mm pitch headers
- Yellow, green, and red LEDs
- 10uF capacitor
When you’re done soldering, the board will look like this. Note how the components go through the back side of the FR-1.
Congrats! You’ve made your very own ATtiny Arduino programmer shield using the Bantam Tools Desktop PCB Milling Machine.
Step 5: Program your Arduino chips.
Attach the ATtiny programming jig you just milled to the Arduino board you want to program. Open the Arduino IDE. (If you haven’t already, download it here.)
- Upload ArduinoISP Sketch to the Arduino Uno.
- Install ATTinyCore by Spence Konde via the Arduino Board Manager.
- Click Tools > Board > ATTiny 25/45/85 (or 24/44/84).
- Click Tools > Clock - 8 MHz (Internal) .
- Click Tools > Chip > ATTiny85 (or ATTiny84).
- Click Tools > LTO – “Disabled”.
Plug the ATtiny into the socket. With the Arduino’s USB port pointing down, pin 1 should be on the lower right. Then plug the programming jig you milled into the Arduino and power it on. The yellow LED should begin to breathe after a startup sequence.
Next, click Tools > Programmer > Arduino As ISP, and then select Tools > Burn Bootloader. This step only needs to be done once per chip. After you’ve burned the Arduino Bootloader onto the ATTiny, you can upload a number of sketches from the example folders in the Arduino IDE, or you can code your own. Make sure that you select “Upload Using Programmer” from the Sketch menu.
Note: For further info on programming your Arduino chip, check out Arduino’s guide to programming an Arduino Uno.
While programming your chips, here are some design notes to keep in mind.
LEDs: The LEDs are attached to Arduino pins 7, 8, and 9 to show programming, errors, and heartbeat. These are status LEDs during programming and built into the ArduinoISP sketch. The yellow LED “breathes” when you’re connected; the green LED blinks when programming is underway; and the red LED turns on when there’s an error and when the sketch finishes uploading.
- Pin 7 — Programming
- Pin 8 — Errors
- Pin 9 — Heartbeat
Serial Peripheral Interface (SPI): SPI is used by microcontrollers for quick communication with one or more peripheral devices, or in this case circuit boards. There’s always one master device that controls the other devices.
- Pin 10 — Salve Select (SS)
- Pin 11 — Master Out Slave In (MOSI)
- Pin 12 — Master In Slave Out (MISO)
- Pin 13 — Serial Clock (SCK)
- 5V — Power
- GND — Ground
Step 6: Test your Arduino board.
In this final step, it’s time to test your board. To make sure your board works, complete the following steps:
- Click File > Examples > 01.Basics > Blink. Change LED pin to 3. This is pin 2 on the 85 and pin 10 on the 84.
- Click Tools > Programmer. Select Arduino as ISP.
- Click Sketch > Upload > Programmer.
Is there a topic you’d like us to cover in our next how-to video? Email email@example.com or reach out to us on our social media channels. Be sure to follow us on Instagram, Facebook, and Twitter for the latest how-tos, CNC projects, and updates!