Strange problem with QTR-8A sensor readings

hi, i am trying to build a line following robot. i am using arduino rbbb(due, atmega 328) and i have 4 aa batteries 1000 mah for power supply… everything is working except the fact that my qtr sensor doesn’t read the black line correctly… i am using a a black line of 2,3 cm width on a white surface… the problem is that the first three sensors(0,1,2) are working just fine but the the last three (3,4,5) seem to change values simultaneously… for example when the robot is at the left of the line on the white surface all sensors have values near 35… when i move slightly the robot to the right then sensor1 sees the black line and it’s is value is 900+… this goes on for the second and the third sensor. when the 4th sensor sees the black line it seems that the fifth and sixth sensor see it as well, when in reality they are above the white surface… when i move it more to the right and only the sixth sensor is above the black line and five and four are above the white surface the values of the sixth sensor are very near, almost the same, to the values of the other sensors (near 30)… my sensors are connected to analog inputs of the arduino from 0-5… the ground of the arduino connects to the ground of the qtr board and to the ground of the batteries… the qtr vcc connects to arduino 5V pin… i have LEDOn connected to digital pin 10 and i have set it to HIGH… all connection seem right and i have checked them many times but i cannot see where the problem is… my baud rate is 57600 and i have changed it in the example programs (raw and callibrated values) from the qtr library… i am sendind my data to the pc wirelessly via a wixel.

please help! any idea may be very helpull!! thanx…

these are the raw values using the code from the qtr library… they show what happens when i move the robot from left to right…

at the 1st picture values from 4,5,6 seem to be correct but on the 2nd picture sensors 5,6 have values near the values from 4th sensor…






Hello.

Thank you for the detailed setup description and pictures. Some of your solder joints look very suspect, and the behavior sounds like you have a connection problem.

Can you post the code you are running? Also, can you post a picture that shows the other side of the QTR sensor? Lastly, can you use a multimeter to measure the voltage on the Arduino’s 5V output pin?

- Ben

this is the code i’m using… it’s almost the same with the callibrated_values example but i have changed the emitter_pin and the baud rate… i also have in comments the code to read the values from the analog inputs but when i do that almost every value is above 700 constantly… i also used the raw_values example with the same changes. sensors 5 and 6 follow the values of sensor 4 and i am thinking that some electrical short is causing it… my solder joints are not so good, i know it and i am going to change them, but they are not shorted anywhere… lastly i do not have a multimeter at the time so i cannot test the 5V output…

thank you for your reply!!

#include <QTRSensors.h>
#define NUM_SENSORS             6  // number of sensors used
#define NUM_SAMPLES_PER_SENSOR  4  // average 4 analog samples per sensor reading
#define EMITTER_PIN             10  // emitter is controlled by digital pin 2

// sensors 0 through 5 are connected to analog inputs 0 through 5, respectively
QTRSensorsAnalog qtra((unsigned char[]) {0, 1, 2, 3, 4, 5}, 
  NUM_SENSORS, NUM_SAMPLES_PER_SENSOR, EMITTER_PIN);
unsigned int sensorValues[NUM_SENSORS];

//  const int analogValue0=A0;
//  const int analogValue1=A1;
//  const int analogValue2=A2;
//  const int analogValue3=A3;
//  const int analogValue4=A4;
//  const int analogValue5=A5;
//
//  int analog0,analog1,analog2,analog3,analog4,analog5=0;


