Check out the NEW stars of the Idiot’s Guides series!

Browse Quick Guides by Subject

How to Make a Seven-Segment Display

How to Make a Seven-Segment Display

Share this with your friends

Microcontrollers (also referred to μControllers, MCUs, μCUs) have changed the game for electronics hobbyists and students. These devices bring the programmability of computers to embedded devices. Are you curious about what a microcontroller can do? Well, the possibilities are limited only by your imagination. Before you take on the world, it is best to get your hands on a few simple projects. We’re going to walk you through creating a simple 7-segment display, the familiar digital readout of the digits 0-9. Where you take this is up to you, but it is a great way to develop the confidence to try your hand at other projects already out there or to start out creating your own.

What Kind of Controller Should I Use?

There are a wide range of sensors and motors that can be controlled by a microcontroller readily accessible at reasonable costs. There are sensors that can detect light, temperature, gases, infrared, sound, and even radioactive decay. The microcontrollers can turn on lights and sounds, and control motors to drive wheels, gears, and pulleys; it is you connecting the inputs and the outputs and writing the code in between that really challenges the hobbyist to create and control.

There are many controllers available for the hobbyist market including the Arduino and the PIC microcontroller. We have chosen to use the Netduino microcontroller because it uses the .NET development platform which we feel to be a more accessible and incredibly robust programming environment.

Supply List

We are linking to Sparkfun, but there are several on-line electronics components suppliers:

How to Make the Display

  1. Download the software to install the programming tools for your Netduino. You will need to follow the set up on this page to install the programming tools needed for this project. We recommend that you follow the first project on the site which is Netduino’s variation on “hello world,” “blinking an LED.” Our project is a variation on what you have just learned in that first project.
  2. Use the schematic to show how you connect the pins of 7 segment display to the pins on the Netduino.
  3. Use the schematic to show how you connect the pins of 7 segment display to the pins on the Netduino. Make sure to include the resistors as shown. We are using a Common Anode LED, so connect pins numbered 3 and 8 of the 7-segment display to the 5v pin on the Netduino.
  4. We are using a Common Anode LED, so connect pins numbered 3 and 8 of the 7-segment display to the 5v pin on the Netduino.
  5. Open this .cs file to get the code for this project. Be sure to set your project properties for “deployment” “transport” from emulator to USB. We have used our code to set the other pins to LOW or False to turn on the different segments to display the different digits. For example, if we want to display the number 0, we need to set all but one segment (labeled G in our schematic) to light up. We set that one segment to true so if is off and the other segments light up, the digit zero will display. You can then create all of the other digits by setting the different segments to be on or off by changing the outputted voltage to be high or low.
  6. Be sure to set your project properties for “deployment” “transport” from emulator to USB.
  7. Send the code to your Netduino by pressing the F5 key or the play button and let it run.

“Using a Netduino microcontroller to control a 7-segment display”

There are lots of microcontroller projects out there for hobbyists, and many give detailed step-by-step instructions. But if you take the time to learn the theory of electronics, the function of the components, the architecture of the systems and you are in the driver’s seat. The resources are out there, online and in classrooms; in books such as ours and in online video courses. Join your local maker community or participate in online forums to learn from those who are creating around you, and when you create something new, share it with others.

by Sean Westcott and Jean Riescher Westcott, authors of The Complete Idiot’s Guide to Electronics 101