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 IR RX GPIO RF TX Digital Compass IR TX Motor Motor (Left) RF RX Motor (Right) RS/232 GPIO GPIO Motor Control RS/232 Digital Compass Processor 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 Memory Map $FFF F $FFFF EPROM EPROM $8400 $8000 $7FFF $8000 $FFFF PERFS SRAM SRAM $0000 $0000 Current 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 DW CodeBase ; set up pointer address to start of ORG CodeBase ; start of code ; start of address pointer code Start: nop nop nop jmp Start Ryan Hitchler EPROM Test Results Ryan Hitchler Parts Listing Part Quantity Price .1 uF Cap 28 Donated 1 uF Cap 2 Donated Through Hold Pins 26 Donated Power Bus 2 Donated Raltron 8MHz Clk Oscillator 1 Donated Heat Sink 1 Donated LM7805 5V Regulator 1 Donated 78M33 3.3V Regulator 1 Donated Banana Plug (Female) 3 Donated LED (Yellow) 1 Donated Diode 1 Donated Various Resistors 3 Donated SPST Switch 1 Donated Push Button Switch 1 Donated XCS10 FPGA 1 Donated 18V256 EEPROM 1 Donated 10 Pin 4.7KOhm SIP 3 Donated 6 Pin JTAG Header 1 Donated 20 Pin Logic Analyzer Header 2 Donated 27C256 EPROM 1 Donated 62256 SRAM 1 Donated 28 Pin ZIF 1 Donated MC68HC11 E0 1 Donated 74373 Transparent Latch 1 Donated MAX233 2 Donated DB9 Connector 2 Donated Perf Board 1 $19.00 Stand Off 10 $10.00 Total Cost $29.00 Ryan Hitchler Software Algorithm Redux Power On Set up Interrupts Set up Serial Poll RF Receiver RF Signal ? No Yes Turn Antenna Poll IR Receiver No No RF Signal ? Yes Move Base Poll IR Receiver Yes Stop Antenna Yes Stop Antenna IR Signal ? No IR Signal ? Poll RF Receiver Read Ant. Compass Yes Ant. = Base ? No Read Ant. Compass Turn Ant. -> Base Stop Turning Yes Base = Ant.? No Read Base Compass Turn Base -> Ant John Maitin Code ; Capstone algorithm code ; for MC68HC11 ; begin code section ORG CodeBase Start: lds #Stack bsr enable_int pollrf: ldaa PORTA anda #RFMASK cmpa #RFMASK bne pollrf startantenna: ldaa PORTA oraa #MAONFMASK0 anda #MAONFMASKF staa PORTA pollir: ldaa PORTA anda #RFMASK cmpa #RFMASK bne stopantenna found ldaa PORTA anda #IRMASK cmpa #IRMASK bne pollir stopantenna: ldaa PORTA oraa #MAOFFMASK0 anda #MAOFFMASKF ; start of code ; load stack pointer ; enable interrupts ; ; ; ; get GPIO information mask out RF information compare to RF information if no RF signal, continue polling ; ; ; ; get GPIO information mask in antenna motor control info mask out unwanted info write out GPIO stuff ; ; ; ; get GPIO information mask out RF information compare to RF information jump to stopantenna if no RF signal ; ; ; ; get GPIO information again mask out IR information compare to IR mask if no IR signal, continue polling antennacompass: oraa staa bsr std #CMPAMASK PORTA read_compass compass ; ; ; ; select antenna compass write out GPIO information read from the antenna compass into d store antenna compass reading into compass baseturn: ldaa anda staa bsr subd beq cpd bge PORTA #CMPBMASK PORTA read_compass compass movebase $0167 turnright ; ; ; ; ; ; ; ; get GPIO information select base antenna write out GPIO information read from the base compass into d subtract compass value if equal, then move base compare d to halfway value for compass turn right if difference greater than halfway turnleft: ldaa oraa anda staa ldaa oraa anda staa bra PORTA #MLONRMASK0 #MLONRMASKF PORTA PORTA #MRONFMASK0 #MRONFMASKF PORTA pollcomp1 ; ; ; ; ; ; ; ; ; get GPIO information write in left motor information write out unwanted information write GPIO information get GPIO information write in right motor information write out unwanted information write GPIO information jump to pollcomp1 ; get GPIO information ; mask in antenna motor control info ; mask out unwanted info John Maitin Code (Pt. 2) turnright: ldaa oraa anda staa ldaa oraa anda staa pollcomp1: PORTA #MLONFMASK0 #MLONFMASKF PORTA PORTA #MRONRMASK0 #MRONRMASKF PORTA ; ; ; ; ; ; ; ; get GPIO information write in left motor information write out unwanted information write GPIO information get GPIO information write in right motor information write out unwanted information write GPIO information movebase: stop ; enable interrupt control enable_int: sei ldaa #$30 staa BAUD ldaa #$00 staa SCCR1 ; disable interrupts ; 9600 baud, assuming 8 MHz clock ; ; 8 data bits ; ldaa staa #$2c SCCR2 ; Receive interrupt, poll transmit, enable TX,RX ; ldaa ldaa SCSR SCDR ; clear RDRF, error flags ; clear receive buffer clra tap cli rts ; clear a ; transfer a to cc register (enable XIRQ and IRQ) ; enable interrupts ; 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 QUESTIONS?