Project showcase
Ultra Flat Screen

Ultra Flat Screen © GPL3+

An ultra flat screen built out of single row of LEDs.

  • 1,514 views
  • 1 comment
  • 5 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
4966285
Solder Wire, Lead Free

About this project

Ultra Flat Screen

An LED screen with just one row of LEDs based on persistence of view.

The idea behind this project is that a moving row of LEDs may serve as a screen. If the row of LEDs is mounted on a spring, the row will move up and down on the resonance frequency of the mass/spring system. To produce a figure or a message, the individual LEDs in the LED row should shut on and off depending on the position of the LED row. This position will be measured by a phototransistor placed on the LED row, that receives light from a stationary light source (another LED). If the phototransistor is close to the light source, the current through the transistor will be high, if the phototransistor is far from the light source, the current will be low.

In order to reduce the amount of operations, I decided to directly access the output ports of Arduino. As communication via the serial port proved to be very handy during trouble shooting of my earlier projects, I decided to not use these outputs. This way I had 12 digital outputs left. I decided to store the state of the LED’s in an unsigned integer (two bytes). With highByte() I can access the least significant bits that will store the state of the LED’s connected to ports 2 till 7 (set via PORTB), with lowByte() I can access the most significant bits that will store the state of the LED’s connected to ports 8 till 13 (set via PORTD).

The distance sensor will be built of a LED that sends light to a phototransistor. The LED will be in a stationary position, the phototransistor will travel with the LED screen. As the phototransistor moves away from the LED, the light received will drop and thus the current through the phototransistor will decrease. This is measured via analog input A1. Through a rather tedious analysis, I proved that the distance is directly proportional to the reciprocal of illumination.

The quality is not great, but it works!

Ultra Flat Screen

Code

Ultra Flat ScreenC/C++
Sends message to row of LEDs mounted on a spring.
void setup() {
  // put your setup code here, to run once:
  DDRB = DDRB | B00111111;
  DDRD = DDRD | B11111100; //set digital ports as output

  PORTB = PORTB | B00111111;
  PORTD = PORTD | B11111100; //put all small LED's to sleep


  pinMode(A1, OUTPUT);   
  digitalWrite(A1,1);  //set A1 to feed position measurement  
  pinMode(A2, OUTPUT);   
  digitalWrite(A2,1);  //switch on LED distance measurement

  pinMode(A0, INPUT);  //set A0 to monitor phototransistor
  
  Serial.begin(9600); //just in case we need this for trouble shooting
  delay(1000);

}

unsigned int nf    [8] = {256*B00000000+B00000000,
                          256*B00111110+B10000100,
                          256*B00100000+B11000100,
                          256*B00100000+B10100100,
                          256*B00111100+B10010100,
                          256*B00100000+B10001100,
                          256*B00100000+B10000100,
                          256*B00000000+B00000000
                         };
                          
unsigned int heart  [8] = {256*B00000000+B00000000,
                           256*B00001110+B11100000,
                           256*B00011111+B11110000,
                           256*B00111111+B11111000,
                           256*B00001111+B11100000,
                           256*B00000011+B10000000,
                           256*B00000001+B00000000,
                           256*B00000000+B00000000
                           };

unsigned int v      [8] = {256*B00000000+B00000000,
                           256*B00100000+B00000100,
                           256*B00010000+B00001000,
                           256*B00001000+B00010000,
                           256*B00000100+B00100000,
                           256*B00000010+B01000000,
                           256*B00000001+B10000000,
                           256*B00000000+B00000000
                           };





void loop() {
  byte curPos = measPos(); //read position
  toScreen(nf[curPos]); //send message as function of current position
  //delay(100);
}


//write message to screen
void toScreen(int msg) {
  PORTB = ~highByte(msg); //LEDs are common anode!!!
  PORTD = ~lowByte(msg);
}

//measure position
byte measPos() {

  unsigned int E = analogRead(A0);  //read phototransistor
  
  //select valid range
  const unsigned int Emax = 800;
  const unsigned int Emin = 600;
 // Serial.println(E);
  if (E <= Emin) return 0; 
  if (E >= Emax) return 0;

  //linearize valid range
  const unsigned int maxInt = 65535; //maximum value in two byte integer (2^16-1)
  const unsigned int recEmax = maxInt/Emax;
  const unsigned int recEmin = maxInt/Emin;
  const byte numPos = 8;
  unsigned int recE = maxInt/E;
  byte measPos = (recE - recEmax) * numPos / (recEmin - recEmax); 
  //measPos = (1.0/E-1.0/Emax)*numPos/(1.0/Emin-1.0/Emax); 

  //Serial.println(measPos);

  return numPos-measPos-1;
}

Schematics

Ultra Flat Screen
Mount row of LEDs on a spring. It will produce 2 dimensional pictures.
Img 0189 usdpzzxrys
Ultra Flat Screen Fritzing
ultra_flat_screen_xpHKc3Jc40.fzz

Comments

Similar projects you might like

Konica Minolta MFP Touch screen use with Arduino Uno

Project showcase by DoubleG

  • 1,081 views
  • 0 comments
  • 5 respects

Flat Panel Switchboards

Project tutorial by Kirthik vasan

  • 1,430 views
  • 2 comments
  • 13 respects

Thirst Alert Plant Alarm

Project tutorial by Patchr

  • 4,415 views
  • 3 comments
  • 39 respects

Ambilight Clone: Smart Screen Backlight

Project in progress by Dan Fein

  • 10,753 views
  • 1 comment
  • 16 respects

Face Tracking Camera

Project tutorial by Little_french_kev

  • 13,371 views
  • 15 comments
  • 74 respects

Solar Tracker 35W with DC Motors

Project showcase by DemetrisEng

  • 9,945 views
  • 5 comments
  • 45 respects
Add projectSign up / Login