Project: Seven Segment Display and an Arduino Mega

Seven Segment Display standing on a table

Everyone has one in their house, a clock on your VCR you never set, a timer on your cooker or your microwave, a digital clock. The seven segments of LEDs that light up to form numbers are made up of Seven Segment Displays.

There are all sorts of projects you might want to add these to, but this is a basic introduction with one number.

The pins on these displays may differ, on mine, the first pin did nothing and the middle pin on the top and bottom connected to ground. Each of the other pins was a positive for a different segment on the display.

Seven Segment Display in Breadbord

First things first, look up the data sheet of your display and figure out how much current and voltage it should take, no point burning it out. You will probably need to hook up a resister for safety.

I’m using an Arduino Mega, but you could do it with any Arduino boards or a Raspberry Pi.

Put the display in a breadboard so each pin can be powered separately and first wire up the ground with a resister, then connect it to the Arduino ground.

Then, connect a jumper line to the 3.5V on the Arduino and connect it to each pin on the Display in turn. If everything works, each segment should light up as you power it up.

Seven Segment Display in Breadboard, being tested

To make it more interesting, wire up each segment to a digital pin on the board. For Arduino, I used pins 1-7, which is a bit interesting.

Seven Segment Display with all pins connected to Arduino

Firstly, you can’t connect pin 0 or pin 1 to anything while the sketch is uploading to the board. Once the program is uploaded, you can then connect these pins.

I used pins 1-7, and connected them to the display, skipping the ground pins.

The below code has 2 parts, and is derived from the blink program.

 

// the setup function runs once when you press reset or power the board

void setup() {

pinMode(7, OUTPUT);

pinMode(6, OUTPUT);

pinMode(5, OUTPUT);

pinMode(4, OUTPUT);

pinMode(3, OUTPUT);

pinMode(2, OUTPUT);

pinMode(1, OUTPUT);

// for each pin we want to use, we need to set it to output.

}

// the loop function runs over and over again forever

void loop() {

digitalWrite(7, HIGH); // turn on whatever segment is connected to pin 7

digitalWrite(6, LOW); // turn off whatever segment is connected to pin 6

digitalWrite(5, HIGH);

digitalWrite(4, LOW);

digitalWrite(3, HIGH);

digitalWrite(2, LOW);

digitalWrite(2, HIGH);

delay(4000); // wait for a 4 seconds

digitalWrite(7, LOW); // now whichever segment is connected to pin 7 will turn off

digitalWrite(6, HIGH); // now whichever segment is connected to 6 will turn on

digitalWrite(5, LOW);

digitalWrite(4, HIGH);

digitalWrite(3, LOW);

digitalWrite(2, HIGH);

digitalWrite(1, LOW);

delay(4000); // wait for 4 seconds

}

The display is really simple, it is made up of seven LEDs and you can turn on and off each part at the same time to from numbers. This is a basic introduction, you can add more displays for more advanced features.

Project: Skull Radio Box

IMG_20150426_171137

This blog post is written by our member Jeffrey Roe about his Skull Radio Box Project.

The Skull Radio Box came out of the frustration demonstrating the bone conduction kits at the Big Day Out. The kits are great for workshops but in a show and tell type of stand they just are not user friendly. They need an audio source hooked into them and just not appealing to members of the public to bite on a metal rod with lots of wires hanging out of it.

 

 

B9KYBxhCMAAQzp-

I first found out about bone conduction from David McKeown at Artek Circle (Photographed right) and tried it out with a spoon in my mouth.  Months later, I then worked with Sinead Mc Donald to create the Guzman Box. Internally, it used a Kitronik amplifier kit to create the bone conduction effect. During its stay in the Lexicon Library for Soundings, the TBA820M IC burned out twice. The main cause was due to heat. The IC had no heatsync and would burn if left on for too long.  Jump forward a few months, I used bone conduction again during Spectral Forms a week long residence in the Science Gallery. We looked for a fun way to play back the audio of people’s brain waves, that we were capturing with an EEG unit. We again faced problems with the kits being too quiet for the loud gallery setting. Finally, we used them as a demo at the Big Day Out, people loved the demo but not the look of the device. All these led to creating a stand alone, demo dubbed the Skull Radio Box.

 

