Simple Tracking Camera for Online Teaching

2,064

31

4

Introduction: Simple Tracking Camera for Online Teaching

About: I'm a student majoring in International Relations/Sociology who just got back into electronics and DIY after a few years.

During the pandemic, a lot of the teachers I know find it extremely difficult to move their teaching model online. Most teachers do best using a huge board, but the problem with using a board is that a camera cannot record the entire board at a time without losing quality, so it must be zoomed and constantly adjusted based on where the teacher is writing. Take this video for example, the teacher has a dedicated camera man who would adjust the camera constantly, which is something 99% of the teachers cannot have.

Typing or writing with their mouse on Zoom is really uncomfortable, Buying expensive equipments is out of the picture for people in Third World countries like myself, where a lot of schools don't even have projectors or decent speakers for their classes.

Thats why I want to create a simple solution that would cost less than 20$ to make teaching with a board during covid much easier, by replicating what the camera man is doing in the video linked above. By using PIR sensors or a small manual control, teachers can use this platform to adjust their camera to cover the entire board with ease.

Step 1: Supplies and Tools

- Arduino Uno: 6$

- PIR sensors x3: 3$ or whatever IR Remote and an IR receiver

- 12V Stepper Motor: 8$

- Wires, carton box, glue,...: 1$

- Phone holder from a selfie stick/phone tripod: 3$

- 12V Power Source

Soldering iron

Glue Gun

This is the price I got the supplies for, I am quite sure these are Chinese knock-offs but they are the only ones on sale here.

Step 2: How It Works

As you can see in the picture above, the board is divided into 3 parts. Before the class starts, you should adjust the camera so that it would zoom into the middle part. During the class you will have to move to the 2 sides, the camera will automatically move with you.

With the 3 PIR sensors stationed looking at 3 parts of the board, it will alert the Arduino to whenever you move to a different section, and turn the stepper motor to face that part.

With the IR remote, you press 3 buttons to manually control the 3 positions of your camera. This might be a bit more of a hassle during teaching, but it is more consitent than the PIR sensors.

Step 3: Circuit and Code for Automatic PIR Version

For the PIRs:
Data PIR pin right side -> 2 Arduino

Data PIR pin middle -> 3 Arduino

Data PIR pin left side -> 4 Arduino

For the Stepper:

4 pins of the motor to 4 slots on the L298N like in the diagram

Data pins L298N to slot 8, 9, 10, 11

Step 4: Circuit for Manual IR Version

For the Stepper:

4 pins of the motor to 4 slots on the L298N like in the diagram Data pins L298N to slot 8, 9, 10, 11

For the IR receiver:

VCC -> 5V

GND -> GND

Data pin -> 12 Arduino

You will also have to use a script to save the IR remote HEX code using this guide:

https://create.arduino.cc/projecthub/electropeak/use-an-ir-remote-transmitter-and-receiver-with-arduino-1e6bc8

Step 5: Assemble the Product

Put everything in the box and use the Glue Gun and glue the PIR sensors like the image, so as the PIR sensor wont interfere with eachother.

Attach the Stepper to the lid of the box, and glue the phone holder onto the motor like in the image

Arduino Contest

Participated in the
Arduino Contest

Be the First to Share

    Recommendations

    • Fiber Arts Challenge

      Fiber Arts Challenge
    • First Time Author Contest

      First Time Author Contest
    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge

    4 Comments

    0
    kellsworth246
    kellsworth246

    Question 6 months ago on Step 3

    When we tried to code the project, we received the error, "PIR Pin was not declared in the scope". Can you help us understand what we're doing wrong? Thank you!

    Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino: In function 'void loop()':
    sketch_jan26a:22:11: error: 'PIRpin' was not declared in this scope
    pinMode(PIRpin[p], INPUT);
    ^~~~~~
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:22:11: note: suggested alternative: 'PRIi8'
    pinMode(PIRpin[p], INPUT);
    ^~~~~~
    PRIi8
    sketch_jan26a:31:4: error: 'myStepper' was not declared in this scope
    myStepper.setSpeed(60);
    ^~~~~~~~~
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:31:4: note: suggested alternative: 'Stepper_h'
    myStepper.setSpeed(60);
    ^~~~~~~~~
    Stepper_h
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino: In function 'void loop()':
    sketch_jan26a:35:6: error: redefinition of 'void loop()'
    void loop() {
    ^~~~
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:17:6: note: 'void loop()' previously defined here
    void loop() {
    ^~~~
    sketch_jan26a:38:5: error: 'currentPIRpin' was not declared in this scope
    currentPIRpin = PIRpin[PIR];
    ^~~~~~~~~~~~~
    sketch_jan26a:38:21: error: 'PIRpin' was not declared in this scope
    currentPIRpin = PIRpin[PIR];
    ^~~~~~
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:38:21: note: suggested alternative: 'PIR'
    currentPIRpin = PIRpin[PIR];
    ^~~~~~
    PIR
    sketch_jan26a:39:5: error: 'PIRstatus' was not declared in this scope
    PIRstatus = digitalRead(currentPIRpin);
    ^~~~~~~~~
    sketch_jan26a:42:10: error: 'PIRprevState' was not declared in this scope
    if(PIRprevState[PIR] == 0) {
    ^~~~~~~~~~~~
    sketch_jan26a:43:13: error: 'currentPIRposition' was not declared in this scope
    if (currentPIRposition != currentPIRpin && PIRprevState[PIR] == 0) {
    ^~~~~~~~~~~~~~~~~~
    sketch_jan26a:44:11: error: 'myStepper' was not declared in this scope
    myStepper.step(PIRposition[PIR]);
    ^~~~~~~~~
    C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:44:11: note: suggested alternative: 'Stepper_h'
    myStepper.step(PIRposition[PIR]);
    ^~~~~~~~~
    Stepper_h
    sketch_jan26a:44:26: error: 'PIRposition' was not declared in this scope
    myStepper.step(PIRposition[PIR]);
    ^~~~~~~~~~~
    sketch_jan26a:56:7: error: 'PIRprevState' was not declared in this scope
    PIRprevState[PIR] = 0;
    ^~~~~~~~~~~~
    In file included from C:\Users\cwe64\OneDrive\Desktop\sketch_jan26a\sketch_jan26a.ino:3:0:
    C:\Program Files (x86)\Arduino\libraries\Stepper\src/Stepper.h: At global scope:
    C:\Program Files (x86)\Arduino\libraries\Stepper\src/Stepper.h:87:5: warning: 'setup()::Stepper::Stepper(int, int, int, int, int)' used but never defined
    Stepper(int number_of_steps, int motor_pin_1, int motor_pin_2,
    ^~~~~~~
    exit status 1
    'PIRpin' was not declared in this scope
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    0
    chaparro78
    chaparro78

    1 year ago

    simple and functional, I will apply this for a webcam and an arduino nano, it will be great. Thanks

    0
    NL1_CS
    NL1_CS

    Reply 1 year ago

    Im glad that you like it, and if its possible you should post the results when ur done. Cheers