Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Arduino Shield Tutorial – Make Your Own LCD Keypad Shield

Arduino Shield Tutorial – Make Your Own LCD Keypad Shield

Watch the Video Tutorial

Arduino shields are boards that can be plugged on top of the Arduino PCB to extend its capabilities. This makes prototyping with Arduino plug and play. Instead of soldering or wiring external devices or sensors, you can simply hook your board with a shield. This speeds up development time even for absolute beginners.

There are hundreds of shields out there. Whether you want to connect your board to the Internet, Control motors, switch high voltage devices or wireless communication like Wi-Fi or Bluetooth, there is a shield for that.

This is another practical tutorial, we’re gonna build a fully working complete Arduino LCD Keypad shield, we’re gonna go through all the steps, we’ll start from scratch explaining and simulating the circuit diagram in Proteus, then we’re gonna create a Printed circuit Board with Eagle but any PCB design software can also be used, then we’re gonna generate the manufacturing files to manufacture the PCB with PCBWay our favorite low cost PCB manufacturing company and finally were’re gonna test the operation of the shield with a simple arduino sketch.  These same procedures can be used to build any Arduino Shield of your choice.

There are many reasons why you should make your own Arduino shields instead of buying one as we have explained in the Building your Own Arduino Relay Shield tutorial , mainly because they are easy to make these days with open source hardware and libraries you can refer to, you can customize your own shield to meet your own requirements especially if there is no one out there meeting your requirements and above all, it getting cheaper and cheaper to get quality Printed Circuit Boards these days. There are so many options available now, you just need to partner with a correct PCB manufacturing house.

Make Your PCB Cheaper with PCBWay

Making your own Arduino shields could be cheaper than buying one especially for a specialized shield not common on the market. The price of standards electronic components are relatively cheap, the only notable price could be for your PCB or component assembly if opting for SMDs.

Luckily, you don’t have to pay a fortune these days for a quality professional PCB, the same for SMD component assembly.

There are many PCB companies in the world that can make you good quality PCBs, for prototype and for starters, we need a company that can produce cheap boards of high quality on small orders because the first batch of any project is likely be of small quantity. One of those companies we can recommend is PCBWay.

PCBWay is a china based PCB manufacturer specializing in PCB prototyping, small volume production and PCB assembly service all under one roof with more than a decade of experience.

As they are specializing in prototyping and small orders, you can get PCBs even on small numbers for a relatively reasonable price for just $5 USD you can get 10 high quality PCBs (size: 100mm x 100mm or smaller). You can pick between these solder mask colours at no extra cost: Green, Red, Yellow, Blue, white and Black. You can also get the price instantly with the online Instant quote as shown on figure 1 below.

PCBWay Home pageFigure 1: PCBWay Instant Quote

To learn more about their services and place an order online, please click on the link below:

PCBWay: https://www.pcbway.com/

Arduino LCD Keypad Shield Schematic

Arduino LCD Keypad Shield Eagle Schematic

Figure 2: Student Companion LCD Keypad Shield Circuit Diagram

Any PCB Schematic design software can be used. In this project we used EAGLE due to its simplicity and free (the free version has some limitations but for simple 2 layer boards like this one, those limitations won’t affect us). 

PCB design in EAGLE is a two-step process. First we’re gonna design the schematic, then lay out the board based on the schematic.

On the left is our voltage divider. A voltage divider is a simple circuit that can turn a large voltage into a smaller one. To save digital pins on the arduino board, multiple buttons can be connected to a single analog pin.
The way it works is very straightforward: use a resistor network as voltage dividers, and then let each button feed a different voltage to the analog pin. Thus by detecting the voltage we can tell which button has been pressed. All our buttons will be connected to arduino analog 0 in this shield.
We have labeled these buttons Select, Down, Right, Up and Left

A 2 x 16 character LCD is used, the RS pin of the LCD is connected to Arduino digital 12, the RW to ground and the Enable pin to digital 11. The LCD data pins are connected to arduino digital pin 2 to 5.
A potentiometer will control the contrast of the LCD.

We’re gonna have a reset button on our shield because the arduino’s button will be covered by the shield.

We’re gonna have 2 LEDs on the shield, one will be a power indicator and the other will be connected to Arduino pin 13 to mirror the on-board pin 13 which will also be hidden by the shield. All LEDs have current limiting resistors as learnt in previous tutorials.

Start with a new EAGLE Project. In the control panel, under the “Projects” tree, right click on the directory where you want to save your project, we prefer to use the default EAGLE directory. Select “New Project”. Give it a meaningful name.

To add a schematic to a project folder, right-click your project folder, hover over “New” and select “Schematic”. Add the parts using the the ADD Tool and design a schematic like the one on figure 2 above.

We used the Sparkfun EAGLE libraries, you can get the Arduino board under Boards – SparkFun.

Board Layout Using EAGLE

From the schematic editor click the Generate/Switch to Board command in the toolbar or Switch to Board under the File menu. This will prompt to create a new board based on the schematic when switching to board from the first time. All of the parts you added from the schematic should be there, stacked on top of each other, ready to be placed and routed.

Place all the parts using the MOVE tool on the blank board and route all the airwires. The board is small can be easily routed manually using the ROUTE tool.

LCD Keypad Shield Board Layout

Figure 3: Student Companion LCD Keypad Shield Board Layout in EAGLE

We routed the traces on Top layer (Red colour) and Bottom layer (Blue colour). We also added some Text on Top and Bottom Silk layers.

Generating The Gerber Files

The final stage of the PCB design is to generate the Gerber files that we can send to our manufacturing house to build our boards.
Gerber files contain the data about the PCB, where traces, pads, holes are placed, their width and so on.

Although it’s easier to generate Gerber files with Eagle, it comes with a couple default *.cam template files that you can use. There is also an easier way to generate Gerber files from PCBWay, the company we use to manufacture our Printed Circuit Boards. Just upload your Eagle board file *.brd to this link:  https://www.pcbway.com/member/brdtogerber.aspx , their online converter supports Eagle boards from 1 to 10 layers. You can also see how you PCB will look like with this tool. Figure 4 below shows the LCD Keypad Shield Top Layer.

LCD Keypad Shield Eagle Top LayerFigure 4: Student Companion LCD Keypad Shield Top layer

The last step in PCB design is to manufacture the actual board, even though you can do it yourself, this is a simple board after all, but for rapid prototyping or for commercial products it’s always a must to use specialized reputable PCB manufacturer instead of doing it yourself.

As we explained above, we recommend PCBWay, they produce cheap boards of high quality on small orders. You can complete your order online at this link:

PCBWay: https://www.pcbway.com/

Below on figure 5 is the Complete Student Companion LCD Keypad Shield with Components.

Student Companion LCD Keypad Shield Complete

Figure 5: Student Companion LCD Keypad Shield

Testing the LCD Keypad Shield

The LCD displays LcdKeypad Shield on the first like and StudentCompanion on the second line. By pressing each button it will be displayed on the LCD: Left, Down, Right, Up and Select. If the reset button is pressed LED1 will flash as well.

Testing LCD Keypad ShieldFigure 6: Testing Student Companion LCD Keypad Shield

Here below is our test Sketch.

 

Share this post