Top Banner
S.P.A.R.T.A.N. Space Planning and Research to Analyze Nuances
25

SSCCIP Final Presentation (The Spartans)

Apr 13, 2017

Download

Documents

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: SSCCIP Final Presentation (The Spartans)

S.P.A.R.T.A.N.Space Planning and Research to Analyze Nuances

Page 2: SSCCIP Final Presentation (The Spartans)

S.P.A.R.T.A.N. Team Members

Page 3: SSCCIP Final Presentation (The Spartans)

Cody Del Prato

Page 4: SSCCIP Final Presentation (The Spartans)

Ryan Yedinak

Page 5: SSCCIP Final Presentation (The Spartans)

Hesham Assabahi

Page 6: SSCCIP Final Presentation (The Spartans)

Derek J. Russell

Page 7: SSCCIP Final Presentation (The Spartans)
Page 8: SSCCIP Final Presentation (The Spartans)

Goals of the Project● Design and build a rover to collect data samples and traverse the terrain

○ Collect and communicate data ■ Detect large changes in CO2■ Detect hot and cold temperature zones■ Detect a magnetic field■ Read RFID tags■ Communicate data to a computer and graph it

○ Traverse ramps and avoid boulders in the playing field○ Pick up data samples with a robotic arm and return them to the docking area

Page 9: SSCCIP Final Presentation (The Spartans)

List of Tools and Parts:

Available:

Arduino Uno and Mega

Acrylic

Supplies Around Program

-

Bought:

Servos

Rock Crawler

Pi Camera

Battery for Pi

Servo Shield

Electromagnet

Page 10: SSCCIP Final Presentation (The Spartans)

Primary Design

Page 11: SSCCIP Final Presentation (The Spartans)

Secondary Design● Purchased a Rock Crawler chassis equipped with motors for movement● Mounted an acrylic body on top of chassis

○ Microcontrollers and breadboards from which we ran our sensors and servos located inside

● Attached a robotic arm made from acrylic on top of the body○ Run components on Arduino Uno○ Implemented two servos to move the arm ○ Attached an electromagnet enclosed in acrylic to retrieve data samples

● Mounted sensors on the front, back, and bottom of the rover to gather data○ Run sensors from an Arduino Mega (originally Raspberry Pi)

Page 12: SSCCIP Final Presentation (The Spartans)
Page 13: SSCCIP Final Presentation (The Spartans)

Control System● Turnigy 9-Channel Transmitter and Receiver used to control rover movements and arm components

○ Channel 1: Rover movement forward and backward○ Channel 2: Rover movement left and right○ Channel 4: Arm base movement left and right (20∘ each way)○ Channel 5: Arm movement up and down (0∘/45∘/90∘)○ Channel 6: Electromagnet switch (On/Off)

● Motors for rover movement attached directly into channels 1 and 2 of the receiver without adjustment● Functions for channels 4-6 adjusted in the Arduino code based on the values transmitted by the controller

Channel 4x<1100 70∘ (Full Left)1100 ≤ x < 1200 75∘

1200 ≤ x < 1300 80∘

1300 ≤ x < 1400 85∘

1400 ≤ x < 1500 90∘ (Center)1500 ≤ x < 1600 95∘

1600 ≤ x < 1700 100∘

1700 ≤ x < 1800 105∘

1800 ≤ x 110∘ (Full Right)

Channel 5 (Auxiliary-Pitch)

N (0%) x ≤ 1100 0∘

1 (50%) 1400 ≤ x < 1500 45∘

2 (100%) 1800 ≤ x 90∘

Channel 6

x < 1100 Off

x > 1800 On

Page 14: SSCCIP Final Presentation (The Spartans)

Guts of the Rover● All sensors run on an Arduino Mega powered by a 9V battery

○ RFID-RC522 RFID Reader [Mounted on Bottom of Rover]○ TMP36 Temperature Sensor [Front of Rover Near Ground]○ K-30 10% CO2 Sensor (SE-0118) [Back of Rover]○ Triple-Axis Magnetometer (HMC5883L) [Front of Rover Near Ground]○ TCS230 Color Sensor with RGB LED [Mounted on Bottom of Rover]

● Servo motors and electromagnet for robotic arm run on an Arduino Uno powered by a 9V battery○ Two 360∘ servo motors for arm movement

■ One servo moves arm’s base left and right■ One servo moves arm up and down

○ Electromagnet attached to end of arm to pick up data samples (containing magnets)● Camera run from Raspberry Pi mounted on front of rover to view data samples● Xbee running on Arduino Mega to transfer data to computer through X-CTU

○ Temperature (∘C, ∘F, K), Magnetic Field (uT in x,y,z directions), Color Intensities, RFID Info, CO2 data (ppm)

Page 15: SSCCIP Final Presentation (The Spartans)

<CODE-->Movement> ● Attempt_1.0:

○ Four Servos at the top to rotate the degree of the base.○ Four Servos at the bottom to move the rover back and straight.○ ISSUE → 3D printer did NOT work.

● Attempt_2.0:○ An RC car was bought without a controller.○ A Turnigy 9x was supplied by SSCCIP. ○ We programed the 9x to work for the RC car.

Page 16: SSCCIP Final Presentation (The Spartans)

“Design_Movement_1.0” (Top-Down, High-Level)

● Initializations and Libraries :○ #include : <Servo.h> ○ Objects: 8 control servo objects, 4 variables for the receiving channels, a couple of dummy

