Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web...

14
Robotics Challenge Beacon Receiver and Simulator Description Version 2.0 Mar 24, 2014 Table of Contents Overview of the Beacon System 2 Navigation using the Beacon System 5 How the Beacon Receiver works 7 Status from the Beacon Receiver 8 Status Values and their meetings 8 Arduino Pin Usage 8 Serial 9600 bps 8 Serial on Beacon Receiver Arduino 9 SPI on Beacon Receiver Arduino 9 Radio to Arduino Connections 9 Configuration and Diagnostics 9 Analog to Digital Support 9 SPI checkout and Beacon Simulation Pin 9 Good Beacons Received 10 Beacon Simulator Wiring Diagram 11 1

Transcript of Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web...

Page 1: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Robotics Challenge Beacon Receiver and Simulator Description

Version 2.0Mar 24, 2014

Table of ContentsOverview of the Beacon System 2

Navigation using the Beacon System 5

How the Beacon Receiver works 7

Status from the Beacon Receiver 8Status Values and their meetings 8

Arduino Pin Usage 8Serial 9600 bps 8Serial on Beacon Receiver Arduino 9SPI on Beacon Receiver Arduino 9Radio to Arduino Connections 9

Configuration and Diagnostics 9Analog to Digital Support 9SPI checkout and Beacon Simulation Pin 9Good Beacons Received 10

Beacon Simulator Wiring Diagram 11

1

Page 2: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Overview of the Beacon System

The Beacon system consists of a Beacon Transmitter found in the center of the challenge area and Beacon Receivers found on each robot. The Beacon Transmitter is a 433MHz transmitter from Parallax hooked up to a Yagi antenna which rotates from 0-359 degrees once about every 2 seconds. As the Yagi antenna rotates it will continually transmit the compass heading for all robots to listen and receive the signal.

Figure 1: The Beacon Transmitter. The Black and Silver boxes are the electronics and the Yagi antenna is mounted at top. A base at bottom rotates the antenna.

The Arena nominlly will be set up as follows with the Beacon Transmitter in center and with courses radially pointing inward. The robot starting line will be the ouside of the circle and the course will point inward. An area from 350 to 10 degrees, basically North, will not be used as to not confuse the robots too much.

2

Page 3: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Figure 2: Course Layout with Beacon (B) in center

A Beacon system Fucntional Block Diagram is found in Figure 3.

3

Page 4: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Figure 3: Beacon System Functional Block Diagram

