presentation - Electrical and Computer Engineering

28
Featherweight Electronic Book for Rural Education Rajkumar Singh Parihar BITS Pilani Mentors Kentaro Toyama Vibhore Goyal MSR India

Transcript of presentation - Electrical and Computer Engineering

Featherweight Electronic Book

for

Rural Education

Rajkumar Singh Parihar

BITS Pilani

Mentors

Kentaro Toyama Vibhore Goyal

MSR India

Outline • Overview of TEM

• Overview of Featherweight Electronic Book

• Motivation and Innovation behind Design

• Block Diagrams and Various Alternatives

• Basic Building Blocks of Design – Microcontroller

– MMC and Interfacing

– Key Pad and Interfacing

– PWM signal to Audio Generation • 5th Order Active Low Pass filter Design

• Audio Amplifier

• Speaker interfacing

• Future Directions and Improvements

Technology for Emerging Markets

Understand (potential) technology users in emerging-market countries – E.g., urban middle-class

– E.g., rural entrepreneurs

Invent new technologies and make suggestions on policy

Contribute to growth in emerging markets and to socio-economic development of poor communities worldwide

Government-sponsored lunches

at a rural school in Tamil Nadu

Goals

Featherweight Computing??

• Devices which do a small calculation for their functioning

comes under this category.

• Technologists generally call them “Digital Manipulative”.

why??

• The Motivation and idea behind the approach is to create

a new capability in object without changing Basic overall

look and architecture. (i.e. create a talking capability in a book

with reprogramming over time so that it can read its text also.)

Smart Computational Toys

• “Smart toys combine the best of the two worlds – traditional toys and the power of computers and electronic chips. Experts predict that almost every toy will be powered by interactive technology in near future”.

- Herman D’Hooge and team, smart toys: Brave new world

• “Researchers are now exploring ways of adding computational capabilities to everyday objects ranging from notepads and desktops to eyeglasses and shoes”.

- weiser,M.(1991). The computer for the 21st century. Scientific American 265,3,94-104.

• “Our goal in designing new “digital manipulatives” is to make a new set of concepts salient for children. Our basic strategy is to embed computational and communications capabilities in traditional children’s toys”.

- Mitchel Resnick & team at MIT media lab. Digital manipulatives: New Toys to think With

Featherweight Computing

• Anticipated target user is from remote rural areas. They may be…

– Illiterate or semi-literate adults

– Children

– Physically disabled (e.g., blind)

– Economically poor

– Without access to consistent electrical power

• Characteristics of featherweight computing:

– Serves single purpose well

– Very cost-effective

– Simple user interaction

– Low power

– Robust, highly reliable

Actual User

Kids Illiterate

Adults

Blind People

Electronic Book

• Target customer – Strong interest in improving quality of life through increased literacy and

information.

– Need effective ways to access information (e.g., health, hygiene, agriculture, etc.) in local languages.

• Solution: electronic book – Designed for education

– Could cost US$20-30

– Extends standard “book” format; touching book causes audio playback

– Uses 4 AA batteries

– Strong plastic encasing

• Existing products – LeapFrog LeapPad

– Fisher-Price PowerTouch

Our Goals at MSRI

• The TEM group is interested in experimenting with electronic books in rural India.

• Existing products do not allow flexibility to create local content.

• We will create an electronic book where we have the flexibility to change the content ourselves.

• If we have time, we would like to experiment with our electronic book and try it with children in Bangalore slums.

Generic Block Diagram: E Book

Micro-controller

Digital Data to

Analog Signal

Converter

Touch

Pad

Storage

Device

Page

Decoder

Speaker

Internal

RAM

Different Possibilities that

We Considered

ATmega

162

Serial

DAC

SD

MMC

Speaker

ATmega

162

PWM

(LPF)

capacitance

Sensor

USB

drive

PIR

Sensing

Tech Speaker

ATmega 162

LPF

NCP

MMC

Speaker

ATmega

162

Parallel

DAC

MMC

card

ADC-08 Speaker

4x4

Keypad

8x8

Keypad

4x4

Keypad

Audio

Amplifier