variables.● Set Up:

○ Attach the 8 servos.○ Set the receiving channels to their pins.

● Main Loop( functions ):○ void SetDegree(void)○ void MoveTheBase(void)

Page 17: SSCCIP Final Presentation (The Spartans)

<Cont.>void SetDegree()

- Receive values from the channel - Test if the value was received last call

- .If true : return - If the value is low: move the servos to

0°- If the value is in the middle: move the

servos to 45°- If the value is high: move the servos to

90°- Save the value for next call.

void MoveTheBase()

- Receive values from the channel - If the value is low: move the servos

backwards- If the value is in the middle: stop

moving the servos- If the value is high: move the servos

forward

Page 18: SSCCIP Final Presentation (The Spartans)

“Design_Movemnet_2.0” (Top-Down, High-Level)

● Initializations and Libraries :○ #include:

■ <varSpeedServo.h> // Servo Library that allows you to move it in different speeds. ○ Objects:

■ 2 servo object■ 3 variables for the pins for the receiver channels, and some dummy variables. ■ One Variable for the electromagnet

● Set Up:○ Connect the channels to their pins.○ Set up the servos and the electromagnet to their pins

● Main Loop( functions )○ void moveArm(void)○ Void moveBase(void)○ void controlElectro(void)

Page 19: SSCCIP Final Presentation (The Spartans)

<Cont.>void MoveArm()

- Receive values from the channel - Test if the value was received last call

- .If true : return - If the value is low: move the servos to 0°- If the value is in the middle: move the

servos to 45°- If the value is high: move the servos to 90°- Save the value for next call.

void MoveBase()

- Receive values from the channel - Move the base accordingly to values of

that received.

void controlElectro()

- If channel is on : turn on the electromagnet

- If the channel is off: turn off the electromagnet.

Page 20: SSCCIP Final Presentation (The Spartans)

<CODE-->Sensors> ● Attempt_1.0→( Raspberry Pi 3) :

○ Pros : use a Raspberry Pi 3 for sensing, storing, graphing, and sending data via Wifi. Great with power.

○ Cons : - It’s brand new, therefore most libraries are not comparable. - It kept failing and lost all the code and the data.

● Attempt_2.0→( Arduino a.k.a Emergency Plan)○ Pros: - All the libraries are comparable. - It’s robust. ○ Used Xbee to transfer data wirelessly instead of wifi.○ Cons: - Power supply.

Page 21: SSCCIP Final Presentation (The Spartans)

“Design_Senors_2.0” (Top-Down, High-Level)

● Initializations and Libraries :○ #include :

■ <Wire.h> //■ <Adafruit_Sensor.h> // Magnetometer■ <Adafruit_HMC553_U.h>//Magnetometer ■ <kSeries.h> // CO2■ <MFRC522.h> // RFID■ <SPI.h> // RFID

○ Objects:■ Create object sensors when needed■ Variables to hold pin numbers■ Dummy variables to hold data coming

from the sensors.

● Set Up:○ Set up and turn on the Magnetometer ○ Init SPI bus○ Display sensor details○ Set up the RFID○ Set up and turn on the color sensor

● Main Loop( functions ):○ void TempSensor(void)○ void magSensor(void)○ bool RFID(void)

■ If true : Flash a light○ void colorSensor()

Page 22: SSCCIP Final Presentation (The Spartans)

<Cont.>void tempSensor()

- Get voltage from the sensor pin- Do the calculation to convert the voltage

to celsius, fahrenheit, and kelvin- Send the info to the computer - If the temperature is higher than the last

call, save it as the new high- If the temperature is lower than the last

call, save the as the new low

void magSensor()

- Get the voltages from the sensor- Do the calculations and the conversations- Send the info to the computer

void CO2_Sensor()

- Read the Sensor - Send the info to the computer - If the CO2 value is higher than the last

call, save it as the new high- If the CO2 is lower than the last call, save

the as the new low

Page 23: SSCCIP Final Presentation (The Spartans)

<Cont.>void ColorSensor()

- Read the red, green, and blue intensities- If red < green && green >= blue && red

is low- Color is white- Turn LED to white

- If blue < red && blue < green- Color is blue- Turn on LED to blue

- If red < blue && red < green && green < red < green - 20

- Color is red - Turn LED on to red

- If red < green && green < blue- Color is yellow- Turn LED on yellow

- Turn off LED after delaying 500 miliseconds

bool RFID()

- If a card was read- Send the info of the card to the

computer - Return true

- Else return false

Page 24: SSCCIP Final Presentation (The Spartans)

ResultsSuccesses

● Sensors were able to retrieve data○ Temperature sensor detected hot and cold

zones○ CO2 sensor detected large amount of CO2 near

dry ice○ Magnetometer detected large magnetic field○ Color sensor detected colored areas (signified

by RGB LED changing color to match colored zone)

○ RFID reader read all four tags● Rover able to traverse all ramps● Data transferred to computer through XBee

communication

Issues

● Electromagnet did not work for most of the competition○ Power issues○ Not able to retrieve data samples

● RFID sensor had difficulty reading● Temperature Sensor was intermittent● Needed to switch out 9V batteries powering the

Arduinos often● Rover started to lose power towards the end

○ Unable to drive in reverse

Page 25: SSCCIP Final Presentation (The Spartans)