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


If I were rich

Now there are two aspects to that statement .
– did I come into a lot of money in the last couple of days?
– was I born rich?

Rich here doesn’t apply to mental satisfaction or monetary resources sufficient to buy an iPhone 5 , MacBook pro or a playstation. God the playstation has been on my mind for as long as I can remember. Or even the mental satisfaction of owning such resources itself. Rich ,here, doesn’t apply to a personal credit card either. We are talking about filthy rich. Or so was my interpretation in the thirty seconds I was given before my ‘performance’.

If I were rich…considering the first possibility, I’d buy …everything. Literally everything . I don’t think my mind is going to be stable enough to think along the lines of charity. I would buy the playstation, the xbox, wii, gamecube, and the official edition of every game I have ever played. Even if I already own a copy, I’d just buy it again. Heck I am filthy rich ,aren’t I ?

‘This is definitely one of my top choices’

I’d buy the crap out of all clothes stores out there. No more long lines in the trial room on weekends. I’d buy an Audi r8. Oh hell I’d just buy the company itself and get them to build me a bat mobile. I’d buy every book out there. Every music record.

‘Not the  dalmatian pony.’
Why should I care about charity or even my family. Right? Isnt that the first thought stream that would actually pop in my head if this were a real situation?

Money is like blood ; hard earned money is made of blood and sweat. ‘free’ money is just blood. Once a beast tastes it, not even an entire populous could quench it’s thirst. And a beast with blood in his head doesn’t stop , never stops yearning for more , doesn’t share it. Not even with it’s own brethren. Its like a poison that eats you slowly, from the inside, driving you insane with a longing so deep, you don’t think once before harming others.

And other than behaving like a man eating tiger cub

or a cat…….a rich cat,

I might donate a couple of grand here and there and tour the world with me mum and dad and Liena . And live the rest of my life buying things like crazy and distributing the useless ones for free. Ya , I know I’d do that. All in all , I will try and make sure that the money which I so happily accepted in the hope of improving the quality of my life doesn’t destroy it.

The second possibility , if I were born rich . Now that is a little hard to imagine seeing as how I wouldn’t be the person I am today if I were, in fact, born rich.

I am happy for everything life has provided me with. And I am glad I wasn’t born rich. You don’t appreciate the lesser things in life unless and until you are brought to that level. I would have never known the feeling of sleeping on box beds, shifting every two- three years as is the ritual when you are from a defense background. I would’ve never known the taste of that pao bhaji in the not so classy school canteen . Or the joy…., maybe not joy and I was actually forced into that situation, of riding in a city bus with my fellow country men. I would’ve have never known the face of the father of our nation on the currency notes , because I wouldve been using credit cards…
Ok so maybe they aren’t exactly precious memories , but I am thankful for the way life has treated me. A lot of people have it much worse . And if I ever do come into a lot of money, I think I’ll just hand it to my mum. She’ll know what to do with it.

Then there arises another question…’when I become rich’.
Hm…that’s a different story altogether?

Any thoughts?


I was given this topic as a part of an english extemporary.
Other than the things I blurted out on impulse (which was only a fraction of what was said above), the experience helped me discover a lot of things about myself. Like how I can’t speak fluently in front of a crowd of 5 or more people for more than forty seconds. I actually stood there like an idiot for the remaining time despite the judge’s attempts to prompt me to say something …………