void setup()
{
  
  Serial.begin(57600);
  
  Serial.begin(57600);
  
  Serial.println("");
  
  pinMode(EMITTER_PIN,OUTPUT);
   
  digitalWrite(EMITTER_PIN,HIGH);  
  
//    pinMode(analogValue0,INPUT);  
//    pinMode(analogValue1,INPUT);
//    pinMode(analogValue2,INPUT);
//    pinMode(analogValue3,INPUT);
//    pinMode(analogValue4,INPUT);
//    pinMode(analogValue5,INPUT);

  
  delay(500);
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);    // turn on Arduino's LED to indicate we are in calibration mode
  for (int i = 0; i < 400; i++)  // make the calibration take about 10 seconds
  {
    qtra.calibrate();       // reads all sensors 10 times at 2.5 ms per six sensors (i.e. ~25 ms per call)
  }
  digitalWrite(13, LOW);     // turn off Arduino's LED to indicate we are through with calibration

  // print the calibration minimum values measured when emitters were on
  for (int i = 0; i < NUM_SENSORS; i++)
  {
    Serial.print(qtra.calibratedMinimumOn[i]);
    Serial.print(' ');
  }
  Serial.println();
  
  // print the calibration maximum values measured when emitters were on
  for (int i = 0; i < NUM_SENSORS; i++)
  {
    Serial.print(qtra.calibratedMaximumOn[i]);
    Serial.print(' ');
  }
  Serial.println();
  Serial.println();
  delay(1000);
}


void loop()
{
  // read calibrated sensor values and obtain a measure of the line position from 0 to 5000
  // To get raw sensor values, call:
  //  qtra.read(sensorValues); instead of unsigned int position = qtra.readLine(sensorValues);
  unsigned int position = qtra.readLine(sensorValues);
  
  // print the sensor values as numbers from 0 to 1000, where 0 means maximum reflectance and
  // 1000 means minimum reflectance, followed by the line position
  for (unsigned char i = 0; i < NUM_SENSORS; i++)
  {
    Serial.print(sensorValues[i]);
    Serial.print('\t');
  }
  
//    analog0=analogRead(analogValue0);
//    analog1=analogRead(analogValue1);
//    analog2=analogRead(analogValue2);
//    analog3=analogRead(analogValue3);
//    analog4=analogRead(analogValue4);
//    analog5=analogRead(analogValue5);   
//   
//    Serial.print("analog0= ");
//    Serial.println(analog0);
//    
//    Serial.print("analog1= ");
//    Serial.println(analog1);
//    
//    Serial.print("analog2= ");
//    Serial.println(analog2);
//    
//    Serial.print("analog3= ");
//    Serial.println(analog3);
//        
//    Serial.print("analog4= ");
//    Serial.println(analog4);
//    
//    Serial.print("analog5= ");
//    Serial.println(analog5);
  //Serial.println(); // uncomment this line if you are using raw values
  Serial.println(position); // comment this line out if you are using raw values
  
  delay(250);
}


I think you should try to simplify things so we can get a better idea of what might be going wrong. My suspicion is that sensors 5 and 6 do not have a good connection to your Arduino, so the readings you get on those pins are being heavily influenced by the reading of sensor 4. There are a few ways we can test for this. First, I would like you to just try a basic program that calls analogRead() on the six sensor pins to get their raw values (don’t use the QTR library, and don’t do anything with the emitter pin). Can you post that program along with its output as you slide the array over a black line?

- Ben

ok… this is the code for the analog reading

  const int analogValue0=A0;
  const int analogValue1=A1;
  const int analogValue2=A2;
  const int analogValue3=A3;
  const int analogValue4=A4;
  const int analogValue5=A5;

  int analog[6];


void setup()
{
  
  for(int i=0;i<6;i++){
    
     analog[i]=-100; 
  }
  
  Serial.begin(57600);
  
  Serial.println("");
   
    pinMode(analogValue0,INPUT);  
    pinMode(analogValue1,INPUT);
    pinMode(analogValue2,INPUT);
    pinMode(analogValue3,INPUT);
    pinMode(analogValue4,INPUT);
    pinMode(analogValue5,INPUT);

    delay(500);
    
  }


void loop()
{
  
  analog[0]=analogRead(analogValue0);
  analog[1]=analogRead(analogValue1);
  analog[2]=analogRead(analogValue2);
  analog[3]=analogRead(analogValue3);
  analog[4]=analogRead(analogValue4);
  analog[5]=analogRead(analogValue5);
  
  for (int i = 0; i < 6; i++)
  {
    Serial.print(analog[i]);
    Serial.print('\t');
  }
  
  Serial.println();
  
  
  delay(50);
}

