The open-source hardware realm of Arduino shields is a nearly dazzling array of variations of form and capability. There are choices of the bare PCB, DIY Kit or pre-assembled modules that combine with layout and functionality to a point of being products different from the original concept.
The Arduino prototyping shield perhaps supports this assertion, it has several forms, some focused on screw terminals versus the more Arduino-centric long tail headers (and both). Other examples address the technology of the IC components (SMD,SOIC,DIP). Any variant may have appeal because it seems suited to a user’s application.
There is one of these pre-assembled units that is perhaps most recognisable with the added bells and whistles of two LEDs (with resistors) and one ‘general’ pushbutton additional to the standard Ardunio Reset. However even this ‘universal’ model has undergone a modification that on the surface seems illogical. The “small soldering area” once lauded as a feature is now the adhesive base-plate for a mini breadboard.
Like many procurements, the first encounter with the new-hybrid prototyping shield was merely availability not a deliberate plan. Probably like many procurements, the prototyping shield’s destiny was to languish unused as ‘bright ideas’ came and went. However when ‘re-discovered’ the module proved to be eminently suited to projects where a coffee table is called on to be lab space and/or where logistics available are limited to one hand, one shirt’s pocket, over an ear , etc.
The point of this Instructable is not to critique this mini breadboard variant of an Arduino prototyping shield but to show some simple extensions that, when combined with a 170 tie points breadboard, makes a ‘nifty’ platform for tinkering with ICs as the X9C103P here or even small resistor–transistor (RTL) circuits.
For added depth for this skinny Instructable some code is included. First there is a modification to the classic Debounce code to work with the shield’s pushbutton without additional hardware components and there is small snippet to show a simple method for the Debounce and the pushbutton to be used ‘safely’ to interact with a sketch.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Material
- 2x - Dupont M-M connector (nominal 20cm length).
- 1x - 3 or 4-pin header socket (optional).
- 2x - capacitor of nominal value .1µf (optional).
- Electrician tape (optional).
- Ardunio UNO Prototyping Shield as per eBay.
- Mini Solderless Prototype Breadboard 170 Tie-points (part of #5.)
- Piece of sandpaper.
- Soldering iron.
Step 2: Plan/Preparation
View the edge of the prototyping shield. If the silk screen show C1 and C2 and the holes are manufactured on the board the two optional .1µf capacitors may be install. In theory, the capacitors help stabilize the power on the 5V rails but the skeptic may scoff at the likelihood of jitter. Nonetheless, if the holes are there the job is easy and at least this will heat up a soldering iron.
Cut the two M-M Dupont wires at their mid-point. This length is nearly perfect for connecting the switch and two LEDs with any header socket on a UNO sized shield. Strip 1-2mm of insulation from the severed ends of three of the wire. Save the fourth piece for the next shield.
By looking carefully at the articles first image, the purpose of the 3 or 4 pin header socket can be seen as nothing more than a ‘pincushion’ for restraining the male pins of the wires. This will interfere with any prototyping that involves the SOIC pad if located as shown but if it is only ‘tack’ soldered it is easily removed. If this option is not appealing, a small piece of insulating foam taped to the prototyping board also works as the pincushion.
The final option pertains to the electrician tape and is a matter of preference. In this project, a small piece (5-7mm) of electrician tape is cleverly folded into a double-sided loop. The resulting wonder of technology is then used to stick the mini-breadboard onto the prototyping shield. The mini breadboard won’t likely become dislodged when pins are inserted or extracted, it is easy to remove without acetone, alcohol or any other harsh chemical and extremely economical to re-mount. There doesn’t yet seem to be any (social or legislative) restriction to using the shield with multiple mini breadboards.
Having decided on the options, the necessary bits should be dug out, polished with the sandpaper if needed and the soldering iron ignited.
Step 3: Construction
The construction is straightforward. If the two-.1µf capacitors are to be added, it is likely the best first step. A warm up so to speak.
For the Dupont wires, locate the two LED where at each LED will be a manufactured hole as shown. Additionally at the location marked LED2 is another manufactured hole that is associated with the pushbutton. Simply solder the stripped end of the severed M-M Dupont through the holes. The colour scheme has no bearing on the functionality but here red was used for the two LEDs and the blue for the switch. Some times it is helpful to keep thing simple with a bit of uniformity.
Step 4: Wiring
The diagram shows an equivalent wiring of the LEDs and pushbutton of the Prototyping Shield. The GND connection to the Arduino part of the shield’s pin configuration, to work with the following code the male Dupont pins must be connected as:
- LED1 to Arduino Pin 8
- LED2 to Arduino Pin 9
- Pushbutton to Arduino Pin 2
Plug the Prototyping Shield onto the UNO or UNO stack. The ‘nifty’ platform hardware is complete.
Step 5: Code
Classic Debounce Revisited
The classic Debounce of the Arduino Tutorial was chosen as a good example to use to illustrate the pushbutton feature of the Prototyping Shield for two reasons. First it’s there, no need to work at being inventive whatever its operational shortcoming. Second, the classic Debounce is not embedded in a library and the tutorial value is readily exploited.
The reason the classic Debounce cannot be used without change is simply the polarity of the signal. The classic Debounce has a ’known state’ by virtue of the 10KΩ pull down of the Arduino pin wired for sampling the pushbutton. Closing the pushbutton pulls the Arduino pin HIGH.
With the Prototyping Shield, closing the pushbutton connects the Arduino pin to GND. Simply stated the Arduino pin has only one state i.e. LOW. The real world of course can’t always be dismissed by ‘simply’ and Arduino+breadboards+connecting wire at times will become a good facsimile of an electromagnetic proximity sensor.
However, to provide a reliable HIGH state requires a pull up for the Arduino pin. This could be accomplished with an external resistor but the microprocessor chip provides this service as well. A small change of code will substitute for and external resistor. Specifically the “INPUT_PULLUP “ is inserted in the pinMode statement as “pinMode(buttonPin, INPUT_PULLUP);”. Well explained in the Arduino Tutorial.
The change to the classic Debounce to function with the Prototyping Shield is just this additional condition for the pushbutton sampling pin and the minor changes to recognize HIGH as the open state of the switch and LOW as the closed. The sketch ClassicDebounceRevisited.ino has been commented with the changes.
Of course tweaking the classic Debounce doesn’t seem very entertaining so the code includes an extension to include the second LED of the Prototyping Shield. Nothing more spectacular than turning the second LED ON when the first if OFF.
Halt a Process
Another sketch is included that shows the use of the pushbutton and LED. Not solely as 170 Tie Points Prototyping but perhaps part of an Arduino Stack. Again the coding content is not of direct value but hopefully it is food for thought for Prototyping Shields.
The code is passed along in a form often employed in the author’s code development and proto-development. A tale could probably be spun that would excuse the form but the reality is firmly rooted in equal part laziness, questionable organizing habits and a certain loathing of the ‘scroll’. No effort has been made to detail its functionality outside of the Arduino IDE V1.6.5 but a cut and paste ‘work-around’ will solve the issue though maybe not with the (perceived) advantages.
The sketch is comprised of three separate ‘.ino’ files that if present in the same directory (at least with Windows OS) are treated by the IDE as any single sketch file. There is a certain confidence this results from some intended design as the IDE presents the root sketch(et?) as the first tab.
For this Instructable a barely minimum root file is Prototypingnippet.ino and a second is the modified classic Debounce with another treatment to conform to the syntax rules for functions. This is UpdatedButtonBounce.ino. The last piece of code is contained in pinDoubleBlink.ino.
The Prototypingnippet code uses the wiring of the Prototyping Shield from Step 4 and has essentially the same goal of proofing the shield but by using the pushbutton not as a toggle but HALT event. The code is not elaborate and is commented. Some output to the serial port is provided mostly to show the sketch is executing the loop. The HALT is performed if the shield’s pushbutton is held down for at least 1.25 seconds. Once the Halt is requested the sketch performs a ‘shutdown’ sequence of blinking LED and then literally whiles away the time away.
The Prototypingnippet code can be downloaded with the Zip file link below and should extract into the Arduino IDE ready directory of the same name.
The sketch code samples the pushbutton pin’s state, there are no algorithmic techniques introduced and the outcome may be bit uncertain. The classic Debounce and these modified versions also use the millis() function so the usual caveats on timed loops, overflow and TIMER0 prescaler are in play.
Step 6: Summary
While there are limitations to the use of the 170 Tie-Points and Prototyping Shield, there are several attractions for both breadboarding and prototyping in general.
The disadvantage that may cause the most head shaking with this Instructable is the little mentioned “Arduino UNO”. If the UNO is not the reader’s preferred instrument then a take-away is only the ideas and aggravations the Instructable engenders.
That distinction aside, even the size of the breadboard is likely 50-50 pro and con when coupled with the Prototyping Shield although it is most likely a binary 0-1. The mini board itself has no rails for VCC/VSS but the VCC/VSS available on the shield could be described as “ample”. Something as large as a port expander IC would likely tax even the most nimble fingers. Something with 8-pins or 2-3 TO-92 packages with a few resistor/capacitor elements is not impossible to wire.
The actual application is of course what will drive the level of attraction or repulsion. The simple extensions proposed here will of course have no meaning if LEDs and/or pushbutton have no place in a project although it is difficult to imagine an Arduino project where a LED was banished.
The simplest conclusion to this Instructable is from the Introduction. The prototyping shield with a 170-tie points breadboard, makes a ‘nifty’ platform for tinkering. Maybe only in the eye of the beholder but shouldn't be dismissed.