Neeraj Rane
Published © CC BY-NC-SA

Mechanical 7-Segment Display

Make a mechanical 7-segment display using electromagnets!

AdvancedFull instructions provided3,797
Mechanical 7-Segment Display

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Power MOSFET N-Channel
Power MOSFET N-Channel
×7
1N5408
×7
Resistor 10k ohm
Resistor 10k ohm
×7
Resistor 100 ohm
Resistor 100 ohm
×7
Neodymium Magnet
×7

Software apps and online services

Fusion
Autodesk Fusion
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

bobbin_cap.stl

bobbin_mainbody.stl

face.stl

segment.stl

limiter.stl

case.stl

Schematics

Schematic_7Seg

Code

SevenSegmentShift.ino

Arduino
int latchPin = 8;    
int dataPin  = 11;   
int clockPin = 12;   

int i = 0;

/*               A
 *          __________
 *         /         /
 *     F  /         /  B
 *       /____G____/
 *      /         /
 *  E  /         /  C
 *    /_________/ 
 *        D
 */
  
//Order of Bits - A,B,C,D,E,F,G
//Last bit is not used
byte digit[] = {B11111100,  //0
                B01100000,  //1
                B11011010,  //2
                B11110010,  //3
                B01100110,  //4
                B10110110,  //5
                B10111110,  //6
                B11100000,  //7
                B11111110,  //8
                B11110110}; //9

void setup(){
  pinMode(dataPin, OUTPUT);       
  pinMode(latchPin, OUTPUT);      
  pinMode(clockPin, OUTPUT);      
}

void loop(){  
  for (i = 0; i < 10; i++){
    digitalWrite(latchPin, LOW);                                           
    shiftOut(dataPin, clockPin, LSBFIRST, digit[i]);                        
    digitalWrite(latchPin, HIGH);                                        
    delay(1000);
    }
}

Credits

Neeraj Rane

Neeraj Rane

18 projects • 47 followers
Electrical Engineer and a Maker from India. Engineering is fun once you start applying it!

Comments