top of page

Little Train Lab 2: IR Sensor Activation

Little Train Lab 2

Google Slides

PDF

Objective


Continued improvement of programming capabilities through the installment of an IR sensor. Program the Little Train to activate through hand motion.

Activity


  • First Students will attach and wire the IR sensor to the Little Train

  • Learn how the IR sesnor works while programming

  • Sucessfully program the Little Train to activate through hand motion

Assessment


  • Students will the basics of sensor functionality

  • Learn basic circuitry and intermediate coding skills

In the next phase of our Little Train Project, participants will continue the step-by-step building process, incorporating key mechanical elements such as the crank-and-slider linkage and gears. This hands-on experience will deepen their understanding of how machines work together and interact in the real world and provide an introduction to programming. Additionally, students will be introduced to our Code2Grow workspace interface, learning how to use block coding on our website to bring their creations to life.

Lab Summary:

Required Materials:

Materials
Purpose
Recommended Quantity

Little Train Kit

Assembly kit which fosters hands-on skills and familiarizes participants with parts.

1 Per Participant

C2G Mini Microcontroller

Acts as the control center where code instructions are received and electrical signals are sent to various hardware components to execute actions.

1 Per Participant

USB-C Cable

Provides direct upload connection between computer and C2G microcontroller.

1 Per Participant

Cardboard Ramp

Acts as variable angle inclined plane for experiment. 

1 Per Participant

Plastic Wheels

Connects with axle to form a simple machine, reduces friction generated when moving an object allowing for rolling rather than sliding.

4 Per Participant

Aluminum Rods

Connects with wheel to form a simple machine, acts as a fulcrum and support by holding the load of the cart.

2 Per Participant

Cardboard Square

Freight car platform and surface holding load.

1 Per Participant

String Piece 

Acts as connector allowing for the train to tow the freight car.

1 Per Participant

Adhesive Double Sided Pad

Adhesive surface connecting boxed holding container to freight platform.

1 Per Participant

Small Carboard Box

Holding container for load.

1 Per Participant

Mancalla Pieces

Acts as load or weight that the train will be pulling.

15 Per Participant

Step 1

Natural Light Portrait

Attach and wire the Little Train's IR Sensor in accordance to these steps or following the video below:


  1. Obtain the designated IR sensor kit, wires + velcro

  2. Carefully wire and attach the IR sensor to your Little Train

  3. Start by wiring the VCC, GND and OUT pins accordingly

  4. With the other ends, wire the C2G-Mini with 3V3, GND and GP5 accordinly

  5. With this you are prepared to move onto Step 2

Step 1

Step 2

Natural Light Portrait

Programming the Little Train to activate through the IR sensor:


  1. Using the Code2Grow coding workspace, click on the libraries button and select IR sensor

  2. Once selected, click "add to workspace" this will create a base program for coding the IR sensor.

  3. Based on the wired GP pin, in this case: GP5. Make sure the assigned pin matches.

  4. Plug in your USB-C cable into your C2G-Mini, making sure the microconntroller is on

  5. Program the your Little Train and enjoy the actvation of it through hand motion!

bottom of page