Difference between revisions of "Finding Fëanor"

From ESE205 Wiki
Jump to navigation Jump to search
(Created page with "== Project Overview == The primary drawback of solar panels as a commercially viable energy harvesting application is the high cost per watt energy. Currently, the best consum...")
 
m (Protected "Finding Fëanor" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(151 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Project Overview ==
+
= Project Overview =
The primary drawback of solar panels as a commercially viable energy harvesting application is the high cost per watt energy. Currently, the best consumer solar modules are able to achieve an  [http://www.greentechmedia.com/articles/read/SunPower-Again-Holds-Record-For-Worlds-Most-Efficient-Rooftop-Solar-Panel efficiency of 24%], meaning that about 24% of incident solar radiation is converted to usable electrical energy. That figure is astounding if one examines previous maximum efficiency in consumer models throughout the [https://cleantechnica.com/2012/03/21/history-of-solar/ technology's development].
+
The primary drawback of solar panels as a commercially viable energy harvesting application is the high cost per energy harvested. Currently, the best consumer solar modules are able to achieve an  [http://www.greentechmedia.com/articles/read/SunPower-Again-Holds-Record-For-Worlds-Most-Efficient-Rooftop-Solar-Panel efficiency of 24%], meaning that about 24% of incident solar radiation is converted to usable electrical energy. That figure is astounding if one examines previous maximum efficiency in consumer models throughout the [https://cleantechnica.com/2012/03/21/history-of-solar/ technology's development].
  
This success aside, our group believes that the core issue of high cost per energy harvested is still not being addressed in a practical way, which is the motivation behind our project, Finding Fëanor. A portion of the inefficient energy conversion stems from the changing angle of incident sunlight with the respect to a given solar panel. The closer to between the face of the solar panel and path of sunlight, the more optimum the collection is. The problem with current products on the market is that most are static panels that cannot change in response to the changing angle, driving their already low efficiency even lower.
+
This success aside, our group believes that the core issue of high cost per energy harvested is still not being addressed in a practical way, which is the motivation behind our project, Finding Fëanor. A portion of the inefficient energy conversion stems from the changing angle of incident sunlight with the respect to a given solar panel. The closer to 90˚ between the face of the solar panel and the path of sunlight, the more optimum the collection is. The problem with current products on the market is that most are static panels that cannot change in response to the changing angle, driving their already low power output even lower.
 +
 
 +
Our solution is to build an Arduino-controlled system that allows for two axes of rotation. This would allow a panel in almost any setting or application to be dynamically adjusted to the changing incident angle of light. While doing preliminary research, we came across a project almost identical in [https://www.hackster.io/Valentino/power-sunflower-ab1598 motivation and scope]. We decided that improving upon this project would give allow us to experience a design project more holistically than if we had to start from scratch. This also means we will be attempting to optimize some aspects of the old design. These optimizations are covered in the objective portion of the proposal.
 +
 
 +
[[File: Completed System.jpg |400px|thumb|right|Completed System]]
  
Our solution is to build an Arduino-controlled system that allows for two degrees of freedom of rotation. This would allow a panel in almost any setting or application to be dynamically adjusted to the changing incident angle of light. While doing preliminary research, we came across a project almost identical in [https://www.hackster.io/Valentino/power-sunflower-ab1598 motivation and scope]. We decided it would be beneficial to replicate this project before we start our own development so we can learn the process of controlling a motor. This will allow us to approach our own design ideas with expectations of what will and will not work.
 
 
== Team Members ==
 
== Team Members ==
 
* John Fordice
 
* John Fordice
Line 13: Line 16:
 
==Objectives==
 
==Objectives==
 
A successful project will require:  
 
A successful project will require:  
*1. Replication of the project found on [https://www.hackster.io/Valentino/power-sunflower-ab1598 Hackster] to see where it can be improved.
+
*1. A frame that allows for dual axis rotation.
*2. Implementation of photoresistors that allow an Arduino unit to calculate the incidence angle.
+
** A base which will most likely be made from a block of wood.
*3. A control algorithm for a double-step motor system based on data taken from the photoresistors and processed by the arduino.
+
** A 3D-printed U-frame to house the panel itself.
*4. Power to the system using a wall adapter.
+
*2. Implementation of phototransistors that allow an Arduino unit to calculate the incidence angle.
*5. A scale-able design.
+
** While the original project used photo''resistors'', ours will use photo''transistors'' because of their greater sensitivity.
 +
** The phototransistor unit will be separate from the solar panel, but it will be in a fixed plane with the panel such both components experience the same angle of incidence from a sufficiently distant light source.
 +
** The photoresistors will be in a pyramid array, exactly like the array from the [https://www.hackster.io/Valentino/power-sunflower-ab1598 hackster project].
 +
*3. A control algorithm for a motor system based on data taken from the phototransistors and processed by the arduino.
 +
*4. (Stretch Goal) A scale-able design.
 +
** The same control algorithm and photo resistor arrangement should be able to work with components of a larger physical size. This will most likely require a change in materials involved.
 +
** The extra weight of larger frames and motors will not spoil the design
 +
** Stretch Goal: With larger size and more weight comes more power consumption. We would need to make sure that power consumption is less than the yeild of a typical consumer panel.
 +
 
 +
==Challenges==
 +
 
 +
=====Power supply=====
 +
*Can handle load bearing of panel (more of a challenge at large scale).
  
 +
=====Hardware=====
 +
[[File: Board Mounts.jpg|thumb|right|250px|The mount for the Arduino and stepper motor shield are fastened to the base of the frame.]]
 +
* Implementation of stepper motors that enable dual axis rotation without unnecessary failure points
 +
* 360 degree rotation (stepwise) without tangling of wiring
 +
* Keeping control systems stable during rotation
  
==Challenges==
+
=====Power supply=====
Challenges that we predict:
+
*Drawing power from the solar panel attached would be ideal but we may try and implement a regular two prong wall plug for convenience and testing.
=====Mechanical=====
 
*Designing grippers able to grasp and rotate the cube. It's unlikely we will be able to grip the cube with the surface with PLA filament, so we need some sort of foam surface to provide traction. We also need to make sure that when the cube is released by the gripper it is able to freely rotate.
 
*Ensuring the grippers rotate exactly 90 degrees so the cube can rotate cleanly and subsequent moves will be able to be performed. Given we are using stepper motors, ensuring that the position of the steppers is zeroed before we start performing moves is important.
 
*Trying to get the individual moves to take as little time as possible. The steppers that we are considering are relatively high torque and low power
 
*Designing a convenient way for the cube to be inserted into the device and exit the device. We could possibly use some kind of platform on a screw that is able to raise and lower the cube out of the device.
 
*Designing circuitry to connect the Pi (The Pi can’t deliver enough power or pins to drive all the necessary servos and steppers) Right now the servos will need one pin each (4 pins total) and the steppers need 4 pins each (16 pins total) that is a total of 20 pins, and the Pi has 17 GPIOs. We need a different method for driving the steppers than the ULN2003 drivers that come with them, or additional circuitry to drive all the inputs. For now we will try and drive the ULN2003 boards with two 8 bit shift registers, which will use 4 pins total, with the servos, that totals 8 pins. however, we are then limited in step speed, which may mean we have to invest in additional hardware, like the [http://www.amazon.com/Adafruit-Stepper-Motor-HAT-Raspberry/dp/B00TIY5JM8/ref=sr_1_1?ie=UTF8&qid=1455424110&sr=8-1&keywords=adafruit+motor+hat Adafruit motor HAT.]
 
*Finding a way to power both the Pi and the actuators from a wall adapter.
 
=====CS=====
 
*Finding a suitable open source algorithm that we can adapt to our robot to solve the cube.
 
*Making sure the camera can distinguish the color patterns on each side of the cube and store each face's patterns to memory. We also may be able to detect the colors with the grippers in the way, we may not. That will require some experimentation.
 
*Design code that can take that algorithm and translate it to what the robot can do. (The robot’s current design can only act on 4 faces at any given time. To access the other two, the cube must be rotated). We must make sure we know the position and orientation of the cube at all times so we know where to go next for our next action.
 
  
 +
=====Safety=====
 +
*Mechanical safety should not be too much of an issue given the relatively small size of our design. Safety regarding moving parts should also not be an issue as this project will be designed to move slowly in order to get accurate readings on the light sensitive phototransistors.
  
 
==Budget==
 
==Budget==
*Raspberry Pi — From lab - This is the brains of the operation. It both computes the algorithm to solve the cube and sends commands to the servos.
+
*[https://www.sparkfun.com/products/11021 Arduino Uno] ($24.95)
*[http://www.amazon.com/Arducam-Megapixels-Sensor-OV5647-Raspberry/dp/B012V1HEP4/ref=sr_1_3?ie=UTF8&qid=1454703226&sr=8-3&keywords=raspberry+pi+camera+module Camera (Arducam)] $14.99 - This camera should be able to recognize the colors on the cube to put them into the algorithm.
+
*[https://www.itead.cc/itead-dual-step-motor-driver-shield.html ITEAD Dual Step Motor Driver Shield Expansion Board Kit For Arduino] ($12.00 + $4.60 shipping)
*[http://www.amazon.com/SEGURO%C2%AE-4xPcs-MG995-Torque-Helicopter/dp/B015N2J7GW/ref=sr_1_18?ie=UTF8&qid=1455748162&sr=8-18&keywords=servo Gripper rotation servos] - $27.99 - These servos rotate the grippers, turning the faces on the cube.
+
*[http://www.vetco.net/catalog/product_info.php?products_id=15590&gclid=CI6UgPjKxs8CFQKsaQodKFEOLg JST Socket Connector Cables] (3X$1.49 + $0.00 shipping)
*[http://www.amazon.com/Adafruit-16-Channel-PWM-Servo-Raspberry/dp/B00SI1SPHS/ref=sr_1_1?ie=UTF8&qid=1455748271&sr=8-1&keywords=servo+hat Servo driver hat] - $23.53 - This is our servo motor controller, capable of taking input from the pi and turning it into servo rotation.
+
*[http://www.ebay.com/itm/SP213-PhotoTransistor-Photo-sensor-SFH309-BPW42-FPT700-XC500A-OP500-20pcs-/370764553612 Phototransistors] ($3.20 + $4.90 shipping)
*[http://www.amazon.com/HOSSEN%C2%AE-Genuine-Micro-Helicopter-Airplane/dp/B00CCZ2CRA/ref=sr_1_2?ie=UTF8&qid=1454703166&sr=8-2&keywords=mini+servos Servo motors] — $11.98 - these mini servos are the actuators for the individual grippers.
+
*[https://solarbotics.com/product/r10k/?gclid=CLHSi_a1xc8CFQGSaQodSTEF2Q Resistors 10 kohm](10X$0.20)
*1" #5 machine screws - used for assembling the build.
+
*[http://www.ebay.com/itm/US-Ship-Nema-17-Stepper-Motor-37oz-in-12V-0-4A-3D-Pinter-Reprap-Arduino-DIY-CNC-/331601550532?hash=item4d34fe1cc4:g:9-QAAOSwjVVVmyt8 4 Nema 17 Stepper Motors] (4X$6.99 + $10.00 shipping)
*Lab power supply
+
*[http://www.ebay.com/itm/Radioshack-276-0168-Printed-Circuit-Board-PL1-3076-276-016-NEW/262632755222?_trksid=p2047675.c100012.m1985&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D38530%26meid%3Df46cac4f53ff467cafb38e6a65e9f426%26pid%3D100012%26rk%3D4%26rkt%3D4%26sd%3D381635159524 General purpose printed circuit board] ($5.99 + $4.99 shipping)
*Total: $78.49 + $0 shipping (purchased through Amazon prime)
+
*[http://www.miniinthebox.com/4-2w-12v-output-polycrystalline-silicon-solar-panel-for-diy_p4710666.html?currency=USD&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=100792743688&adword_kw=&adword_pos=5o10&adword_pl=&adword_net=g&adword_tar=&adw_src_id=7107338275_427104928_30693736768_pla-211900322202&gclid=CIuPzIWRuM8CFZSCaQodpmEGLg 4.2W 12V Output USB High Efficiency Solar Panel] ($12.99 + $0.00)
 +
*[https://www.amazon.com/Wall-Adapter-Power-Supply-650mA/dp/B003XZSZWO Wall Adaptor Power Supply (2.1mm center positive)]($5.19)
 +
 
 +
Total: $123.24
 +
 
 +
== Design Solutions ==
 +
 
 +
=== Mechanical Design ===
 +
[[File: Frame_Model.PNG|100px|thumb|right]]
 +
[[File: Panel Mount Model.PNG|100px|thumb|right]]
 +
[[File: Pyramid_Model.PNG|100px|thumb|right]]
 +
 
 +
After preliminary research, we came across a project on Hackster (mentioned in overview) which gave us a base point for the pivoting U-frame design. It quickly became evident that 3D printing would allow us to take significant departures from the original design.
 +
 
 +
We were able to mount the Arduino and motor shield on the system itself which allowed for a more compact form factor. This allowed us to eliminate most of the rotational constraints. We didn’t want to risk a battery-powered set-up for the demo for fear of running low on charge so the constraint of a power cord to the system remained.
 +
 
 +
Another improvement we made to the original project had to do with the mounting of the bottom stepper motor. Instead of attaching the pin to the frame, we found we could get more stability by using the screw holes already in the motor. The pin of the motor does not rotate. Instead, it is held stationary by a heat shrink inside a block of wood while the rest of the motor is free to rotate within the constraint of the power cord.
 +
 
 +
 
 +
[[File:TransistorCircuit.png|150px|thumb|left|Circuit used to read voltages from photo-transistors]]
 +
=== Circuitry and Wire Management ===
 +
 
 +
Our light sensing device is fairly simple and is made out of four basic photo-transistor circuits, each composed of a phototransistor and a 1MΩ resistor. The apparatus to put these photo-transistors to good use is a 3D printed square pyramid with a 0.5cm diameter hole in the middle of each of the four triangular faces.  The holes allow the phototransistors to be glued in place and still have their wires be usable in the interior of the pyramid.  All the positive voltage leads  were soldered to a wire that will provide power to all four circuits directly from the Arduino.  The remaining leads of each photo-transistor are soldered to a 4-set ribbon wire as to consolidate all four of these loose wires.  From the pyramid apparatus, this ribbon wire is fed under the solar panel and is soldered onto the circuit board mounted there.  Soldered to the circuit board are all four 1MΩ resistors, 3 jumpers to connect the resistors, a wire leading from these jacks to ground, and an additional ribbon wire to connect the photo-transistor outputs to Arduino pins A0, A1, A2, and A3.
 +
 
 +
 
 +
Each stepper motor has a 4-set of ribbon wire soldered to its four protruding output wires and fed directly into the motor shield.  The 3D printed frame has rectangular holes on all its sides making it easier to feed the wires directly to their respective pins on the Arduino and to ensure these additional wires do not interfere with the rotation of the solar panel. 
 +
The Arduino to USB power cable is the only wire that is not contained within the moving parts of the solar panel mount.  If the base is round then the cord will have no problem winding itself around until the rotation of the solar panel mount exceeds the length of the cable.  If the base is a polygon (like ours) the cable can virtually do the same thing but take greater care to make sure it does not get suck on a corner.
 +
*Note: All solder joints are wrapped in electrical tape to ensure there is no electrical interference from neighboring wires.
 +
*Note: Make sure wires going from circuit board to the Arduino are long enough so they do not interfere with the panel’s rotation.
 +
 
 +
=== Algorithm Design ===  
 +
 
 +
Though we had an idea for the general structure of the algorithm, the design of the algorithm did not begin until after the stepper motors and the motor shield arrived.
 +
 
 +
The motors used (NEMA 17) were designed to only draw 350 mA and, as such, could be controlled by an arduino through a stepper shield. A native arduino library saved us the hassle of authoring functions to control the motors ourselves. This library, conveniently named “Stepper.h”, included functions to define specific stepper objects, specify the rotation speed, and individually step each of the motors. We wrote a simple arduino sketch to familiarize ourselves with the library and its use. With the motor control fully understood, the next step was to include and read the phototransistors.
 +
 
 +
After the electrical circuit was completed, it was a simple step to read in the voltages from the phototransistors. A high resistance in the biasing circuit allows for a greater range of output voltages based on the amount of incoming light. The analogRead() command allows the arduino to read the values from each transistor. With the motor control understood and the phototransistor voltages available, the final step was to actually construct the algorithm.
 +
 
 +
[[File:Nema 17 stepper motor.jpg|200px|thumb|left|Dimensions of the NEMA 17 stepper motor]]
 +
 
 +
The algorithm used in this setup is a basic greedy search algorithm. First, it reads in the voltage data from the phototransistors and assigns each to its own variable. Next, it compares the left and right phototransistors and assigns this difference to another variable. The same process is followed with the top and bottom phototransistors. These two values are then compared to a predefined tolerance and if they are outside of the absolute value of this range the steppers are adjusted as to minimize this difference. If the left phototransistor was higher than the right, for example, the horizontal stepper motor would be incremented to turn the pyramid toward the light source and work to minimize this difference. Every time the motors are incremented or decremented, a counter is updated to match the number of steps taken. If this counter reaches the amount of steps that corresponds to a half rotation in the horizontal direction or a quarter rotation in the vertical direction, the motor will not increment any further. Each iteration of the algorithm can only step the motor once, but because it is run continuously it gives the illusion of smooth movement.
 +
 
 +
After the setup was completed and the algorithm was uploaded to the arduino, we tuned some of the specific parameters. First, we tested several tolerance limits and actually used a separate tolerance for the vertical movement and horizontal movement. Additionally, we looked at using several different motor speeds. A speed of 200 rpm was used for the vertical axis, while a slower speed of 125 rpm was used for the horizontal axis to minimize the loss of steps.
 +
 
 +
== Results and Next Steps ==
 +
 
 +
Our group is satisfied with the outcome of the project. We can accurately track the movement of a light source within a reasonable tolerance which satisfies our goal of improving the output of a solar panel. However, there were a few bugs and missed opportunities worth discussing:
 +
[[File: Trim.1B994E63-F578-41B7-956C-41E0D6BDECA0.MOV|thumb|portrait|right|600px|Preliminary testing. Here, the apparatus misses steps about 16 seconds into the video. This problem was solved by slowing the rotation speed of the bottom stepper.]]
 +
* Mechanical vibrations turned out to be more of an issue than we imagined they would. While the system still worked more or less how we thought it would, the twitchy nature of the motors made the project seem unrefined. One way to address this would be to increase the speed of rotation. While testing, we found that the lower the motor's rpm, the more vibrations occurred. Unfortunately, at higher rpm we tended to lose steps in the algorithm's step counter. More work is needed, but we believe the problem lies in either the algorithm being used or the speed at which the system rotates.
 +
* As far as the algorithm is concerned, everything works exactly as we envisioned. At the outset of our project, Dr. Gonzalez suggested we use the output of the solar panel as a secondary virtual sensor to aid in fine adjustments of the angle. In a sense, the pyramid of phototransistors would act as a first watch to initialize an optimal angle. Once that angle was achieved, the solar panel would pivot a small number of steps in the four available directions while the output at each adjusted angle was measured. This would, in effect, give us a system with nested tolerances. While this would undoubtedly give us a more accurate system, we ran out of time to implement it because of the late arrival of parts.
 +
* The wiring is a bit unprofessional as we heavily prioritized getting the system working before we worried about cosmetics. Implementing more compact wiring solutions would be a top priority for a Finding Fëanor redux.
 +
 
 +
 
 +
=== Future Considerations ===
 +
 
 +
Future projects could take advantage of the progress that we made and continue to refine both the algorithm and the mechanical design. Additionally, groups could work on scaling up the technology, working to power the setup with the solar panel itself, or using different sensors (e.g. motion sensing) on the same setup to create a movement tracking device for a camera.
 +
 
 +
= Gantt Chart =
 +
[[File:Finalganttchart.png|900px|700px]]
 +
 
 +
[[Category:Projects]]
 +
[[Category:Fall 2016 Projects]]

Latest revision as of 05:22, 15 December 2016

Project Overview

The primary drawback of solar panels as a commercially viable energy harvesting application is the high cost per energy harvested. Currently, the best consumer solar modules are able to achieve an efficiency of 24%, meaning that about 24% of incident solar radiation is converted to usable electrical energy. That figure is astounding if one examines previous maximum efficiency in consumer models throughout the technology's development.

This success aside, our group believes that the core issue of high cost per energy harvested is still not being addressed in a practical way, which is the motivation behind our project, Finding Fëanor. A portion of the inefficient energy conversion stems from the changing angle of incident sunlight with the respect to a given solar panel. The closer to 90˚ between the face of the solar panel and the path of sunlight, the more optimum the collection is. The problem with current products on the market is that most are static panels that cannot change in response to the changing angle, driving their already low power output even lower.

Our solution is to build an Arduino-controlled system that allows for two axes of rotation. This would allow a panel in almost any setting or application to be dynamically adjusted to the changing incident angle of light. While doing preliminary research, we came across a project almost identical in motivation and scope. We decided that improving upon this project would give allow us to experience a design project more holistically than if we had to start from scratch. This also means we will be attempting to optimize some aspects of the old design. These optimizations are covered in the objective portion of the proposal.

Completed System

Team Members

  • John Fordice
  • Zach Pewitt
  • Sam Donaldson
  • Will Luer (TA)

Objectives

A successful project will require:

  • 1. A frame that allows for dual axis rotation.
    • A base which will most likely be made from a block of wood.
    • A 3D-printed U-frame to house the panel itself.
  • 2. Implementation of phototransistors that allow an Arduino unit to calculate the incidence angle.
    • While the original project used photoresistors, ours will use phototransistors because of their greater sensitivity.
    • The phototransistor unit will be separate from the solar panel, but it will be in a fixed plane with the panel such both components experience the same angle of incidence from a sufficiently distant light source.
    • The photoresistors will be in a pyramid array, exactly like the array from the hackster project.
  • 3. A control algorithm for a motor system based on data taken from the phototransistors and processed by the arduino.
  • 4. (Stretch Goal) A scale-able design.
    • The same control algorithm and photo resistor arrangement should be able to work with components of a larger physical size. This will most likely require a change in materials involved.
    • The extra weight of larger frames and motors will not spoil the design
    • Stretch Goal: With larger size and more weight comes more power consumption. We would need to make sure that power consumption is less than the yeild of a typical consumer panel.

Challenges

Power supply
  • Can handle load bearing of panel (more of a challenge at large scale).
Hardware
The mount for the Arduino and stepper motor shield are fastened to the base of the frame.
  • Implementation of stepper motors that enable dual axis rotation without unnecessary failure points
  • 360 degree rotation (stepwise) without tangling of wiring
  • Keeping control systems stable during rotation
Power supply
  • Drawing power from the solar panel attached would be ideal but we may try and implement a regular two prong wall plug for convenience and testing.
Safety
  • Mechanical safety should not be too much of an issue given the relatively small size of our design. Safety regarding moving parts should also not be an issue as this project will be designed to move slowly in order to get accurate readings on the light sensitive phototransistors.

Budget

Total: $123.24

Design Solutions

Mechanical Design

Frame Model.PNG
Panel Mount Model.PNG
Pyramid Model.PNG

After preliminary research, we came across a project on Hackster (mentioned in overview) which gave us a base point for the pivoting U-frame design. It quickly became evident that 3D printing would allow us to take significant departures from the original design.

We were able to mount the Arduino and motor shield on the system itself which allowed for a more compact form factor. This allowed us to eliminate most of the rotational constraints. We didn’t want to risk a battery-powered set-up for the demo for fear of running low on charge so the constraint of a power cord to the system remained.

Another improvement we made to the original project had to do with the mounting of the bottom stepper motor. Instead of attaching the pin to the frame, we found we could get more stability by using the screw holes already in the motor. The pin of the motor does not rotate. Instead, it is held stationary by a heat shrink inside a block of wood while the rest of the motor is free to rotate within the constraint of the power cord.


Circuit used to read voltages from photo-transistors

Circuitry and Wire Management

Our light sensing device is fairly simple and is made out of four basic photo-transistor circuits, each composed of a phototransistor and a 1MΩ resistor. The apparatus to put these photo-transistors to good use is a 3D printed square pyramid with a 0.5cm diameter hole in the middle of each of the four triangular faces. The holes allow the phototransistors to be glued in place and still have their wires be usable in the interior of the pyramid. All the positive voltage leads were soldered to a wire that will provide power to all four circuits directly from the Arduino. The remaining leads of each photo-transistor are soldered to a 4-set ribbon wire as to consolidate all four of these loose wires. From the pyramid apparatus, this ribbon wire is fed under the solar panel and is soldered onto the circuit board mounted there. Soldered to the circuit board are all four 1MΩ resistors, 3 jumpers to connect the resistors, a wire leading from these jacks to ground, and an additional ribbon wire to connect the photo-transistor outputs to Arduino pins A0, A1, A2, and A3.


Each stepper motor has a 4-set of ribbon wire soldered to its four protruding output wires and fed directly into the motor shield. The 3D printed frame has rectangular holes on all its sides making it easier to feed the wires directly to their respective pins on the Arduino and to ensure these additional wires do not interfere with the rotation of the solar panel. The Arduino to USB power cable is the only wire that is not contained within the moving parts of the solar panel mount. If the base is round then the cord will have no problem winding itself around until the rotation of the solar panel mount exceeds the length of the cable. If the base is a polygon (like ours) the cable can virtually do the same thing but take greater care to make sure it does not get suck on a corner.

  • Note: All solder joints are wrapped in electrical tape to ensure there is no electrical interference from neighboring wires.
  • Note: Make sure wires going from circuit board to the Arduino are long enough so they do not interfere with the panel’s rotation.

Algorithm Design

Though we had an idea for the general structure of the algorithm, the design of the algorithm did not begin until after the stepper motors and the motor shield arrived.

The motors used (NEMA 17) were designed to only draw 350 mA and, as such, could be controlled by an arduino through a stepper shield. A native arduino library saved us the hassle of authoring functions to control the motors ourselves. This library, conveniently named “Stepper.h”, included functions to define specific stepper objects, specify the rotation speed, and individually step each of the motors. We wrote a simple arduino sketch to familiarize ourselves with the library and its use. With the motor control fully understood, the next step was to include and read the phototransistors.

After the electrical circuit was completed, it was a simple step to read in the voltages from the phototransistors. A high resistance in the biasing circuit allows for a greater range of output voltages based on the amount of incoming light. The analogRead() command allows the arduino to read the values from each transistor. With the motor control understood and the phototransistor voltages available, the final step was to actually construct the algorithm.

Dimensions of the NEMA 17 stepper motor

The algorithm used in this setup is a basic greedy search algorithm. First, it reads in the voltage data from the phototransistors and assigns each to its own variable. Next, it compares the left and right phototransistors and assigns this difference to another variable. The same process is followed with the top and bottom phototransistors. These two values are then compared to a predefined tolerance and if they are outside of the absolute value of this range the steppers are adjusted as to minimize this difference. If the left phototransistor was higher than the right, for example, the horizontal stepper motor would be incremented to turn the pyramid toward the light source and work to minimize this difference. Every time the motors are incremented or decremented, a counter is updated to match the number of steps taken. If this counter reaches the amount of steps that corresponds to a half rotation in the horizontal direction or a quarter rotation in the vertical direction, the motor will not increment any further. Each iteration of the algorithm can only step the motor once, but because it is run continuously it gives the illusion of smooth movement.

After the setup was completed and the algorithm was uploaded to the arduino, we tuned some of the specific parameters. First, we tested several tolerance limits and actually used a separate tolerance for the vertical movement and horizontal movement. Additionally, we looked at using several different motor speeds. A speed of 200 rpm was used for the vertical axis, while a slower speed of 125 rpm was used for the horizontal axis to minimize the loss of steps.

Results and Next Steps

Our group is satisfied with the outcome of the project. We can accurately track the movement of a light source within a reasonable tolerance which satisfies our goal of improving the output of a solar panel. However, there were a few bugs and missed opportunities worth discussing:

Preliminary testing. Here, the apparatus misses steps about 16 seconds into the video. This problem was solved by slowing the rotation speed of the bottom stepper.
  • Mechanical vibrations turned out to be more of an issue than we imagined they would. While the system still worked more or less how we thought it would, the twitchy nature of the motors made the project seem unrefined. One way to address this would be to increase the speed of rotation. While testing, we found that the lower the motor's rpm, the more vibrations occurred. Unfortunately, at higher rpm we tended to lose steps in the algorithm's step counter. More work is needed, but we believe the problem lies in either the algorithm being used or the speed at which the system rotates.
  • As far as the algorithm is concerned, everything works exactly as we envisioned. At the outset of our project, Dr. Gonzalez suggested we use the output of the solar panel as a secondary virtual sensor to aid in fine adjustments of the angle. In a sense, the pyramid of phototransistors would act as a first watch to initialize an optimal angle. Once that angle was achieved, the solar panel would pivot a small number of steps in the four available directions while the output at each adjusted angle was measured. This would, in effect, give us a system with nested tolerances. While this would undoubtedly give us a more accurate system, we ran out of time to implement it because of the late arrival of parts.
  • The wiring is a bit unprofessional as we heavily prioritized getting the system working before we worried about cosmetics. Implementing more compact wiring solutions would be a top priority for a Finding Fëanor redux.


Future Considerations

Future projects could take advantage of the progress that we made and continue to refine both the algorithm and the mechanical design. Additionally, groups could work on scaling up the technology, working to power the setup with the solar panel itself, or using different sensors (e.g. motion sensing) on the same setup to create a movement tracking device for a camera.

Gantt Chart

Finalganttchart.png