Difference between revisions of "S13: Solar Panel Tracker"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Hardware Interface)
(Hardware Interface)
Line 248: Line 248:
 
<td align = "right"> Light Sensor Top </td>
 
<td align = "right"> Light Sensor Top </td>
 
<td align = "right"> Analog Input </td>
 
<td align = "right"> Analog Input </td>
 +
</table>
  
 
==== PWM ====
 
==== PWM ====
Line 253: Line 254:
  
 
==== ADC ====
 
==== ADC ====
 
 
</table>
 
  
 
=== Software Design ===
 
=== Software Design ===

Revision as of 20:10, 18 May 2013

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

Abstract

The objective of this project is to create a solar panel that tracks the sun. The project will consist of two stepper motors that control the position of the solar panels by using the photo resistors to detect the sun location.

Objectives & Introduction

Solar Panel Sun tracker uses the inputted voltage from photo resistors in order to adjust the position of the solar panel. The project uses and Analog to digital converter. The servo motors are controlled using a pulse; this controls the position of various angles. The servo uses in this project is a standard servo which can only position between 0 and 180 degrees.

The project required the following objectives to be accomplished:

  • Read the voltage from photo resistors
  • Control servo to move from 0 to 180 degrees
  • Compute the location which has the greatest light intensity
  • Determine algorithm to convert digital value into servo position


Team Members & Responsibilities

  • Arturo Montoya
    • Light Sensors (PWM driver) , Servo motor(ADC driver) , and Matrix (Spi driver)
  • Matthew Balhorn
    • FreeRTOS Software Design

Schedule

WeekPlanned TasksStatus

1

  • Order parts
  • Completed

2

  • Look over datasheet(s)
  • Test Servos
  • Design System Logics
  • Completed
  • Completed
  • Completed

3

  • Test Light-sensing circuit
  • Create System Schematics
  • Code Servo Task
  • Create Structure Design (Autodesk Inventor)
  • Completed
  • Completed
  • Completed
  • Completed

4

  • Code Light-sensing Task
  • Build/Machine Structure
  • Code Glue Logics (Directional Logic)
  • Completed
  • Completed
  • Completed

5

  • Integrate system
  • Test System
  • Project report
  • Completed
  • Completed
  • Completed

6

  • Finalize project
  • Finalize report
  • Completed
  • Completed

Parts List & Cost


Part QuuantityCostLink
LPC 1758 SJSU Dev Board 1 $60
180 Degree Servo 2 $25
Solar Panel 1 $15
LED Matrix 1 $25
Resistors 4 $.25
Photoresistors 4 $1.50
Jumper wires(x50) 1 $15
Servo belt 2 $2

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Light Sensor The Solar Panel Sun Tracker consists of the following hardware:

  • Resistors
  • Photo resistors

This section is responsible for interpreting the voltage of the photo resistors. The diagram below shows the circuit needed in order to get a voltage division of the two photo resistors. This voltage divider consists of two resistors on each side of the voltage divider output (ADC pin). When the top photo resistor has a greater resistance then the bottom resistor the voltage output will drop. When they both have the same resistance will hold in the middle.


CmpE146 S13 SPT LightSensorConnection.png
Figure 1: LightSensorConnection


Servo Motor The servo section consists of the following hardware:

  • Servo Motors / Servo Belts
  • Solar Panel

This section is responsible for positioning the solar panels perpendicular to the light source. The panel is mounted to a frame that pivots according to the top servo. In order to perform a full scan the top servo motor was mounted on pivoting bases that is controlled by the second motor. The diagram below describes the complete setup in order to properly track the sun from sun rise to sun set.

CmpE146 S13 SPT SJOneBoardSchematic.png
Figure 2: SjOneInterface

Hardware Interface

CmpE146 S13 SPT SjOneInterface.png
Figure 2: SjOneInterface


SJSU Dev Board Pin Destination PinDescription
PWM1.4(p1.23) Servo Base Control Set pivot
PWM1.5(p1.24) Servo Top Control Set pivot
AD0.4(p1.30) Light Sensor Base Analog Input
AD0.5(p1.31) Light Sensor Top Analog Input

PWM

PWM, or Pulse Width Modulation, was used to control the two 180 degree positional servos. The servos required a 50 Hz (20 ms) duty cycle, and the duration of the high duty cycle (in milliseconds) would control the position to move to. Typically, the valid high duty cycles are between 1.0 and 2.0 milliseconds, with 1.0 representing '0 degrees', 1.5 representing '90 degrees' and 2.0 representing '180 degrees.' However, we found that the valid duty cycle range was larger, ranging from [INSERT FULL RANGE]. Knowing this, we expanded the range of the duty cycle and converted the range into a degree range with the change_direction_with_Degree() function. The servos were connected to a 5V power supply and were controlled by PWM1-4(P1.23)and PWM1-5(P1.24).

ADC

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

CmpE146 S13 SPT FreeRTOS.png
Figure 2: FreeRTOS


Servo Task
Light-sensing Task

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

CmpE146 S13 SPT SjOneIO.png
Figure 2: FreeRTOS
CmpE146 S13 SPT SJOneBoardPWMblockDiagram.png
Figure 2: FreeRTOS

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

Wifi Connection Issues

Many wifi connection issues were encountered. To solve this problem, a dedicated task was created to re-connect to wifi if the connection was ever lost.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

Send me your zipped source code and I will upload this to SourceForge and link it for you.

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.