Table of Contents Executive Summary 2


Design 3.1 Umpire Indicator



Download 471.88 Kb.
Page10/17
Date31.07.2017
Size471.88 Kb.
#25812
1   ...   6   7   8   9   10   11   12   13   ...   17

3.0 Design

3.1 Umpire Indicator

3.1.1 Microcontroller


All functions of the Umpire device will be controlled, stored and transmitted by processes of the microcontroller to the peripheral equipment in this design. Because of this, the microcontroller needs to be chosen carefully so that all needed specifications are met or surpassed. Factoring in all of the important factors such as cost, ease of acquiring parts, ease of programming and flexibility for connecting peripherals. The chip that best met these requirements is the PIC24HJ64GP204 from microchip.com and will be used in this design. Some of the most noted features of this chipset are listed below.


  • 16-bit architecture that has CPU speeds of 40 MIPS

  • Program memory of 64 KB which will easily fit our program

  • 35 I/O pins for the displays and push buttons of the project

  • Low power management modes to increase battery life

  • C compiler optimized instructions

Now that the microcontroller has been selected there are a number of things that need to be designed for it to function properly in this project. Power, connections to peripheral equipment and firmware for the microcontroller all need to be designed. The power requirements for this microcontroller are specifically stated in the data sheet and reference material for the PIC24 microcontroller. The supply voltage range for this chip from the data sheet is 3.0V to 3.6V. There are quite a few necessary voltage supply points on this chipset however. The main chipset supply voltage Vdd will be supplied with a regulated 3.3V from a voltage regulator. Some of the other supply voltages that must be addressed are the AVdd for the I/O pins which will be triggering the displays and sensing the buttons from the handheld device being pressed. This voltage for AVdd will also be supplied a voltage of 3.3V due to convenience of the design although if the peripheral equipment needed a higher voltage to trigger properly this voltage could be supplied up to 5V. For connecting all of the peripheral equipment the appropriate I/O pins on the microcontroller will be used via the lead pins of the device. The displays, pushbuttons and Bluetooth chipset will all be assembled in this manner with the proper function occurring because of correctly coding the microcontroller to handle the information sent or received from that item properly.


3.1.2 Firmware Coding


For convenience and efficiency, the microcontroller will be programmed in C. C programming is something that the group is proficient at and that is wide spread enough in the hobbyist markets of the microcontroller selected that assistance with specialized functions and the debugging of this chip is more likely to be found. The software for the microcontroller will be written in a compiler of choice. After the completion of the software on the computer the code needs to be applied to the microcontroller. The best way to do this is using the development tools discussed in the research part of this paper. The group will use the earlier described evaluation board and properly port the firmware to the device and the remainder of the debugging and testing phases of this project will be done with the evaluation board still attached. The processes of prototyping and testing are described in further detail later on in this paper. The microcontroller has a great number of functions to deal with, as it is the interfacing device between all of the peripheral equipment. In the software of the microcontroller all of the display functions will be processed. The microcontroller needs to send the appropriate 4-bit number to each of the displays for them to display this for the end user. This is easily accomplished in C with printing a register value to that specific display through its designated output pin. Another section in the software for the microcontroller will be the pushbuttons on the device.
There are two different kinds of pushbuttons on the device for the umpire to utilize. The first is the buttons for incrementing the values of balls, strikes and outs on the device. This will be handled as an interrupt function in the software. When the microcontroller sees that the button has been pressed for an incrementing of any of these values the device will call up that register increment that register if it is below the allowed value or reset if above the allowed value of balls, strikes and outs. The interrupt code will next update the display and send the updated value to the transceiver for wireless transmission. The second type of button on the umpire indicator is the special function buttons. These special function buttons are for resetting the device if for some reason the values get inappropriately incremented and the second special button is for next batter. These two buttons like the increment buttons will be interrupts in the software. The reset button will clear the register containing the counts of balls, strikes and outs, allowing the umpire to reset these values before resending the data to wireless. The next batter button is for the convenience of the umpire and the database storage method. When the next batter button is pressed the values of the registers will be sent to the Bluetooth chip for transmission with a special value that tells the database that this player is no longer going to change any of his or her data and a new batter is going to have their data altered. The microcontroller will then reset the values of the registers back to zero for the new batter, resetting the displays back to zero.

