fig 6 special sensor: ip camera d-link dcs-930l · web viewpark ranger is an intelligent robot...

23
Park Ranger Li Yang April 21, 2014 1

Upload: nguyenkhue

Post on 10-Mar-2018

225 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Park RangerLi Yang

April 21, 2014

University of Florida Department of Electrical and Computer Engineering

EEL 5666C – IMDL –Written Report Instructors: A. Antonio Arroyo, Eric M. Schwartz

TAs: Andy Gray, Josh Weaver, Nick Cox, Daniel Frank

1

Page 2: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Table of ContentsAbstract ........................................................................................................................ 3 Executive Summary..................................................................................................... 3

Introduction .................................................................................................................. 4 Integrated System ......................................................................................................... 5 Mobile Platform.............................................................................................................5 Actuation ...................................................................................................................... 6 Sensors ......................................................................................................................... 7 Behaviors ......................................................................................................................9 Experimental Layout and Results ............................................................................... 11Conclusion .................................................................................................................. 13 Documentation ............................................................................................................13 Appendices ..................................................................................................................13

2

Page 3: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Ⅰ.AbstractNational Park in the summer is likely to suffer from potential forest wildfire, and it will cause a lot of damage to the nature environment. In order to prevent such tragedy from happening, an autonomous robot called Park Ranger is designed to look for potential fire and report to the base. This paper describes the idea of Park Ranger and all the details of its component and function.

Ⅱ.Executive SummaryPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature), then he will display temperature on a screen. Meanwhile, it will have a camera mount on it, the camera will capture real time environment image. Park ranger can detect fire and launch an alarm. After the alarm is launched, he will start looking for base, after he successfully finds the base, it will cancel the alarm.Propulsion is provided by two forward motors with shaft encoders. One omni-directional caster were added for stability. Three IR sensors were placed on the front for obstacle avoidance. And an IP camera is placed in the front to provide vision. There are two layers of the park ranger. Bottom layer of the Park Ranger resides microcontroller (MCU), XBee, and a three cell 5 amp 12 V lipo battery. On top layer of the Park Ranger are LCD, analog temperature sensor, buzzer and two LEDs for base detection and fire alarm feedback. After the power is on, the temperature starts to monitor environment temperature and the LCD display the value on it. The default state of Park Ranger is random walk and avoid obstacles. In that way, Park Ranger is in patrol mode to find potential fire, as soon as it find the temperature is higher in some particular place, it will launch an alarm (buzzer) and turn the red light on. Then the Park Ranger starts to find the base for help, after he successfully find the base, the red light and buzzer is off and the green light is on.For the MCU, I use Arduino mega 2560, it is a popular controller board with good interface and community support. In order to control motor, I also used an AFmotor shield mounted on the top of the controller. It provide library which can easily implement in Arduino code. For the IP camera, it is used to detect the location of the base, which is based on OpenCV color detection. IP camera sends the image it captured to the computer wirelessly. Then the image is converted to red, blue, green to hue saturation and value(HSV). By adjusting threshold through track bars, it will filter out the color you desire, then we can locate the object in the frame and send the Park Ranger command through Xbee to approach target. Basically, when the object is on the middle of the frame, Park Ranger drive forwards, if the object is in the Left, it turn left a little bit until the object is in the middle, the same when the object is in the right.This is the default mode of Park Ranger, however, through giving Park Ranger command from Xbee, we can manually control Park Ranger, this is very important

3

Page 4: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

since sometimes it is not intelligent enough to walk in complex terrain, so manual mode is quite critical in this kind of situation.To sum up, Park ranger is able to perform function as desired and it is quite stable and well built.

Ⅲ.IntroductionA wildfire is an uncontrolled fire in an area of combustible vegetation that occurs in the countryside or a wilderness area. In the United States, there are typically between 60,000 and 80,000 wildfires that occur each year, burning 3 million to 10 million acres of land depending on the year. Fossil records and human history contain accounts of wildfires, as wildfires can occur in periodic intervals. Wildfires can cause extensive damage, both to property and human life [1]. Park Ranger is designed to prevent potential fire.Park ranger’s feature is to walk around at the park and monitor the weather situation and send weather data to the base. And when it finds the sign of fire, it will send alarm to the base and make some noise by itself. It is build based on Arduino 2560 R3 Microcontroller. The robot has four wheels to go forward/backward and turn. On the top of the frame, there will be temperature monitoring weather data. It will communicate with the board by ADC. Then robot will transmit the data to base by XBEE RF antenna. Also there is going to be a LCD display weather data on the top of the robot. It is able to avoid obstacle automatically by three IR sensors at the front of the robot. The camera I use is an IP camera, it will transmit the image to the computer, and computer will process the image by OpenCV. When it detects there is fire, it will launch an alarm. Then it will go to the base.

4

Page 5: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Fig1 Platform Design of the Park Ranger

Ⅳ.Integrated System

In general, the park ranger is in a random patrol mode, wandering around randomly and avoiding obstacles in the same time. Meanwhile, it will collect temperature data, display them on LCD, and send them to the base (laptop) by XBEE. When park ranger detect there is a fire (relatively high temperature), it will send the computer alarm and active the buzzer. Also, base can choose remote control mode to control the park ranger if necessary. The following is the block diagram of integrated system.

Fig2 System Block Diagram of the Park Ranger

Ⅴ.Mobile Platform The mobile platform will carry all the modules of the robot and drive around the park. It has two DC motors and one caster to stay stable. The motor I choose is high torque and low speed, since Park Ranger need to turn at very low speed sometime, so

5

Page 6: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

high torque motor is helpful to accurate control of the robot. This platform is consisted of two levels. The bottom level is the three ultrasonic sensor, buzzer, power, MCU, Xbee and battery level. The motors and wheels are mounted under this level. The upper lever is the IP camera, LCD and weather sensors. The bottom and upper levels are as shown below:

Fig2 Mobile Platform of the Park Ranger

Ⅵ.Actuation Park ranger uses two wheels and a caster to support the frame, and use 2-wheel drive via four DC motors with motor controller. The motors are controlled by motor controller board. It will turn by apply different rotation to different side of wheels. I used AFmotor library <motor.h> library in Arduino to achieve forward/back/turn control. In obstacle avoidance mode, the actuation is determined by the distance of the obstacle and in find-base mode, the actuation is determined by the position of the target.

Fig3 High torque DC motor

6

Page 7: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

DC motor type: JGB 37-371 Torque:14.4kg.cm Weight 150g  Ratio:90 Rated voltage 12V Current 50mA(no load) 300mA(load torque) 1A(stall)

Ⅶ.SensorsPark Ranger has three ultrasonic sensors on the bot layer for obstacle avoidance. And it has a temperature sensor on the top to monitor weather data. An IP camera is mounted on the top to give the real time image for the robot to find tourist or detect tourists face. If the tourist is far away, assume the tourist is a pink ball for instance, the park ranger will go towards it. If the park ranger detect there is a human face very near, it will say hi and take a picture of tourists.

Fig4 HC-SR04 ultrasonic sensor

Fig5 TMP36 temperature-humidity sensor 7

Page 8: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Fig 6 Special Sensor: IP camera D-Link DCS-930L

Object avoidance algorithm Left sensor Middle sensor Right sensor Robot Behavior

Value <=20 Back, then turn left/right(random)

Value <=20 >20 >20 turn rightValue >20 >20 <=20 turn leftValue >20 >20 >20 Forward

Special Sensor IntroductionI used IP camera for my special sensor, it is able to find certain object and go towards it. OpenCV[2] library is used for the coding, based on color detection and shape detection, the IP camera is able to find the object and recognize the location of the center of the object on the display screen. Then it will send serial signal to the robot car through Xbee, those signals tell the robot to turn left/right so that the object is on the center of the screen, then the robot will go towards the object( through check several times). I used capturefromvideo function in opencv to read the image on IP camera, then I convert the Image(BGR) to HSV and filter the desired color by editing threshold value. Then I filter out the relatively small noise. After get the filtered image of the object, I use moment function to get the x,y position of the object.

8

Page 9: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Fig 7 OpenCV: Object Detection

Fig 7 Xbee Command Based on Object Position

Ⅷ.BehaviorsThe default state of the Park Ranger is patrol mode, he will walk randomly and avoid obstacle. If the temperature is higher than the threshold value, it will move to find base mode. The buzzer will beep and the red light will be on, after he find the base (middle IR sensor value is smaller than threshold), the red light and buzzer is off and the green light will be on. The main behavior logic map is shown below.

9

Page 10: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Fig 8 Behavior logic map

Special Sensor Behavior Diagram

Fig 9 Special Sensor Diagram10

Page 11: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Xbee is used to send command from the laptop to the robot and sensor values from the robot to the laptop.

Ⅸ.Experimental Layout and ResultsThe following is the analog temperature sensor display analog temperature sensor value on a LCD screen.

Fig 10 LCD and tmp sensor

I use DIGI XCTU to set and test the Xbee. That includes setting baud rate, data bits, stop bits and so on. Through testing in terminal, we can let coordinator and router talk to each other.

11

Page 12: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Fig 11 Xbee test in XCTU

Fig 12 Reading tmp value from serial monitor12

Page 13: Fig 6 Special Sensor: IP camera D-Link DCS-930L · Web viewPark ranger is an intelligent robot car. His feature is to walk around at dangerous area and monitor the weather data (temperature),

Ⅹ.ConclusionTo sum up, the final result meet the expectations of my initial design. All the behavior and sensor is working fine. However, there are still some limitations of my work. Firstly, IP camera is limited to the environment, I have to get a router and computer to let my robot run. Secondly, analog temperature sensor is determined by the voltage of MCU, when the voltage is not that stable, the value may change. Finally, the appearance of the park ranger is not that pretty, I do not have enough time to decorate it.

Future workIn the future, I will improve my Park Ranger with a powerful ARM processor which can deal with the image processing by itself. Then maybe I will use digital temperature sensor instead of analog one because digital temperature is more stable. If possible, I will also change the frame of the robot to metal to make it stronger, and I will also change the tires to all terrain tires.

ⅩⅠ.Documentation

[1] Introduction of wildfire in wiki http://en.wikipedia.org/wiki/Wildfire[2]Opencv official website http://www.opencv.org

ⅩⅡ.Appendices

Code is available at my project website: https://sites.google.com/site/imdlbyliyang/robot-abstractXbee 2.4 GHz series 2 datasheet: ftp://ftp1.digi.com/support/documentation/90000866_A.pdf

13