390 likes | 573 Views
Radio Frequency Navigational Tracker. Main Objective. Create a vehicle that will track a high frequency RF/IR transmitter The practical application is a golf caddy that will follow a golfer when requested. Matthew Sharp. Hardware Overview. Platform. Transmitter. GPIO. IR RX. RF TX.
E N D
Main Objective • Create a vehicle that will track a high frequency RF/IR transmitter • The practical application is a golf caddy that will follow a golfer when requested. Matthew Sharp
Hardware Overview Platform Transmitter GPIO IR RX RF TX Digital Compass IR TX Motor Motor (Left) Motor (Right) RF RX RS/232 GPIO Motor Control GPIO Processor Digital Compass RS/232 Base of Vehicle
Transmitter Ben Says: “It Transmits!!” Matthew Sharp
RF Transmission Matthew Sharp
IR TX Matthew Sharp
Receivers Matthew Sharp
RF RX Matthew Sharp
IR RX Simple, yet sophisticated!! Matthew Sharp
Sensors Matthew Sharp
Timing is Everything Matthew Sharp
8051 to the Rescue Matthew Sharp
Powering the Transmitter Fabien Nervais
Base Motors • Two 12V ServoDisk Motors • Power – 12V Car Battery • Optocoupler • Solid-State Relays • 4 Amp Fuses Fabien Nervais
Rotating Mount Configuration • 5V DC Servo Motor • Grooved Rubber Belt • Power • 12V to 5V linear voltage regulator • Solid-State Relay Fabien Nervais
Rotation Control • Wire Routing Resolved: • Approximately 350º Rotation • Serial Cable Connection • 2 Limit Switches Controlling the Rotational Behavior Fabien Nervais
Powering the Rotating Mount Platform Fabien Nervais
Processor Ryan Hitchler
System Clock Ryan Hitchler
Capacitors and Vcc/Gnd Bus Vcc Gnd .1 uF Ryan Hitchler
Headers Ryan Hitchler
Memory Ryan Hitchler
$FFFF $FFFF EPROM EPROM $8400 PERFS $8000 $8000 $7FFF $FFFF SRAM SRAM $0000 $0000 Current Memory Map Memory Map Future Memory Map Ryan Hitchler
Power Ryan Hitchler
Reset Ryan Hitchler
FPGA Ryan Hitchler
EPROM Test Program ; Capstone test code ; for MC68HC11 CodeBase EQU $8000 ; address of start of code ORG $FFFE ; start of address pointer DW CodeBase ; set up pointer address to start of code ORG CodeBase ; start of code Start: nop nop nop jmp Start Ryan Hitchler
EPROM Test Results Ryan Hitchler
Parts Listing Ryan Hitchler
RF Signal? Turn Antenna Poll IR Receiver Set up Serial Set up Interrupts Poll RF Receiver Power On Yes No IR Signal? No RF Signal? Yes Yes No Stop Antenna Yes IR Signal? No Poll IR Receiver Poll RF Receiver Move Base Stop Antenna Read Ant. Compass Yes Ant. = Base? Base = Ant.? Read Ant. Compass Turn Ant. -> Base Stop Turning Yes Read Base Compass Turn Base -> Ant No No Software Algorithm Redux John Maitin
Code ; Capstone algorithm code ; for MC68HC11 ; begin code section ORG CodeBase ; start of code Start: lds #Stack ; load stack pointer bsr enable_int ; enable interrupts pollrf: ldaa PORTA ; get GPIO information anda #RFMASK ; mask out RF information cmpa #RFMASK ; compare to RF information bne pollrf ; if no RF signal, continue polling startantenna: ldaa PORTA ; get GPIO information oraa #MAONFMASK0 ; mask in antenna motor control info anda #MAONFMASKF ; mask out unwanted info staa PORTA ; write out GPIO stuff pollir: ldaa PORTA ; get GPIO information anda #RFMASK ; mask out RF information cmpa #RFMASK ; compare to RF information bne stopantenna ; jump to stopantenna if no RF signal found ldaa PORTA ; get GPIO information again anda #IRMASK ; mask out IR information cmpa #IRMASK ; compare to IR mask bne pollir ; if no IR signal, continue polling stopantenna: ldaa PORTA ; get GPIO information oraa #MAOFFMASK0 ; mask in antenna motor control info anda #MAOFFMASKF ; mask out unwanted info antennacompass: oraa #CMPAMASK ; select antenna compass staa PORTA ; write out GPIO information bsr read_compass ; read from the antenna compass into d std compass ; store antenna compass reading into compass baseturn: ldaa PORTA ; get GPIO information anda #CMPBMASK ; select base antenna staa PORTA ; write out GPIO information bsr read_compass ; read from the base compass into d subd compass ; subtract compass value beq movebase ; if equal, then move base cpd $0167 ; compare d to halfway value for compass bge turnright ; turn right if difference greater than halfway turnleft: ldaa PORTA ; get GPIO information oraa #MLONRMASK0 ; write in left motor information anda #MLONRMASKF ; write out unwanted information staa PORTA ; write GPIO information ldaa PORTA ; get GPIO information oraa #MRONFMASK0 ; write in right motor information anda #MRONFMASKF ; write out unwanted information staa PORTA ; write GPIO information bra pollcomp1 ; jump to pollcomp1 John Maitin
Code (Pt. 2) turnright: ldaa PORTA ; get GPIO information oraa #MLONFMASK0 ; write in left motor information anda #MLONFMASKF ; write out unwanted information staa PORTA ; write GPIO information ldaa PORTA ; get GPIO information oraa #MRONRMASK0 ; write in right motor information anda #MRONRMASKF ; write out unwanted information staa PORTA ; write GPIO information pollcomp1: movebase: stop ; enable interrupt control enable_int: sei ; disable interrupts ldaa #$30 ; 9600 baud, assuming 8 MHz clock staa BAUD ; ldaa #$00 ; 8 data bits staa SCCR1 ; ldaa #$2c ; Receive interrupt, poll transmit, enable TX,RX staa SCCR2 ; ldaa SCSR ; clear RDRF, error flags ldaa SCDR ; clear receive buffer clra ; clear a tap ; transfer a to cc register (enable XIRQ and IRQ) cli ; enable interrupts rts ; SCI interrupt handler rec: psha ldaa SCSR anda #$40 cmpa #$40 bne quit ldaa SCDR staa compass quit: pula rti ; change antenna direction (XIRQ interrupt handler) changeant: psha pshb ldaa PORTA ldab antdir comb bmi goreverse goforward: oraa #MAONFMASK0 anda #MAONFMASKF bra finishchange goreverse: oraa #MAONRMASK0 anda #MAONRMASKF finishchange: staa PORTA pulb pula rti John Maitin
Simple Memory Map, Simple Decode • Memory map is divided in half, so only 1 pin needed to decode • If memory mapped I/O is used, we can adapt logic with and gates from needed address pins Josh Bingaman
Motor Control Decoding Josh Bingaman
RS232 Multiplexing Josh Bingaman
Sensor Communication • All GPIO • No Decode logic • 1 pin for IR Reception • 1 pin for RF Reception • Limit Switches on Antenna motor to XIRQ • 1 spare GPIO input for Proximity Sensor Josh Bingaman