Experiment 4 Light Seeking

Share for us
Share on facebook
Share on twitter
Share on pinterest
Share on whatsapp

This experiment adds four photosensitive modules based on the first experiment to make the car walk towards the light source. The photosensitive modules can show the change of light intensity on the LED bar. After all the assembly and circuits, if you feel the wires are too messy and should be more organized, you may wrap them with the heat shrink tubing.

The physical diagram of light-seeking experiment is as shown below:

Components

-1 * Car model

-4 * Photosensitive module

-2 * 18650 battery

-1 * USB cable

-Several Dupont wires

Experimental Principle

When you shine the flashlight onto the car, the photoresistor on four photosensitive modules senses the light. The resistance of the photoresistor decreases as the light intensity increases, and more voltage is assigned to the analog port. Then a larger voltage is transformed into digital value by A/D convertor. You can tell the direction of the light source by this digital value and make the car move forward along the direction of light source by programming. You can also display the change of light intensity on LED bar.

Experimental Procedures

Step 1. Connect the circuit. This experiment adds four photosensitive modules based on the first experiment.

1)       Connect the first photosensitive module

Photosensitive ModuleSensor Shield
VCC5V
GNDGND
ST_CP3
SH_CP4
DS7
Q7’Connected to DS of next module
DA0

2)       Connect the second photosensitive module

Photosensitive ModuleSensor Shield
VCC5V
GNDGND
ST_CP3
SH_CP4
Q7’Connected to DS of next module
DA1 

3) Connect the third photosensitive module

Photosensitive ModuleSensor Shield
VCC5V
GNDGND
ST_CP3
SH_CP4
Q7’Connected to DS of next module
DA2

4) Connect the fourth photosensitive module, namely, the one at the back:

Photosensitive ModuleSensor Shield
VCC5V
GNDGND
ST_CP3
SH_CP4
DA3

Step 2. Assemble the photosensitive module

1. Assemble the photosensitive modules to the front plate with M3*12 screws and M3 nuts 
2. After assembly, it is as shown below:  

The figure of completed assembly (no wire) is as shown below:

Step 3. After you have finished all the connections, connect the SunFounder Uno board to your computer with a USB data cable. Download the corresponding sketch under the Smart Car for Arduino\Code\4.Car_Lightseeking\Car_Lightseeking path, and then remove the USB cable.

Test before running:

Switch on the power. To make the car work steadily, some adjustments need to be made. First, turn the potentiometer on the sensor shield till the car stays still under the current ambient light condition, which means if there is no brighter light shining on the car, it will not move. Then test the car with a flashlight. Shine the flashlight on the car and it will move accordingly; withdraw the light and the car stops right away. If you get these results, it means the test succeeds and the car can seek light and move accordingly.

Experimental Phenomena

On the car, there are four photosensitive modules that control the car to move forward, backward, left and right. When you shine the flashlight onto a specific module, the car will move accordingly. Thus, you can control the car to move as you want!

After the adjustment, the car keeps still. Then shine the flashlight on the middle photosensitive module at the back, and the car moves backwards; shine on the left module and it turns counterclockwise; shine on the right module and it turns clockwise; shine on the module at the front and it moves forward. If you withdraw the light away from the modules, the car will stop right away.