and these are the results from right to left… same problem again…

31	27	29	28	60	75	
31	27	29	28	60	75	
31	27	29	28	60	75	
31	27	29	28	60	75	
31	27	29	28	60	75	
31	27	29	28	60	75	
31	27	29	28	60	75	
30	27	29	28	60	75	
30	27	29	28	60	75	
30	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
30	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
29	27	29	28	60	75	
31	27	29	28	60	75	
33	27	29	28	60	75	
39	27	29	28	60	75	
42	27	29	28	60	75	
48	27	29	28	60	75	
114	27	29	28	60	75	
239	27	29	28	60	75	
374	27	29	28	59	75	
496	27	29	28	59	74	
568	27	29	28	58	74	
591	27	29	28	59	74	
604	27	29	28	59	74	
613	27	29	28	59	74	
618	27	29	28	59	74	
622	27	29	28	59	74	
628	28	29	28	59	74	
630	28	29	28	59	74	
629	27	29	28	59	74	
629	27	29	28	59	74	
630	28	29	28	59	74	
633	28	29	28	59	74	
634	28	29	28	59	74	
635	28	29	28	59	74	
636	28	29	28	59	74	
635	27	29	28	59	74	
633	27	29	28	59	74	
633	28	29	28	59	74	
635	28	29	28	59	74	
636	28	29	28	59	74	
638	28	29	28	59	74	
635	27	29	28	59	74	
632	27	29	28	59	74	
630	27	29	28	59	74	
632	27	29	28	59	74	
634	28	29	28	59	74	
635	28	29	28	59	74	
634	28	29	28	59	74	
633	28	29	28	59	74	
632	27	29	28	59	74	
632	27	29	28	59	74	
634	28	29	28	59	74	
636	28	29	28	59	74	
636	28	29	28	59	74	
635	28	29	28	59	74	
634	28	29	28	59	74	
632	28	29	28	59	74	
633	28	29	28	59	74	
635	28	29	28	59	74	
636	28	29	28	59	74	
636	28	29	28	59	74	
636	28	29	28	59	74	
641	28	29	28	59	74	
641	28	29	28	59	74	
644	28	29	28	59	74	
645	28	29	28	59	74	
649	28	29	28	59	74	
650	28	29	28	59	74	
649	28	29	28	59	74	
647	28	29	28	59	74	
647	28	29	28	59	74	
650	28	29	28	59	74	
651	28	29	28	59	74	
652	28	29	28	59	74	
651	28	29	28	59	74	
649	28	29	28	59	74	
649	28	29	28	59	74	
650	28	29	28	59	74	
653	28	29	28	59	74	
655	28	29	28	59	74	
654	28	29	28	59	74	
654	28	29	28	59	74	
654	28	28	28	59	74	
654	28	29	28	59	74	
656	28	29	28	59	74	
658	28	29	28	59	74	
659	28	29	28	59	74	
658	28	29	28	59	74	
656	28	28	28	59	74	
657	28	29	28	59	74	
659	28	28	28	59	74	
661	28	29	28	59	74	
662	28	29	28	59	74	
663	29	29	28	59	74	
665	29	28	28	59	74	
666	29	28	28	59	74	
669	29	28	28	59	74	
670	29	28	28	59	74	
672	30	28	28	59	74	
676	31	28	28	59	74	
679	32	28	28	59	74	
684	37	28	28	59	74	
691	159	28	28	59	74	
693	224	28	28	59	74	
697	371	28	28	59	74	
700	539	28	28	58	73	
697	628	28	27	58	73	
691	675	28	27	58	74	
685	682	28	27	58	74	
685	682	28	27	59	74	
688	684	28	27	59	74	
689	685	28	27	59	74	
689	685	28	27	59	74	
688	684	28	27	59	74	
686	683	28	27	59	74	
684	682	28	27	59	74	
686	683	28	27	59	74	
688	684	28	27	59	74	
688	685	28	27	59	74	
687	684	28	27	58	74	
686	683	28	27	58	74	
685	682	28	27	58	74	
686	683	28	27	58	74	
687	684	28	27	58	74	
688	685	28	27	58	74	
688	685	28	27	58	74	
687	683	28	27	58	74	
687	682	28	27	58	74	
687	682	28	27	58	74	
693	685	28	27	58	74	
696	687	28	27	59	74	
696	688	28	27	59	74	
694	689	28	27	59	74	
692	695	28	27	59	74	
691	696	28	27	59	74	
692	698	28	27	59	74	
692	702	28	27	59	74	
694	704	28	27	59	74	
693	704	28	27	59	74	
692	704	28	27	59	74	
691	702	28	27	59	74	
690	701	28	27	59	74	
691	700	28	27	59	74	
695	701	28	27	59	74	
697	702	28	27	59	74	
696	701	28	27	59	74	
692	701	28	27	59	74	
690	701	28	27	59	74	
692	704	28	27	59	74	
693	706	28	27	59	74	
692	709	28	27	59	74	
690	711	28	27	58	74	
687	713	28	27	58	74	
685	715	28	27	58	74	
685	719	28	27	58	74	
685	720	28	27	58	74	
685	721	28	27	58	74	
683	725	28	27	58	74	
679	727	28	27	58	74	
675	727	29	27	58	74	
673	729	29	27	58	74	
674	730	29	27	58	74	
676	730	29	27	58	74	
676	732	29	27	58	74	
674	732	29	27	58	74	
672	730	29	27	58	74	
669	729	29	27	58	74	
670	730	29	27	58	74	
669	730	29	27	58	74	
666	729	29	27	58	74	
668	730	29	27	58	74	
673	732	29	27	58	74	
672	731	29	27	58	74	
679	737	29	27	59	74	
681	739	29	27	59	74	
680	739	29	27	59	74	
680	739	29	27	59	74	
679	744	30	27	59	74	
675	749	30	27	59	74	
672	750	30	27	59	74	
672	749	30	27	59	74	
674	750	30	27	58	74	
675	750	30	27	58	74	
673	750	31	27	58	74	
669	751	31	27	58	74	
664	752	31	27	58	74	
665	753	31	27	58	74	
665	755	32	27	58	74	
657	757	33	27	58	74	
607	763	47	27	58	73	
483	766	299	27	59	74	
420	766	365	27	58	73	
424	766	361	27	58	73	
427	767	365	27	57	72	
417	768	383	27	57	72	
286	770	474	27	58	72	
111	771	541	27	58	73	
58	771	554	27	58	73	
53	771	557	27	58	73	
91	770	545	27	58	73	
49	771	567	27	58	73	
51	772	567	27	58	73	
49	771	566	27	58	73	
48	770	565	27	58	73	
45	769	566	27	58	73	
43	770	575	27	58	73	
42	773	582	27	58	73	
42	774	582	27	58	73	
44	773	576	27	58	73	
44	771	573	27	58	73	
43	770	572	27	58	73	
45	769	567	27	58	73	
45	769	569	27	58	73	
46	770	571	27	58	73	
47	770	571	27	58	73	
46	770	569	27	58	73	
46	769	567	27	58	73	
46	769	566	27	58	73	
46	770	567	27	58	73	
49	771	566	27	58	73	
49	771	568	27	58	73	
48	771	568	27	58	73	
46	770	566	27	58	73	
46	769	565	27	58	73	
46	769	565	27	58	73	
47	770	566	27	58	73	
49	770	567	27	58	73	
39	770	591	27	58	73	
32	768	637	27	58	73	
29	767	670	27	58	73	
28	766	679	27	58	74	
27	767	695	27	58	74	
26	766	708	27	59	74	
26	766	712	27	59	74	
26	766	713	27	59	74	
26	765	712	27	59	74	
26	765	711	27	59	74	
26	765	712	27	59	74	
26	767	714	27	59	74	
26	768	716	27	59	74	
26	767	717	27	59	74	
25	766	718	27	59	74	
25	765	718	27	59	74	
25	765	718	27	59	74	
25	764	718	27	59	74	
25	764	719	27	59	74	
25	765	719	27	59	74	
25	765	719	27	59	74	
25	764	717	27	59	74	
25	764	717	27	59	74	
25	764	717	27	59	74	
25	765	719	27	59	74	
25	766	719	27	59	74	
25	765	721	27	59	74	
25	762	729	27	59	74	
24	758	740	27	59	74	
24	751	753	27	59	74	
24	746	763	27	59	74	
24	747	763	27	59	74	
24	748	764	27	59	74	
24	748	764	27	59	75	
24	742	766	28	59	75	
24	739	768	28	59	75	
24	732	774	28	59	75	
24	728	778	28	60	75	
24	722	783	29	60	75	
24	716	786	30	60	75	
24	700	790	31	61	76	
24	678	793	34	63	77	
24	670	795	35	64	78	
24	673	796	35	64	79	
24	672	797	35	64	79	
24	662	798	36	65	79	
24	660	798	36	66	80	
24	659	797	36	65	80	
24	659	797	36	66	80	
24	660	798	36	65	80	
24	661	799	37	66	80	
24	661	799	37	66	80	
24	658	798	37	66	80	
24	656	797	37	66	80	
24	655	797	37	66	80	
24	656	798	37	66	80	
24	657	799	37	66	80	
24	659	799	37	66	80	
24	659	799	37	66	80	
24	657	798	37	66	80	
24	656	798	37	66	80	
24	655	797	37	66	80	
24	657	798	37	66	80	
24	658	798	37	66	80	
24	658	798	37	66	80	
24	657	798	37	66	80	
24	656	797	37	66	80	
24	657	797	37	66	80	
24	659	798	37	66	80	
24	661	799	37	66	80	
24	662	800	37	66	80	
24	663	800	37	66	80	
24	650	800	38	67	81	
24	625	801	43	69	82	
24	588	803	77	90	95	
24	516	806	203	173	150 
24	354	809	357	294	243	
24	79	812	481	410	346	
24	34	811	571	507	443	
24	30	809	627	577	521	
24	29	808	652	618	575	
24	30	820	654	634	606	
25	33	836	658	642	622	
26	33	837	658	645	631	
26	33	836	656	644	634	
25	33	835	656	644	635	
25	33	835	657	645	636	
26	33	836	659	646	637	
26	33	837	660	647	638	
25	33	836	659	647	639	
25	33	835	658	646	638	
25	33	835	656	645	638	
25	33	835	657	645	637	
25	33	836	658	646	638	
26	33	837	660	647	639	
26	33	836	659	647	639	
25	33	835	657	646	639	
25	33	835	656	645	638	
25	33	835	657	645	637	
26	33	836	659	646	638	
26	33	837	660	648	639	
25	33	836	659	648	639	
25	33	836	658	647	639	
25	33	835	656	645	638	
25	33	835	657	645	638	
26	33	836	659	647	638	
26	33	837	660	648	639	
26	33	837	659	648	640	
26	33	836	657	647	639	
25	33	835	656	646	638	
25	33	835	657	646	638	
26	33	836	658	647	639	
26	33	837	660	648	640	
26	33	837	659	648	640	
26	33	836	658	647	639	
25	33	835	656	646	638	
25	33	835	657	646	638	
25	33	836	659	647	639	
25	32	835	669	654	643	
25	32	834	675	660	649	
25	32	831	683	667	655	
25	31	825	701	682	667	
25	31	824	703	687	674	
25	31	825	705	691	679	
25	31	826	706	692	682	
25	31	826	706	693	683	
25	30	823	707	694	684	
25	30	819	715	699	688	
25	30	810	733	712	698	
25	29	801	748	725	709	
25	29	801	750	730	716	
25	29	800	750	732	720	
25	29	797	751	734	722	
25	29	790	757	738	726	
25	29	765	776	751	735	
25	29	721	795	767	748	
25	28	686	803	776	759	
25	28	676	804	780	764	
25	28	668	803	781	767	
25	28	665	803	781	768	
25	28	666	803	781	768	
25	28	668	804	782	769	
25	28	657	806	783	770	
25	28	638	807	784	771	
25	28	620	807	784	772	
25	28	582	808	786	773	
25	28	516	811	789	776	
25	28	349	815	793	779	
25	28	79	815	792	779	
25	28	39	812	789	778	
25	28	37	810	787	776	
25	28	36	808	785	774	
25	28	35	807	784	773	
25	28	35	808	784	772	
25	28	34	807	784	772	
25	28	34	806	784	772	
25	28	33	801	780	769	
25	28	32	795	775	765	
25	27	31	791	771	761	
25	27	31	784	766	757	
25	27	31	777	760	752	
25	27	30	763	749	743	
24	27	30	745	735	731	
24	27	30	722	716	715	
24	27	29	692	691	695	
24	27	29	663	665	671	
24	27	29	630	635	644	
24	27	29	588	598	611	
24	27	29	551	561	576	
24	27	29	529	534	545	
24	27	29	496	503	515	
24	27	29	432	451	471	
24	27	29	316	359	398	
24	27	29	116	201	272	
24	27	29	37	107	171	
24	27	29	33	76	119	
23	27	29	31	66	95	
23	27	28	30	63	84	
23	27	28	29	61	79	
23	27	28	29	61	77	
23	27	28	29	60	76	
23	26	28	28	60	76	
23	26	28	28	59	75	
23	26	28	28	58	74	
23	26	28	28	58	74	
23	26	28	28	57	73	
23	26	28	28	59	74	
23	26	28	28	59	75	
23	26	28	28	60	75	
23	26	28	27	60	75	
23	26	28	27	60	75	
23	26	28	27	60	75	
23	26	28	27	59	75	
23	26	28	27	59	75	
23	26	28	27	59	75	
23	26	28	27	59	74	
23	25	28	27	59	74	
23	26	28	27	59	73	
23	25	27	27	58	72	
23	25	27	27	58	72	
22	25	27	27	59	74	
22	25	27	27	59	74

