• Category Archives electronics
  • IR eye

    This project is the first step in my motion tracking. This Eye was built and adapted from an LRM post here .

    DSCN0219DSCN0221please dont laugh at my soldering job, its what i can manage with that kind of board, I like the ones that mimic a breadboard setup. With very little trouble i finished soldering in about 2 hours but had to go back a desolder one transistor and replace it and resolder one wire. After that i tested each IR sensor by themselves to make sure they all worked, each one gave a little different reading off the same IR source but that can be fixed with a little calibration in the software. But for now my goal is to hook it up to 2 servos and control the x and y for the motion tracking, eventually i would like to put this into an enclosure that looks like an eye.
    This is to make sure all 4 eyes are working
    const int sensepin0 = 0;
    const int sensepin1 = 1;
    const int sensepin2 = 2;
    const int sensepin3 = 3;
    int sensorValue0 = 0;
    int sensorValue1 = 0;
    int sensorValue2 = 0;
    int sensorValue3 = 0;
    void setup() {
    Serial.begin(9600);
    }
    void loop() {
    sensorValue0 = analogRead(sensepin0);
    sensorValue1 = analogRead(sensepin1);
    sensorValue2 = analogRead(sensepin2);
    sensorValue3 = analogRead(sensepin3);
    Serial.print("sensor = ");
    Serial.print(sensorValue0);
    Serial.print(" ");
    Serial.print(sensorValue1);
    Serial.print(" ");
    Serial.print(sensorValue2);
    Serial.print(" ");
    Serial.println(sensorValue3);
    delay(10);
    }

    this will test all 4 sensors and print to the serial port.

    also this code is written for the arduino but can be adapted to other microprossecors.

    Here is a screenshot of the schematic as well

    ScreenshotNext i will mount it to the servo and start writing the logic for 1 of the axis, but my question is how to mount this to a servo with stuff wround the garage. I will answer this question soo.

    and this is why you should never place you MC on your keyboard…………..Screenshot-1that large stack to the left is about 30 print screen applications running. I placed my arduino on my print screen button for about 10 secs before I realized what was going on.

    Parts:

    • 4x 2n 2222 NPN transistors (generic NPN)
    • 4x 220 Ohm 1/4w resistors
    • 4x NPN photo transistors
    • a bunch of wire
    • Arduino