3.1.2 Implementing Displays


Upon selecting the LED 7-segment displays from webtronics.com, the group needs to properly implement them in to the design. From the research done for this paper the group found the most effective way to utilize the 7-segment displays is to use an integrated chip as the driver for the 7-segment displays. The BCD to 7-Segment Display driver is the perfect solution. This chips part number is the 4511. To implement this part into the design the specifications of the LED displays and the 4511 chips need to be met. The 4511 from its specifications can be powered with a supply voltage of 3V to 15V. Changing the input voltage changes the amount of current the chip can supply to the displays at any given time and changes the efficiency of the chip. So much of this project will be powered with 3.3V so it was decided to also power the 4511 with this voltage. The block diagram of how the displays will be properly connected can be seen below in 3.1.2 Figure 1. This block diagram shows that the microcontroller directly feeds the 4511 chips the information on what number is to be displayed and the 4511 then configures the the appropriate seven segments to display that number.
:::::desktop:screen shot 2010-12-02 at 6.37.26 pm.png

3.1.2 Figure 1: Display Block Diagram
From this point of knowing what is the desired plan for the screens, the group can move on to best implementing this design in hardware. Powering the 4511 with 3.3V properly powers the chipset. The 4511 has the ability to power up to 25mA to each of the seven segments of the display but we want to protect the chip and limit the current sent to the LED displays by putting a resistor inline with the pins for the leads to the displays. With the Supply voltage set to 3.3V we chose all of the resistors in the Schematic below 3.1.2 Figure 2 to be 200 ohms. This limits the current to a safe 15mA that is still sufficient to meet the forward current of the LED segments to power them on. The 4511 also has special functions that need to be set to the proper value for the chip to perform as expected. The 4511ic has a built in test function that lights all of the segments that is an active low. For the purposes of this design it is not needed and will be connected to Vdd. The other special function is a blank input pin. This pin turns all segments off regardless of changes that are made to the inputs of the chip. This special function is also not needed for this project and will be set to Vdd. The three displays will be connected to the microcontroller as shown in 3.1.2 Figure 2 using pins 1 – 4, 30 – 33 and pins 41 – 44 as digital output pins to choose the desired number.
:::::desktop:screen shot 2010-12-02 at 8.57.13 pm.png

3.1.2 Figure 2: Schematic of Displays
Since the 4511 chipset requires four pins to select the possible ten numbers that can be displayed on the 7-segment display, binary number values are selected from the four pins. 3.1.2 Table 1 shows the correct pin high assignments for all the necessary numbers in this project. The convenience of this design is how simple the coding in the microcontroller becomes to properly display any desired number. In the microcontroller the appropriate pins are defined as zero for off and one for on and assigned to arrays where when a number is changed that array changes and the appropriate pins simply change to the correct low or high value to send the correct four bit number to the 4511.


#

Pin A

Pin B

Pin C

Pin D

0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

3.1.2 Table 1: Binary Number Selection

3.1.3 Push Buttons and Battery Indicator


