[Project report]digital speedometer with password enabled speed controlling(1...
Digital-III-FinalReport
1. Currency Counter and Braille-Stamping
Machine
Rahu Bannister
Matthew Davis
Logan Isler
ECET 3220 – Digital III
Fall 2014
2. Table of Contents
ABSTRACT................................................................................................................................................3
INTRODUCTION.......................................................................................................................................4
OPERATING INSTRUCTIONS.................................................................................................................5
User Interface:.....................................................................................................................................5
Basic Operation:..................................................................................................................................6
MASTER CONTROL SYSTEM.................................................................................................................8
Hardware Description..........................................................................................................................8
Software Description:..........................................................................................................................9
COLOR SENSOR SYSTEM.....................................................................................................................10
Hardware Description:.......................................................................................................................10
Software Description:........................................................................................................................10
MOTOR SYSTEM....................................................................................................................................11
Hardware Description:.......................................................................................................................11
CONCLUSIONS.......................................................................................................................................12
Key Results and Findings..................................................................................................................12
Difficulties.........................................................................................................................................12
Next Steps..........................................................................................................................................12
REFERENCES..........................................................................................................................................13
APPENDIX 1 – Parts List.........................................................................................................................14
APPENDIX 2 – Wiring Diagram..............................................................................................................15
APPENDIX 3 – Board Layout Diagrams..................................................................................................16
APPENDIX 4 – Block Diagrams...............................................................................................................16
APPENDIX 5 – Interface Diagrams..........................................................................................................19
APPENDIX 6 – Schematic Diagrams........................................................................................................23
Pg -2-
3. ABSTRACT
The object of this project was to build a single system that could properly read, count and administer the
appropriate braille signature to money. The overall idea was inspired to assist visually impaired people.
The braille stamp on the money would give clear indication of which bill the operator has in his or her
possession. Bill detection used in commercial money management systems, however, is very
sophisticated and rather expensive, and well beyond the scope of this class. Because of this, as well as
time and monetary constraints, colored paper will be used as a substitution for a proof of concept.
Silicon Labs software was used to program three individual 8051F340 microcontrollers. One DC motor is
used to run a money counter feeding system. A front panel holds a parallel LCD two switches and two
push buttons. The LCD is used to display money counted as well as give visual feedback to some users
while the switches can set which mode you want the system in and the backlight capabilities. The two
buttons are used for starting the system once a mode is selected and debug the system in case an error.
The front panel also holds six LED indicators that correspond to the LCD error messages and statuses.
One HDJDS822 breakout board handles all the color, converting it to be fed to the internal analog-to-
digital converter on one of the controllers. 5 solenoids are positioned to apply the braille to the paper after
it is read.
The end product is a mobile easy-to-use system that accurately reads the money and applies an
appropriate braille stamp at the convenience of the impaired user.
Pg -3-
4. INTRODUCTION
Currently in the US there are 38 million notes printed on a daily basis with no physical markings for
vision impaired people [1]. This provides a problem to over six million people who cannot distinguish the
difference between a single dollar bill and a one hundred dollar bill[2]. Because of this, vision-impaired
people have trouble handling there financial obligations without assistance from others they trust. Even
so, the blind and vision-impaired struggle doing day-to-day things such as buying apparel and purchasing
groceries.
Handling money is essential in day-to-day life, even for the vision-impaired; thus, the idea of this
machine. This machine gives the vision-impaired freedom from depending on others to handle their
obligations. No more full dependence and no more fear. Within a matter of minutes the blind will know
how much actual money they are in possession of. America is the land of innovation. Eye sight may be
lost, but independence and security does not have to be lost with it. An affordable easy to use product is
what we were striving for when developing this system.
Pg -4-
Fig. 1 - Completed System
5. OPERATING INSTRUCTIONS
User Interface
6 System Indicators:
- System Power: indicates system power
- Color Received: indicates a bill in system (valid or not valid - for debugging purposes)
- Motor Running: indicates feeding tray is active
- Bill Loading: indicates a bill is being accepted into machine
- Bill Recognized: indicates a bill recognized bill in machine
- Read Error: indicates bill in the machine is not recognized (possibly not correct currency)
2 SPST Switches:
- Mode Select: stamp mode / count mode
- Backlight Select: backlight on / backlight off
2 Dipole Push Buttons:
- Start: begins the given mode sequence, stops current sequence
- Debug: initiate testing sequence
1 Serial LCD Screen:
- Provides currency information
Pg -5-
Fig. 2 - User Interface
6. Basic Operation
1) Plug in and turn on power to the power supply unit on the back of the system. When first powered on
the LCD screen will display an initialization routine showing the course number of the class and the
names of each creator of the project (Fig. 3). After the initial three seconds the screen will display the idle
state and wait for the user to press one of the two buttons (Fig. 4).
2) During the idle state, the user then selects the desired mode using the mode switch. The available
modes are Stamp Mode and Count Mode. Stamp Mode allows for bills to be passed into the machine and
receive the appropriate stamp, but provide no visual output. Count Mode will accept bills and only count
the currency that is processed, showing the quantity of each currency amount that has been counted. An
example screen of the machine engaged in Count Mode is seen in Fig. 5. The user also has the option to
turn off the backlight of the LCD screen. This is also selected at the idle state.
Pg -6-
Fig. 3 - Initialization Screen Fig. 4 - Idle State
Fig. 5 - Count Mode Example
7. 3) When the proper mode is selected for use, press the Start button the engage the system. The Start
button can also be used at any time during the counting/stamping process to stop the current process and
return to the idle state. If the machine encounters an error in the reading of a bill (such as an incorrect
currency type), the machine will flash the Read Error indicator on the front panel of the system. This,
however, will not halt or pause the counting/stamping process. This merely indicates to the user that one
or more of the bills was not processed. This allows for the error to be self-clearing with no external input
from the user.
Once all currency is processed, or the system is disengaged with the Start button, the system will return to
the idle state. At this time, the system is ready to receive more currency and continue functioning using
any selected mode.
*NOTE* For debugging and troubleshooting purposes, a Debug button has been added to the system.
This button is optional and by no means necessary for every day operation of the system. To engage the
debug routine, the Debug button is to be pressed at the idle state. At this action, the system will show all
indicators on the front panel one by one in a sweeping fashion from left to right to ensure proper function.
The LCD screen will then light every pixel to ensure no problems exist. Upon completion, the system will
return to it’s idle state.
Pg -7-
Fig. 6 - Error Indication
8. MASTER CONTROL SYSTEM
Hardware Description
Microcontrollers:
A total of three Silicon Labs(c8051f340) Microcontrollers are used. Each subsection focuses on one
controller. The capabilities of this 8-bit controller include 40 I/O ports, UART, SPI, 46kB of flash
memory, and a 10-bit ADC.
The Master Controller (U1) controls the SPI LCD display, 6 display LED indicators, 2 toggle switches,
and 2 push buttons. Each microcontroller is connected to a master power on reset circuit and protected by
a fuse & diode power protection circuit to provide stability to the system. This controller is also in charge
of visual output displayed to the LCD. This is done through a three wire SPI connection. Lastly this
controller receives UART messages from U2 that provides information on the currency.
LED Indicators:
The 6 LED indicators provide real-time indication to the user as system output. The LED indicators are
used in a ‘current sinking’ orientation. These LED indicators are connected to pins 33-38 of the master
microcontroller.
Switches:
There are two SPST toggle switches that control the mode and LCD backlight. One side of the switch is
tied to 5v and the other is tied to a controller pin and a pull-down resistor to ground. These switches are
connected to pins 45 and 46 of the master microcontroller.
Push Buttons:
Two push buttons are implemented in the design. The push buttons used are normally-open push buttons.
On one side of the push button is the 5v source. The other side connects to a pin on the master
microcontroller as well as a pull-down resistor to ground. The switches are connected to pins 47 and 48 of
the master microcontroller.
A 4x20 serial LCD display is used in the design. The LCD connects to the controller using pins 3, 4, and
6. Pin 3 of the controller drives the NSS line on the LCD. Pin 4 is the Master-Out-Slave-In line for the
LCD. Pin 6 is the clock pin for the LCD.
Pg -8-
Fig. 7 - 8051 Microcontroller
9. Board Communication:
Connection between the master controller board the color controller board is accomplished via UART.
Connection between the master board and the motor board is a 4-wire parallel interface.
Software Description:
The color controller sends data to the master controller to indicate what the color sensor is reading, if
anything. To accomplish this, the master controller will recognize a series of HEX values received from
the color controller as recognized bills. These values are 01h - 06h. These values represent $1 - $100
respectively. A reception of 00h indicates that no bill is present and sets the indicators accordingly. A
reception of any other value will result in the system signaling a read error and will light the proper LED.
Based on these values, the master controller will relay information to the motor controller to properly
stamp the incoming bill. The command set for this communication can be seen in Figure.
*NOTE* The Master Controller Board Layout, Block Diagram, and Interface Diagram can be found in
Appendix 3, 4, and 5 respectively.
Pg -9-
10. COLOR SENSOR SYSTEM
Hardware Description
Analog-to-Digital Converter:
The built in 10-bit ADC of the 8051 microcontroller is used. Three wires from the color sensor send
analog voltage inputs to the ADC which is then referenced to an internal reference of 2.44V and GND.
Color Sensor:
We are using HDJDS822 breakout board sensor with 3 wire connection going to the Color Controller.
Each line holds the voltage different R,G, and B analog voltage output. These channels are converted
individually. Once all three channels have been converted, a dichotomous routine is used to distinguish
color (a process-of-elimination of sorts). A standoff made of folded paper was wrapped around the sensor
as the sensor is extremely sensitive to ambient light and noise.
Board Communication:
The Color Controller determines which color was read by the color sensor and sends a hex value (see
software description) corresponding to a color to the Master Controller via UART connection.
Software Description:
The ADC reads the voltage on one of the three channels of primary color voltage and compares it to the
reference voltage (in this case, ground). After obtaining the newly converted voltage value, it is stored
into a general purpose RAM address. This value, along with the converted values of the green and blue
channels, fascinate the means to produce an approximate color. An example of this is shown below:
ADC0_Red_Vo:
mov AMX0P, #001H ; select red channel for ADC buffer
clr AD0INT ; clears conversion completion flag
setb AD0BUSY ; initiates AD0 conversion
jnb AD0INT,$ ; waits for conversion to complete
mov R0, ADC0H ; mov conversion into register R0
ret
*NOTE* The Color Controller Board Layout, Block Diagram, and Interface Diagram can be found in
Appendix 3, 4, and 5 respectively.
Pg -10-
Fig. 9 - Color Sensor
11. MOTOR SYSTEM
Hardware Description
DC-Motor:
This system used a 12V rated, 30 RPM, high torque dc motor to run the feeding system. We are using
high torque because the feeding system should run smoothly regardless of the stress put on the system.
We used a power transistor circuit to drive the motor from a PWM signal generated by the Motor
Controller. (see Motor Controller Schematic)
Power Transistor:
There are 6 (TIP31AG) transistors used to drive the five solenoids and our dc motor. Each transistor’s
collector is connected to one device. Each base is connected to one pin on the Motor Controller. The
emitter of each transistor is tied to ground.
Board Communication:
Master Controller communicates with Motor Board via serial 4 wire connection. Motor Controller servers
as a motor drive board and Master Controller tells it which motors to drive. Each motor is powered
externally by the power supply but switched by the Motor Controller through a power transistor.
*NOTE* The Color Controller Board Layout, Block Diagram, and Interface Diagram can be found in
Appendix 3, 4, and 5 respectively.
Pg -11-
12. CONCLUSIONS
Key Results and Findings
Designing a solid project from an idea takes more work than previously anticipated. By working in a
group and dividing up the workload it was possible to so that idea come to life. Every step from building
a physical model to wiring up individual boards to building the actual system was approached in some
modular way. This helped the project run more smoothly but did not extinguish all problems. We as a
group had to be okay with making decisions that directly affected our project and cope with major
setbacks. This process developed us as future engineers. Skills from team building to research and
development were tested and honed for future use in industry. The road from idea and dreams to
development and reality is a rough one. You will have a lot of failures along the way but at the end it will
be all worth it to see a completed product.
Difficulties
Working with the 8051 microcontroller has been the focus of the project and because of this the controller
in itself has been the source of most of our difficulties. Setting up timing for UART as well as connecting
two microcontrollers provided a big hassle. This was due to the lack of debug options for errors. For
example, the only way to tell if there is a timing error between each controller is to either connect it to a
logic analyzer and observing the output cycle or reading through the code and data sheet. Because there
is no class on using the logic analyzer time was lost getting familiar with it in order to use it for what we
needed. Learning how to drive a 12V motor with a 3.3V standard logic controller was another learning
curve. We blew through a few controllers and a power supply trying to find the right approach. We did
manage to research a transistor circuit using a power transistor that can handle 12V signals and ended up
using it to run our PWM driven motor.
Next steps
Our original goal was to build a system that is user friendly for people that are vision impaired. Because
of the lack of time we veered off course a little by not incorporating any audio system to fit this goal. So
for future improvements, by using a sound based user interface we could then prompt a visually impaired
person to use the system when ready and give audio feedback. The serial LCD screen would still be used
for displaying operation statuses and giving out indications to people that can see as well as providing
feedback to the manufacturer in case of damage or debugging. All of the indicator LED’s should be
moved inside the system next to their respective components. This should happen due to the audio system
handling all user needs. The LED’s would be for the manufacturer only at that point. A stronger motor
with more torque is needed to run the system faster and implementation of a one single feeding system
would cut down on complexity. Lastly, a more ergonomic case with a lighter overall weight for more
mobile use should be used.
Pg -12-
13. REFERENCES
[1] “Facts About US Money”. Fact Monster. 2007. Web. December 2, 2014
http://www.factmonster.com/ipka/A0774850.html
[2] “ Blindness Statistics”. National Federation of the Blind. 2012. Web. December 2, 2014
https://nfb.org/blindness-statistics
Pg -13-