ATtiny Arduino Programming Shield

by Bantam Tools in Circuits > Arduino

848 Views, 3 Favorites, 0 Comments

ATtiny Arduino Programming Shield

Finished-Arduino-Programming-Jig-Desktop-CNC.jpg
Bantam Tools Desktop CNC: ATtiny Arduino Programmer Shield

In this project build, we show you how to make your own ATtiny Arduino programmer shield using a Bantam Tools Desktop PCB Milling Machine. This essential component allows you to plug in and program ATtiny chips through the Arduino IDE. This project requires very little setup and milling time to achieve a finished product. Let’s get started!

Gather Your Tools and Materials

TOOLS

Bantam Tools Desktop PCB Milling Machine

Computer with Bantam Tools Desktop Milling Machine Software installed

Arduino IDE program installed

Flat end mill, 1/32"

PCB engraving bit, 0.005"

Alignment bracket

Soldering iron

Diagonal wire clippers

USB cable

MATERIALS

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

FILES

Download the ATtiny-Jig-Final-Bantam-Tools.brd file.

Set Up Your Job

First, we need to install and locate the alignment bracket. After you attach the alignment bracket, under Fixturing, select Locate, and follow the instructions on the screen. Using the alignment bracket will ensure that your board 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 Desktop Milling Machine Software, refer to the Light-Up PCB Badge project.

  1. Hook up the Desktop PCB Milling Machine and open the Bantam Tools Desktop Milling Machine Software.
  2. Home the mill.
  3. Double-check to make sure it says Bracket under Fixturing.
  4. Select the 1/32" Flat End Mill, load it with the bit fan attached, and locate the tool.
  5. In the Material dropdown menu, select Single-Sided FR-1.
  6. Measure and enter dimensions in the X, Y, and Z values under Material. Then apply high-strength, double-sided tape on one side of the PCB, and place it onto the spoilboard so it aligns with the corner of the alignment bracket.

Import Your File

Customize-Tool-Library-Desktop-CNC-Software.png

In the Bantam Tools software, under Plans, click Open Files 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, click File > Tool Library > Add Tool. Name your new tools and then input the speeds and feeds recipes. You can learn more about customizing your Tool Library here.

Start Milling

Arduino-Programmer-Shield-Desktop-CNC.jpg

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.

Solder the Components

Screen Shot 2020-01-16 at 11.15.35 AM.png
ATtiny-Programming-Jig-After-Soldering.jpg

Alright, it’s time to solder! Grab your components and your soldering iron. It’s easiest to solder the components in the following order:

  1. Resistors
  2. 2x4 or 2x7 dip socket
  3. 2.54mm pitch headers
  4. Yellow, green, and red LEDs
  5. 10uF capacitor

When you’re done soldering, the board will look like the one shown here. 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.

Program Your Arduino Chips

Default-Settings-Arduino-Programming.png

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.)

  1. Upload ArduinoISP Sketch to the Arduino Uno.
  2. Install ATTinyCore by Spence Konde via the Arduino Board Manager.
  3. Click Tools > Board > ATTiny 25/45/85 (or 24/44/84).
  4. Click Tools > Clock - 8 MHz (Internal).
  5. Click Tools > Chip > ATTiny85 (or ATTiny84).
  6. 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.

  1. Pin 10 — Salve Select (SS)
  2. Pin 11 — Master Out Slave In (MOSI)
  3. Pin 12 — Master In Slave Out (MISO)
  4. Pin 13 — Serial Clock (SCK)

Global Programming

  • 5V — Power
  • GND — Ground
  • Reset

Test Your Arduino Board

Finished-Arduino-Programming-Jig-Desktop-CNC.jpg

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 resources@bantamtools.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!