If you have just gotten yourself an Arduino UNO and wondering "what's next?" - Well, a good start will be to light up some LEDs (a.k.a. The "Helloworld" of electronics). You will of course need to purchase the components (such as LEDs, Resistors, Breadboard, Jumper Wires etc.) separately but if you do not want too much hassle, enter the world of Arduino Shields. You can quickly get started with basic electronic concepts using this Proto Shield designed for the Arduino UNO, which you can get it off cheap from eBay or AliExpress.



This is a very basic (and cheap) version that comes with:
  • 2 x LEDs (wired-up to 2 resistors)
  • 1 x Button
  • 5 x extra 5V female pins
  • 5 x extra GND female pins
  • 1 x 170 pin breadboard (separate piece)
Note: There are of course more sophisticated ones (with more features) that you can find online but they usually cost more. Some vendors may provide this as a kit and you will need to solder everything yourself. This one I got was fully assembled on arrival.

The center of the shield allows you to place a tiny 170-pin breadboad for prototyping or solder in your own components to make things more permanent. Take note that the center design of the shield may vary from vendor-to-vendor and is not standardized. I would recommend that you do not stick the breadboard onto the shield and also to make sure that the breadboard you are placing onto the shield does not have its back metal strips exposed (or you will risk shorting out your shield or worst - the UNO).


A caveat that you should know about this shield is that it is not stackable. If you noticed, the space between the rows of pin headers at the top and bottom are not aligned for the next shield (because the Chinese did not only cloned the board, they also cloned the problem). You can probably fix it by de-soldering the pin headers and replacing them with the ones you desire or get a version of the shield that allows stacking. Since I am a noob, I will have to live with the defective design of this shield.

Testing the Shield

Before you start thinking (like me initially) that you can immediately blink LEDs on this, take note that you will still need a few male-to-male Jumper Wires to connect the LEDs to the pins. Noticed the tiny little holes marked with the labels - LED1 and LED2? That's where you need to poke the jumper wires.



There is also a tiny hole with the label + beside the S1 push button for you to learn inputs (like clicking a button in your app). Don't get confused with the RESET button - most Arduino Shields comes with a reset button for you to "reboot" your board.

#1 - Basic Test

To test out the shield, upload the following sketch to your UNO. It is just a simple program that turns LED1 on and then swap to turn on LED2 instead when you press the push button. When you release the button, it will switch back to turn on LED1.

#define LED1 13
#define LED2 12
#define BUTTON 11

static int _buttonState = 0;

void setup() {
  // Setup pins.
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);

  // Pull-up Button pin.
  digitalWrite(BUTTON, HIGH);
}

void loop() {
  // Read button state.
  _buttonState = digitalRead(BUTTON);

  // Swap lightings.
  digitalWrite(LED1, _buttonState);
  digitalWrite(LED2, !_buttonState);
}

Disconnect the UNO from the computer and attach the shield. Then proceed to make the following hardware connections:
  • LED1 -> Pin 13
  • LED2 -> Pin 12
  • + (S1) -> Pin 11
Once it is done. Connect the UNO to your computer and test the shield. LED2 should light up and LED1 will turn off when you press the button.


#2 - Chase LEDs

Let's try out something a little bit more interesting. We will wire-up 4 LEDs onto the tiny breadboard with some resistors and create the 'Chase LED' effect. Uploading the following sketch to your UNO:

#define LED1 13
#define LED2 12
#define LED3 11
#define LED4 10
#define TOTAL_LEDS 4

#define BUTTON 7

#define ON  LOW
#define OFF HIGH

static int LEDS[] = { LED1, LED2, LED3, LED4 };
static int _pos = -1;
static bool _forward = true;

void setup() {
  // Setup pins.
  for(int i = 0; i < TOTAL_LEDS; i++)
    pinMode(LEDS[i], OUTPUT);

  // Pull-up Button pin.
  digitalWrite(BUTTON, HIGH);  
}

void loop() {
  if (!digitalRead(BUTTON)) {
    setDirection();
    blink(100);
  }
}

void setDirection() {
  // Increase _position if have not reached the end.
  if (_forward && _pos < TOTAL_LEDS - 1)
    _pos++;

  // Decrease _positon if have not reached the beginning.
  else if (!_forward && _pos > 0)
    _pos--;

  // Set to Forward if reached beginning.
  if (_pos <= 0)
    _forward = true;
   
  // Set to Backward if reached end.
  else if (_pos >= TOTAL_LEDS - 1)
    _forward = false;
}

void blink(int pause)
{
  digitalWrite(LEDS[_pos], HIGH);
  delay(pause);
  digitalWrite(LEDS[_pos], LOW);
  delay(pause);
}

Disconnect the UNO and proceed to make the following connections onto the tiny breadboard:

  • Blue LED (Anode +ve) -> Pin 13
  • Green LED (Anode +ve) -> Pin 12
  • Yellow LED (Anode +ve) -> Pin 11
  • Red LED (Anode +ve) -> Pin 10

Important! Make sure all the LEDs are connected to resistors of at least 220 ohm. 

You will now discover that the lack of a power rail on the tiny breadboad is a challenge for you to connect the LEDs to the GND pin. Fortunately, the Proto Shield came with a row of GND Pin Header that you can use. Connect all the LEDs to GND.
  • Blue LED (Cathode -ve) -> 220 ohm Resistor -> GND
  • Green LED (Cathode -ve) -> 220 ohm Resistor -> GND
  • Yellow LED (Cathode -ve) -> 220 ohm Resistor -> GND
  • Red LED (Cathode -ve) -> 220 ohm Resistor -> GND
Finally, connect the Proto Shield button to Pin 7:
  • + (S1) -> Pin 7
Your completed wiring should look something like the following picture:


Check all your connections to make sure that they are correct. Connect your UNO to your Computer and press the button on the Proto Shield to run the chase effect.



Summary 

That's all to it for the Proto Shield. If you are a seasoned electronics person or have some experience with the Raspberry Pi, you will noticed that the Arduino's pin design is somewhat not very convenient for external breadboads without longer jumper wires, due to the positioning of the pins along the edge of the board. Therefore, you may find the Proto Shield useful as well for little projects.



Category
Ratings
Comments
Easy to Learn
Extremely easy to use even with basic electronics knowledge. No rocket science required.
Availability of Resources
Resources and samples are abundance but may be different from vendor-to-vendor.
Built-In Features A button and 2 LEDs with matching resistors. Nothing fancy.
Customizability
Can solder your own components onto it but space to put breadboard for prototyping maybe too small.
Extensibility
Not stackable but exposes pin headers to connect to other modules and components.
Length of Excitement
Can learn all the features quickly. Will get bored very fast.
Price
Good value and quite cheap.

Origin: I suspect this shield originated from Adafruit's earlier creations. Since Adafruit published the designs for people to use, I guessed anyone can actually manufacture the similar thing. But you will notice that this shield has a few missing items from the original design i.e. the two 0.1uF Capacitors. Adafruit no longer produces this shield but instead sells an updated version that is stackable.

0

Add a comment

Loading