LED display cricket scoreboard final doc

LED display cricket scoreboard final doc - TABLE OF...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TABLE OF CONTENTS 1. INTRODUCTION ______________________________________________________ 3 2. BACKGROUND _______________________________________________________ 5 3. PROPOSED SYSTEM __________________________________________________ 9 4. DESIGN ASPECTS ____________________________________________________ 11 4.1. NETWORKING: _______________________________________________________ 11 4.1.1. THREE-WAY HANDSHAKING: ____________________________________________ 13 4.1.2. ALGORITHM: ____________________________________________________________ 14 4.2. SERIAL COMMUNICATION:____________________________________________ 16 4.3. HARDWARE DESIGN: __________________________________________________ 19 4.3.1. 4.3.2. LED DRIVER (ULN2003A): _________________________________________________ 22 4.3.3. TRANSISTOR (SK 100B): __________________________________________________ 23 4.3.4. 5. AT89C51ED2:_____________________________________________________________ 20 LEDS: ___________________________________________________________________ 24 EXPERIMENTAL ASPECTS ___________________________________________ 30 5.1. PERSISTENCE OF VISION: _____________________________________________ 30 5.2. DOT-MATRIX CONFIGURATIONS:______________________________________ 31 5.3. DISPLAY DECODING: __________________________________________________ 32 5.4. BASIC CIRCUIT DIAGRAM: ____________________________________________ 33 6. ANALYSIS ___________________________________________________________ 36 7. PROBLEMS FACED __________________________________________________ 38 8. RESULTS AND CONCLUSIONS ________________________________________ 40 9. FUTURE SCOPE _____________________________________________________ 42 10. REFERENCES ________________________________________________________ 44 INTRODUCTION 2 1. INTRODUCTION Cricket has been one of the most popular games since its birth in England. It has been a game that is known and played by many countries across the globe. India, being no exception to this, is another place where cricket is well spoken of. In spite of its national game being hockey, cricket is given even more importance. With such great honour and fame for cricket in India, cricket stadiums are expected to be equipped with the ‘state-of-the-art’ technologies and methods in order to meet the rising popularity of the game. However, very few cricket stadiums in India are equipped with the state-of-the-art techniques and only to a certain extent, if not completely. One of the steps taken in developing such stadiums is the automation of scoreboards. Scoreboards in the past used numeral cards to display the score. When a point was made, a person would put the appropriate digits on a hook. Cricket stadiums in India today use either mechanical scoreboards operated manually or electromechanical boards. Modern scoreboards however use electronic means of displaying the score. In these electronic scoreboards, digits are often composed of dot-matrix or seven-segment displays made of incandescent bulbs or light-emitting diodes (LEDs). This project is about designing such an electronic LED based Cricket Scoreboard having an official person called the official or secondary scorer, operating it from a server system. The scorer would be entering data for each ball in an excel sheet in the server and the client would be receiving the same excel sheet in a wireless LAN. The client would retrieve the required parameters such as score, wickets taken, overs bowled, etc from the excel sheet and send it to the scoreboard. Certain other parameters can also be displayed on the scoreboard upon processing the retrieved data from the excel sheet available at the client. Cricket scoreboards are used primarily for displaying parameters like the total score, overs bowled, wickets fallen, etc. However, other parameters can also be displayed on choice. Depending upon the type of cricket being played, the parameters change accordingly. The parameters for an ODI match are different from that of the test matches. However the basic parameters such as runs scored, wickets taken, runs to win, etc. remain the same. With the help of these scoreboards, the players can have a quick view of the status of the game without much difficulty. 3 BACKGROUND 4 2. BACKGROUND A scoreboard is a large board for publicly displaying the score in a game or match. Scoreboards find application in various sports such as cricket, football, basketball, baseball, hockey, motor sports, swimming, wrestling, etc. Scoreboards in the past used numeral cards to display the score operated manually by hooking up appropriate digit cards when a point is scored. Later, mechanical scoreboards came into existence. In the mechanical boards, each display character is a mechanical unit operated manually by pulling a chord fixed to a lever at the rear. Most modern scoreboards use electromechanical or electronic means of displaying the score. Prior to the 1980s, most electronic scoreboards were electro-mechanical. They contained relays or stepping switches controlling digits consisting of incandescent light bulbs. Beginning in the 1980s, advances in solid state electronics permitted major improvements in scoreboard technology. High power semiconductors like transistors replaced mechanical relays. Light emitting diodes (LEDs) first replaced light bulbs for indoor scoreboards and then, as their brightness increased, they were used for outdoor scoreboards as well. Modern scoreboards are often composed of dot-matrix or seven-segment displays made of incandescent bulbs or light-emitting diodes (LEDs). The dot matrix displays consist of a matrix of lights arranged in a rectangular configuration such that by switching on or off selected lights, text or graphics can be displayed. The matrix can be of various other shapes as well, but are not very common in use. A dot matrix controller converts instructions from a processor into signals which turns on or off lights in the matrix so that the required display is produced. This project uses LED dot matrix displays for displaying the required parameters on the scoreboard. LED displays are preferred over incandescent bulbs for the following reasons: LEDs produce more light per watt than incandescent bulbs. LEDs can have a relatively long useful life. It is estimated that LEDs have 35,000 to 50,000 hours of useful life, though time to complete failure may be longer. Incandescent light bulbs typically are rated at 1,000–2,000 hours, depending partly on the conditions of use. 5 The solid package of the LED can focus its light. Incandescent sources often require an external reflector to collect light and direct it. Dot matrix displays are chosen so that both alphabets and numbers can be displayed using them. The common size for a dot matrix character is 5x7 pixels. A smaller size is 3×5 pixels. A matrix of 11×9 is often used to give far superior resolution. LED displays last many times longer than those of light bulbs. They are not subjected to breakage, and are much more efficient at converting electrical energy to light. The newest light emitting diodes can last up to 1, 00,000 hours before having to be replaced. Advances in large scale integrated circuits permitted the introduction of computer control. The idea behind the project is to design such cricket scoreboards controlled by a computer. This involves designing the required circuitry and the software needed to operate the scoreboard in real-time. In this project, the server-client networking facilitates to operate this board in the wireless LAN environment. The scoreboard can be treated as a wireless display as the client is part of the board. The layout of the scoreboard is as shown below. The scoreboard is primarily divided into two columns. The left column consists of three parameters which are obtained directly from the excel sheet present in the client system. The right column consists of another three parameters which are displayed upon processing the parameters of the left column. 6 Data Entry: The server which acts as the host for the wireless LAN in the stadium is where the scorer is present entering data into the server for each ball. For this purpose, a Microsoft Excel Sheet is used. Microsoft Excel is a spreadsheet application written and distributed by Microsoft. It has been the most widely used spreadsheet application available. The excel sheet is neatly formatted as a score-sheet for the scorer to enter data for every ball played in the game. The score-sheet consists of 50 rows for the overs and 10 columns for the balls played in each over. Six is the ideal number of balls that are played in an over. However, due to balls that do not count officially, the number of balls bowled physically by the bowler increases. The data for every ball is to be entered in the appropriate cell. All the cells in which the result of each ball will be entered are assigned drop-down lists. The list consists of all the possible outcomes of a ball. For example, if the ball is a wide ball, then the option ‘WB’ is selected in the list of the appropriate cell. The columns showing the results comprise of the total score for every over, the number of extras given, wickets taken, etc. The picture below shows the score-sheet and its format. 7 PROPOSED SYSTEM 8 3. PROPOSED SYSTEM Fig 3.1. Block Diagram of the Proposed System The above block diagram represents the outline of the project. The server and client systems operate in a wireless LAN environment. A secondary scorer enters data for each ball at the server in an excel sheet and this file is acquired by the client system. Required data is retrieved from the excel sheet and is processed to obtain the required parameters for display. These parameters are sent serially to a microcontroller which performs the decoding operations required for the display. The display driver circuit drives sufficient amount of current to glow the LEDs in the display. The LED display board is a dot matrix display. Each character is displayed using a 5x7 matrix or a larger matrix scaled by an appropriate factor. 9 DESIGN ASPECTS 10 4. DESIGN ASPECTS 4.1. Networking: The design at the server – client system to acquire the data from the server includes the concept of Networking. The server and client are present in a wireless LAN environment. This follows the IEEE802.11 protocol. An 802.11 LAN is based on cellular architecture where the system is subdivided into cells and each cell is controlled by a base station (Access Point). Fig. 4.1.1. An example of Wireless Network The above figure shows that a network switch is equipped with a Wireless Access point, a PC and a Serial server. Laptop or desktop computers equipped with wireless cards, or other wireless devices such as wireless serial servers can communicate with each other and the wired network via the Access Point. Wireless devices connect to the switch as if they are connected via a normal network cable. 11 Even though a wireless LAN may be formed by a single cell with an access point, most installations will be performed by several cells, where access points are connected through some kind of backbone (distribution system), typically Ethernet or in some cases wireless itself does the job. Fig. 4.1.2. An example of Distributed System In our project, the implementation of the data acquisition from the server is done using a reliable connection oriented protocol (TCP) through JAVA Programming. It brings a new word in networking namely SOCKET. A socket is a network communications endpoint. Its analogy is a wire (the network data connection) being plugged into a socket. A socket is not a port, though there is a close relationship between them. A port is a logical connection between two end points to communicate. Ports operate at the Transport layer of the OSI whereas sockets operate at the application layer. A socket is one end point of a connection which can be determined by an IP address and port number. 12 The sockets are present at both the server and client. At the server, two types of sockets are present. They are welcoming socket and connection socket. The welcome socket welcomes some initial contact from a client. A connection socket is created immediately after initial contact from any client. This socket is dedicated to that particular client. At the client side, the socket named client socket initiates the TCP connection to the server. It specifies the address of the server process, namely, the IP address of the server and the port number of the process. This connection is a three-way handshake. 4.1.1. Three-way handshaking: Fig. Three way Handshaking Mechanism The server creates a welcoming socket and waits for the clients to initiate the process of transferring the data. Whenever a client socket is created, it initiates the connection to the server which is followed by the creation of a connection socket. Then the data transfer takes place between the server and client. The following function calls are defined to explain the flow of transferring the data from server to client. 1. Socket () : create a socket 2. Bind () 3. Listen () : passively waiting for connections 4. Connect (): initiating connection to another socket 5. Accept () : accept a new connection 6. Close () : close a socket (tear down the connection) : bind a socket to a local IP address and port # 13 CLIENT Socket () Bind () Connect () SERVER Socket () Bind () Listen () TCP Connection Request TCP Acknowledgment Accept () Send () Receive () Receive () Send () Close () Close () Fig. Step by Step Representation in Networking The client receives an Excel Sheet in which an official scorer enters the data for each ball. Upon receiving the excel sheet, the data in the excel sheet is extracted to a notepad which comprises of the total score, total number of overs bowled and total wickets taken. 4.1.2. Algorithm: 1. START 2. CHECK THE SERVER AVAILABILITY 3. IF YES GOTO STEP 4 ELSE GOTO STEP 7 4. RECEIVE THE FILE FROM THE SERVER 5. PROCESS THE RECEIVED FILE TO GET THE REQUIRED PARAMETERS TO DISPLAY 6. SEND THEM TO THE SERIAL PORT OF THE CLIENT SYSTEM 7. GOTO STEP 2 14 To extract the data from the excel sheet we used an API in JAVA named APACHE POI .This package provides the classes and methods for creating, editing the excel file and extracting the data from it. Some of the sample classes and methods used in extracting the data from excel sheet are:1. HSSFWorkbook 2. HSSFSheet 3. sheet.getFirstRowNum() 4. sheet.getLastRowNum() 5. sheet.getRow(int) After converting the data from excel sheet to notepad, a c-program is used to process the data to obtain the parameters to be displayed. After obtaining the parameters, the same are sent to the serial port of the client system using the same program. The FILES concept in the c-language is used to read the data in the notepad. The header file DOS.H and its functions are used to send the parameters to the serial port of the client. The function call used to send the data to serial port is outportb (). SYNTAX: outportb (port-id, data) The port id field specifies the port address and the data field specifies the data to be sent to that port. Hence the function outportb sends the data to the port specified as its argument. Sample code for configuring the client for serial communication: #define PORT1 0x3F8 //port 1 address Outportb (PORT1+1, 0) //Turn off interrupts - Port1 Outportb (PORT1+0, 0x03) //Set Baud rate-Divisor Latch Lower Byte //Default 0x03 = 38,400 BPS // 0x01 = 115,200 BPS // 0x02 = 57,600 BPS // 0x06 = 19,200 BPS // 0x0C = 9,600 BPS // 0x18 = 4,800 BPS // 0x30 = 2,400BPS Outportb (PORT1+1, 0x00) //Set Baud-rate Divisor Latch Higher Byte Outportb (PORT1+3, 0x03) // 8 Bits, No Parity, 1 stop bit 15 4.2. Serial Communication: There are two basic types of serial communication, synchronous and asynchronous. With synchronous communications, the two devices initially synchronize themselves to each other, and then continually send characters to stay in sync. Even when data is not really being sent, a constant flow of bits allows each device to know where the other is at any given time. That is, each character that is sent is either actual data or an idle character. Synchronous communications allows faster data transfer rates than asynchronous methods, because additional bits to mark the beginning and end of each data byte are not required. The serial ports on IBM-style PCs are asynchronous devices and therefore only support asynchronous serial communication. Asynchronous means "no synchronization", and thus does not require sending and receiving idle characters. However, the beginning and end of each byte of data must be identified by start and stop bits. The start bit indicates when the data byte is about to begin and the stop bit signals when it ends. The requirement to send these additional two bits causes asynchronous communication to be slightly slower than synchronous however it has the advantage that the processor does not have to deal with the additional idle characters. An asynchronous line that is idle is identified with a value of 1 (also called a mark state). By using this value to indicate that no data is currently being sent, the devices are able to distinguish between an idle state and a disconnected line. When a character is about to be transmitted, a start bit is sent. A start bit has a value of 0 (also called a space state). Thus, when the line switches from a value of 1 to a value of 0, the receiver is alerted that a data character is about to be sent. RS232 is the best example for asynchronous serial communication. RS232: In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. 16 The Electronic Industries Alliance (EIA) standard RS-232-C as of 1969 defines: Electrical signal characteristics such as voltage levels, signalling rate, timing and slew-rate of signals, voltage withstand level, short-circuit behaviour, and maximum load capacitance. Interface mechanical characteristics, pluggable connectors and pin identification. Functions of each circuit in the interface connector. We use a DB9 connector with female on one side and male on one side. Female is connected to the PC side (DTE) and male side is connected to the DCE i.e., the MAX232 because the RS232 voltage levels are not TTL compatible and they are not recognized by the micro controller. To overcome this, a MAX232 is used to covert them into TTL compatible logic levels. RS232 voltage values Space state (0) +5 ... +15 +3 ... +25 Mark state (1) -5 ... -15 -3 ... -25 Undefined - -3 ... +3 Table 4.2.1. Voltage levels of RS232 Fig. 4.2.1. Pin diagram of DB9 connectors The diagrams show the pin configuration of the male and female db9 connectors. We can notice that 2 pin of male is RxD and that of female is TxD so they have to be connected together end to end. RS232 is made TTL compatible by using MAX232. 17 Pin Signal In/Out Description 1 DCD In Data Carrier Detect 2 RxD In Receive Data 3 TxD Out Transmit Data 4 DTR Out Data Terminal Ready 5 GND - Ground 6 DSR In Data Set Ready 7 RTS Out Request To Send 8 CTS In Clear To Send 9 RI In Ring Indicator Table 4.2.2. Description of connectors The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. Fig. 4.2.2. Pin diagram of MAX 232 These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels. 18 Connection diagram: Fig. 4.2.3. Connection diagram of MAX 232 We use the asynchronous serial communication with RS-232 standard. The parameters at the serial port of the client system are received by the 89C51ED2 controller and stored in memory. 4.3. Hardware Design: The main components that we have used in making the hardware for the display board are: AT89C51ED2 Training Kit LED Driver (ULN2003A) Transistors (SK 100B) LEDs Resistors (220ohms, 1/4W) Resistors (1k ohms, 1/4W) 19 4.3.1. AT89C51ED2: Fig. 4.3.1. AT9C51ED2 Block Diagram Features: • 80C52 Compatible – 8051 Instruction Compatible – Six 8-bit I/O Ports (64 Pins or 68 Pins Versions) – Four 8-bit I/O Ports (44 Pins Version) – Three 16-bit Timer/Counters – 256 Bytes Scratch Pad RAM – 9 Interrupt Sources with 4 Priority Levels • ISP (In-System Programming) Using Standard VCC Power Supply • Boot ROM Contains Low Level Flash Programming Routines and a Default Serial Loader • High-speed Architecture – In Standard Mode: 40 MHz (Vcc 2.7V to 5.5V, both Internal and external code execution) 60 MHz (Vcc 4.5V to 5.5V and Internal Code execution only) 20 – In X2 mode (6 Clocks/machine cycle) 20 MHz (Vcc 2.7V to 5.5V, both Internal and external code execution) 30 MHz (Vcc 4.5V to 5.5V and Internal Code execution only) • 64K Bytes On-chip Flash Program/Data Memory – Byte and Page (128 Bytes) Erase and Write – 100k Write Cycles • On-chip 2048 Bytes EEPROM Block for Data Storage (AT89C51ED2 Only) – 100K Write Cycles • Dual Data Pointer • Variable Length MOVX for Slow RAM/Peripherals • Improved X2 Mode with Independent Selection for CPU and Each Peripheral • Keyboard Interrupt Interface on Port 1 • SPI Interface (Master/Slave Mode) • 8-bit Clock Prescaler • Asynchronous Port Reset • Full-duplex Enhanced UART with Dedicated Internal Baud Rate Generator • Power Control Modes: Idle Mode, Power-down Mode • Single Range Power Supply: 2.7V to 5.5V • Industrial Temperature Range (-40 to +85°C) Description: AT89C51RD2/ED2 is high performance CMOS Flash version of the 80C51 CMOS single chip 8-bit microcontroller. It contains a 64-Kbyte Flash memory block for code and for data. The 64-Kbytes Flash memory can be programmed either in parallel mode or in serial mode with the ISP capability or with software. The programming voltage is internally generated from the standard VCC pin. 21 The AT89C51RD2/ED2 retains all of the features of the Atmel 80C52 with 256 bytes of internal RAM, a 9-source 4-level interrupt controller and three timer/counters. The AT89C51ED2 provides 2048 bytes of EEPROM for non-volatile data storage. The fully static design of the AT89C51RD2/ED2 allows reducing system power consumption by bringing the clock frequency down to any value, including DC, without loss of data. The AT89C51RD2/ED2 has 2 software-selectable modes of reduced activity and an 8-bit clock prescaler for further reduction in power consumption. In the Idle mode the CPU is frozen while the peripherals and the interrupt system are still operating. In the Powerdown mode the RAM is saved and all other functions are inoperative. The added features of the AT89C51RD2/ED2 make it more powerful for applications that need pulse width modulation, high speed I/O and counting capabilities such as alarms, motor control, corded phones, and smart card readers. 4.3.2. LED Driver (ULN2003A): The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It consists of seven NPN Darlington pairs that feature high-voltage outputs with commoncathode clamp diode for switching inductive loads. The collector-current rating of a single Darlington pair is 500mA. The Darlington pairs may be paralleled for higher current capability. Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED gas discharge), line drivers, and logic buffers. The ULN2003 has a 2.7kΩ series base resistor for each Darlington pair for operation directly with TTL or 5V CMOS devices. Fig. Internal Diagram of ULN2003A 22 4.3.3. Transistor (SK 100B): Row control bit Column control bit Fig. Operation of a transistor using row and column control bits The transistor that is used here is SK 100B. The biasing resistor that is used here is a quarter watt, 220-ohm resistor. The transistor is operated in the Common Emitter configuration. The transistor that is used here acts as a switch. When the column control bit is logic high, the transistor is in ON state so it reaches saturation and the voltage at the collector is V ce (sat) = 0.2V (logic low). If the row control bit is logic high then the LED is in forward bias and thus it glows. If the row control bit is logic low then the LED is in the reverse bias it doesn’t glow. So the required LEDs can be made to glow by making the row control bits either logic high or logic low. So all the anodes of the LEDs pertaining to a single row are shorted and given to the outputs of the row control. The cathodes of each of the LEDs belonging to a single column are shorted and given to the transistor so that this transistor can control the activation or deactivation of the entire column of the display through the output of the column control as explained above. So for the selection of a particular column the transistor pertaining to that column has to be in ON state, i.e. the column control bit that is given to that column must be in the logic high state. Once the particular column is selected we can put the data in that column by sending the data through the row control register (as explained above). 23 4.3.4. LEDs: A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices, and are increasingly used for lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness. The first practical visible-spectrum (red) LED was developed in 1962 by Nick Holonyak Jr, while working at General Electric Company. Holonyak is seen as the "father of the lightemitting diode". M. George Craford, a former graduate student of Holonyak, invented the first yellow LED and improved the brightness of red and red-orange LEDs by a factor of ten in 1972. In 1976, T.P. Pearsall created the first high-brightness, high efficiency LEDs for optical fiber telecommunications by inventing new semiconductor materials specifically adapted to optical fiber transmission wavelengths. The basic important features of LED’s are: • Extremely high optical output: Over 2,750 lumens from a single chip (White). • Extremely high efficiency: Over 100 lumens per watt at 350 mA/mm2. • High thermal conductivity package - junction to heat sink thermal resistance. • Environmentally friendly: free of hazardous materials like lead and mercury. They also enjoy use in applications as diverse as replacements for traditional light sources in automotive lighting (particularly indicators) and in traffic signals. Airbus uses LED lighting in their A320 Enhanced since 2007, and Boeing plans its use in the 787. The compact size of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are useful in advanced communications technology. Working Principle: The LED is based on the semiconductor diode. When a diode is forward biased (switched on), electrons are able to recombine with holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the colour of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. An LED is usually small in area (less than 1 mm2), and integrated optical components are used to shape its radiation pattern and assist in reflection. LEDs present 24 many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability. However, they require more precise current and heat management than traditional light sources. Lumen Depreciation: All electric light sources experience a decrease in the amount of light they emit over time, a process known as lumen depreciation. Incandescent filaments evaporate over time and the tungsten particles collect on the bulb wall. This typically results in 10-15% depreciation compared to initial lumen output over the 1,000 hour life of an incandescent lamp. In fluorescent lamps, photochemical degradation of the phosphor coating and accumulation of light-absorbing deposits cause lumen depreciation. Compact fluorescent lamps (CFLs) generally lose no more than 20% of initial lumens over their 10,000 hour Lumen depreciation - the decrease life. High-quality linear fluorescent lamps using rare earth phosphors will lose only about 5% of initial lumens at 20,000 hours of operation. The primary cause of LED lumen depreciation is heat generated at the LED junction. LEDs do not emit heat as infrared radiation (IR), so the heat must be removed from the device by conduction or convection. Without adequate heat sinking or ventilation, the device temperature will rise, resulting in lower light output. While the effects of short-term exposure to high temperatures can be reversed, continuous high temperature operation will cause permanent reduction in light output. LEDs continue to operate even after their light output has decreased to very low levels. This 25 becomes the important factor in determining the effective useful life of the LED. To provide an appropriate measure of useful life of an LED, a level of acceptable lumen depreciation must be chosen. Lifetime for various lightsources: Table Comparision of lifetimes of various light sources Types of LEDs: Different types of LEDs with different sizes are available in the market they are (1) SMD Type (2) 3mm Type LEDs (i) 3mm Bi-Color LED (ii) 3mm Cylindrical LED (iii) 3mm Oval LED (iv) 3mm Round LED (v) 3mm Super Flux LED (3) 5mm Type LEDs (i) 3mm Bi-Color LED (ii) 3mm Cylindrical LED (iii) 3mm Oval LED 26 15deg 20deg 50deg 70deg 30deg 45deg 70deg Fig. LEDs with various viewing angle Why Resistors with LEDs? An LED must have a resistor connected in series to limit the current through the LED, otherwise it will burn out almost instantly. The current flowing in an LED is an exponential function of voltage across the LED. The important part is that a small change in voltage can produce a huge change in current. Resistors aren’t like that. The current and voltage in a resistor are linearly related. That means that a change in voltage will produce a proportional change in current. Current versus voltage is a straight line for a resistor, but not at all for an LED. The resistor value, R is given by: R = (VS - VL) / I VS = supply voltage VL = LED voltage (usually 2V) I = LED current (e.g. 10mA = 0.01A, or 20mA = 0.02A) It must be ensured that the LED current chosen is less than the maximum permitted and must be measured in amperes(A) so the calculation will give the resistor value in ohms ( ). If the calculated value is not available the nearest standard resistor value which is greater is chosen so that the current will be a little less than what we choose. In fact we may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright. LED Lighting Applications: High Brightness LEDs (HB-LED) and High Power LEDs are poised to enable a market transition to energy efficient Solid State Lighting (SSL). ON Semiconductor provides 27 inductive and charge pump LED drivers; switching regulators, linear regulators, and constant current sources; MOSFETs and rectifiers; power factor correction (PFC) ICs, and high voltage switch mode power supply solutions to enable customers to build high efficiency LED driver solutions whether powered from the AC main or a low voltage DC power source. 28 EXPERIMENTAL ASPECTS 29 5. EXPERIMENTAL ASPECTS 5.1. Persistence of Vision: Persistence of vision is the phenomenon of the eye by which an afterimage is believed to persist for approximately one twenty-fifth of a second on the retina. The human brain retains an image for a fraction of a second longer than the eye actually sees it. This is the reason why the world suddenly doesn’t go black every time we blink our eyes. This is the principle used behind the LED dot matrix displays. For displaying a character using a dot matrix display, all the required LEDs in the matrix are not lit at once. The appropriate LEDs in the matrix are lit, one column after another. The shifting of columns is done fast enough such that the display appears to be on continuous. This is ensured by taking care of the number of frames being refreshed per second. Let us consider a 5x7 dot matrix LED display to display the character ‘A’ using the principle of persistence of vision. The LEDs that need to be lit so as to display the character ‘A’ are shown in the diagram below. Using persistence of vision, we lit up the each column of the matrix with a frequency greater than 25 so that it is seems to be LEDs glow continuously as shown in the above figure but actually what happened is shown in figure below. This type of column switching takes place with high speed, it can be achieved by using the microcontroller which is programmed to control both column and rows simultaneously to display a particular letter by sending a particular hexadecimal values to the two ports which controls rows and columns of dot matrix for every letter to display. 30 When we watch a movie, we see individual still frames of film projected at 24 frames per second. Each of these frames is separated by darkness, so that we are actually sitting in a dark theatre about half of the time. Instead, because of the persistence of vision, we perceive an image blending into the next, giving the illusion of movement and continuity. 5.2. Dot-Matrix Configurations: There are two types of dot-matrix configurations – common cathode row and common anode row. Their internal connection diagrams are as shown below. Fig. 5.2.1. Dot matrix display configurations In the common cathode row dot matrix displays, the cathodes of the LEDs are shorted along the row and the anodes along the column as shown in the diagram. For an LED to be lit, the row in which its cathode is shorted must be given logic 0 and the column in which its anode is shorted must be given a logic 1. The same is applied for lighting any required number of LEDs in the dot matrix in any fashion. Common anode row dot matrix displays have their anodes shorted along the row and cathodes along the column. 31 5.3. Display Decoding: The 89C51ED2 is programmed to receive the data serially and decode it. The decoding process deals with decoding each character that is received and is sent to the display through a set of drivers. The decoded data for each character is retrieved from the lookup table. Each character is displayed on a 5x7 dot matrix display which gets a 7 bit and 5 bit decoded data from the controller to the rows and columns respectively. The decoding process is done in order to light the appropriate LEDs so as to display the required character. Depending upon the LED to be either ON or OFF, bit ‘1’ or bit ‘0’ is sent to the pins of the dot matrix display. Another task involving in the program is to control the display by switching the data among the columns. However, this switching should is done such that the display appears to be a constant one. The switching is done by setting the required time interval in the microcontroller. Fig. 5.3.1. 5x7 dot matrix showing decoding logic ALGORITHM: 1. START 2. SET THE MICROCONTROLLER FOR SERIAL COMMUNICATION 3. CHECK THE DATA AT THE SERIAL PORT OF THE CONTROLLER 4. IF YES GOTO STEP 5 ELSE GOTO STEP 7 5. RECEIVE THE DATA FROM THE PORT AND DECODE IT FOR THE DISPLAY 6. SEND THE DATA TO THE HARDWARE INPUTS 7. GOTO STEP 3 32 5.4. Basic Circuit Diagram: Fig. 5.4.1. Circuit for a single character 5x7 display The circuit diagram shown above is for a single character dot matrix display of 5x7 pixels. The microcontroller shown in the diagram has the hex codes for each of the columns of the display matrix. Two of the controller’s ports are used to drive the rows and columns of the dot matrix display. Port 2 drives the 7 rows of the display matrix and Port1 drives the 5 columns of the display matrix. The transistors are used as switches in the circuit to control the display inputs as needed. Due to the limitation of source and sink current of AT89C51 the driver circuits are used for driving the rows and columns. Row Controlling Action: The inputs which are to be given to each row as per the decoding logic is given though Port 2 of the microcontroller as an eight bit data. Each bit is an input to a row and seven such bits are used to drive the seven rows of the display. Port 2 being an eight bit one, 33 the MSB or LSB is discarded depending upon the code given at the port. Seven SL100 PNP transistors along with 200-ohm current limiting resistors are used as row drivers. When a logic high is given at the MSB of Port 2, the first transistor is switched ON and the first row is made active. The transistors are turned on by the TTL voltages applied by the Port 2 of AT89C51 to their bases through 1-kilo ohm resistors. Column Controlling Action: The five columns of the 5x7 dot matrix display are driven by an ULN2003A driver IC. ULN2003A which is a monolithic high voltage and high current Darlington transistor arrays is used to increase the sinking capacity of the AT89C51 as a column driver. Port 1 of the microcontroller is used to give the data to the five columns of the matrix through the ULN2003A driver. The port being an eight bit one, only five bits of the eight bit data are given to the driver IC and the remaining bits are discarded. Thus, the data to the port must be given carefully ensuring the required bits to be at the right pin of the port. The hex code assigned to the first column of the character to be displayed is sent through Port 2 and column selection bytes are sent through Port1. Depending upon the row and column data, the appropriate LEDs are lit. After a certain time delay another hex value is sent to the row and the respective column is selected using the column selection bit. This process of switching is done very fast such that our eyes cannot perceive the change and it seems that the whole character is displayed once. 34 ANALYSIS 35 6. ANALYSIS Power consumption of LEDs depends on the way we connect them. In common anode or common cathode configurations, a 5x7 dot matrix display has a maximum of 7 LEDs in the ON state for a short interval of time in which each LED consumes 20mA for full brightness. They are driven by 7 transistors and the total current (7x20ma=140ma) is given as sink current to the ULN2003 driver. Power dissipation across LED = (voltage drop across each LED) x (current flowing in each LED) Voltage drop across each LED = 1.9 to 4.0V Optimum current through each LED = 20 mA Reverse saturation current in each LED = 200 to 300 nA Total reverse current in circuit = 28 X .2mA=5.6mA Voltage drop across junction in each transistor = 0.3 to 0.4V Emitter current in each transistor = 20mA Total sink current into ULN2003 = 140mA Voltage drop across each junction (two transistors) = 0.7V Total current drawn by circuit from power supply = 7 X 20mA + 28 X 0.2mA =0.1456A Overall power dissipation across LEDs =7 X 2.5 X 20ma = 0.35 WATTS Overall power dissipation across Transistors = 7 X 0.35 X20.25ma =0.05 WATTS Overall power dissipation in ULN2003 (Datasheet) = 0.07 WATTS Total power dissipation in the circuit = 0.35W+0.05W+0.07W =0.47 WATTS 36 PROBLEMS FACED 37 7. PROBLEMS FACED 1. The data in the excel sheet could not be retrieved using C code as MS Office uses a technique known as XML Parsing to provide security to the files. Hence, an API named APACHE POI, a JAVA package is used to perform many functions such as create, edit, update etc. in Excel. 2. Initially, the functions of receiving the file from the server and processing the file were done simultaneously due to which, real time exceptions occurred. This problem was rectified by executing both the tasks one after another. However, the time taken to execute the tasks is very less. 38 RESULTS AND CONCLUSIONS 39 8. RESULTS AND CONCLUSIONS This project is a prototype design of the scoreboard to be installed at ‘Dr. Y. S. Rajasekhara Reddy ACA-VDCA Cricket Stadium’ in Visakhapatnam. The design of the scoreboard is done as per the requirements mentioned by the management. The parameters entered in the excel sheet are updated on the scoreboard in real time to let the players and the spectators know the status of the game. The design of this scoreboard can be used for various other sports such as football, basketball, baseball, hockey, motor sports, swimming, wrestling, etc. by changing the display parameters. 40 FUTURE SCOPE 41 9. FUTURE SCOPE 1. The reception of data from the server present in a wireless LAN is done with the help of a client system (a PC or a laptop). However, instead of using a client system, it can be replaced with a dedicated real-time operating system (RTOS) which can perform the same function of the client. 2. The data being entered at the server is in an excel sheet. This can be replaced with a dedicated software with a front-end module to enter the score using Visual Basic, DOT NET, etc. 42 REFERENCES 43 10. REFERENCES 1. The 8051 Microcontroller And Embedded Systems by Muhammad Ali Mazidi, Janice Mazidi and Rollin Mc Kinlay 2. Microcontrollers: Architecture, Programming, Interfacing and System Design by Raj Kamal 3. Computer Networks by Andrew S Tanenbaum 4. The Complete Reference Java2 5th Edition by Herbert Schildt 5. Let Us C by Yashwant Kanetkar WEBSITES: 1. 2. 3. 4. 5. http://en.wikipedia.org/wiki/Light-emitting_diode http://ledmuseum.candlepower.us/led/ledleft.htm http://www.ledz.com/ http://poi.apache.org/ http://java.sun.com/docs/books/tutorial/ 44 ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online