Solar Seeker

Swarthmore College

Engineering 72:  Electronic Circuit Application

Professor Erik Cheever

Laboratory # 8

David Luong & Heather Jones

November 11, 2004

 

 

 

Solar Seeker Circuit

Purpose of the Solar Seeker

 

We designed the electronics of a simple device that tracks a light source, which could be useful in keeping solar panels or telescopes aligned with the Sun.  Two photocells PC1 and PC2, each facing in slightly different directions, were used to detect the light source and would change alignment via a motor until each sensor receives the same amount of light.

 

Original Design Schematic of Solar Seeker

 

Below is the design layout of our solar seeker.  We connected the various components together specified to us by the lab protocol.  The block diagram, shown below, was extremely useful in that it neatly summarized the basic functionality of the components

 

 

 

Solar Seeker Block Diagram

 

 

Functionality of the Solar Seeker Circuit

 

A voltage measured between the two Cadmium Sulfide sensors and is passed through a 10-bit Analog-to-Digital Converter.  The signal ranged from 0 volts to 5 volts and was passed into four Open Collector TTL buffers to operate the transistors at a higher voltage.  A 12 volt dc source and a 1 kOhm resistor were applied to each of the buffers to obtain the high voltage with a low current.  To drive the motors, these four signals were passed to four MOSFETs (Metal Oxide Semiconductor Field Effect Transistors).  The two types of MOSFETS—n-channel and p-channel—were used, and built in the H-Bridge configuration.  To drive the motor counterclockwise i.e. get current to flow from left to right through the motor, the gates of P2 and N2 were set low and high, respectively to turn the transistors on.  To make sure that the other transistors are off to prevent a direct path of current to ground, P1 should be set high and N1 low.  To make have the current turn clockwise i.e. get the current to flow in the other direction, P1 should be set low and N1 high.  P2 should be high and N2 low to turn them off.  To turn the motor off, the four transistors should be turned off (gate of P1 and P2 high, gate of N1 and N2 low).  The PCB board in conjunction with the PIC C-compiler was used to control the state of the motor.

 

Final Circuit Design

 

Below is a schematic of the circuit built in the laboratory on a breadboard.

 

 

 

 

 

Encountered Problems and Overcoming Them

 

Problems frequently arose through the course of the lab.  The design phase was relatively simple though it involved a hefty amount of sifting through the lab protocol.  In the end, the information was extremely useful in introducing to us new components and how they were to work in this particular lab.

 

When we went to test the functionality of the photo sensors, we obtained voltage values near 3.5 volts when equal amounts of light were seen by both sensors.  Ideally, the value should have read 2.5 volts since the resistors to the sensors were the same.  After some thought, we decided to proceed to the next phase and settled for using 3.5 volts as the target voltage for the sensors.

 

Testing the buffer stage for digital signals coming from the PIC microcontroller was the next problem encountered.  We used the dip switches on the breadboard to simulate the signals into the buffer, and we wanted to test if the right signals were given out.  It turned out we obtained unexpected and undesirable voltages.  We soon discovered that we needed to provide resistance from the dip switch signals before passing them to the buffers.  That worked for some of the buffer signals, and it turned out that the reason for the others not working was because some of the internal buffers within the chip were malfunctioning. 

 

Testing the MOSFET stage was tricky as well.  The motor driven by the transistors would turn in one direction as expected, but refused to turn in the other.  When we discovered that one transistor was substantially heating up, we immediately turned off the system and replaced the transistor.  After some considerable thought and time, we discovered the problem was not due to the transistor but rather another malfunctioning buffer.  At this point the motor turned in both directions as expected given the right set of transistors turned on and off; this was achieved by driving the transistors with + 12 volts or ground.

 

The physical design phase was now completed, and the next involved programming the PCB microcontroller to operate the motor.  The methodology in writing the code was correct though the motor did not perform as it should have.  We spent an amount of time determining the best range of digital values to specify the “dead” zone; the photo sensors would not register any voltage at times, which was a cause of frustration.  But our biggest problem was the overshoot of the motor spinning.  This can be seen at the following URL.

 

http://www.engin.swarthmore.edu/~dluong1/E72/Lab8/solarseekerproblem.avi

 

The source of this problem was that we had a 1/3 second delay in obtaining the A/D conversion of the photo sensor voltage.  The motor effectively continued to spin too far until it registered a digital signal telling it to spin the other way.  This occurred at both ends, thus the seesawing of the sensors.

 

The commented C-code is provided at the following URL.

 

http://www.engin.swarthmore.edu/~dluong1/E72/Lab8/solarseekerprogram.c

 

Control Strategy Comparison—Coasting Versus Dynamic Breaking

 

Testing the Solar Seeker Circuit

 

A video file available at the below URL illustrates how the solar seeker works in practice. 

 

http://www.engin.swarthmore.edu/~dluong1/E72/Lab8/solarseeker.avi

 

Notice how the motor drives the photo sensors into a position where approximately an equal amount of light is falling upon each of them.  Effectively, the photo sensors are tracking the light source.