This is a set of simple, small form-factor, mini-shields that I created almost by accident. As I made more and more of them, I realized that they could be really useful. What started out as a way to use some spare parts, turned into a standardized form factor for a versatile, miniaturized Arduino shield. The added benefit is that they also make a great kit for traveling, or simplified prototyping or for educating kids and beginners about Arduino.
I have been building some custom shields and modules for a while now but while I like the modularity of a shield, they are a little too expensive and large if all you want to add is just a little piece. The modules I make are all small and have to be plugged into a breadboard, which doesn’t have that satisfying, finished feeling I’m looking for. I buy a lot of perf board, but the Arduino boards have this annoyingly unusual spacing between the digital pin banks so you have to modify the pins to make them fit. I needed something that was more flexible, lighter weight, and allowed me to change the pins used more easily to avoid conflicts with other shields.
The Mini-Shield Standard
I started making these small modules with standardized pinouts that are mostly plug and play. I call them Mini-Shields and they include everything you need for almost any application. The first 3 pins from the right of each board are connected to the 5v, ground and Digital 2 pins from the Arduino. All of my mini-shields use the following standard and they work pretty well with each other.
Pin | Pin Function
1 | 5v
2 | Gnd
3 | Digital 2 (Hardware Interrupt)
4 | Analog *
5 | Digital (PWM)
6 | Digital (PWM)
7 | Analog **
8 | Digital
9 | Digital (PWM)
* the Real Time Clock module requires analog pin 4
** the Real Time Clock module requires analog pin 5
I liked the idea that these little modules could be added to almost any other shield and you could swap them out as needed. I would then also be able to reuse them in different projects without too much effort. The standardized pinout meant that every one of them could be used in place of the others if everything was wired correctly. Once they are built, they make a good little, rapid prototyping set that would also work as an entry level set for Arduino beginners.
Shield of Mini-Shields
I made a single shield with space for any 3 mini-shields to be connected at the same time. Each mini-shield uses 2 analog pins, and 4 digital pins (plus digital pin 2 which they all share since I have dedicated it for the hardware interrupt feature). I needed to dedicate analog pins 4 and 5 to slot A to ensure the Real Time Clock module would work. Of the 14 digital pins, there are only 6 PWM pins available, so I have dedicated slots B and C to be the PWM mini-shields, so things like the speaker and the full-color LED won’t work well if they are plugged into slot A.
Step 1: Parts and Methods
Debounced Button Mini-Shield – An RC circuit with an inverting Schmidt trigger to debounce the output from a tactile switch.
D Pad Mini-Shield – 5 button directional pad connected to a single analog pin
Bar Graph Mini-Shield – Uses a shift register to light an 8 segment LED Bar graph with only 3 digital pins.
RGB Mini-Shield – An RGB LED & trimmer pot + 2 buttons.
Real Time Clock Mini-Shield – an adapter to use my off the shelf RTC module.
Theremin Mini-Shield – A salvaged PC speaker, photo cell & 2 buttons.
I made all of these mini-shields with parts I had on hand but I hadn’t gotten a chance to use. I always keep a lot of male and female headers on hand. More and more, I like to use these right angle headers which only come as male headers, but I have found you can also bend the pins on the female headers to make them lay down along the board as well. I like the 10 packs of straight and right angle headers that they sell at Schmartboard. Most other places only sell the header strips in singles. Unfortunately, they don’t sell the female headers there.
Perf and Proto Boards
I bought a couple of 2 sided, through-hole plated proto boards that I never found a use for. This project gave me a good chance to use them, but once I used the 2 I had, I started cutting pieces off a large perf board that I got at Radio Shack.
Resistors, Capacitors and Components
At some point I stopped buying one type of resistors and I started buying the assorted packs. It’s a much better deal and it’s more convenient to use something you have on hand than to run to the store and hope you remember all of the things you needed. If you have a bunch to choose from, you can usually mix and match something to work for you.
I have been using a lot of buttons lately, and I ran out of new ones but I had a bunch that I salvaged out of an old DVD player so I was able to reuse those as well. When I junk old electronics, I open them up to see what could be useful. If I find anything good, I cut the parts out with a pair of tin snips and put them away. If I need them later, I will use some desoldering braid to remove the solder and free the part from the circuit board. I used the same process for the buttons, the IR LEDs and the IR sensor that I used in this project.
The wire I use in my projects is just solid core UTP network wire. I have a big spool of wire, so every so often I cut a few feet off and strip off the outer sheath. The wires inside use the standard CAT5 standard, so I don’t have red and black wires like I would prefer. Instead I use Orange for Red and Green for Black. I use Blue for switches and other digital pin leads. I use White Blue or White Green for data and analog pin leads.
I used some paint pens to mark the header pins with colors so you can easily tell what pins are necessary and how they should be hooked up to an Arduino from a breadboard. I marked the 5v pins with Red and the GND pins with Green. I marked digital pins with Blue and I marked analog pins with Yellow. I marked the PWM (digital) pins with White, but I put a dot of color in the middle. For the Full-Color LED, I matched the dot to the color that the pin relates to on the LED. I mark the female header pins with white masking tape and fine tip permanent markers using the same color scheme as above.
Step 2: IR Mini-Shield Construction
This was the first mini shield. I had some parts I wanted to add to my Time and Temp shield, but I had no more room on the shield for the parts. I decided to put them on a daughter board with header pins so it’s removable and reusable. I had a few of these 9 x 9 hole proto boards that I hadn’t found a use for but it turned out 9 holes was exactly the right size for this project.
I salvaged a few IR LEDs out of old TV remotes, and an IR Receiver from an old A/C unit that I thought I could use on the Time and Temp shield. I also thought it would be nice to add a few buttons, so that I could make a menu for the display.
First I tested the IR LED from the remote with 5v from the Arduino. I had to look at the LED through my camera to see the infrared glowing. The camera showed that the LED worked fine but it did get hot, so I assumed it was getting too much power. I tried a few different resistors until I didn’t see too much difference between full brightness and when the resistor was placed in series with the led. With a 47 ohm resistor, the LED doesn’t overheat anymore and still shows full brightness on the camera screen.
I found a little information on Adafruit about a similar IR Sensor. The board I took this from had markings that indicated the + and – leads were the same as Adafruit’s guide said, so I soldered it along the top of the proto board for clearance of the sensor’s eye.
I had some extra room, so I had to put a couple tactile buttons in place to fill up the space. I like having extra buttons on my projects because there is always a reason to have some way to trigger a process, especially when you are testing something.
Step 3: Debounced Button Mini-Shield
I had another of these 9×9 through-hole plated proto boards so I figured I would make another module that I could use in the same port. I have a section of one of my breadboards devoted to a hardware debounced switch. This way I can hook the switch up to the hardware interrupt on Arduino and begin a new instruction in the middle of a loop. The interrupt pins need to be debounced with hardware because there is no way to use the wait delay to debounce on the interrupt.
There is a really good explanation of hardware debouncing and interrupts on these websites…
Step 4: Directional Pad Mini-Shield
Since the original idea was to add some new inputs for my Time & Temp shield project, I thought a directional pad would be nice. I remembered this post on the Arduino site that only uses 1 analog pin for all of the buttons. Because the resistances are mapped out so nicely, it even allows for the Arduino to recognize combinations of any 2 keys pressed at the same time.
I was trying to use parts I had on hand and I was running out of buttons, so I had to salvage 4 of these buttons from the A/C unit’s control panel. I have a set of standard resistors from Radioshack that is getting a little picked over, but I was still able to make something work by combining a few resistors to get the desired resistance.
I had to use 4 resistors for buttons 2 and 3 to make the 390 and 680 values described in this example, and as a result my actual resistance was slightly different, so I had to run the following test code to see what the analog reading would be for each button, and update the button array to allow for these values (usually 1 number above/below the example on the Arduino site).
int analogpin = 3; // analog pin to read the buttons
Step 5: Bar Graph Mini-Shield
I was thinking of other things that would be useful as a mini-shield and I thought I might like to have an LED bar graph circuit, complete with a shift register on it. I have a nice tricolor bar graph, but its a 10 segment one, and my shift register is only 8 bits. I remembered I had these 8 segment (2 per line) LED displays with a strange pinout and I figured this would be a good chance to use them.
With the shift register driving the LED display on the mini-shield, I can get away with only using the 3 digital pins to light up all 8 LEDs. Otherwise, I couldn’t put this on the mini shield since I only have 4 digital pins dedicated to each mini shield. Even if I used the shared pin 3 on the mini-shield connector, I would only have 5 digital pins to drive 8 segments. The shift register makes it possible to drive more LEDs without exceeding your available pins.
74HC595 Shift register – These shift registers are great for increasing the number of output pins so you can drive many LEDs from just 3 pins on the Arduino. You can daisy chain them together to get even more output pins, you only need to change your code to allow for the additional shift registers. There is a good tutorial for these here.
LED 8 segment bar graph – I have these in a couple different colors because I was trying to string a lot of them together with daisy chained shift registers. The ones I used here were not what I expected so they were never used.
Resistor Network – I have 2 different kinds of these, Isolated and Bussed. This one is isolated so it contains 8 separate resistors, but I dragged a line of solder down the outgoing leads to tie the grounds together. If I had used the bussed one, I could have just used the one common lead for the ground, but I would have been wasting 7 additional resistor leads.
For more detail: Arduino Mini-Shields