This project is a demonstration of how to create a light seeking system that is relatively low cost to make and execute. This involves an Arduino microcontroller as the heart of the whole project. The target system is a truck that is a broken down RC, bought from a second hand store on an "as is" basis as referred to previously in the older posts.
The building blocks:
Below is the video of the first building block of code and electronics. It involves two light dependent resistors (LDR), a servo motor and a light source to test the responses. As light is focused on any one of the LDR's, the servo moves accordingly. The design thought of is that the servo movement should be relative to the difference in intensities read by the LDR's. The bigger the delta, the greater the angular rotation. This system will be the basis of the steering system for the truck.
From the above, the design was copied into the truck body itself using a prototype breadboard as seen below. The servo motor is already installed in the steering mechanism replacing the original DC steering motor installed. We would be interested to control the steering in incremental fashion and not only in fixed angles, left or right. Aside from the LDR's, a 4-channel IR sensor is also being put in place to be used for another project later on (the line follower project).
Below is the truck with the LDR's already in place. Two placed in the front and two at the back. All placed on the corners of the truck body. The Arduino board is also installed as can be seen under the deck of the truck. The power to the drive motor will be provided by the L293D H-driver IC. All the IR sensors are placed under the front bumper for the later project.
Almost all set. Now, it's time to close the truck, upload the software and test run the system. Below is the first steering test. Using a laser pointer to trigger the LDR's, the front wheels steer toward the light input. This is our first taste of success.
For the full functional test, power must now be from batteries because we have been using the USB port to power the system yet. The final step was to connect the Arduino to battery power as well as connect the H-driver to the battery as well. The drive motor will be powered from the battery without going through the Arduino.
Running the prototype:
Below is the first ever test run of the light seeking truck. Obviously, the sensors and steering need to be optimized further but the demonstration unit is already a success story.