Exploration 1: Sensors & Motors

Artificial intelligence and robots are more prevalent than ever in society today, especially at professional and collegiate levels. The basics include the mechanics and hardware behind operations such as sensors and motors. The purpose of this exploration was to learn about robot operating principles by writing programs to calibrate and control a servo motor and discovering how to navigate a robot using microswitches.

In this exploration, a basic pre-built robot chassis was used, already affixed with a CdS cell photosensor, microswitches, motors, and analog optosensors. The first part of the exploration consisted of writing and running a program to collect CdS cell readings of various light colors. Next, a servo was added and calibrated, and a program was written to change the angle of the servo based on the input of the CdS cell. Finally, the exploration consisted of writing and running a program navigating the robot through a course using microswitches.

After completing the first part of the exploration, it was found that the CdS cell read values ranging from 0 to 3.3V. The red light on the robot course corresponded to 0.247V, the blue light was 0.692V, and no light was read as 2.675V. There is a significant difference between colors’ values, although multiple values obtained for a single light produced varied results. This is helpful because it means a CdS cell is useful for detecting the color. A colored filter was not used but might help detect the colors too. On the robot itself, bump switches were necessary for the robot’s navigation on the chassis’ front and back in order to align with a wall, so the same should be done to navigate a future robot course.

Sources of error include incorrect code, the CdS cell not being lined up with the light it is reading, the wires connecting the Proteus and the motors being old and not working correctly, the servo not being calibrated, the angle when turning the robot not being large enough, and new code not saving to the micro SD card.

Some of these errors could have been solved by paying close attention to the behavior of the robot and adjusting accordingly. The problem of wiring is not easily found but is cause of great errors in navigation, since the first thought in a robot acting up would be to look at the code. This just goes to show that problems can arise anywhere and not to second guess correct code. Using bump switches, sensors, and servo motors is critical to creating a functional robot that can accomplish multiple tasks, but successfully writing the program that controls these features is equally important. In the future, it would be nice to see a servo motor do something rather than change angles, or do something meaningful with the data collected from the CdS cell.