Having selected the pushbuttons from the above research section it is necessary to put these pushbuttons into the design. For this design we will be using pins 19 – 23 for the five pins needed for the five switches. The pins will be set in the microcontroller to digital input pins for the purposes of this project. There are two main ways to connect pushbutton pins to the microcontrollers. The two ways the pushbuttons can be connected to the microcontroller are in a pull-up or pull-down design. Pushbuttons connected in a pull-up design are connected to Vdd and to the microcontroller and the microcontroller is connected to ground through a resistor. When the button is not being pressed the microcontroller sees ground voltage through the resistor. Upon pressing the button Vdd is allowed to come through the button and the voltage the microcontroller sees is pulled up to Vdd. The second method that the pushbuttons can be wired to the microcontroller by is the pull-down method. This method works on the opposite principal as the pull-up method. The microcontroller is connected to Vdd through a resistor to limit the current the microcontroller sees and when the switch is not being pressed the microcontroller sees a voltage of Vdd. Upon turning the switch on the current goes to ground through the switch and the microcontroller sees a low voltage setting. The pull-down method is the design the group will be using in the designing of the umpire device. To complete this the group has designed the pushbuttons to be connected to ground and to the appropriate pins on the microcontroller. Next 3.3V is supplied from Vdd to the pins on the microcontroller through 10Kohm resisters to limit current to the microcontroller. This design can be seen on the pushbutton and battery indicator schematic of 3.1.3 Figure 1.
:::::desktop:screen shot 2010-12-03 at 1.10.58 pm.png

3.1.3 Figure 1: Schematic of Pushbuttons and Battery Indicator
Pushbuttons are very simple in operation. When pressed they contact the input and output pins together and allow current to flow through the button. This very process though causes false triggers of that switch. The microcontroller has an internal clock fast enough to see that there are momentary hops or ringing of the pushbutton for a very short period of time, around 10mS in length. To avoid this the group needs to write a de-bouncing function into the code for the microcontroller to avoid this ringing and recording of false information. For this design the group will have the microcontroller constantly looking at the pushbuttons and comparing the current recorded value to the value that was recorded 10mS before. When a button is pressed the microcontroller will record a press in the array for that switch, on the next cycle of recording the information on that switch if the value is still at the same high trigger the microcontroller will record that as a valid push of the button. This limits if not eliminates false triggers by requiring two back-to-back cycles of either a one value for the push of the switch or a zero value for the button no longer being pressed. This code does not eliminate accidental presses of the button because any person that would be pressing the button would certainly press the button for a longer duration than 10mS. What this program does is eliminates two or three presses of the button when really the user only pressed the button once.
The battery indicator for this design has two functions. The first function of the battery indicator is to tell the user that the device is on. To make this happen in the microcontroller the pin used for that LED will be set to always on. When the microcontroller powers up and initializes, the LED will turn on. The second function of the battery indicator LED is to signify a low battery warning. The LED for this project that was selected is a dual color resistor. It was found at RnDwarehouse.com for $0.40 per LED. The green side of this LED will be connected to the microcontroller; the red side of the LED from RnDWarehouse.com will be connected to a low battery warning circuit. This circuit found at discovercircuits.com monitors the voltage of the 9V battery that will be used in this project. Upon reaching a threshold of 7.2V the low battery indicator will illuminate the red side of the LED and signify to the user that the battery is low and is due for changing or charging. The benefits of this circuit are that the current consumption is very low at 4mA and the parts to build this circuit are all readily available. 3.1.3 Figure 2 shows the circuit schematic for the 9V low battery monitor.

:::::desktop:screen shot 2010-12-03 at 1.38.04 pm.png

3.1.3 Figure 2: Low battery monitor Schematic – printed from discovercircuits.com

3.1.4 Wireless Implementation


Choosing to go with the LinkMatik 2.0 design approach allows the group to not have to design and build a receiving dongle for the umpire indicator. This is because the coaching tablets have the appropriate Bluetooth connectivity internally upon purchasing them. The LinkMatik 2.0 has the ability to connect to up to four devices at the same time allowing both coaching tablets to receive the information and appropriately upload the data to the database. The first step to implementing the LinkMatik in the umpire indicator is to define how the information is to flow between devices in the system. This can be seen in the block diagram below of the wireless communications between devices in 3.1.4 Figure 1.

:::::desktop:screen shot 2010-12-03 at 11.32.50 am.png

