Talking,Singing,and Game Boy Printing

Parallax Expo 2012

by Joe Grand Grand Idea Studio

Me.

electrical engineer. hardware hacker. former tv host.

Designer

of

Parallax things...

Agenda

Emic 2 Text-to-Speech Module LRF-to-Game Boy Printer Hack

Emic

2:

Overview

Multi-language text-to-speech synthesizer Fonix DECtalk 5.0e1 TTS engine via Epson S1V30120 TTS IC Dynamic control of speech & voice characteristics

-

Pitch, speaking rate, word emphasis, phoneme, etc.

5V @ 30mA idle, 46-220mA active 1.25" W x 1.5" L x 0.37" H Significant improvements over original Emic 1

Emic

• • •

2:

User

Interface

Simple TTL-level serial interface, 9600bps ASCII commands/responses Connections to host: 1. GND 2. VCC 3. SOUT (Serial Out) 4. SIN (Serial In)



Audio output: - SP+/SP- (8Ω Speaker, Bridge-Tied Load)

-

1/8" Audio Jack (Single-Ended)

Emic

• • • • • • • • • • •

2:

Commands

Convert text-to-speech (1023 byte maximum) Play demonstration messages Pause/stop playback Select voice (of 9) Set audio volume (-48 to 18dB) Set speaking rate (75 to 600 words/minute) Select language (English or Castilian/Latin Spanish) Select parser (DECtalk or Epson) Revert to default TTS settings Print version information Print list of available commands

Emic

2:

Block

Diagram

Emic

2:

Development Platform

Freescale DEMOQE128 + Epson S1V30120 Eval. Board + Modified Emic 1Module + Custom Interface PCB

Emic

2:

PCB

2

3

4

5V0

SDA2

SDA1

4 PIU204

5 PIU205

38 PIU1038 37 PIU1037

4.7k

PIR401 PIR501 NLRX RX NLTX TX

PIJ101

34 PIU1034

PTB0/KBIP4/RXD1/ADP4 33 PIU1033 PTB1/KBIP5/TXD1/ADP5 32 PIU1032 PTB2/KBI1P6/SPSCK1/ADP6 31 PIU1031 PTB3/KBI1P7/MOSI1/ADP7 19 PIU1019 PTB4/TPM2CH1/MISO1 18 PIU1018 PTB5/TPM1CH1/SS1 13 PIU1013 PTB6/SDA1/XTAL 12 PIU1012 PTB7/SCL1/EXTAL 43 42 PIU1042 36 PIU1036 35 PIU1035 30 PIU1030 29 PIU1029 28 PIU1028 27 PIU1027 PIU1043

B

Background Debug Mode (BDM)

COJ3 J3

NO FIT

PIJ305 PIJ303 NLBKGD BKGD PIJ301

5 3 1

3V3

PIR601

3V3

6 4 2

PIJ306 PIJ304

NL0RESET /RESET

PIJ302

PIR602

COC2 C2

Header 2X3

0.1uF

COR6 R6

10k

PTF0/ADP10 PTF1/ADP11 PTF2/ADP12 PTF3/ADP13 PTF4/ADP14 PTF5/ADP15 PTF6/ADP16 PTF7/ADP17

63 64

PIU1063

IRQ/RESET BKGD/MS VDD

PIU1064

14 PIU1014

4 PIU104

PONRESET NRESET

2 PTD0/KBI2P0/SPSCK2 PIU102 1 PTD1/KBI2P1/MOSI2 PIU101 46 PTD2/KBI2P2/MISO2 PIU1046 45 PTD3/KBI2P3/SS2 PIU1045 44 PTD4/KBI2P4 PIU1044 24 PTD5/KBI2P5 PIU1024 23 PTD6/KBI2P6 PIU1023 22 PTD7/KBI2P7 PIU1022

POSCLK SCLK POMOSI MOSI

POMISO MISO

POSFRM1 SFRM1

POMSGRDY MSGRDY

60 PTE0/RPGIO0/TPM2CLK/SPSCK1 PIU1060 59 PTE1/RGPIO1/MOSI1 PIU1059 54 PTE2/RPGIO2/MISO1 PIU1054 53 PTE3/RPGIO3/SS1 PIU1053 39 PTE4/RPGIO4 PIU1039 17 PTE5/RGPIO5 PIU1017 16 PTE6/RGPIO6 PIU1016 5 PTE7/RGPIO7/TPM3CLK PIU105 26 25 21 20 PIU1020 62 PIU1062 61 PIU1061 52 PIU1052 51 PIU1051 PIU1026 PIU1025

B

NLLEDR LEDR NLLEDG LEDG

