Lectura Mcirosmouse
-
Upload
edwin-ramirez -
Category
Documents
-
view
225 -
download
3
description
Transcript of Lectura Mcirosmouse
MicromouseInfrared and Gyroscopic Sensors
Notes on Project 1
H-Bridge Logic Level
● Pin 16 (Vss) sets the Logic Level Voltage○ i.e. The “Input” pins expect that voltage to
be considered “HIGH”
● The Nucleo can only output 3.3V from DigitalOut pins, so we set Logic Level to 3.3V
● Vs is voltage going to motors○ We want this to be as large as possible
Powering the Nucleo
● Nucleo’s Vin needs 5V● Nucleo’s GND needs to be grounded● USB vs. External Power Jumper
Uploading Code to the Nucleo
● SWD Connectors○ Communication protocol for ARM chips○ Can interact with and manipulate memory in MCU (Upload/Debug)
● 6 Pins (We use 4 of them)○ SWCLK, GND, SWDIO, NRST
● MCU has specific pins that support SWD○ PA_13 = SWCLK, PA_14 = SWDIO○ Reset and GND
● Please put female jumpers back in the box when you’re done
Transistors
Bipolar Junction Transistors
● Consists of 3 doped silicon regions○ NPN or PNP
● Current controlled device● Can act like a switch● 3 Terminals
○ Collector, Emitter, Base
NPN -- “Not Pointing IN”
NPN vs PNP
On when base current is HIGH
On when base current is LOW
MOSFETs
● Metal Oxide Semiconductor Field Effect Transistor● Voltage controlled device● Like BJT, comes in two flavors
○ N-Channel, P-Channel
●
N-MOS vs P-MOS
On when gate voltage is HIGH
On when gate voltage is LOW
BJT vs MOSFET
● Current controlled● Can “turn on” at lower voltages● Cheaper● Good for low-current devices
○ LEDs
● Voltage controlled● (Theoretically) Draws no current at the
gate● Can switch much larger loads● Good for high-power switching
○ Motors
BJT MOSFET
Infrared Sensors
Infrared LEDs
● LEDs that emit light in the infrared range (typ. 800-950nm wavelength)● Emission Angle
○ Want a narrow emission angle○ Maximize signal amplitude○ Minimize peripheral vision
● Wavelength○ Must match wavelength of the reciever
IR Emitter Operation
Phototransistors
● NPN Transistors that use light instead of a base current
● Wavelength-specific○ We choose phototransistor specific to IR wavelengths
○ Have to ensure that wavelength matches emitter in the pair
IR Sensing Pair
● SFH 4545○ 950nm Wavelength○ Narrow emission angle
● Note: Anode (positive lead) is the shorter lead
● TEFT4300○ Matched for 940nm wavelength light
● Note: Collector (positive lead) is the shorter lead
IR Emitter Phototransistor
Gyroscope
Gyroscope
● Measure angular velocity○ Degrees/second (dps)
● Digital Gyro○ Communicate to MCU via SPI/I2C/etc.○ Less noise○ Easier to use
● Analog Gyro○ Analog voltage output can be read by MCU○ Potentially more accurate○ Cheaper
Project 2
Goal: Finish the hardware!
● Solder on IR Sensors and Gyroscope● Write test code to verify they are working● Bad News: More soldering● Good News: By the end of this project, you will have built a complete
Micromouse!