Top Banner
Lecture 4 Advanced Micromouse Hardware Design
26

Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Dec 18, 2015

Download

Documents

Sybil Sherman
Welcome message from author
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
Page 1: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Lecture 4Advanced Micromouse

Hardware Design

Page 2: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Lecture OutlineMicrocontrollerPower SystemPeripherals

Sensor System: IR emitters and receiversMotor ControllerGyroBuzzerDisplayVoltage MeterLEDsPush ButtonReset Button

Page 3: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

MicrocontrollerSTM32F405RGT6 – 64 pins

Timers - Generate PWM signals to motor, buzzer

GPIOs – LEDs, IR emitters, push buttonUSART – Allows “printf” to display on a

terminal SPI – Prints data on alphanumeric displayADC – Convert analog voltage to a digital

number 1 MB Flash – Store maze info

Page 4: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Microcontroller PinsMulti-function pins

Page 5: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Power System - Microcontroller Power Supply Schemes:

VDD = 1.8 to 3.6 V: external power supply that will supply the voltage for GPIOs (Futura Mouse: 3.3 V)

VDDA = 1.8 to 3.6 V: external analog power supply for ADC, DAC, Reset blocks, RCs and PLL (Futura Mouse: 3.3 V)

VBAT = 1.65 to 3.6 V: power supply for RTC, external 32 kHz oscillator, backup registers (Futura Mouse: 3.3 V)

VSSA = GND for VDDA; VSS = GND for VDD

VCAP: connect 2.2 microFarad ceramic cap between this pin and GND (External capacitor that decouple power supply)

Page 6: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Power System

Page 7: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Power System – Power SupplyFully Charged Battery: 8.4 V (2 x 4.2 V)

Motor Controller System (Level shifter + H-Bridge)5V regulator

5V Encoders, IR Emitters (anode “+”), Alphanumeric

Display3.3 V regulator

3.3 V Microcontroller, Buzzer, USART, push buttons

3.3 VA (analog circuits) IR Receivers, Gyro

Page 8: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

8.4V Power - Battery

Page 9: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Power 5V

Page 10: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Power 3.3V and 3.3VA

Page 11: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

IR Emitter - Front(SFH4545)

Page 12: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

IR Emitter – DiagonalSFH4545

Page 13: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

IR Receiver(TEFT4300)

Page 14: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

IR Sensor Pulsing Timing

Delay between each sensor reading until all residues are gone

Page 15: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Motor Driver

Level Shifter IC

H-Bridge IC

Page 16: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Gyro

Page 17: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Buzzer

- Buzzer behaves like an inductor- Diode is used to prevent inductive kickback

Page 18: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Display

Page 19: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Voltage Meter

Keep track of the battery voltage to protect the battery from over discharging

Page 20: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

LED2 ways to control LED

with MCUThe one on left is easier

for wiring since ground is easier to find

The way to the right is better in terms of power, since power is not drawn from the MCU

Futura Mouse uses left scheme

Page 21: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Push Button-Futura Mouse uses right scheme

Page 22: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Boot0 ButtonFor new MCUs,

bootloading must be done just once via USART

Boot mode must be entered first before bootloading

Figure 2 shows how to save one button

Figure 2

Figure 1

Page 23: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

System memory boot mode- Bootloader is stored in the system memory (ROM).- To enter boot mode, set Boot0 high by holding down on the Boot0 push button, then push the reset button. Boot1 should be connected to GND.- Using USART, load application programs into FLASH.

Page 24: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Boot0 and Boot1

Page 25: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

Reset ButtonUse Reset to reset the

state of the mouse, instead of the power ON/OFF switch

This button is IMPORTANT for entering system memory boot mode

Reset is active low

Page 26: Advanced Micromouse Hardware Design. Lecture Outline Microcontroller Power System Peripherals Sensor System: IR emitters and receivers Motor Controller.

References http://

www.st.com/web/en/resource/technical/document/datasheet/DM00037051.pdf

STM32F405 MCU datasheet

http://www.seattlerobotics.org/encoder/mar97/basics.html Info about pull-up and pull-down resistors

http://coactionos.com/embedded%20design%20tips/2013/10/21/Tips-Understanding-Microcontroller-Pin-Input-Output-Modes/

Info about pin input/output modes (i.e. push-pull, open-drain) http://www.allaboutcircuits.com/vol_3/chpt_3/9.html

Info about inductive kickback https://learn.sparkfun.com/tutorials/capacitors/application-examples

Info about decoupling capacitors (filters) http://learn.parallax.com/node/258

Info about phototransistor circuits (IR receiver)