3.1.4 Figure 1: Wireless Block Diagram
Looking at the specific requirements of the LinkMatik 2.0, at minimum six of the chips fifteen pins need to be connected. These pins are required for the proper workings of the chip in this design. The first pin to look at is the Vdd pin. This pin will be supplied with 3.3V, as are many of the other circuits in this design. Ground is supplied to the chip at the several Vcc pin connections. With these two pins connected the chip will power on, however, this Bluetooth chip is very sensitive to power supply fluctuations. To fix this 100nF capacitors are to be installed between the Vcc and Vdd pins on the chipset. The LinkMatik 2.0 is also sensitive to 2.56GHz and a 10nH inductor needs to be placed between the supply voltage and Vdd on the chip. This aids stability of the chip and aids in noise rejection in the wireless transmissions. 3.1.4 Figure 2 shows the circuit diagram for the proper power filtering for the LinkMatik 2.0.
:::::desktop:screen shot 2010-12-03 at 1.58.43 pm.png

3.1.4 Figure 2: Power Filtering for LinkMatik 2.0 – reprinted from flexipanel.com
The next required sets of pins are the data transmission pins. These pins are labeled RxD for the receiving pin and TxD for the transmission pin of the Bluetooth chip. Also there are the CTS and RTS pins that need to be connected. The CTS pin is for the Clear to send command. This command allows the LinkMatik to transmit the needed data when this pin goes low. The RTS pin is the flow control output of the LinkMatik 2.0. These pins are internally controlled because the data is buffered inside the Bluetooth module and so will be connected to each other. This Bluetooth module also has the ability to use Bluetooth to transmit audio, this will not be used for the purposes of this project and these pins will not be connected. The fulfilled purpose of this chip is that the data stored in the microcontroller will be sent to the coaching apps of a serial connection. This chipset does this at a baud rate of 9600 by default and active low with eight data bits no parity bits and one stop bit are transmitted per cycle of transmission. Knowing what pins were needed to properly implement the LinkMatik 2.0 into the umpire indicator a schematic could be made. 3.1.4 Figure 3 shows the schematic of the microcontroller to the Bluetooth module.

:::::desktop:screen shot 2010-12-03 at 3.20.06 pm.png

3.1.4 Figure 3: Wireless Schematic

3.1.5 Power


Properly powering the umpire device takes considering the specific power needs of every chip in the design. It is necessary to properly transmit the required supply voltage to each chip individually as not to fry any of the chips in this design. The chosen method of powering this project is a single 9V alkaline battery. 9V batteries have a usable 565 mAh approximately of current per battery. This is completely suitable for this project. The nine volts of the battery, however, cannot be supplied directly to the components of this design. In proper planning and designing of this project the group has chosen components that require a supply voltage of 3.3V. This makes powering the devices of this design significantly easier by allowing the group to regulate the nine volts of the battery to a common 3.3V between all of the components in this project. The best way to regulate the voltage to the desired 3.3V is with the LD1117V33. This voltage regulator can be purchased from digikey.com for $0.68. This voltage regulator supplies up to 950mA of current with a 1.1V drop at 800mA of load typically. This chip will accept an input voltage of up to 15V so the 9V of the battery is not an issue even when the voltage of the 9V begins to sag to the 7.2V allowed before the low battery indicator turns on. The circuit the group is going to use for the regulator contains filter capacitors of 100nF to stabilize any fluctuations in the power from the LD1117 and from the 9V battery. 3.1.5 Figure 1 shows the schematic of the voltage regulator circuit that will be used.
:::::desktop:screen shot 2010-12-03 at 4.48.19 pm.png

3.1.5 Figure 1: Voltage Regulator Schematic



Download 471.88 Kb.

Share with your friends:
1   ...   6   7   8   9   10   11   12   13   ...   17




The database is protected by copyright ©ininet.org 2024
send message

    Main page