ECE 4760: Final Project

Remote Controlled POV Display

Yuan Cui (yc969@cornell.edu)

Jin Sha (js2839@cornell.edu)

Introduction    top

For our ECE 4760 final project, we designed and implemented a remote controlled persistence-of-vision (POV) display that is able to display multiple patterns based on remote input. The display is consisted of a rotor and a motor. A row of LEDs and a microcontroller sit on the rotor. The basic theory behind POV is that if LEDs flash at the exact same location on each revolution and the motor is rotating fast enough, human eye is not able to detect the LEDs’ downtime between flashes, and has the perception that they are constantly on. The LEDs are controlled by the microcontroller. The goal of this project is to implement a portable POV display for home entertainment or decoration. Therefore, weight, size and balance play crucial roles in our design.

High Level Design    top

Mechanical

Top View of Our Display

The stand of the system is a square box where the DC motor is located. The motor has its shaft sticking out of the box to the middle of the box surface. Two layers of coils sit around this shaft. The inner coil closely wraps around a plastic cylindrical structure that can accommodate the motor shaft. This structure is also glued to the bottom of the rotor. When motor spins, it drives the cylindrical structure to spin along, hence the rotor. The rotor has two different circuit boards that are put together with two wood beams glued to them for support. One circuit board is the microcontroller PCB, and the other is a electrical board where LEDs are soldered.

Hardware

There are mainly two parts of the hardware design, motor circuit and rotor circuit. Motor circuit is powered by 5V generator while the rotor circuit is powered by a small transformer which has an outer coil and an inner coil. The rotor sits on the motor’s shaft and the shaft is surrounded by inner coil and outer coil. With the help of transformer, a battery is no longer needed to power rotor circuit, thus cutting down the weight of rotor. Motor circuit sets up the Infrared LED for the Infrared (IR) receiver to detect cycle time, time required for one rotation. It also converts the DC from a DC generator to AC. The AC flows in the outer coil and induces an AC in the inner coil. The rotor takes the AC and does a conversion to DC to power the microcontroller and the LEDs. The rotor also has two IR receivers, one of which is used for detecting a complete cycle and the other one is responsible for receiving remote control.

Software

The software allows us to generate different display patterns: a static heart image, an analog clock, a modifiable digital clock and a rotatable phrase “ECE4760 JS-YC”.

Our POV has a 2-degree resolution. This is achieved by splitting cycle time into 180 time intervals. Every 1/180 of this time, LEDs are switched. There are two files for our software design. One is main.c and the other is IR_Receive.h. IR_Receive.h detects key press from the remote control. Main.c displays according to corresponding key press. There are four timers and two external interrupts used for this project. Two of the timers, timer1 and timer3 are responsible for the 2-degree resolution. Timer0 generates a 1us timebase. Timer2 is used for IR communication between remote controller and IR receiver on the rotor. External interrupt 0 is used to indicate end of cycle and external interrupt 1 is used to receive signals from remote controller.

Hardware Design    top

Our hardware design is primarily consisted of two components and worked on together by the members.

Motor Circuit

Motor Circuit Schematic

Voltage of Primary Coil after DC to AC Conversion

The motor circuit has four parts: 5V DC power supply, motor, infrared transmitter and LC circuit. The motor is connected to the power supply through a diode, preventing the reverse current generated from the motor when shut down from damaging other electrical components in the circuit. The infrared LED combined with the receiver on the rotor side is used to detect the cycle time of rotor. It has a 470 ohm resistor connected to it for protection. The generator is connected to a 470uf capacitor for stabilization. The most important part in the motor circuitry is the LC circuit that converts DC to AC. A LC circuit can store energy oscillating at its resonant frequency 195kHz. The power transistors used in the circuit are there to amplify signals and compensate power loss in the circuit. The outer coil is the inductor in the circuit and it outputs a 5 volt AC voltage. The power efficiency of such transformer is calculated to be (5V * 0.1A) / (5V * 0.35A) = 28.6%.

Rotor Circuit

The rotor circuit has many parts connected together, the microcontroller, LED array, AC to DC convertor, and Infrared receiver.

The four diodes that are connected to the inner coil form a full wave rectifier that is able to convert AC input into voltage with only one polarity. This single polarity voltage gets stored in a 220uf capacitor, and a zener diode works as a voltage regulator to stabilize the output voltage of the capacitor to 5 voltages. The 5 volt DC voltage is fed into the Vcc port of microcontroller to provide power.

The IR receiver corresponding to the IR transmitter in motor circuit is connected to Vcc through a 10k resistance. 10k resistor lowers the current in that branch. The positive lead of the receiver is connected to Vcc via a resistance and the external interrupt port PORTD2 while the negative lead is connected to ground. Under normal operation, the receiver is open. PORTD2 is always high. When it receives from the transmitter, it closes and pulls PORTD2 low. The external interrupt 0 is trigger on falling edge. It is used to calculate cycle time.

Another IR receiver is used to receive inputs from the remote control. It has three connections, Vcc, Gnd and Xin. The Xin is connected to the other external interrupt port PORTD3 on the microcontroller board. The theory behind remote control is that each key on the remote controller sends a sequence of 0s and 1s. The 0 and 1 differ from their pulse width. 0s last 0.57ms while 1s last 1.68ms. Each key is composed of 32 pulses. The microcontroller uses external interrupt to reconstruct the 32 bit key press. This second external interrupt triggers on falling edge of those pulses.

There is a row of LEDs on one side of the rotor. Each LED’s positive lead is connected to a pin on microcontroller and negative lead is connected to ground via a 330 ohm resistor. The 330 ohm resistor is there for protecting the LED. There are 21 LEDs in total, out of which 20 are blue colored and one is red colored. The red colored LED is the outmost LED and is responsible for producing the outer frame of the display. It is constantly on once the power-on button is pressed. The red LED is a normal LED used in previous labs. It has long leads and stands higher than the rest. The difference in height creates a 3D effect. The LEDs are mapped to all pins for PORTA and PORTB, and some pins of PORTC. Each port on this microcontroller has 8 pins.

The principal component used in our project is the Atmel ATmega1284P microcontroller. This microcontroller has countless features and functions. The pertinent features that we exploit are listed as below:

  • PORTA, PORTB, PORTC accounting for controlling 21 LEDs
  • Two external interrupts for IR communication
  • 4 internal timers, timer0-timer3
  • 2 timer compare match ISR