Team 7: Persistence of Vision Machine
description
Transcript of Team 7: Persistence of Vision Machine
Steve AndreEric Glover
Shaun GreeneRussell Willmot
An ability to: 1. display a pattern with rotating LEDs 2. control the direction in which the pattern is being projected 3. track the angle of arrival of an RF beacon 4. update a projected image while the machine is in operation 5. accept user-generated input to change display
• Primary functions of microcontroller 1 of
2
• Stationary (ARM Cortex M3)
– User interface (5 push buttons & OLED)
– Read temperature (ATD 1)
– Angle detection & calculation (ATD 2 & 3)
– Pixel-map generation
– encodes data for transceiver
– Control transceiver (SPI)
– Motor on/off (GIO)
– Measure motor speed (EINT)
• Polling “state machine” with few interrupts
Pushbuttons and OLED configuration
128x96 OLED
• Primary functions of microcontroller 2 of 2
•Rotating (PIC24F)
– Control transceiver (SPI 1)
– Send data to LED drivers (SPI 2)
– Detects 0° reference of spinning disc (EINT)
– Calculate motor speed (TIM1/2)
– Convert angle to offset time from RPM
– Calculate time of a column
• Interrupt driven
Display screen saver
On any button push
Configure OLED
Display Welcome
Configure µMIRF
Display Main Menu
User input
Power On
Set “state”
Jump to selected function
no
yes
User input
no yes
Selected Function
Get required data
Generate pixel map
Send data to µMIRF
return
Display data on OLED
Functions
• Display temperature
• Display time
• Display motor speed
• Display beacon angle
• Display picture
• User input text
• Toggle beacon follow mode
Power On
Initialize ports, pins, and registers
Configure µMIRF (SPI 1)
Send data to
LED drivers?
Send data to LED drivers (SPI 2)
Perform speed/column
time calculation
no
Yes
Interrupts EINT – 0° pulse from IR sensor
– reads running timer (TIM1/2) and calculates speed
– enables “delay” interrupt TIM3 – “delay” timer to generate
angle offset
– Enable column timer
TIM4 – column timer
– Pulse the latch of LED Driver
SPI1 – read data from µMIRF and store it
Control byte Control Bits
– 0 0 : nothing new– 1 0 : new pixel map– 0 1 : new offset value– 1 1 : both are new
If the offset is new, the offset portion is read– Value in degrees with 10° increments (00001 = 10°)
If the pixel map is new, the next 1152 bytes are the data for the image
The received image is in a separate buffer that the image being output
7 6 5 4 3 2 1 0
Degree offset of display
Control bits