PIU1021

COR7 R7

270

COD1B D1B KPB-3025ESGC

PIR702

PIR802

PIR701 PID103

PIR801 PID101

Green

COR8 R8 470 COD1A D1A KPB-3025ESGC Red

PID104

PIU106 PIU104 PIU107 PIU108 PIU109 PIU10 PIU10 PIU104

6

3V3

15 PIU1015 3 PIU103

PTC0/RGPIO8/TPM3CH0 PTC1/RGPIO9/TPM3CH1 PTC2/RGPIO10/TPM3CH2 PTC3/RGPIO11/TPM3CH3 PTC4/RGPIO12/TPM3CH4/RSTO PTC5/RGPIO13/TPM3CH5/ACMP2O PTC6/RGPIO14/RXD2/ACMP2+ PTC7/RGPIO15/TXD2/ACMP2-

58 PTG0 57 PIU1057 PTG1 56 PIU1056 PTG2/ADP18 55 PIU1055 PTG3/ADP19 PIU1058

PIC202 PIC201

PTH0 PTH1 PTH6/SCL2 PTH7/SDA2

1

3 PIU203

COR5 R5

PTA0/KBI1P0/TPM1CH0/ADP0/ACMP1+ PTA1/KBI1P1/TPM1CH1/ADP1/ACMP1PTA2/KBIP2/SDA1/ADP2 PTA3/KBIP3/SCL1/ADP3 PTA6/TPM1CH2/ADP8 PTA7/TPM2CH2/ADP9

PID102

2

SCL1

47 PIU1047

3

SCL2

48 PIU1048

4

6 PIU206

5V0

PIJ102

2 PIU202

VREF2

49 PIU1049

VSS

PIJ104

VREF1

7 PIU207

COR4 R4 4.7k

50 PIU1050

PIR402 PIR502

VSS

NLSIN SIN NLSOUT PIJ103 SOUT

PIR201 PIR301

GND

EN

3V3

41

PIJ105

POSP0 SP+ POSP0 SP-

0.1uF

1 PIU201

VSSAD

PIJ106

8 PIU208

11

6 5 4 3 2 1

4.7k

3V3

COU2 U2 PCA9306DCT

COC1 C1

VREFL

Header 6

COR3 R3

200k

9

4.7k

PIR101 PIC102 PIC101

A

10

COR2 R2

COJ1 J1

PIR202 PIR302

6

MCF51QE128CLH

VREFH

5V0

5

COU1 U1 COR1 R1

VDDAD

PIR102

VDD

A

(Main)

7

1

Schematic

8

2:

40

Emic

C

C

10mS delay from power-up to EN @ 2V = 0.5RC Rail must go high > 10uS after 1V8 per Epson S1V30120 Power-On/Reset Timing spec.

5V0

PIR902

D

PIR901 PIC10 2 PIC10 1

COC3 C3

1.0uF

COR9 R9

200k

Place close to power input

COU3 U3 MIC5205-3.3YM5 1 5 PIU301 IN OUT PIU305

5V0

PIC302 PIC301

3

PIU303

2 PIU302

3V3 3V3

PIC401 PIC402

EN GND BYP

4 PIU304

PIC902 PIC901

COC9 C9

COC4 C4 10uF

COC5 C5 10uF

PIC501 PIC502

3V3

PIC602 PIC601

3V3

COC6 C6

0.1uF

PIC702 PIC701

COL1 L1

3V3

COC7 C7 0.1uF

PIC802 PIC801

PIL101

COC8 C8

0.1uF

COL2 L2 PIL201

80R@100MHz, 1A PIL102

80R@100MHz, 1A

NOTE: RESISTORS ARE IN OHMS +/- 5% AND CAPACITORS ARE IN MICROFARADS UNLESS OTHERWISE NOTED. SEE BOM FOR ACTUAL VOLTAGE AND SPECIFICATION.

PIL202

470pF

COC10 C10

D

0.1uF TITLE

Distributed under a Creative Commons Attribution 3.0 US license

1

2

3

4

Emic 2 Text-to-Speech Module (a30016)

DaTE

FILENaME

3/23/2012

SIZE

B 5

SHT

1

OF

2

DRaWN BY

REV

Joe Grand

A

6

Emic

2:

Schematic

1

2

(TTS)

3

4

5

6

3V3

COU5 U5 3V3 A

POMSGRDY MSGRDY

3V3

PIR10 2

COR10 R10 47k

PIR10 1 PONRESET NRESET

COY1 Y1

3V3

SG-3030JC 32.7680KB3 3 VCC OUT PIY103

4 PIY104