Can you tell me what the output is if you run the following program? (The only change I made was to enable internal pull-ups on your analog inputs.)

  const int analogValue0=A0;
  const int analogValue1=A1;
  const int analogValue2=A2;
  const int analogValue3=A3;
  const int analogValue4=A4;
  const int analogValue5=A5;

  int analog[6];


void setup()
{
  
  for(int i=0;i<6;i++){
    
     analog[i]=-100; 
  }
  
  Serial.begin(57600);
  
  Serial.println("");
   
    pinMode(analogValue0,INPUT_PULLUP);  
    pinMode(analogValue1,INPUT_PULLUP);
    pinMode(analogValue2,INPUT_PULLUP);
    pinMode(analogValue3,INPUT_PULLUP);
    pinMode(analogValue4,INPUT_PULLUP);
    pinMode(analogValue5,INPUT_PULLUP);

    delay(500);
    
  }


void loop()
{
  
  analog[0]=analogRead(analogValue0);
  analog[1]=analogRead(analogValue1);
  analog[2]=analogRead(analogValue2);
  analog[3]=analogRead(analogValue3);
  analog[4]=analogRead(analogValue4);
  analog[5]=analogRead(analogValue5);
  
  for (int i = 0; i < 6; i++)
  {
    Serial.print(analog[i]);
    Serial.print('\t');
  }
  
  Serial.println();
  
  
  delay(50);
}

