PROJECT Nº 2: Zoetrope

Learn to build and program a zoetrope using the components of the Maker Control Kit and Maker Kit 2.

The zoetrope is the predecessor of cinema. Make your own zoetrope using the IR line tracking sensor and the DC motor with a propeller. When you put your finger over the IR line tracking sensor, the zoetrope will start to turn, and you can see the animation produced by the turning movement through the slits. Use your favorite drawings and have fun creating moving images!

DIFFICULTY LEVEL: Beginner.

DURATION OF THE EXERCISE: 60 min.

MATERIALS:

  • 1 DC motor with propeller
  • 1 IR line tracking sensor
  • 1 4in1 Build&Code board
  • 1 USB – Micro USB cable
  • 1 Computer
  • Zoetrope stencils
  • Drawings for the zoetrope
  • Adhesive or tape

What is an IR line tracking sensor?

The IR line tracking sensor is an electronic component made up of an infrared LED (transmitter) and a phototransistor (receptor) placed next to each other. The infrared LED emits infrared light, invisible to the human eye, that will bounce off of white surfaces to hit the phototransistor. If, on the other hand, it hits a black surface, the material absorbs the majority of the light, and it will not bounce back to the phototransistor.

To interpret the signal, the IR line tracking sensor emits a digital signal (0 or 1) that reports if it is detecting a white or black surface.

CONNECTIONS:

  1. Connect the IR line tracking sensor to digital port 4 on the 4in1 Build&Code board.
  2. Connect the DC Motor with a propeller to digital port 9 on the 4in1 Build&Code board.

Look at the colors of the cables and the colors of the terminals on the 4in1 Build&Code board to guide you. Each cable should be connected to its color.

BUILDING THE STRUCTURE:

To build the structure, download the zoetrope stencils and the quick assembly guide. Follow the steps provided.

Cut out and assemble the cylinder stencils and the strip of drawings. Next, glue the cylinder to the tip of the propeller on the DC motor and insert the strip of drawings inside the cylinder.

PROGRAMMING CODE:

The program instructs the IR line tracking sensor to emit the value 1, which happens when your finger covers the sensor. Then, the DC motor with a propeller turns on, making the cylinder spin and moving the animation that is inside.

The IR line tracking sensor will emit a 0 when there is nothing covering it. Then, the DC motor with a propeller will stay off.

You can do this activity by using Arduino and Bitbloq software, as well as other compatible block programming software. Below you will find the programming code needed for each software.

Arduino Code

  1. Download the Arduino software and go through the installation process.
  2. Add the library for the RGB LED to the Arduino software, following the instructions in the guide “How to add a library to program your RGB LED.”
  3. Open the Arduino program, and once in, copy the following program:
    byte PortIR = 4, ValueIR; //IR sensor is connected to digital port 4 / ValueIR contains the value of the IR sensor
    int PortMotor = 9; // DC motor connected to digital port 9
    
    void setup() {
      // Put your setup code here, to run once:
      // Port configuration
      pinMode (PortIR, INPUT);
      pinMode (PortMotor, OUTPUT);
    }
    
    void loop() {
      // Put your main code here, to run repeatedly:
      ValueIR = digitalRead (PortIR); // Value reading of the line follower IR sensor 
      if(ValueIR == 1) // If the IR sensor registers a 1
      {
        analogWrite (PortMotor, 35); // Motor DC = ON at a speed of 35
      }
      else // If the IR Sensor registers a 0
      {
        analogWrite (PortMotor, 0); // DC motor = OFF at a speed of 0
      }
    }
    
  4. Configure and load the code, following the instructions given in the document First Steps for the 4in1 Build&Code board.

Code for compatible block programming software

  1. Download the software and go through the installation process.
  2. Add the extension to program the RGB LED following the instructions in the guide “How to add a library to program your RGB LED.”
  3. Open the program, and once in, copy the following code:
  4. Configure and load the code, following the instructions given in the document First Steps for the 4in1 Build&Code board.

BitBloq Code

  1. Get the BitBloq software.
  2. Open the BitBloq program, and once in, copy the following code:
    • Hardware
    • Software
  3. Configure and load the code, following the instructions given in the document First Steps for the 4in1 Build&Code board.

RESULT OF THE EXERCISE:

If you cover the IR line tracking sensor with your finger, the zoetrope will activate and begin to spin. Look inside through the slits, and you will see the animation produced by the spinning movement.

If the IR line tracking sensor does not detect any object covering it, the DC motor with a fan will stay still. Now you have your zoetrope!

1 0

0