Persistance of Vision using MSP 430

I have been missing for months. Exams and a new semester. But in between I worked on MPS430 to build a project from scratch. Rest is as follows…


Following is a project utilising persistence of vision for a propeller display controlled by MSP 430 G2553. 16 SMD leds were used as display and connected to micro controller via shift registers and current sinks. The setup was installed on a 2mm thick acrylic board and rotated using a 12V DC gear motor with 1000rpm. An infrared led was used as a sensor for the zero position of the system with a phototransistor used as sensor. The project used timers, comparators, interrupts and general input output function of the different pins in the MSP 430 IC, using a total of 14 pins out of 20 available on the IC. The circuit was powered using two AA batteries providing 3V and the motor powered from mains via a dc adapter.

Persistence of vision is the phenomenon of the eye by which an afterimage is thought to persist for approximately one twenty-fifth of a second on the retina. The discovery of persistence of vision is attributed to the Roman poet Lucretius, although he only mentions it in connection with images seen in a dream. In the modern era, some stroboscopic experiments performed by Peter Mark Roget in 1824 were also cited as the basis for the theory. 

A class of display device described as “POV” is one that composes an image by displaying one spatial portion at a time in rapid succession (for example, one column of pixels every few milliseconds). A 2 dimensional POV display is often accomplished by means of rapidly moving a single row of LEDs along a linear or circular path. The effect is that the image is perceived as a whole by the viewer as long as the entire path is completed during the visual persistence time of the human eye. A further effect is often to give the illusion of the image floating in mid-air. A 3 dimensional POV display is often constructed using a 2D grid of LEDs which is swept or rotated through a volume. POV display devices can be used in combination with long camera exposures to produce light writing.

Experimental Details

>Components used:

J      PCB board

J      Eagle software

J      Photo printer

J      Photo paper

J      Electric Iron

J      Electric Drill

J      Screws and nuts

J      Electronic components:

  • Ø MSP430G2553
  • Ø Phototransistor
  • Ø OMRON switch
  • Ø Capacitor 0.1u
  • Ø Resistors
  • Red SMD LEDs: used as display on the spinning propeller base.
  • Ø Shift register 74HC595
  • Ø Current Sink ULN2803 

The entire project was made in three printed circuit boards:

1.Battery board :

A PCB was designed to hold a battery holder for two AA batteries providing a total of 3V to the complete circuit. The board was connected to the rest of the circuit using jumper wires.

sadg dfsdgfd 

2. Micro controller board

This board consists of the msp430g2553 IC, a reset switch pulled up through 47K resistor, an M02 connector for power supply, and jumpers to connect the circuit to the led board. Four pins from the msp 430 were assigned to the shift register (Clock, Latch, Serial and Clear) which further controls eight leds via a current sink ULN 2803, eight pins assigned to remaining eight leds again connected through ULN 2803. A ceramic capacitor of 0.1 uF was connected in parallel with all power supply connections so as to filter noise signals.


3.Led board:

The led board was designed using sixteen smd leds due to constraint of space, connected in series with smd resistances of value 100 ohm each. Jumper wires from the microcontroller board connect the shift register and currents sinks in this board to the msp430 IC.

ZLKdjdjg wiaesijfdskljfaldsk 

All project schematics and the board layouts were laid out using the EAGLE software.

EAGLE (Easily Applicable Graphical Layout Editor) by Cadsoft is a flexible and expandable EDA schematic capture, PCB layout, and CAM program widely used since 1988.

The entire setup was installed on a 3mm thick acrylic sheet and hooked on to the dc motor supported by a wooden base.



The IR LED and dc motor are powered separately by the mains using a 12V 500mA adapter. The boards were positioned keeping in mind torque considerations. All three pcbs together weighed 117 gms. The load rpm of the motor was found to be 380 rotations per minute.

POV msp430


An optimized code was developed for the above described hardware using CCS: Code Composer Studio. CCS is an Eclipse based integrated development environment (IDE) that supports all MSP430 devices and all other TI embedded products.

First the pins DVCC and DVSS are connected with power supply and ground with a ceramic capacitor in parallel to cancel noise signals. P1.6 is defined as input for the phototransistor which in turn provides for the interrupt for comparator and consequently executes the ISR (interrupt service routine) for the comparator. Four GPIO (General Purpose Input Output) pins are set as output for the four inputs of the shift register: Clock, Latch, Serial, and Clear which are further to the leds via the current sinks. Eight pins are again set as output for other eight leds connected to the processor via current sink.

The code starts with defining various variables as different bits used to control the shift register, the current sink and sensor input pin.

Various functions are defined to control the clock pulse, latch and serial of the shift register.

In void main: The watch dog timer is disabled to prevent system reset and to enable manual control over other interrupt intervals. The system frequency is set at 1 MHz and SMCLK (sub main clock) is used as input for the whole code. Various pins at port 1 and port 2 are defined as output and input as per their corresponding functions. The comparator control register is modified to generate an interrupt and execute ISR as and when the phototransistor crosses the line of sight of the IR LED.

Next, user defined functions were created for the custom 8×5 font displayed via the leds. These functions are invoked in the comparator ISR. Suitable delay was calculated for each led column utilising the fact that the dc motor, with load, rotates at 380rpm and the distance of each led from the centre is a constant.

CCS Code:

(You can request it if you like, its pretty long to post as text)





  1. TI = Texas Instruments
  2. PCB = Printed Circuit Board
  3. LED = Light Emitting Diode
  4. MSP 430 =16-bit microcontroller platform of ultra-low power RISC mixed-signal microprocessors from TI
  5. ADC = Analog to Digital Convertor
  6. UART = Universal Asynchronous Receiver Transmitter
  7. SPI = Serial Peripheral Interface
  8. I2C = Inter Integrated Circuit
  9. SMD = Surface Mount Device



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s