Each robot will have a Beacon Receiver consisting of a 433MHz radio Receiver (#27982) and an Arduino. This Beacon Receiver system will then talk to the robot and indicate which Vector the robot is on. Specifically the Beacon Receiver will listen for the beacons and when it “hears” the strongest signal from the Beacon Transmitter, it will record that Vector and make it available to a robot communicating with the Beacon Receiver Arduino. The Beacon Receiver Arduino will need to listen 100% of the time during a complete roation of the Beacon Transmitter so it can compare and be listening for the strongest signal.

Advanced user note: It is possible to integrate the functionality of the Beacon Receiver into an Arduino used to control the main robot. This is a challenging task and is not advised, however it is possible. Arduinos are not multi-threaded and listening would have to be time multiplexed in with control of the robot.

4

Page 5: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Navigation using the Beacon System

Here is a nominal scenario of how the Robots could navigate. The Beacon will transmit out the vector from North. In the below example East is at 90 degrees (beacon trasnmits a 45) and South is at 180 (beacon trasmits at 90). In this example the robot is 140 degrees from North or Southeast of the Transmitter Beacon.

Figure 4: Transmitter Beacon (B) and Robot. Compass Vectors and half Value Compass Vectors in parenthesis.

5

Page 6: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

The Robot will have to determine where it is and which way to head. If the robot has a compass on board, the robot will compare its compass heading to the Vector as reported from the Transmitter Beacon and turn accordingly. Alternatively, (or in addition), the robot could receive a Vector move forward and then compare the current Vector to the previous Vector. If the Vector is getting smaller then the robot is moving counter clockwise and should turn left to head to the beacon. See Figure 5 as an example. If the Vector is getting bigger then the robot is heading clockwise and the robot should turn right to head to the beacon.

Figure 5: Example Vector Navigation

6

Page 7: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

How the Beacon Receiver works

The cardinal direction to the beacon can be read by multiplying by two the value received from the Beacon Receiver. For example, the Beacon Receiver (BR) will provide a number 0-179 and multiplying this value by two will give the range from 0-358 degrees. A robot can use the Serial or SPI interface to obtain the direction to the central Beacon.

Figure 6: Beacon Receiver Wiring

7

Page 8: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

8

Page 9: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Status from the Beacon ReceiverThe SPI byte or the ASCII string received from the Beacon Receiver will tell you the heading to the Beacon. As mentioned above, the value nominally will be 0-179 and will be doubled to give the Robot the actual heading to the central Beacon. The following values outside the range of 0-179 have the following additional meaning. Using the Serial interface is in most cases the easiest interface to get working. Start with serial.

Status Values and their meetings200 - Ambiguous Vector and the robot should wait or move until a valid vector is available 201 - SPI read has pulled last valid vector. Poll again in a second and see if a valid vector is now available202 – Stale Data. If you pull this from the SPI interface, the Beacon Receiver has not updated the SPI interface since the last time the Robot attempted to pull information.0-179 Valid Vector heading.

The Robots should poll the Beacon Receiver no more than once every 3 seconds. If it is polled more than once every 3 seconds, 202 will be seen.

If the BR does not hear good data from the Radio due to a poor signal, a value of 202 will typically be seen and the LED will not change state every revolution of the Antenna.

All Robots should include a mode switch to allow for beacon tracking and compass navigation. Compass navigation would be using your onboard compass of your choosing which will allow your robot to “head west” in the event of a non-operational Beacon signal. More importantly, navigating by compass alone will allow for debugging at the Challenge when not actively in a Challenge pit, let alone testing and debugging prior to the event.

The robots may want to poll the Beacon Receiver multiple times (once every 3 seconds) to get a good average reading and throw away readings which are too different than other historical readings. The heading to the Beacon Receiver should be good but it is always good to perform some reasonability checks on your data too.

Arduino Pin Usage Serial 9600 bpsDuring nominal operation, teams should use the SPI interface. However a serial interface is also provided. Only Digital Pin 1 should be used by the Robot to receive an ASCII character string representing the vector. A New Line follows the vector. The cardinal

9

Page 10: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

direction can be read by multiplying by 2 the value received from the Beacon Receiver. The Robot should never use Digital Pin 0. This is only to be used for the Radio.

433 MHz RF Transceiver (#27982) from Parallaxhttp://www.parallax.com/product/27982

Serial on Beacon Receiver Arduino Pin 0 UART RX (Radio to Beacon Receiver) will monitor the Radio Communications Pin 1 UART TX (Beacon Receiver to Robot) will send vector heading to robot

SPI on Beacon Receiver Arduino Pin 10 SS_PIN Pin 11 MOSI_PIN Pin 12 MISO_PIN Pin 13 SCK_PIN

Radio to Arduino ConnectionsRadio Arduino RSSI Analog Pin 0 PDN Digital Pin 8 TX-RX Digital Pin 9 Data RX Digital Pin 0 VIN (5V) GND GND

Configuration and DiagnosticsAnalog to Digital SupportAREFGNDTwo equal value, resisters are needed, typically in the range of 2k-50k Ohms. One resister will go between Gnd and AREF and another from 5V and AREF. This voltage divider will provide higher received signal strength resolution. This is required for proper operation as it allows the small signal sampled from the RSSI pin to have good resolution.

SPI checkout and Beacon Simulation PinBeaconSim Digital Pin 4

Logic High = Sim ModeLogic Low = Normal Beacon Receiver Mode

10

Page 11: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

This pin allows for checkout of SPI Interface. This pin would nominally have a 1k Ohm pull down resister to GND and a switch from 5V to provide a logic high when connected. When this pin is logic High, the SPI and Serial data interfaces will increase by one from 0-179 every 3 seconds and then roll over back to zero. This will allow an interface test for SPI and a simulation of the Beacon Receiver that should stimulate movement of your robot. This Pin should normally be pulled low for normal Beacon Receiver operations (open switch in the above description). This ideally would be a at-the-dunes switch to allow for mode changes in debugging.

Good Beacons ReceivedA LED mounted in a visible spot on your robot will provide a visual indicator of a vector being received. A LED of your choice with a typical 1k-ohm resister could be used. The LED will not blink when in SPI simulation mode. The LED signal pin is Digital Pin 6. Ideally this optional LED output would be mounted in a very visible location on your robot so you know if your robot is receiving the signal.

LED Digital Pin 6

Blink Pattern Decoder.

Change of state every Beacon Full Rotation (repeating)On for One Full rotation then off for one full rotation. This change of state (ON->OFF->ON) indicates the receipt of good and reasonable vectors from the central Beacon Station. Occasionally there will be too much RF noise for the Radio. This is a good LED to have visible on the outside of your robot so you know it is tracking to the Beacon.

750ms ON then OFF for 2.5 seconds (repeating)This pattern indicates that the Beacon Receiver is finding a constant vector, likely from a Beacon Simulator.

11

Page 12: Overview of the Beacon System - COSGC Homespacegrant.colorado.edu/COSGC_Projects/Robotics... · Web viewStart with serial. Status Values and their meetings 200 - Ambiguous Vector

Beacon Simulator Wiring Diagram

Figure 7: Beacon Simulator

The Beacon Simulator is a good way to insure your Beacon Receiver is functional. The Beacon Simulator is the 433MHz transmitter, and Arduino and a potentiometer. The transmitted vector may be varied by changing the position of the potentiometer and by doing so you should be able to steer your robot. Load the code provided on the website onto the Uno and run. Hooking the Arduino up to a serial monitor over USB is a great first step to insuring proper operation since you will see the data output to the Transmitter echoed to the serial port.

12