1 2 3 4

5 6 7 8

9 0 A B

C D E F

(1) (2)

(3) (4)

Optimized Block Diagram for

Final Implementation

MuC

Key Pad

MMC

LPF

(5th order)

Audio

AMP

Speaker

XTAL

Gnd

Gnd

Vcc

Vcc

Why did we choose?

1. Cheap and Cost Effective

2. Components are Easily available

3. Easy interfacing of Blocks

4. Easy programming for

configuration

1 2 3 4

5 6 7 8

9 0 A B

C D E F

Basic Building Blocks (Components)

• MuC ATmega 162

• MMC NCP 128MB

• Keypad 4x4

• LPF 5th Order using

LM324

• Audio Amplifier LM386

• Speaker 8-ohm

Cost (INR)

60/-

200/- (16MB)

20/-

10/-

10/-

20/-

Total 320/- (INR) This Estimation is valid for production of 1000 Such books.

Flow Diagram (E Book)

Power ON

Touch

An object on

PAD

Audio

Feedback

POWER

ON/OFF

Wait for

Next INT

ON

OFF

Good Bye

Power ON

All device

•I/O port DIR_INIT

•MMC_INIT

•Wait for INTR

Keypad

PRESS?

•Calculate ADD (Size, CLUS) of file

•Read SEC 1 by 1 into BUFF

Take A PCM Sample from BUFF

Generate PWM equ. to DIGI_DATA

FILE_SIZE = FILE_SIZE - 512;

Y

N

FILE_SIZE?

0 1

Flow Chart of System Events

User Interaction and Responses from Device

Microcontroller : ATmega-162

• Computer on a chip – CPU core

– Memory (ROM and RAM)

– Digital I/O ports

– Easy interfacing

Key features: • High performance

• Low power consumption (2.7- 5V)

• High code density (16KB)

• In-system development

• SPI ( MMC Interfacing )

• 2 USARTS (RS-232 Interfacing)

• PWM Signal Generation Capability

• 3 Programmable Timer

MMC • Multimedia card

– Storage for audio data

– Portable

– Removable

• Advantages: – Moderate cost

– Robust

– Small size

– Serial Peripheral Interface

• 4 signals for interface

– Data in

– Data out

– Clock

– Chip select

1

2

3

4

5

6

7

5.6K

20

21

AT

me

ga

162

1

40

MuC

/SS

MOSI

MISO

SCK

RST

OC1A

PA

PC

PB

PD

22pF

16MHz

Vcc

XTAL1

XTAL2

MMC

User Interaction :Touch Keypad

• Allows user interaction with device

• Based on contact or pressure

• Considered: – IR touch panel

– Capacitance touch pad

– Keypad(4x4, 8x8)

• Advantages: (4x4 keypad) – Inexpensive

– Easy to interface

– Readily available

– Sturdy

4x4Keypad

1

4

7

A

8

0 B

9

3 F

E

2

D

C

5 6

Keypad Interfacing : How It Works?

All the rows are grounded

and columns are scanned

until one of them is zero.

One row is high at a time

and all the columns are

read.

For Some Combination all

the column will become High.

The combination of column

read (0111,1011,1101,1110)

and Value sent to Row

(1000,0100,0010,0001)

will give a unique value

which can be easily

mapped into

“unique Key PRESS”.

Schematic for keypad interfacing

4x4

Keypad

1

4

7

A

8

0 B

9

3 F

E

2

D

C

5 6

20K(each)

20

21

AT

me

ga

162

1

40

MuC

/SS

MOSI

MISO

SCK

RST

OC1A

PA

PC

P

B

P

D

20K

22p

F

16MHz

Vcc

XTAL1

XTAL2

What is a PWM Signal?

• When communication by pulses was introduced, the

Amplitude (PAM), Phase (PPM) and Pulse width (PWM)

become possible modulation options.

• In PWM the duty cycle of each pulse of a symmetric

Square Wave is modified to proportional with the audio

sample Value at that Instant.

• How do we Implement that?

PWM Signal: Audio Generation

PWM Signal to Analog Waveform:-