The Build

IMG_20150404_191128.jpgIMG-20150405-WA0008.jpegThe case was the first part of the project.  I started out with Maker case website to create the general box. I then moved into Inkscape to do all the other parts of the design. After a few prototypes in cardboard, I was ready to cut out the final box in  5mm plywood. As the project came out of the laser cutter it looked perfect but when putting together the box with the finger joints, it was clear it did not fit together. Two hours later, using a file,  sand paper and just a little hot glue, the box was all together.

Continue reading “Project: Skull Radio Box”

Workshop: Moar LilyPad (Sensors and Actuators edition)

Protosnap LilyPad Arduino Board
Protosnap LilyPad Arduino Board

This is the second part of the LilyPad workshops. This one focuses on mastering more involed actuators, and learning to get data from the many sensor components. Basically, you’ll be able to get your project to respond to the world around it. Imho, this is what makes e-textiles and wearables so exciting.

Content;
This second workshop is for people who have used the LilyPad or Arduino before. At least to blink an LED or two. Focusing on input we’ll look at using light sensor, temperature sensor, and accelerometer. And if we’ve time on output using the vibration motor and buzzer board.
We’ll also take a quick look at multiplexing, both input and output, and making your own interfaces to connect regular electrical components to your LilyPad circuit.
The only thing you’ll need to bring with you is a laptop with USB port, everything else is provided. (If you want to bring your own LilyPad components that’s great, just let us know when you’re booking and we’ll make sure you have everything you’ll need.)

Important: please bring your own laptop with USB port. Closer to the event you will receive instructions on how to install the programming environment.

Optional materials; Any LilyPad board (preferably the Protosnap), with sensors (e.g. light, temperature, accelerometer) and actuators (e.g. vibration motor, buzzer board).
If you want to play with the LilyPad before buying, Protosnap boards can be provided for the duration of the workshop, but you’ll probably have to work in groups of at least two people.

When: Thursday, February 13th. From 7pm until 10pm.

Where: TOG.

Cost: €10 for non-members, €5 for members. (All proceeds go to support TOG.)
Please register for this workshop through the contact form below the cut.
If you’ve missed your chance to sign up for the workshop, please keep an eye out for a rerun in the next few months.

Workshop: Intro to LilyPad (aka twinkly LEDs edition)

Protosnap LilyPad Arduino Board
Protosnap LilyPad Arduino Board

Once more into the workshops dear friends! This first workshop will focus on getting used to the LilyPad microcontroller, and getting started programming some LEDs.
(The second workshop will focus on reading data in from sensors. A third workshop will be added if requested. Book your place on them as the posts go up.)

Content;
The first workshop is for complete beginners; an introduction to the LilyPad system, from what the different parts of the board do, to some basic coding, and turning on/off some lights. The only thing you’ll need to bring with you is a laptop with USB port, everything else is provided. (If you want to bring your own LilyPad components that’s great, just let us know when you’re booking and we’ll make sure you have everything you’ll need.)

Important: please bring your own laptop with USB port. Closer to the event you will receive instructions on how to install the programming environment.

Optional materials; Any LilyPad board (preferably the Protosnap), with a handful LEDs, including an RGB LED, and a switch or two.
If you want to play with the LilyPad before buying, Protosnap boards can be provided for the duration of the workshop, but you’ll probably have to work in groups of at least two people.

When: Thursday, January 30th. From 7pm until 10pm.

Where: TOG.

Cost: €10 for non-members, €5 for members. (All proceeds go to support TOG.)

Please register for this workshop through the contact form below the cut.
Fully booked. Please check back for a rerun of the course in a few weeks.