performed by : micha rave guy gabso supervisor: reuven nisser המעבדה למערכות...
Post on 20-Dec-2015
225 views
TRANSCRIPT
Performed by: Micha RaveGuy Gabso
Supervisor: Reuven Nisser
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
הטכניון - מכון טכנולוגי לישראל
הפקולטה להנדסת חשמל
Technion - Israel institute of technologydepartment of Electrical Engineering
Barcode Reader(PC)
1
Project Goals:Project Goals:
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
2
Translate barcode labels into voiceTranslate barcode labels into voiceEquipped with:
1. PC - MFC
2. Scan engine SE2223
3. Board
4. Barcode labels
5. Sound card & speaker
Which enables:
Translate digital information stored on barcode labels into voice.
Software EnvironmentSoftware EnvironmentHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
The platform used for the project developing is Microsoft Visual C++.
The MFC IDE is an Object oriented, MT, WIN32 based environment. The code written implements the following software tasks:
1. Manages the communication with the scan engine using the RS232. The protocol used is the one specified by Symbol’s simple interface documentation.
Software Env, continue..Software Env, continue..High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
2. User Interface.
3. Text to Voice Synthesis.
Block DiagramBlock DiagramHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
Comm Main
CSerial
IOComm
IOMain UI
Voice
Synthesis
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
3
Serial communicationSerial communication
SE2223 – Scan Engine overviewSE2223 – Scan Engine overview
• 2D Scanner• Baud Rate : 9600 Baud• Data Bits : 8 bits• Hardware Handshaking• Software Handshaking - on• Half-duplex communication protocol
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
2
SE2223 – Hardware SignalsSE2223 – Hardware Signals
HostDecoder
TXD
Host TXDRXD
Host RXD
RTS
Host RTS
Host CTS
CTS
• Synchronic Communication• Host/TXD : Data Transmit output• Host/RXD : Data Receive input• Host/RTS : Request To Send • Host/CTS : Clear To Send
Serial communicationSerial communication
Serial communicationSerial communication
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
Block DiagramBlock Diagram
Serial communicationSerial communication
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
2
SE2223 - ProtocolSE2223 - ProtocolRXD
TXD
CTS
RTS
Basic Host Initiated Transaction
Serial communicationSerial communication
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
3
SE2223 – SSI CommandsSE2223 – SSI Commands
Host• BEEP, FLUSH_QUEUE, PARAM_SEND, SLEEP, START_SESSION.
Case BEEPpData[0] = 05h; // LengthpData[1] = E6h; // OpcodepData[2] = 04h; // Message source – Decoder/HostpData[3] = 00h; // StatuspData[4] = 00h; // Beep Code
pData[5] = FFh;// MSB Checksum – 2’s complementpData[6] = 11h; // LSB Checksum
Decoder• CMD_ACK, CMD_NAK, DECODE_DATA.
1. Decode opcode2. If ACK/NAK - end3. If Packet : check STATUS for multipacket (over 256 byte)4. Transfer ASCII data to relevant buffer
Serial communicationSerial communicationHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
Data streams from the serial port in packeted ASCII format.
The code must strip the relevant data and produce synthesized voice.
LengthOpMessage Length
StatusDataChecksum
F3h00h…
Voice SynthesisVoice Synthesis
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
The Delay Problem
ScanEngine input rate: Arrival Time of two chars:
9600[bps]/1000 2 [ms]
Play Rate: Duration of one syllable:
(1800 WORD)/8000 225 [ms]
Decoding the ASCII streamDecoding the ASCII streamHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• The program reads the stream, dismantles it to basic syllables and load to memory the corresponding PCM resource according to a predefined table:
• In such a case the ASCII sequences:
“^a” will translate to - \ָא and
“ba” will translate to – ַּ̂ב
Vocalt filePhonateHebrew
a^ָא
bbב דגושה
fvב לָא דגושה
Second letter in filename aaLike but
Second letter in filename e
eLike bed
4
Decoding the ASCII stream Decoding the ASCII stream (cont)(cont)
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• The playing of consecutive syllables will resemble a word.
• In which case the previous example will sound like ABA (ָאבָא).
Playing The Voice filesPlaying The Voice filesHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
6
• In the beginning of the program all the voice file representing the syllables are preloaded into the main memory and held in an array.
• With each syllable to be played, the requested file is placed in a buffer, manipulated as necessary and played.
• In order to avoid delays, the program manages two buffers. While one buffer s being played the other buffer is filled with the next data to be vocalized.
Playing The Voice files - FlowPlaying The Voice files - FlowHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
Start
Init sound card and Preload handles of all
voice files
Sending the buff to the sound card
Decode the ASCII sequence
Prepare the next buff to play
Check for “STOP”
STOP pressed
Wait for Message
End of message?
No
Yes
Voice files interpolatingVoice files interpolatingHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• The voice files are 16 bit, mono 8KHz sample rate raw PCM.
• In order to achieve a “smooth” transition between the syllables some sort of actions are to be taken to blend each two consecutive syllables.
• We choose to do this by fading out one syllable while fading in the next one. Other methods include much more sophisticated forms of mathematical manipulation.
Bar Code LabelsBar Code LabelsHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
The PDF417 barcode labels we used where produced using an applet by ID Automation at http://www.idautomation.com/java/pdf417servlet.html
To encode for example the line “פרויקט קורָא בר קוד” we encoded the ASCII stream “proyectkorebarkod” and got the result:
Major debug issuesMajor debug issuesHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• Dealing with the RS232 is a problem due to the asynchronous nature of the data flow and the design of the MT code.
• Voice Synthesis is far from resembling human voice.
• Delayed parts delivery from manufacturer.
Definition vs. implementationDefinition vs. implementationHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
All Pre-Definition were fully implemented:GoalStatusRemarks
Communicating with the Scan Engine
Major delays !!
Voice SynthesisNeed improvement
GUI
Integration
Creation of barcode labels
Direction of use:Direction of use:High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
User Interface
• Pressing “Scan” (or ‘S’) will result in scanning a barcode label and playing the data coded into it.
• Pressing “Stop” (or ‘T’) will stop the playing of message currently in progress.
• Pressing “Play Again”” (or ‘A’) will play the last message from the beginning.
Direction of use, continue..Direction of use, continue..High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• Before pressing play a label must be placed in front of the barcode so it can be scanned.
• Barcode labels can be printed in the following website:
http://www.idautomation.com/java/pdf417servlet.html
Future planningFuture planningHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
• Design and implement a better phoneme integration, considering a handling in the frequency domain.
• Build a tool for creating a PDF417 label so that operator need not have a knowledge of the phonemes “special” structure.
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות
4
מעבדה ספרתית
טכניון ישרָאל
פרויקט קורָא ברקוד