200 likes | 296 Views
Signals , Instruments & Systems. Sara Oppenheimer & Bruno Spahni. Localizing the maximum in an environmental field using a mobile sensor. Plan. Goal Experiment Results Conclusion. Goal | Experiments | Results |Conclusion. Goal of the Project:.
E N D
Signals, Instruments & Systems Sara Oppenheimer & Bruno Spahni Localizing the maximum in an environmentalfield using a mobile sensor
Plan • Goal • Experiment • Results • Conclusion
Goal |Experiments |Results |Conclusion • Goal of the Project: Finding the location of maximal light in an environmental field. Light (20W) Two main steps: • Go to the Light • LED indicatelight’s direction - Stop near the light source - All LED turn on • Tools: E-Puck
Goal |Experiments |Results |Conclusion Methodology of the robot: 1. Measures environmental informations 2. Analyses the data 3. Wheels and LED reaction 4. Stops if it’s near light
Goal |Experiments |Results |Conclusion • An e-puck with: • 8 IR sensors (we only use the receptorfunction) { i=0; for(i = 0;i <= 7;i++) { sample_single_light_sensor(i); while(sample_status!=2); } sprintf(buffer, "%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu\n\r",sample_buffer[0],sample_buffer[1],sample_buffer[2],sample_buffer[3],sample_buffer[4],sample_buffer[5],sample_buffer[6],sample_buffer[7]); e_send_uart1_char(buffer, strlen(buffer)); while(e_uart1_sending());
Goal |Experiments |Results |Conclusion Go to the Light (2 Methods): 1st: Create two variables with the sum of the right and left sensor’s values respectively. • The robot follows the direction of the lower addition value bufD = sample_buffer[0] +sample_buffer[1] +sample_buffer[2] +sample_buffer[3]; bufG = sample_buffer[4] +sample_buffer[5 ]+sample_buffer[6] +sample_buffer[7]; if(bufD > bufG){ e_set_speed_left(50); e_set_speed_right(100); } else{ e_set_speed_left(100); e_set_speed_right(50); }
Goal |Experiments |Results |Conclusion Go to the Light (2 Methods): 2nd:Find the sensor with the minimal value • Give a particular direction to the wheel for eachsensor switch (captor) { case 0: e_set_speed_left(560); e_set_speed_right(500); e_set_led(0,1); break; case 1: //same set ups for 2&3 e_set_speed_left(300); e_set_speed_right(-300); e_set_led(1,1); break; min = 8000; for(i=0;i<=7;i++) { if(sample_buffer[i]<=min){ min = sample_buffer[i]; captor = i;
Goal |Experiments |Results |Conclusion How to stop the robot near the light? (3codes) 1st: Whenthe sum of all sensors’ values is smaller than a fixed value. 2nd: Whenthe sum of the back sensors’ values is smaller than 1.5 times the sum of the front ones. 3rd: Data storage in a vector Comparison between stored and current data if (sum_captor<3000){ e_set_speed_left(0); e_set_speed_right(0); all_LED_on(); } if (back_sum<(1.5*front_sum){ e_set_speed_left(0); e_set_speed_right(0); all_LED_on(); } if (sum_buffer < (5*mean_buffer) && sum_buffer > ((1/5)*mean_buffer)){ e_set_speed_left(0); e_set_speed_right(0); all_LED_on();
Goal |Experiments |Results |Conclusion Results of followingLight’s Direction Perfectdetection up to 4.5 [m] Regressingfrom 4.5 [m] to 7 [m] Up to 14 [m] in case of horizontal light • Problems: • Deviation to the right side • Minicomindicatessensor 0 more sensitive than the others
Goal |Experiments |Results |Conclusion Results of Stops near the Light • Wevariedtwo coefficients of the code
Goal |Experiments |Results |Conclusion Stop on right location : 7 & 1/7
Goal |Experiments |Results |Conclusion Results of Stops near the Light • Wevariedtwo coefficients of the code
Goal |Experiments |Results |Conclusion Stop before the light: 16 & 1/16
Goal |Experiments |Results |Conclusion Results of Stops near the Light • Wevariedtwo coefficients of the code
Goal |Experiments |Results |Conclusion No stop: 5 & 1/5
Goal |Experiments |Results |Conclusion Results of Stops near the Light • Wevariedtwo coefficients of the code
Goal |Experiments |Results |Conclusion Conclusion • Quite satisfactory results • Pay attention to the bias • IT Project: importance of global view
Goal |Experiments |Results |Conclusion Thanks for your attention Questions?