robosapien powered by msp430 - 3 powe… · short hint list for the budding rs hacker. first off,...
TRANSCRIPT
Slide 1
RoboSapien Powered by MSP430
Pedro Dinis Gaspar, António Espírito Santo, Humberto Santos, Bruno Ribeiro
Engineer/Assistant Professor
Tiago Godinho, Filipe Martins, Luís CostaLast year Electromechanical Engineering Students
Slide 2
Agenda• MSP430@UBI-DEM:
Electromechanical engineering classes and,Last year projects
• Electromechanical Engineering classes - Robotics:RoboSapien powered by MSP430
• Last year projects:Sounds Recording and Reproduction System based in MSP430 for the RoboSapien
• Summary
Slide 3
MSP430@UBI-DEM• The MSP430 microcontroller family is used in the
Electromechanical Engineering Department of the University of Beira Interior (DEM-UBI) – Portugal in:
Electromechanical engineering classes and,last year projects
• Due to:its cost;plenty of hardware starter kits and software integrated development environments either free or with a reduced cost;Amount of peripherals integrated in the μC;rapid learning curve;low power features;high pinout counting;C and C++ easy programming.Among others…
Slide 4
MSP430@UBI-DEM• Electromechanical Engineering classes• Introduction to Microprocessors:
Description of the various systems embedded in a microcontroller;Architecture characteristics;Memory Hierarchy;Internal modules;Input/Output ports;Peripherals;Programming language Assembler / C;Arithmetic;Communications networks.
• All these topics use MSP430 as example• Laboratorial classes demonstrating its capabilities
Slide 5
MSP430@UBI-DEM• Electromechanical Engineering classes• Instrumentation and Data Acquisition (Lab examples):
MSP430 Monitoring System - Develop a low cost system for event record.
PCB board routing
PC data transmission
Tilt sensor Signalconditioning
LCDLED’s
Lightsensor
Signalconditioning
Buttons
I/O
I/O
I/O
USART
Slide 6
MSP430@UBI-DEM• Electromechanical Engineering classes• Automation (Lab examples):
MSP430 home heating, illumination and security control.
LightsensorIndoor
Comparator
Lightsensor
OutdoorComparator
TemperatureSensor
S
Relay
Relay
Motor Speedand Direction
Control
Heating
Motor
Light
ADC
I/O
LCD Controller
Development board Indoor light sensor
Slide 7
MSP430@UBI-DEM• Electromechanical Engineering classes• Robotics (Lab examples):
MSP430 control board and software for the FESTO robot.
LED’s Buttons
PositionSensor
Endcourseswitch
Comparator
OpticalPhotocouplers Optical
Photocouplers Drivers
MOTOR
USART
ADC
I/O
I/O
Rotational optical sensor Linear optical sensor for longitudinal movement
Slide 8
• Electromechanical Engineering classes - Robotics:
2006 Project - RoboSapien powered by TI MSP430;
Born by the collaboration between DEM-UBI and TI;
Substitution of RoboSapien’s control/regulation electronics;
Replicate the RoboSapien operation;
Evidencing the capabilities of TI MSP430;
To motivate the students and to develop a technology demo "vehicle".
MSP430@UBI-DEM
Slide 9
RoboSapien powered by MSP430• The tasks involved in the project consisted in the:
(1) analysis of the robot dynamics (evaluation of the robot movements and its characteristics);
(2) analysis of all sensor/actuator devices on the robot and respective signal conditioning and regulation electronics;
(3) development of the hardware (PCB boards and electronics) and software (C code for the controlling program in the MSP430 to commit robot dynamics); and
(4) tests and development of new functionalities.
Slide 10
Who is RoboSapien?• RoboSapien (RS) is a toy-like biomorphic robot.
• Is preprogrammed with moves, and also controlled by an IR remote control;
• It is capable of:a walking motion;grasp objects with either of its handsthrow grasped objects with mild force;
• It has a small loudspeaker unit, which can broadcast several different vocalizations.
Orig
inal
Rob
oSap
ien
Slide 11
Who is RoboSapien?• A brief presentation of the RoboSapien operation.
Orig
inal
Rob
oSap
ien
Slide 12
Who is RoboSapien?• RoboSapien views.Frontal view, seven motors move the robot. Side view.
Slide 13
Who is RoboSapien?• Dynamic walking gait of RoboSapien.(1) The trunk motor tilts the upper body to the right. The center of
mass shifts over the right foot. The left foot lifts from the ground.
(2) The leg motors move into opposite directions, resulting in aforward motion of the robot. As the upper body swings back, the left foot regains contact with the ground.
(3,4) Symmetrical to (1,2).
Slide 14
Programming of the RoboSapien• The RS controller, is equipped with a basic level of
programmability.
• Users can string together movement commands to form either macros or mini-programs (instructions sets).
• Broadcast of an instruction-set to the RS, save it on-board memory for later execution.
• Sensor-keyed instruction set, performing a specific set of actions on contact with a specific sensor system.
Orig
inal
Rob
oSap
ien
Slide 15
RS’s Remote Control• The RS’s remote control unit has 21 different buttons.
With the help of two shift buttons, 67 different robot-executable commands are accessible.
All DemoDemo2Walk backward
Demo 1DanceTurn step right
WhistleWalk forwardTalk back
RoarLeft throwLeft thump
Right thumpLeft strike 3Left sweep
Right sweepLeft strike 2Right throw
Wake upRight arm outRight arm up
Turn step leftRight arm downRight arm in
StopLeft (turn left)Reset
Step forwardLeft strike 1Left pick up
Step backwardLean rightLean left
Right (turn right)Lean forwardLean back
Right strike 3Left arm upLeft arm out
Right strike 2Left arm inLeft arm down
Right strike 1High FiveFart (Oops)
Right pick upBurpBulldozer
Orig
inal
Rob
oSap
ien
Slide 16
RS eye patterns• Depending on the command that is executed, the RS’s
eyes have different patterns.• The 6 outputs for the eyes (P2.0 to P2.5) can be used as
a very effective digital-level feedback source. His eyes give distinct patterns for all conditions.
Orig
inal
Rob
oSap
ien
Slide 17
User modifications• Some words of the Robot Tech Support, from WowWee Ltd.
“The RoboSapien is designed for modification. Here is theshort hint list for the budding RS hacker.
First off, we must warn you that completely replacingthe RS brain should only be attempted by those witha lot of time, electronic skills, and programming ego.
You don’t have to though — if you carefully remove theconnectors and lift the RS motherboard, on the back youwill find all inputs and outputs labeled, and right next to gold pads convenient for soldering wires.”
in http://www.robosapien1.com/resources/official-mod-guide/
Orig
inal
Rob
oSap
ien
Slide 18
User modifications• Mark Tiden designed the RS to be easily modified or
hacked;
• The electronics inside the RS are easily accessed and clearly labeled;
• A growing community of hackers have devoted themselves to adding new functionalities to the robot.O
rigin
al R
oboS
apie
n
Slide 19
User modifications• microbi’s Robosapien mods (http://www.angelfire.com/droid/rsv2/)
• Active mods: hand-beams, hand-Led’s, heartbeat, voiceoff, tunnel-beam, blue EYES
• Robosapien RF Sound Mod (http://home.comcast.net/~robosapien/rfmod.htm)
Robosapien Camera Mod (http://home.comcast.net/~jsamans/robo/robocam.htm)
• Active mods: wireless camera;wireless radio; frequency audio;pc control.
Orig
inal
Rob
oSap
ien
Slide 20
User modifications• RoboSapienPets RoboSapien page (http://www.aibohack.com/robosap/)
• Active mods: SuperSapien microcontroller mod,color and motion tracking CMUCam
• Mark C’s Robosapien Hacking Site (http://homepages.strath.ac.uk/~lau01246/robot/myhackrs.shtml)
• Active mods: microcontrollers (PicMicrocontrollers, and Palm Pilot controllers forthe Robosapien)
Orig
inal
Rob
oSap
ien
Slide 21
User modifications • Robocup German Open 2005 tournament;• 2 teams of 3 RSs each played the 1st soccer match of
humanoid robots worldwide;• Head replaced by a PDA allowing the perception of its
environment using the camera;• Information sended though the PDA's IR, to a PC.
Orig
inal
Rob
oSap
ien
Slide 22
Controller U2O
rigin
al R
oboS
apie
n
• M means motors, • P means input or output port, • VDD is raw battery voltage (caution: fluctuates wildly) • Vcc is regulated 3.6V and Gnd is universal ground.
Slide 23
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Left shoulder Right ShoulderM2- M2+ Vcc P1.3 P1.6 Vcc M4- M4+
Motors
Slide 24
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Left shoulder Right ShoulderM2- M2+ Vcc P1.3 P1.6 Vcc M4- M4+
Shoulder position switch
Slide 25
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Left elbow Right elbowP1.2 M3+Vcc M3-Vcc VccP1.1 P2.7P2.6 P1.4Vcc VccM1+ VccM1- P1.5
Motors
Slide 26
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Left elbow Right elbowP1.2 M3+Vcc M3-Vcc VccP1.1 P2.7P2.6 P1.4Vcc VccM1+ VccM1- P1.5
Finger switch
Slide 27
Left elbow Right elbowP1.2 M3+Vcc M3-Vcc VccP1.1 P2.7P2.6 P1.4Vcc VccM1+ VccM1- P1.5
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Elbow position switch
Slide 28
Left elbow Right elbowP1.2 P1.5Vcc VccVcc VccP1.1 P1.4P2.6 P2.7Vcc VccM1+ M3-M1- M3+
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Arm LEDs
Slide 29
Left leg/hip Right leg/hipM6+ M7-M6- M7+
TiltM5+M5-
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Motors
Slide 30
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
HeadVcc P2.0 P2.1 P2.2 P2.3 P2.4 P2.5 IR-OUT Gnd Vrx
Left eye LEDs
Slide 31
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
HeadVcc P2.0 P2.1 P2.2 P2.3 P2.4 P2.5 IR-OUT Gnd Vrx
Right eye LEDs
Slide 32
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Component SpeakersVcc VDD Vcc P1.4 SPK1 SPK1 IN OUT Fr VDD Fr
ComponentP1.1 Vcc Gnd Vcc
Slide 33
Controller U2 - ConnectionsO
rigin
al R
oboS
apie
n
Component SpeakersVcc VDD Vcc P1.4 SPK1 SPK1 IN OUT Fr VDD Fr
ComponentP1.1 Vcc Gnd Vcc
Foot switch
Slide 34
Controller U2O
rigin
al R
oboS
apie
n
Slide 35
Controller U2O
rigin
al R
oboS
apie
n
Slide 36
Motor driver U3O
rigin
al R
oboS
apie
n
Slide 37
IR commands• To input commands is used the direct serial input to the
IR-OUT pin (active low signals, 1200 bps).
• Timing based on 1/1200 second clock (~ 0,833 msec)Signal is normally high (idle, no IR).
• Data bits: for each of 8 data bits, space encoded signal depending on bit value (Sends the most significant data bit first). (Carrier is 39,2 kHz)
• BTW: The first bit (msb) is always 1 (valid codes are from 0x80 to 0xFF)
Orig
inal
Rob
oSap
ien
Slide 38
IR commands• Header: signal goes low for 8/1200 sec.• If the data bit is 0: signal goes high for 1/1200 sec, and
low for 1/1200 sec.• If the data bit is 1: signal goes high for 4/1200 sec, and
low for 1/1200 sec.• Example: Command Stop: 0x8E
Orig
inal
Rob
oSap
ien
Slide 39
RoboSapien Replication• The RS has the following devices and sensors:
IR receiver;Power switch;Microcontroller;Seven motors (hands, arms, feet and hip);Four foot touch sensors;Two hand touch sensors,Sound sensor;Seven LEDs;An external IR remote control.E
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Slide 40
Signal Analysis• Digital signals acquired from the electronic board ports;
• To know how the microcontroller work when the robot do a specific command function.
• The procedure consisted in the acquisition of the ports digital signals:
for a single motor,
related to command functions that combine several movements at the same time.
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 41
Signal Analysis• For the single movements we’ve used a Tektronix™
TDS220 oscilloscope.• For the robot combined movements, a PM3580 Logic
Analyzer was used.
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 42
Single motor signal graphics• Illustration of the output signal from the original
microcontroller and the signal that the motor receives.
output signal vs. Motor input signal Left elbow movementfrom the inside to outside and vice-versa
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 43
Combined motors graphics• Wires connected to the original microcontroller ports:
In order to connect it to a flat cable to measure the combined movements digital signals using a logic analyzer.
• Acquisition of the graphical digital signals for the microcontroller motor ports:
For all the combined functions defined in the remote control.
• Graphic functions only obtained for a side function movement of the robot:
Since other side does the same movements with opposite motors.
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 44
Combined motors graphics• Example: Output Ports Signals for the function “Oops”.• Signal “M1+” (Left Elbow Out) is “high”, for 531 msec and
the rest of the time (2125 msec) is “low”.• Signal “M3+” (Right Elbow Out) presents the same signal.• Both elbows executes the movement at the same time.
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 45
New RS Brain – MSP430• Removal of the original microcontroller from the RS
electronic board.
• Flat cables were used to wire theelectronic board to the kit OlimexMSP430F449-STK2 to test the motors.
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 46
MSP430 I/O functions
Foot goes forwardRight FootP2.5M7-Foot goes backRight FootP2.4M7+Foot goes forwardLet FootP2.3M6-Foot goes backLeft FootP2.2M6+Right leaningHipP2.1M5-Left leaning HipP2.0M5+Arm goes downRight ArmP6.7M4-Arm goes upRight ArmP6.6M4+Elbow goes in, and closes gripperRight ElbowP6.5M3-Elbow goes out, and opens gripperRight ElbowP6.4M3+Arm goes downLeft ArmP6.3M2-Arm goes upLeft ArmP6.2M2+Elbow goes in, and closes gripperLeft ElbowP6.1M1-Elbow goes out, and opens gripperLeft ElbowP6.0M1+
FunctionMotorMSP430F449 PortsLabel
Ele
ctro
mec
ham
ical
engi
neer
ing
clas
ses
-Rob
otic
s
Slide 47
Hardware - PCB boardE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s • Microcontroller: MSP430F149;
• Resources:Motors: P6.0 – P6.7 , P2.0 – P2.5;LEDs: P4.0 – P4.7;IR: P1.1;Switches: P1.2 – P1.3;
Slide 48
Hardware - PCB boardE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
C410uF
TCK
TMS
TDI
TDO
/TD
I
RST
/NM
I
XT2
INX
T2O
UT
DVcc11
P6.3/A32
P6.4/A43
P6.5/A54
P6.6/A65
P6.7/A76
VREF+7
XIN8
XOUT9
VeREF+10
VREF-/VeREF-11
P1.0/TACLK12
P1.1/TA013
P1.2/TA114
P1.3/TA215
P1.4/SMCLK16
P1.5
17
P1.6
18
P1.7
19
P2.0
/AC
LK20
P2.1
/TA
INC
LK21
P2.2
/CA
OU
T/TA
022
P2.3
/CA
0/TA
123
P2.4
/CA
1/TA
224
P2.5
/Ros
c25
P2.6
/AD
C12
CLK
26
P2.7
/TA
027
P3.0
/STE
028
P3.1
/SIM
O0
29
P3.2
/SO
MI0
30
P3.3
31
P3.4
32
P3.5 33P3.6 34P3.7 35P4.0/TB0 36P4.1/TB1 37P4.2/TB2 38P4.3/TB3 39P4.4/TB4 40P4.5/TB5 41P4.6/TB6 42P4.7/TB7 43P5.0/STE1 44P5.1/SIMO1 45P5.2/SOMI1 46P5.3 47P5.4 48P5.5
49P5
.650
P5.7
51X
T2O
UT
52X
T2IN
53TD
O/T
DI
54TD
I/TC
LK55
TMS
56TC
K57
RST
/NM
I58
P6.0
/A0
59P6
.1/A
160
P6.2
/A2
61A
Vss
62D
Vss
63A
Vcc
64
uP1MSP430F149
100nC3
+3.3
330RR2
TDO/TDITDITMSTCK
RST/NMI
+3.31 23 45 67 89 1011 1213 14
P1
Header 7X2
12pF C1
12pF C2
23
14
Y185SMX
12
P2 +3.3
100nC5 C6
10uF
DS1LED3
1234
P5
Switch
P12P13P14
P31P32P33
12345678
P6
LED
P40P41P42P43P44P45P46P47
P40
P41
P42
P43
P44
P45
P46
P47
P20P21P22P23P24P25
P20P21P22P23P24P25
R147K
10nF
C15
+3.3
+3.3
P60
P61
P62
P63P64P65P66P67
P60P61P62P63P64P65P66P67
P30
123456
P3
Motores 2
12345678
P4
Motores1
P11/IR
P11/IR
P12P13P14
4K7
R3
4K7
R4
4K7
R5
4K7
R6
4K7
R7
4K7
R8
4K7
R9
4K7
R10
LED1
LED2
LED3
LED4
LED5
LED6
LED7
LED8
LED1LED2LED3LED4LED5LED6LED7LED8
Q1BC847
Q2BC847
Q3BC847
Q4BC847
Q5BC847
Q6BC847
Q7BC847
Q8BC847
Slide 49
Hardware - PCB boardE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Slide 50
Software – Operations Principle[0] [1] [2] [3] [4] [13] [14]
0004252643 00
01693319531525 00
00000 00
00000 00
00000 00
[0]
[1]
[2]
[13]
[12]
Timers
Mot
ors
0
1
0
0
0
1
1
0
0
0
Motor State
Motor Initial Value
Motor 1M1+
M1-
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
M1+, M1- are logical motors;
Both represent the physical motor M1;
Note: M1+, M1- can’t possess the same high state (short circuit)
Example: M1 state 0
If M1+ = High & M1- = Low
then, M1 runs counter clockwise
Slide 51
Software – ArchitectureE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Slide 52
Software – Background taskE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Start
Initialization
Any Command?
No
DecodeCommand
Yes
Load CommandAction
BackGround Task Flow Chart
Slide 53
Software – System taskE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Motor (M1+)
Motor (n)Enable
Yes
Decrement Timer (n)
Timer (n) = 0?
Change Motor (n) Value
Get next Timer (n)
Yes
Timer (n) = 0?
Yes
Desable Motor (n)
No
No
Motor (...)
Motor (n)Enable
Yes
Decrement Timer (n)
Timer (n) = 0?
Change Motor (n) Value
Get next Timer (n)
Yes
Timer (n) = 0?
Yes
Desable Motor (n)
No
No
Start
Movement On ?
Refresh allMotors value
Movement ON ?
Put NextCommand No
Switch On?
Yes
Debounce
Switch On?
Yes
Put STOPCommand
Yes
END
System Task Flow Chart
No
No
Motor (M7-)
Motor (n)Enable
Yes
Decrease Timer (n)
Timer (n) = 0?
Change Motor (n) Value
Get next Timer (n)
Yes
Timer (n) = 0?
Yes
Desable Motor (n)
No
No
Yes
No
Slide 54
Software – IR command taskE
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Comunication OFF
ValidatePreamble
Communication OnSignal Higth
Signal : Higth to Low
Clear TBRCapture on rising edge
Preamble is valid
Clear TBRCapture on falling edgeInitialize data
Preamble NOT validTimeout Condition
Inicialization
Clear TBRCapture on falling edge
Initialize data
Timeout Condition
Clear TBRCapture on falling edge
Initialize dataPut command in the ring buffer
Valid Commad
Clear TBRCapture on falling edge
Initialize data
Commad IRS State Machine
Slide 55
Project conclusions• Successful attempt in the substitution of RoboSapien
control/regulation electronics by TI MSP430;
• Excellent demo vehicle of technology;
• Use the RoboSapien in laboratorial classes, as a way to demonstrate the embedded systems capabilities;
• With MSP430, the RoboSapien has a potential evolution capability.E
lect
rom
echa
nica
l eng
inee
ring
clas
ses
-Rob
otic
s
Slide 56
Future work• Include wireless communications like ZigBee;
• Expand computation capabilities (TI C2000) to include voice commands;
• Development of a user friendly PC high level application to perform new actions/movements;
Ele
ctro
mec
hani
cal e
ngin
eerin
g cl
asse
s -R
obot
ics
Slide 57
MSP430@UBI-DEMLa
st Y
ear P
roje
cts
• Last year projects
• Sounds Recording and Reproduction System based in MSP430 for the RoboSapien
• Implementation of a system of sounds with the particularity to reproduce the voice signal data, stored in flash memory by:
• PWM outputs available in the MSP430F449.• A digital to analog converter TI TLV5616CP.• The comparison between the methods give clear
advantage to the system that uses the external integrated circuit.
Slide 58
PWM frequencyLa
st Y
ear P
roje
cts
• The required frequency for the PWM output signal is equal to the DAC actualization frequency.
• Each alteration in the PWM duty cycle is equivalent to one DAC sampling.
• Clock frequency: 8 MHz• Resolution: 12 bits• PWM frequency: 1953 Hz
Slide 59
Global Architecture of the system• Application block diagram (Analog and digital blocks)
since the microphone to the speaker.
Last
Yea
r Pro
ject
s
Slide 60
MSP430 used peripherals• MSP430 Digital peripherals:• ADC12,• Timer_A and Timer_B,• flash memory.
• The signal conditioning circuit of the microphone is connected to channel 0 of the ADC12.
Last
Yea
r Pro
ject
s
Slide 61
Important States• 2 important states: Recording and Reproduction
• Recording state: 1st analog part and the digital one actives.
• During this time period, the data converted by the ADC12 will be stored in the flash memory.
• Reproduction state: digital part and the 2nd analog part will be actives.
• The voice signal is sent to the PWM output by TImer_B.• A filter was developed to improve the PWM DAC signal,
which is amplified and sent to the speaker.
Last
Yea
r Pro
ject
s
Slide 62
Microphone and Conditioning systemLa
st Y
ear P
roje
cts
• Pre-amplifying circuit and low pass filter• Microphone: input jack 3,5 mm (J1)• Amplifying stage: Active low pass filter (TI OA
TLE2141CP)
1k1
R3
56k
R4
27k
R5
11k
R6
18k
R7
470p
C3
10nC4
D1
D2
3
26
74
8
15
IC1a
TLE2141CP
4.7u
C2
1k1R1
4.7u
C1
680R2
24
1
53
J1
Microfone
+5V
Liga ao canal 0 do ADC12no MSP430F449(pino 95)
+5V
+5V
Slide 63
PWM DAC and active filterLa
st Y
ear P
roje
cts
• The PWM DAC is constituted by two RC series low pass filters.
• The digital signal in the TIMER_B compare output is converted to an analog signal.
• To reduce the attenuation amount of the signal produced by the filter, the cut off frequency of the filter should be near the band weight used at the ADC12 input.
• Cut off frequency: fcut off = 723 Hz
Slide 64
PWM DAC and active filter• Before amplifying the signal, it is used an Sallen-Key low
pass filter with unitary gain.• 2 resistors (R10 e R11),• 2 condensers (C7 e C8)• TI OA TLE2141CP with unitary gain (buffer)
Cut off frequency: fcut off = 870 HzQuality factor: Q = 1,97
1k
R8
1M
R9
0.22uC5
470pC6
18k
R11
4.7nC8
3
26
74
8
15
IC1b
TLE2141CP
0.22u
C7
+5V
Liga à saída compare do Timer_Bno MSP430F449(pino 77)
Liga ao amplificadorde áudio1k8
R10
Last
Yea
r Pro
ject
s
Slide 65
Audio amplifierLa
st Y
ear P
roje
cts
• Volume control: tension divider (R12 and R13)• Limit the input audio signal level.• Amplifying circuit: Audio amplifier Philips TDA7052
330kR13
10kR14
10kR15
100n
C11
100n
C9
VP1
IN2
GND13
NC4 OUT1 5GND2 6NC 7OUT2 8IC2
TDA7052
220u
C10
24
1
53
J2
Headphone
470kR12
+5V
Liga à saídado filtro Sallen-Key
Slide 66
Using MSP430F449 OLIMEX kitLa
st Y
ear P
roje
cts
• 3 external interfaces: JTAG, AEXT and EXT• AEXT interface - ADC12• EXT interface – Access to multiplexed ports.
Slide 67
PWM signals - SoftwareLa
st Y
ear P
roje
cts
• Erasing flash memory by segments
Block flash memory7Unset the erase mode by segments6
Set to 0 the flash memory index which segment is to be erased5Set the erase mode by segments4Unblock flash memory3
Select clock source. f ≈ 444 kHz2
Stop Watchdog timer1DescriptionStep
Slide 68
PWM signals - SoftwareLa
st Y
ear P
roje
cts
• Write words in flash memory
Block flash memory6
Un set the word writing mode5
Attribute the memory index with a 16 bits data4
Set the word writing mode3
Unblock flash memory2
Stop Watchdog timer1DescriptionStep
Slide 69
Storing voice signals - SoftwareLa
st Y
ear P
roje
cts
• Flash memory used: 370 Kbytes• Duration of speech: 15,3 sec
Slide 70
Using Timer_A - SoftwareLa
st Y
ear P
roje
cts
• Speech signal sampling frequency: 1953 Hz = 512 μsec.
• Generate an interruption to save the speech signal sample.
• Operation mode: up mode.
• Increase TAR until TAR = TACCR0 then generate interruption.
Slide 71
Using ADC12 - SoftwareLa
st Y
ear P
roje
cts
• Conversion reference voltage: 0 – 3 V.
• Time of conversion: 5,8 μsec.
Slide 72
MatLab verificationLa
st Y
ear P
roje
cts
• Word saved in flash memory: “hello”
Slide 73
Using Timer_B - SoftwareLa
st Y
ear P
roje
cts
• PWM outputs each 512 μsec.
• Each signal sample stored in flash memory is sent to the PWM DAC through Timer_B interruption.
• Operation mode: reset/set.
Slide 74
Serial communication DAC La
st Y
ear P
roje
cts
• 2nd choice for the global architecture of the system.• Substitution of the PWM DAC for a serial communication
DAC.
• Using the same peripherals but also the USART in SPI mode.• Allows sending the serial data synchronized to the 12 bits DAC
(TI TLV5616CP).
Slide 75
Using USART - Software La
st Y
ear P
roje
cts
• 2nd choice for the global architecture of the system.• Substitution of the PWM DAC for a serial communication
DAC.
• Using the same peripherals but also the USART in SPI mode.
• Allows sending the serial data synchronized to the 12 bits DAC (TI TLV5616CP).
• In synchronous mode, the USART allows to connect the MSP430 to an external device through: SIMO, SOMI, UCLK and STE.
• For correct operation of the USART in SPI mode, the bit SYNC in the UxCTL control register must be active.
Slide 76
Serial communication DACLa
st Y
ear P
roje
cts
• Using the Olimex kit MSP430F449, the connections are:
1k1
R3
56k
R4
27k
R5
11k
R6
18k
R7
470p
C6
10nC7
D1
D2
3
26
74
8
15
IC1a
TLE2141CP
4.7u
C2
1k1R1
4.7u
C1
680R2
24
1
53
J1
Microfone
+5V
+5V
+5V
Liga ao pino15 de AEXT
Slide 77
Serial communication DACLa
st Y
ear P
roje
cts
Slide 78
Serial communication DACLa
st Y
ear P
roje
cts
18kR8
18kR9
1k8
R10
18k
R11
4.7nC8
3
26
74
8
15
IC1b
TLE2141CP
DIN1
SCLK2
CS3
FS4 AGND 5REFIN 6OUT 7VDD 8IC2
TLV5616CP
4.7uC3
0.22u
C4
+5V
Liga ao pino 1 de EXT
Liga ao pino 4 de EXT
Liga ao pino 5 de EXT
Liga ao pino 7 de EXT
330kR13
10kR14
10kR15
100n
C9
100n
C10
VP1
IN2
GND13
NC4 OUT1 5GND2 6NC 7OUT2 8IC3
TDA7052
220u
C5
24
1
53
J2
Headphone
470kR12
+5V
Slide 79
Breadboard developmentLa
st Y
ear P
roje
cts
Upper connections Lower connections
Slide 80
Breadboard developmentLa
st Y
ear P
roje
cts
Slide 81
Project conclusionsLa
st Y
ear P
roje
cts
• Using PWM signals:Low quality of the sound reproducedDue to the sampling frequency (1953.125 Hz)Speech duration: 15,3 sec
• Using serial communication DAC TLV5616CP Higher quality of the sound reproducedSpeech duration: 3 sec
• To include this sound recording and reproduction system in the RoboSapien, it is necessary to include an external memory in MSP430 to increase the duration of the speech.
Slide 82
Project conclusionsLa
st Y
ear P
roje
cts
• The voice commands recognition by the RoboSapienneeds:
Voice acquisition;Parameters extraction;Pattern recognition.
• Voice acquisition: ADC12.• Parameterization algorithm: development of a software
code to extract the characteristics of the voice acquired, in a manner of extraction commands interpretation through their pattern.
• Pattern recognition: through successive comparisons with a reference pattern.
Slide 83
Summary• Presentation of the teaching structure at UBI in classes
that use microprocessors;
• Exposition of the items covered in the substitution of the RoboSapien microcontroller by TI MSP430, untitled “RoboSapien powered by MSP430”;
• Presentation of last year degree projects using MSP430 as the “sound recording and reproduction system for the Robosapien”.
Slide 84
Acknowledgments• This project was partially funded by Texas Instruments;
• The authors would like to particularly acknowledge the help provided by:
• Christian Speck(TI Europe Business Development);
• Robert Owen(TI University Programme Manager: Education &
Communications).