Another thing you might try is reading the sensors in the reverse order and see if that affects the output.

- Ben

ben i tested the code with the INPUT_PULLUP and here are the results… 5 and 6’s values are constantly near 1016… i don’t what this means…

49	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	59	60	51	1016	1016	
50	60	60	51	1016	1016	
50	59	61	51	1016	1016	
49	59	61	51	1016	1016	
49	58	60	51	1016	1016	
49	58	60	51	1016	1016	
48	57	60	51	1016	1016	
48	57	61	52	1016	1016	
47	56	63	52	1016	1016	
47	56	66	53	1016	1016	
47	55	74	53	1016	1016	
46	53	65	52	1016	1016	
46	53	66	53	1016	1016	
46	52	66	53	1016	1016	
47	53	70	53	1016	1016	
47	53	84	54	1016	1016	
48	53	88	55	1016	1016	
47	52	73	54	1016	1016	
48	52	78	54	1016	1016	
51	53	89	55	1016	1016	
277	52	65	54	1015	1015	
758	52	62	55	1017	1017	
843	53	60	55	1018	1018	
864	55	60	56	1018	1018	
881	61	61	56	1018	1018	
895	255	61	56	1017	1017	
901	573	62	56	1013	1013	
908	762	65	56	1018	1018	
914	860	96	57	1019	1019	
909	890	87	55	1019	1020	
907	903	114	54	1019	1020	
901	912	178	54	1019	1020	
894	917	274	54	1018	1018	
888	918	318	54	1017	1017	
884	918	338	54	1016	1016	
881	921	415	55	1014	1014	
846	922	586	54	1015	1015	
672	924	805	54	1017	1017	
436	921	858	55	1014	1014	
420	921	860	55	1014	1015	
417	921	861	55	1014	1015	
237	921	882	54	1019	1019	
60	918	898	55	1020	1020	
55	914	904	55	1020	1020	
52	906	912	55	1019	1020	
52	894	921	73	1020	1020	
52	852	929	468	1012	1012	
52	651	934	778	1017	1017	
51	351	931	855	1017	1017	
51	168	928	880	1020	1020	
51	93	921	892	1020	1020	
51	69	909	904	1020	1020	
51	64	878	914	1020	1020	
51	60	766	916	1019	1019	
50	58	500	911	1010	1010	
50	57	255	911	1017	1017	
50	56	174	902	1018	1018	
50	56	149	890	1018	1018	
50	56	129	852	1018	1018	
50	56	119	736	1016	1017	
49	56	89	506	1007	1007	
49	55	73	210	1016	1016	
49	56	70	70	1016	1016	
49	56	69	61	1016	1016	
49	55	66	59	1016	1016	
49	55	64	58	1016	1016	
48	54	64	57	1016	1016	
48	54	63	56	1016	1016	
48	53	64	55	1016	1016	
48	53	63	54	1016	1016	
48	52	62	54	1016	1016	
47	52	61	54	1016	1016	
47	52	59	53	1016	1016	
46	51	58	53	1016	1016	
46	51	56	53	1016	1016	
45	51	56	54	1016	1016	
45	50	55	53	1016	1016	
44	50	54	53	1016	1016	
44	49	54	52	1016	1016	
43	48	54	52	1016	1016	
43	48	53	51	1016	1016	
43	47	53	51	1016	1016	
42	47	53	51	1016	1016	
43	47	53	50	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
43	47	53	51	1016	1016	
42	47	53	51	1016	1016	
43	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	50	1016	1016	
42	47	52	50	1016	1016	
42	47	52	50	1016	1016	
42	47	52	50	1016	1016	
42	47	52	50	1016	1016	
43	47	53	51	1016	1016	
43	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
42	47	53	51	1016	1016	
43	47	53	51	1016	1016	
42	47	52	50	1016	1016

That is a very strong indication that analog pins 5 and 6 are not electrically connected to the QTR array. If you disable the pull-ups and read the sensors in a different orders, you will probably read values for 5 and 6 that approximately match the values of whatever sensor you read right before them.

I think at this point you should invest in a multimeter (they are not very expensive, and they are pretty much an essential tool if you are going to be working with electronics like this). I suggest you disconnect the QTR sensor array from the Arduino entirely and just use a multimeter to see what the voltages are on the channels as you pass the array over the line. If you probe at various points, you should be able to determine where your connection is broken.

- Ben

ben i solved it… i found that the analog pins of the atmega chip were not soldered correctly. i reheated the pins added some solder and now they work…

thank you very much for your help!

That’s great to hear; thank you for letting us know what the problem was.

- Ben