1 PIY101 VIO

46 PIU5046 52 PIU5052 53 PIU5053 54 PIU5054 55 PIU5055 58 PIU5058 59 PIU5059 60 PIU5060 48 PIU5048 47 PIU5047 1 PIU501 2 PIU502

GPIOA0 GPIOA1 GPIOA2 GPIOA3 GPIOA4 GPIOA5 GPIOA6 GPIOA7 GPIOA8 GPIOA9 GPIOA10 GPIOA11

NLNRESET NRESET

PIU5062

NRESET

NLCLKI CLKI

36 PIU5036

CLKI

62

3V3

2 GND PIY102

8

28 PIU5028 37 PIU5037 49 PIU5049 56 PIU5056 64 PIU5064

HVDD HVDD HVDD HVDD HVDD HVDD HVDD

3 PIU503 11 PIU5011 20 PIU5020 24 PIU5024 29 PIU5029 39 PIU5039 45 PIU5045 50 PIU5050 57 PIU5057

LVDD LVDD LVDD LVDD LVDD LVDD LVDD LVDD LVDD

PIU508

18 PIU5018

B 1V8

PIR1902

S1V30120F01A100

6 PIU506 16 PIU5016 23 PIU5023 32 PIU5032 41 PIU5041 51 PIU5051 61 PIU5061

SIN SOUT SCLK SFRM1 SFRM2 HPO HPON HPOP AUDCLK SPPDN SPHMT SCANEN TESTEN TSTMODE0 TSTMODE1 TSTMODE2 EXCKM NTRST TDI TMS TCK TDO VCP

VSS VSS VSS VSS VSS VSS VSS

5 PIU505 POMOSI MOSI 9 PIU509 4 PIU504 POSCLK SCLK 7 PIU507POSFRM1 SFRM1 10 PIU5010

PIR1901

COR19 R19 47k

POMISO MISO

A

Bias

NLHPO HPO

26 PIU5026 17 PIU5017 21 PIU5021 22 PIU5022 31 PIU5031 30 PIU5030

2nd order low-pass filter Fc = 10kHz

COR13 R13

COR14 R14

1.5k

PIR1302

PIR1301

PIR1402

PIU5063

63

PIC1 02

42 PIU5042

PIC1 01

40 PIU5040 43 PIU5043 44 PIU5044 38 PIU5038 15 PIU5015 14 PIU5014 13 PIU5013 12 PIU5012 19 PIU5019 34 PIU5034

PLLVDD

33 PIU5033

PLLVSS

35 PIU5035

AVDD

PIU5027

AVSS

PIU5025

PIR1202

15k

PIR1201 PIR1602

PIR1401

PIC1202

COC11 C11

0.01uF

300mW typ. @ 8 ohm BTL

A3V3

PIC1201

COC12 C12

1000pF

PIR1601

COR11 R11

22k

PIR1102

COR12 R12

PIR1101

POSP0 SP+

COU6 U6

51k

COR15 R15 PIC1302

COR16 R16

PIC1301

2.2k

PIR1502

PIR1501

COC13 C13 0.22uF

51k

4

PIU604 3 PIU603

2 PIU602

PIC1401

COC14 C14

PIC1402

3V3

10uF

-IN +IN

VO1 VO2

BYPASS

VDD

1 PIU601 SD

COJ2 J2 SJ-3523-SMT

COC38 C38 0.22uF

LM4864MM

NLSP0 SP+ NLSP0 SP-

5

PIU605 8 PIU608

PIC3802

A5V0

6 PIU606

PIC3801

PIR20 2

POSP0 SP-

PIC1502 COC15 C15 PIC1501 0.1uF

7 GND PIU607

PIJ201 PIJ203 PIJ205

COR20 R20 10 ohm

PIR20 1 PIC3902 PIC3901

COC39 C39

0.047uF

B

1V8

A3V3

27 25

C

C

1V8

5V0 1

COC27 C27

1.0uF

Adjustable output Vout = 1.242V x [(Rb / Rt) + 1] = 1.806V

COU4 U4

PIC2702 PIC2701

MIC5205YM5

PIU401

IN

3 PIU403

EN

2

PIU402

5

OUT

PIU405

GND BYP

PIU404

PIR1702 PIR1701 PIR1802

4

PIC2902 PIC2901

COC29 C29

470pF

PIR1801

PIC2801 PIC2802

COR17 R17

220k, 1a

COR18 R18

COC28 C28 10uF

PIC1602 PIC1601

COC16 C16

0.1uF

PIC1702 PIC1701

1V8

PIC1802 PIC1801

COC17 C17 0.1uF

