Professional Documents
Culture Documents
PDF For Talking Calculator
PDF For Talking Calculator
PDF For Talking Calculator
July 27 2006
th
Talking calculator
Overview
This work describes a talking calculator built just by three chips that can be very useful to blind people. The calculator operates with real numbers of simple precision. It has the four basic operations (addition, subtraction, multiplication and division), and the functions: clear all, change of sign (+/-), inverse (1/x), square root ( ), pi number ( ), add with memory (M+) and read from memory (MR). It also has the keys POWER_ON, POWER_OFF and VOICE to change between the Voice and No-voice modes. It works with a battery of 3 volts.
The complete system is composed by 3 chips and an alphanumeric LCD display (optionally). The systems main component is the ATMEGA88 microcontroller, whose missions are: reading the keypad, doing mathematical calculations, showing the results, voice generating and the handling of the battery energy in order to increase its lifetime. The system uses a two-wire serial EEPROM that contains the codified sound that the computer uses to communicate the results and to inform on the keys pressed by the human operator. The Talking Calculator uses the speech waveform encoder RC-2 that needs only two resistors and one capacitor to do voice decoding. The LM4861, an Audio Power Amplifier with Shutdown Mode, is used to amplify the sound. To show the results we use a 3V alphanumeric LCD MDLS16166 of 16 characters x 1 line. This element is not essential because the calculator is completely operative without it.
AUDIO AMPLIFIER
C10 P1 C9
0.1uF 500K
VCC
2nF
R7
20k Vo1 5 6 7 8 SPEAKER
R2
PD0
6k8
R6
20k
U3
4 3 2 1 IN-
LS1
R3
PD1
6k8
C6
0.1uF
C7
1u
C4
0.1uF
LCD1
VCC_LCD PC1 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC2 SDA SCL MOSI MISO SCK
4 RS 5 RW 6 E
U1
14 15 16 17 18 19 9 10
100 PD0/RXD PD1/TXD PD2/INT0 PD3/INT1 PD4/XCK/T0 PD5/T1 PD6/AIN0 PD7/AIN1 2 3 4 5 6 11 12 13 PD0 PD1
PB0/ICP PB1/OC1A PB2/SS/OC1B PB3/MOSI/OC2 PB4/MISO PB5/SCK PB6/XTAL1/TOSC1 PB7/XTAL2/TOSC2 PC0/ADC0 PC2/ADC2 PC4/ADC4/SDA PC5/ADC5 /SCL PC6/RESET ATMEGA88
SHUTDOWN 23 VCC_LCD 25 27 28 1
7 8 9 10 11 12 13 14
D0 D1 D2 D3 D4 D5 D6 D7
R1
ISP CONNECTOR
C5
AVCC AREF 20 21 0.1uF 20k MISO SCK RESET 1 2 3
J3
6 5 4 CONN-DIL6 MOSI
RESET
C2
0.1uF
"VOICE"
PB4
"1/X"
"ROOT"
"+/-"
"OFF"
BAT1
3V
C1
0.1uF
C8
10u
"7"
PB3
"8"
"9"
"MR"
"M+"
"4"
PB2
"5"
"6"
"*"
"/"
VCC
PB1
R4
10k 7 5 6
R5
10k
"0"
PB0
","
"EXP"
"="
"C/ON"
U2
3 2 1 A2 A1 A0 WP SDA SCL
SDA SCL
AT24C1024
PC2
PC3
PB7
PB6
PB5
Software
The Codevision AVR C Compiler and the demo version of visualSTATE have been used to develop the software of the calculator. With visualSTATE the behavior of the calculator is described in a graphic way using UML statecharts, see figure 3.
/ [veVoice = 1] CalculatorOff Entry / InitCalcOff() Exit / InitCalcOn() eClear() / Say(veKey) eOn() / Say(CALCULATOR_ON) eOff() / Say(CALCULATOR_OFF)
CalculatorOn eVoice() [veVoice != 0] / Say(VOICE_OFF) [veVoice = ! veVoice] eVoice() [veVoice == 0] / [veVoice = !veVoice] Say(VOICE_ON) / [N=0] [Oper[0]=0] DisplayN() eSign() / [Oper[N]=-Oper[N]] DisplayN() eDig_0() / [Oper[N]=0] DisplayN() eExponent() / [Oper[N] = PI] DisplayN()
DisplayN
eOperator() [N==1] / Operate(viOperator) [Oper[1]=Oper[0]] [viOperator=veKey] Say('=') DisplayN() Say(veKey) eEqual() [N==1] / [N=0] Say('=') Operate(viOperator) DisplayN()
Conclusions
The talking calculator is an interesting device built just by three chips that can be very useful to blind people. Its main features are: the use of an extremely simple digital audio decoder, its low cost and its reduced energy consumption. It can be adapted to different languages easily only changing the voice memory contents. I hope its simplicity stimulate other people to add audio capability to theirs microcontroller-based designs.