Light Sensing Car

by roscoepoyner05 in Craft > Digital Graphics

11 Views, 0 Favorites, 0 Comments

Light Sensing Car

Screenshot 2025-05-07 095548.png

This project was made for the 4-H robotics contest, and abided by their requirements. We chose to build a light sensing car, that spins until it finds a light source, and follows it indefinitely until the light is turned off. The 4-H contest requirements are as follows.

  1. You can use any elements in the Sparkfun kit. You can use resources in 1100 Learned to build your project. When working in 1100, be sure to wear safety glasses and complete the EHS training. Other sensors, motors, and materials can be used as needed. 3D printing is also possible if a team member knows how to do that. Making the project out of easy to access materials does make it a more accessible project for kids.
  2. The system should have some sort of actuation. This should be accomplished with one of the motors provided in the kit.
  3. You can use materials beyond the sparkfun kit. Be sure to include all materials in the necessary parts list.
  4. Once your group has completed the project, you should create an instructional document and video for the project. We will also print posters and have a demonstration.
  5. The projects will be assessed on:
  6. Originality
  7. Functionality
  8. Appearance and presentation of the project (including the poster and instructables page)
  9. Quality of instructional materials


Supplies

sik-full-kit.jpg
janr18yupxkd1.jpeg

• Arduino Uno R3

• White Solderless Breadboard

• Photoresistors (2 total)

• Wires (2 sets)

• Button (x1)

• Spartkfun Motor Driver

• L293D Motor Controller

• Rubber Wheels (2 total)

• Hobby Gearmotors (2 total)

• Zip Ties

• Wago connectors

• Tape

• SolidWorks 3D printed shell

Assemble the Chassis

Screenshot 2025-05-07 095339.png

• 3D print the chassis using the provided SolidWorks model.

• Insert the hobby gearmotors into the designated motor slots.

• Mount the rubber wheels onto the motor shafts.

Circuit Setup

Screenshot 2025-05-07 095359.png

• Attach the Arduino Uno onto the breadboard.

• Wire the circuit based on the circuit diagram shown in the poster:

• Connect photoresistors to analog inputs (A0, A1).

• Connect motors through the L293D motor driver.

• Wire the motor driver to the Arduino’s digital output pins.

• Use Wago connectors or solder where necessary.

Secure Components

Screenshot 2025-05-07 095548.png
Screenshot 2025-05-07 095603.png

• Zip tie or tape the Arduino, breadboard, and battery securely to the chassis.

• Route wires carefully to avoid tangles or contact with moving parts.

• Ensure photoresistors are exposed and facing forward.

Upload the Code

• Write or upload the Arduino sketch that matches the flowchart logic:

• Initialize pins

• Continuously read light levels from photoresistors

• Compare left vs right input

• Drive forward or turn accordingly to follow the brightest light source

Downloads

Test the Car

• Place the car on the floor.

• Shine a flashlight in front of it—observe it follow the light.

• Confirm it avoids obstacles and adjusts direction as expected.