Performed by : Micha Rave Guy Gabso Supervisor : תתתת תתתתתתת תתתתתתת תתתתתתh speed digital systems laboratory תתתת- תתתתתתת תתתתתתתת תתתתתת תתתתתתת תתתתתת תתתתechnion - Israel institute of technology epartment of Electrical Engineering Barcode Reader (PC) 1
25
Embed
Performed by : Micha Rave Guy Gabso Supervisor: Reuven Nisser המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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המעבדה למערכות ספרתיות מהירות
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: