Docsity

Autonomous HoverCraft Project - Sensor Report 1 - Paper | EEL 5666, Papers of Electrical and Electronics Engineering

Partial preview of the text

Download Autonomous HoverCraft Project - Sensor Report 1 - Paper | EEL 5666 and more Papers Electrical and Electronics Engineering in PDF only on Docsity!

University of Florida

Department of Electrical and Computer

Engineering

EEL 5666 – Spring 2006

Intelligent Machines Design Laboratory

Instructor: : Dr A. Arroyo, Dr. E. M. Schwartz

TAs: Adam Barnett, Sara Keen

{Wi-Tesla}

(Wifi-Power Transfer and Jamming)

Final Report

April 2 5 , 2006

Ahmad EL Kouche “Ed”

Table of Contents

System Components and Behaviors

Wi-Tesla is composed of the following components that are necessary to achieve an autonomous power transfer and signal jamming robot:

Servos

Wi-tesla has four servos in total. Two of them are continuous rotating servos (internally hacked) to serve as rotating wheels. The wheels are responsible to move the robot around. The other two servos, which are not hacked, are used as left arm and right arm. Bottom side Left side Right side Top side Rear side Front side

The servos are HiTec HS-322HD Deluxe Specification: Cored Metal Brush Motor Torque at 4.8V 42 oz/in (3.0 kg/cm) Torque at 6.0V 51 oz/in (3.7 kg/cm) Speed at 4.8V 0.19sec/60 degrees at no load Speed at 6.0V 0.15sec/60 degrees at no load Dimensions 1.57" x 0.79"x 1.44" (40 x 20 x 36.5mm) Weight 1.52oz (43g)

Wheels Behaviors

There are basically seven behaviors Wi-Tesla’s wheels are capable of doing, and are defined as C functions:

  1. Void Left_Turn (int speed): This function will cause Wi-Tesla to take a left turn at a given speed argument (speed0, speed1,speed2,speed3,speed4,speed5). These speeds were noticed to be audibly and visually different than each other, such that speed0 is neutral, also known as “brakes” and speed 5 is the fastest saturation speed accomplished. There is no return value from this function. Example: Left_Turn (speed5); //continuous left turn at 5 th speed
  2. Void Right_Turn (int speed): This has the same behavior as above, however, as indicated it will make a right turn instead. Example: Right_Turn (speed5); //continuous right turn at 5th^ speed
  3. Void Turn_ON ( int servo_num): This function will turn on the servo specified in the argument value. Values are specified as constants: Right_Servo or Left_Servo. Example: Turn_On (Right_Servo); // Right servo on with last motion memory Example: Turn_On (Left_Servo); // Left servo on with last motion memory
  4. Void Turn_Off ( int servo_num): This function will turn off the servo specified in the argument value. Values are specified as constants: Right_Servo or Left_Servo. Example: Turn_Off (Right_Servo); // Right servo off (no power consumed) Example: Turn_Off (Left_Servo); // Left servo off (no power consumed)
  5. Void Forward ( int speed, long time): This function moves Wi-Tesla forward at the given speed and for the specified amount of time in m-sec. Example: Forward (speed5, 1000);//move forward for one second
  6. Void Backward (int speed, long time): This function moves Wi-Tesla backward at the given speed and for the specified amount of time in m-sec. Example: Backward (speed5, 1000);//move backward for one second.
  7. Move (int Direction, int Servo_Num, int Speed): this function is a general movement function that is optimized for code efficiency and speed. This function will move the specified servo in the given direction and a given speed. Example: Move( Go_Forward, Right_Servo, Speed5)// move right servo forward Example: Move( Go_Backward, Left_Servo, Speed5)// move left servo backward

Whiskers

Wi-Tesla has what looks like whiskers. These whiskers are used to detect obstacle collision from left and right side of the robot. The whiskers are homemade from tie- straps. Two tie straps are necessary to form each of the left and the right whisker. When Wi-Tesla hits on obstacle from one side, one of the tie straps will get contact to ground through the grounded metal located on the second tie strap, thus operating as a switch like mechanism. This homemade collision detection switch is easy, works great, and is cost effective. The whiskers have one common behavior:

  1. Void Check_Bumps(Void): This function will check each of the bumps for possible collision, and would make an opposite turn to the location of the collision detected.

Wireless Generator and Receiver

Wi-Tesla main function is to find a low battery sensor and transfer power to it via radio frequency (RF) energy. The special sensor providing wireless power transfer service is divided into two parts. The first part is the radio frequency generator. The second part is the RF to DC sensor. When Wi-Tesla detects a low battery device in the room via a color tracking camera, the RF energy is radiated toward the sensor, and DC energy is displayed on a multimeter showing power transfer. The wireless energy transfer system is composed of two entities. The first entity is the radio generator. The second entity is the RF to DC sensor.

Radio Generator

The radio generator is a system that provides high radio frequency power via a high frequency oscillator, high power amplifier, and high directivity antenna. The oscillator is a high frequency generator ZX95-2650 from www.minicircuits.com , cost is 44$ each. Some electrical features of this device are the following:

RF

Generator RF to DC Sensor

DC operation : Vcc at 12 volts with maximum current draw of 25mA Frequency Tuning : 2165 MHz – 2650 MHz Power Output : 5dBm More features of this oscillator can be found at this link: http://www.minicircuits.com/ZX95-2650.pdf The high power amplifier is the ZRL-3500 from www.minicircuits.com, cost is 140$ each. The amplifier is fed with the signal generated form the oscillator. The signal is amplified with a gain of about 20dB and then fed to a high directivity gain antenna. Some electrical features of the amplifier are the following: Frequency: 700 MHz to 3500MHz Gain: 26 dB (700-1600MHz), 21 dB (1600 – 2600MHz), 16 dB (2600-3500MHz) DC operation: 12volts with maximum current draw of 575mA The amplified signal is then fed through a high directivity antenna HG2412P from www.hyperlinktechnologies.com, cost 33$ each. The antenna has about 12 dB of gain in the zero degree vertical and horizontal direction. Some electrical features of the amplifier are the following: Gain: 12 dB Polarization: vertical (34 degree) and horizontal (65 degree)

Some electrical features of the amplifier are the following: Return Loss S11 of the RF to DC sensor: Detected voltage of the RF to DC sensor with input power equal to 0dBm:

Detected current of the RF to DC sensor with input power equal to 0dBm:

Graphical and Text LCD

At the top side of Wi-Tesla is a graphical LCD that is capable of displaying up to 16 lines of text by 32 characters across, graphical capability display of 256x128 pixels. The LCD has a SED1330 onboard controller. This LCD is available from allelectronics for about $18. The LCD can be a little complicated to work with at first, but once the controller data sheet is understood, the functions become understandable. LCD Functions: void gl_init(); // initializes LCD display void gl_grfclr(); // clears graphical LCD pixels void gl_grfhome(); // sets cursor addresse to graphical void gl_strobe(); // shifts data into LCD void gl_txtclr(); // clears all text on screen void gl_setaddr (int gl_cur, long gl_addr); //sets address of cursor void send_data (int gl_byte); // sends data, then Strobes data in void send_command (int gl_cmd); // sends command data to LCD void g_printf (char string[],long Line_num); //prints a text line at the line number void g_clear_line (long Line_num); // clears the specified line

Heat-Sinks and Fans

In addition to the temperature sensor to monitor the amplifier’s temperature, two heat- sinks and two fans are located on top of the amplifier to absorb the heat and reduce it to a controlled level. Fan Functions:

  1. Void Fan_ON( int fan_num, long time); // turns on specified fan for time (ms) Example: Fan_On(left_fan, 4000); // left fan on for 4 second
  2. Void Fan_OFF( int fan_num); // turns off specified fan Example: Fan_Off(right_fan); // right fan off Left Fan + Heat-Sink Right Fan + Heat-Sink

Infra-Red (Sharp GP2D02)

The infra red sensor is used for edge of the world detection. It is located on the back of the high power antenna, and would not effect the performance of the antenna due to the grounded plate. IR Functions:

  1. int get_ir_reading (); // obtains a vertical distance reading Example: height = get_ir_reading();// height has the vertical distance

PyroElectric Sensor

The pyroelectric sensor is used to detect the presence of humans in the path of the radio frequency generated signal. This is a safety issue to ensure a human is not bombarded with high power RF energy. IR (sharp GP2D02) Pyro-Electric Sensor

CMUCAM Original

The CMUcam is used on Wi-Tesla to detect sensors via colors. When the specified color is captured, Wi-Tesla will follow the color source until it is within 10 cm distance, then it will beam the color source with high radio power beam. CMUcam Functions:

  1. short setup_color (int color);// sets up the cmucam to look for the specified color. Color choices are : Orange, Blue, and Black Example: Setup_Color(Orange); // Wi-Tesla would lookout for orange colors
  2. short get_color (); //tracks color specified in above function CMUcam

Conclusion

Wi-Tesla was a great learning experience in the field of sensors and actuators. I’ve learned a great deal about servos, motors, sensors, and robotic intelligence. Wi-Tesla was a successful project that has met it’s objective. Some of the lessons learned in the process of building the robot are summarized below:

  1. Wi-Tesla has large power consumption needs.
  2. Adding more sensors requires more power
  3. The need for more power leads to the addition of more batteries which makes the robot heavier
  4. Adding more sensors complicates the design and makes the robot run slower
  5. Slower sensor readings leads to missed sensor readings such as collision or edge of the world detection delay
  6. Testing and running each sensor alone is the best way to start off
  7. Having set functions for each sensor makes the integration process much easier
  8. Low battery caused the robot to behave in an unexpected manner

Appendix

Source Code

#include <16F777.h> #device *= #device adc= #fuses XT,NOWDT,NOBROWNOUT #use delay(clock=4000000) #include <stdio.h> #include <stdlib.h> #include <string.h> #use rs232(baud=19200,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream = cmucam) #use rs232(baud=9600,parity=N,xmit=PIN_C4,rcv=PIN_C5,bits=8,stream = bluetooth) #use rs232(baud=19200,parity=N,xmit=PIN_C3,rcv=PIN_C3,bits=8,stream = servo_control) //#use rs232(DEBUGGER) #use fast_io(B) //#use fast_io(D) #include <input.c> //LCD port definition - Done!

#define LCD_INVERSE 0xff

#define LCD_CR 0x20 //32 Chars/bytes per line #define LCD_W 0x100 //256 pixels wide #define LCD_H 0x80 //128 pixels high #define LCD_GRH 0x1000 //Graphic home position #define trigger_delay 10 // 10ms ultrasonic reset #define out_of_range 0xffff

  • Abstract...........................................................................................................................
  • Introduction.....................................................................................................................
  • Robot Physical Platform..................................................................................................
  • System Components and Behaviors.................................................................................
    • Servos
      • Wheels Behaviors....................................................................................................
      • Arms Behaviors.......................................................................................................
    • Whiskers
    • Wireless Generator and Receiver.................................................................................
      • Radio Generator
      • RF to DC Sensor
    • Graphical and Text LCD
    • UltraSonic Range Detector (SRF04)..........................................................................
    • Temperature Sensor (LM35CAZ)..............................................................................
    • Heat-Sinks and Fans..................................................................................................
    • Infra-Red (Sharp GP2D02)........................................................................................
    • PyroElectric Sensor
    • BlueTooth Wireless Module......................................................................................
    • CMUCAM Original
  • Conclusion
  • Appendix
    • Source Code..............................................................................................................
  • #define LCD_NORMAL 0x
  • #define LCD_L1 0x00 //Line #define LCD_Lh 0x08 //Height of line (8x8 characters)
  • #define LCD_L2 0x20 //Line
  • #define LCD_L3 0x40 //Line
  • #define LCD_L4 0x60 //Line
  • #define LCD_L5 0x80 //Line
  • #define LCD_L6 0xA0 //Line
  • #define LCD_L7 0xC0 //Line
  • #define LCD_L8 0xE0 //Line
  • #define LCD_L9 0x100 //Line
  • #define LCD_L10 0x120 //Line
  • #define LCD_L11 0x140 //Line
  • #define LCD_L12 0x160 //Line
  • #define LCD_L13 0x180 //Line
  • #define LCD_L14 0x1A0 //Line
  • #define LCD_L15 0x1C0 //Line
  • #define LCD_L16 0x1E0 //Line
  • //#define eeprom_size //#define button_down !input(pin_c4)
  • #define echo pin_c
  • #define pulse_trigger pin_c
  • #define servo_reset pin_c // servo control constants
  • #define right_servo
  • #define left_servo
  • #define right_arm
  • #define left_arm
  • #define neutral_speed
  • #define full_speed
  • #define speed5
  • #define speed4
  • #define speed3
  • #define speed2
  • #define speed1

#define speed0 0 #define stop_speed 0 #define turn_delay 500 //servo constants: #define start_byte 0x #define device_id 0x #define go_forward 0 #define go_backward 1 #define repeat_command 3 //servo repeat command #define turn_time 5 // turns 5 *(100ms) = 0.5sec //CMUcam constants: #define orange 0 #define black 1 //#define average_color 4 //servo global variables int servo_command; int servo_num; int data_1 ; int data_2 ; int counter0_overflow; int counter1_overflow; int counter2_overflow; short timeout_error; //long cmu_param[8]; int mx,my,x1,y1,x2,y2,pixels,confidence; // graphic LCD char line_string [33]; void gl_init(); void gl_grfclr(); void gl_grfhome(); void gl_strobe(); void gl_txtclr(); void gl_setaddr (int gl_cur, long gl_addr); void send_data (int gl_byte); void send_command (int gl_cmd); #separate void g_printf (char string[],long Line_num); void g_clear_line (long Line_num);