1V8

COC18 C18

0.1uF

PIC1902 PIC1901

1V8

COC19 C19 0.1uF

PIC20 2 PIC20 1

1V8

COC20 C20

0.1uF

PIC2102 PIC2101

1V8

COC21 C21 0.1uF

PIC2 02 PIC2 01

1V8

COC22 C22

1.0uF

PIC2302 PIC2301

3V3

1V8

COC23 C23 0.1uF

PIC2402 PIC2401

A3V3

COL4 L4

5V0

3.3uH

PIL401

PIL402

COC24 C24

COL3 L3

80R@100MHz, 1A

PIL301

PIC2501 PIC2502

1.0uF

1V8

A5V0

PIL302

PIC2601 PIC2602

COC25 C25 10uF

COC26 C26 10uF

Place near oscillator 3V3

PIC30 2 PIC30 1

100k, 1a

1V8

3V3

COC30 C30

0.01uF

PIC3102 PIC3101

3V3

PIC3202 PIC3201

COC31 C31

0.1uF

3V3

COC32 C32

0.1uF

PIC3 02 PIC3 01

3V3

COC33 C33 0.1uF

PIC3402 PIC3401

3V3

COC34 C34

0.1uF

PIC3502 PIC3501

3V3

COC35 C35 0.1uF

PIC3602 PIC3601

NOTE: RESISTORS ARE IN OHMS +/- 5% AND CAPACITORS ARE IN MICROFARADS UNLESS OTHERWISE NOTED. SEE BOM FOR ACTUAL VOLTAGE AND SPECIFICATION.

A3V3

COC36 C36

0.1uF

PIC3702 PIC3701

COC37 C37 1.0uF

D

D

TITLE

Distributed under a Creative Commons Attribution 3.0 US license

1

2

3

4

Emic 2 Text-to-Speech Module (a30016)

DaTE

FILENaME

3/23/2012

SIZE

B 5

SHT

2

OF

2

DRaWN BY

REV

Joe Grand

A

6

Emic

2:

Demo

Code

BASIC Stamp 2 Propeller Arduino Microchip PIC12F675 (Emic 2-to-Elmo)

BASIC

Stamp

2

Propeller

Arduino

PIC12F675

(Emic

2-to-Elmo)

Before...

PIC12F675

(Emic

2-to-Elmo)

During...

PIC12F675

(Emic

After...

2-to-Elmo)

Emic

2:

How

to

Get

One

Production manufacturing in progress right here in Rocklin! Available through Parallax (#30016) in mid-May Full details soon @ www.grandideastudio.com/portfolio/ emic-2-text-to-speech-module/

LRF-to-Game

Boy

Printer



Parallax Laser Range Finder module (#28044) meets old school Nintendo Game Boy Printer



Inspired by furrtek's GBP reverse engineering



Write-up @ http://forums.parallax.com/ showthread.php?136293



LRF

Module:

Front

LRF

Module:

Back

LRF-to-GBP:

Details



LRF: 160 x 128 greyscale image @ 8bpp



GBP: 160 x ∞ @ 2bpp



Modified version of original LRF firmware



Only need camera interface, frame grabber, and serial communication functionality LRF grabs single frame when button pressed Frame processed and sent to GBP via SPI

Created Game Boy Printer Interface object for Obex (Spin): http://obex.parallax.com/ objects/814/

LRF-to-GBP:

• • • • •

Image

Processing

Need to rearrange all the pixels and downsample

-

LRF frame stored in a linear format GBP expects image data in a series of tiles (blocks) Each tile = 8 pixels * 8 pixels 20 tiles horizontal per band 2 bands per buffer 640 bytes per transaction

www.atomicvpp.com/wpblog/2012/03/04/gameboy-printer-project/

LRF-to-GBP:

Schematic Gameboy Link Connector

Laser Range Finder Module Parallax a28044 P1 Header 4 1 2 3 4

SIN SOUT 5V

P3 Header 6 GBIN GBOUT

R1 220

GBCLK

R2 220

5V

P22 P23

1 2

SCLK

R4

Battery Input P4 1 2 BH9V

R5 10k

R3 220

S1 2

SW1

SPST

2.2k

EG1271 3

U1

1

1 C1 0.33uF

LM7805ACT 3 IN OUT GND 2

P2 Header 2

5V

C2 0.1uF

1 2 3 4 5 6

LRF-to-GBP:

Front

LRF-to-GBP:

Back

LRF-to-GBP:

Demonstration

LRF-to-GBP:

Results

Take your own pictures during the expo!

R G . W WW

A

AS E D I ND

T

CO . O I UD

M