1. A simple RC circuit, fourth-order low pass active filter and audio amplifier are used to convert the PWM signal into audio signal.

2. RC circuit and Low Pass Filter is used for harmonics and carrier frequency generated by PWM signals. The RC circuit is for attenuation. It prevents the saturation of the low pass filter and the audio amplifier

3. The audio amplifier will drive the speaker to generate the audio.

The output sound quality is as good as an AM radio.

Active LPF: PWM signal to Audio

Analog wave Generation

LOW PASS

FILTER

Audio

AMPLIFIER

PWMO

To LPF

PWMO

33K + +

+

5th Order LOW Pass Filter

LM324

850p

F

850pF

850pF

850pF

46K

850pF

33K

68K 56K

Vout

200uF

10ohm

LM386

+

50nF

2 4

5

3

6

Vin Vout

Complete Schematic (All in One)

• Include all the library files

• MMC initiation

• FAT16 Implementation

• 4x4 Keypad press detection function

• Reading the clusters, sector by sector

• PWM signal for each byte

• Check the size of file and Data Read

• Read the cluster until the data read==file size.

• Wait for a new key press.

+ +

+

5th Order LOW Pass Filter

LM324

850p

F

850pF

850pF

850pF

46K

850pF

33K

6

8

K

4x4

Keypad

1

4

7

A

8

0 B

9

3 F

E

2

D

C

5 6

20K(each)

1

2

3

4

5

6

7

5.6K

20

21

AT

me

ga

162

1

40

MuC

/SS

MO

SI

MIS

O

SCK

RST

OC1A

PA

PC

P

B

P

D

20K

22p

F

16MHz

Vcc

XTAL1

XTAL2

200uF

10ohm

33K

56K

LM386

+

50nF

2 4

5

3

6

MMC

Program Structure:

Future Improvements:

• Keypad can be replaced by a better and sophisticated

Touch pad (i.e. Power Touch Pad).

• To improve the audio quality of sound a Low pass filter

IC can be used in place of LPF made of Discrete

components.

• MMC connectors will make the transfers of files from PC

to board Easy.

• Using MP3 decoder files directly can be stored in mp3

format which is most popular because of it’s smaller size

and good voice quality. Right now only 8-bit PCM wave

format files can be used.

Thanks

Rajkumar

Backup Slides

Analog to Digital Recording and playing Chain

ADC

Continuously varying electrical energy is an analog of the sound pressure wave.

Microphone converts acoustic to electrical energy.

ADC (Analog to Digital Converter) converts analog to digital electrical signal.

Digital signal transmits binary numbers.

DAC (Digital to Analog Converter) converts digital signal in computer to analog for your headphones.

DAC

Basic Digital Audio Concepts

• Sampling rate – Number of sample taken of a signal in a given time

(usually one second)

• Bit depth – Describes the accuracy of the audio data

• Channels – E.g. Stereo has two channels

• Bit rate – Measured in kilobits per second (Kbps) is a function

of the bit depth and sampling rate

Basic Wave File Layout

Chunk ID "RIFF"

Chunk Data Size

RIFF Type ID "WAVE"

Chunk ID "fmt "

Chunk Data Size

Chunk Data Size

Sample Format Info Chunk ID "data"

Digital Audio Samples

52 49 46 46 9e a6 03 00 57 41 56 45 66 6d 74 20 RIFFž¦..WAVEfmt 1e 00 00 00 55 00 01 00 22 56 00 00 a0 0f 00 00 ....U..."V.. ..

01 00 00 00 0c 00 01 00 02 00 00 00 68 00 01 00 ............h.. 71 05 66 61 63 74 04 00 00 00 be 1e 14 00 64 61 ..q.fact....¾...

74 61 60 a6 03 00 ff f3 40 c4 00 13 c1 51 ed b9 data`¦..ÿó@Ä..

Chunk ID

Chunk

Data Size RIFF Type Chunk ID

Chunk Data Size

16 + extra format bytes Compression

code Number of

channels

Sample rate Average bytes

per second

Block align Significant bits

per sample Extra format bytes

data chunk size

Sample Data

Chunk ID