Skip to main content

Subsection 14.2.3 Part 3: Solar Tracker Assembly

Recall the servo test setup from Day 15: the potentiometer, the ADC and the PWM pulse controlled the servo, with the code from Day15_servo_template.c that you completed, and the servo powered as in Figure 13.2.28. We took the potentiometer off the breadboard when you started Part 1 of Lab 8. Now we’ll add the photocells to the tracker arm of your servo. The arm has a shielding cup at each end (Figure 14.2.12).
Figure 14.2.12. A photocell in the shielding cup at one end of the tracker arm. The cup shades the cell from light arriving from the other side of the arm.
Figure 14.2.13. Use alligator-to-breadboard clips to make the electrical connections between the leads of the photosensors and your breadboard.

Activity 14.2.4. Solar tracker assembly.

(a)

With nothing powered, remove your photocells from the breadboard, put one into each of the two shielding cups on the motor arm, and bring each lead to the breadboard with an alligator-to-breadboard clip, one clip per lead. If your photocells are already in the cups, they are already wired through their clips; go on to the last step.

(b)

Connect the leads of the alligator clips to your breadboard to recreate the photocell circuit from earlier in the lab. Then power up in the usual order and run your two-channel program again: both channels print, now from the arm.
Figure 14.2.15. The ultimate setup. The two photocells are drawn on the breadboard, but they are physically in the cups of your tracker arm, reached through the alligator clips. The servo is powered from the regulator board’s 5 V pin and its orange signal lead goes to D11 (PA7), as in Figure 13.2.28. The regulator board is plugged into the breadboard, so each of its pins is reached through the row it sits in.