Dual Axis Solar Module

by Cwalker01 in Circuits > Arduino

410 Views, 2 Favorites, 0 Comments

Dual Axis Solar Module

Dual Axis Solar Module.jpg

This instructable was created in fulfillment of the project requirement of the Make course at the University of South Florida (www.makecourse.com). This instructable will go over the basics of making a small dual-axis solar module system. The purpose of this system is to represent what real dual-axis solar module systems are like by rotating solar panels on the X and Y axis plans. Ultimately most solar panel systems use single-axis tracking while heliostats use dual-axis tracking so this project takes pieces from both and adds them all into one system.

This design is pretty small and is fully 3D printed so a 3D printer is mandatory for this project. Finally, Arduino software and an Arduino Uno board were used to program some of the components in the design, and Autodesk inventor was used for the modeling of all the 3d printed components. I'll post plenty of screenshots and include the STL files of all the components used in the design so you can directly 3d print everything without having to figure out component dimensions.

Tools and Software

Tools:

  • 3D-Printer (at least 5 X 5 inches)
  • Arduino Uno Board
  • Bread Board
  • 2 SG90 Servo Motors
  • AMX3d Solar panels
  • Ir-remote and Receiver
  • 1k ohm resistor
  • 10 Bread Board Wires
  • KM Flat HEad Phillips Screws Assortment Kit
  • Black and Decker Screw Driver
  • Super Glue

Software:

  • Arduino IDE
  • Auto Desk inventor
  • Ir-remote Library
  • Servo Motor Library
  • Flash print or other software for 3d printer

Auto Desk Design and Part Functionality

FinalDesign.JPG
ServoHousing.JPG
Servocase.JPG
RaisedServoCase.JPG
PanelHolder.JPG
PanelAssembly.JPG
PanelArm.JPG
TopConnector.JPG
Servoattatch1.JPG
ServoAttatch2.JPG
Brace.JPG
2inchRod.JPG

Design Process:

For each part provided I will be showing screenshots as well as adding every STL file used for this design. The dimensions of each part should not need changing at all so if it comes out slightly off it is most likely due to the 3D Printer. I personally had to reprint multiple parts due to faulty 3D printers. Overall the print time for the entire project is around 24 hours, mainly due to the Servohousing. This is the largest component and took about 12-16 hours. Most parts you only need to print once with the exception of failed prints and some small parts which I will list the ones you need multiples of.

Part functionality:

Final Assembly: The Final Assembly is just to show what the final design looks like once everything is connected together. Two servo motors are implemented just to show how they connect to the parts.

ServoHousing: This is where the Arduino board and breadboard are housed as well as one of the two servo motors. There is a long cutout so that the top connecter can attach to the servo motor 2.

Panel Assembly: The panel Assembly is what will hold the solar panels and connect to the panel arm

PanelHolder: This is what holds up the Panel Assembly and Panel arm.

Panel Arm: This connects to one of the servo motors and holds the Panel assembly up.

Raised Servo Case: This case attaches one of the servos to it using screws and allows the servo to connect to the Panel Arm.

Servo Case: This Servo Case is used to hold down one of the servo motors and attach it to the servo housing box

Top Connector: This piece is where the Panel Holder and Raised Servo Case are attached to. The top connector is then attached at the bottom to one of the servo motors.

Servo Attachment 1: This Servo Attachment is used to connect to the panel arm. Rods are then implemented in between the holes so that they can rotate and hold the arm in place.

Servo Attachment 2: This servo attachment is used to connect to the Top Connector. A rod is implemented in between the holes so it can rotate the top connector.

Brace: These are small attachments that can be used to brace the top connector and take some weight off of the servo on the bottom. You should only need to print 4 of these should you use them

2-inch Rod: Rods are used to attach the two servos to the panel arm and top connector. 2 of these are needed for the design.

That's it for the design with regards to auto desk inventor and their purpose. Ultimately most of the time building this design is used to try to get accurate 3D prints from the modeled parts. All 3D printers are different so the STL files can be downloaded and you can adjust some of the dimensions if needed. If the STL files appear to be upside down this is okay, it should change back when you put them in your preferred 3d printing software like flashprint.

Hardware Design

Screw_box_used.jpg
ServoParts.jpg
3D_printed_Servo_Parts.jpg
Attatching_Servo_Parts_using_screws.jpg
Attatching_Servo_Part.jpg
Screws_on_bottom_of_box.jpg
Bolting_Down_Servo_2.jpg
Attatching_panels_to_Rod.jpg
aligning_servo_1.jpg
attatching_design_to_drop_down_platform.jpg
Box_Supports.jpg
Attatching_Design_to_servo_2.jpg

For this step, I'll be going over the hardware portion of the project and how it was built. Pictures will be shown for each step in order and I will go into detail on what is needed to be done.

1. First you want to make sure you have the appropriate screws. I designed all the screw holes to fit with M2*4-M2*8 screws but having multiple types would be helpful here. This is why I suggested the screw kit with multiple screws because sometimes 3D printers do not print the screw holes correctly. The screw kit shown above is available on Amazon and is really cheap.

2. Next you want to pick which plastic piece that comes with the servo motor that you want to attach to it. I chose the dual-sided plastic piece so it's more stable.

3. Next you want to attach "Servoattatchment" and 1 and 2 to each of the servo motors (servo motor 1 and 2. I Used an M2*6 screw for this step.

4. Once this is complete you want to take servomotor 2 with "Servoattatchment 2" and attach it to the "servocase". The "servocase" has screw holes in the side so you can attach the servo to it using M2*8 screws. Do the same thing with servomotor 1 with "Servoattatchment 1" but connect this to the "RaisedServoCase"

5. Next attach 4 M2*8 screws to the bottom of the servo housing. This will allow you to attach servomotor 2 in the servo case to the servo housing. This is mainly to keep it in place when it rotates the design.

6. Slide the panel arm through the panel holder and PanelAssembley and Attach the PanelAssembley to the PanelArm. Attaching the PanelAssembley can be done using super glue to make things easier.

7. Next is to align ServoMotor 1 with the panel arm, once this is achieved you can slide the 2-inch rod through the holes of the attachments. These should be aligned and if they are not that means the 3D printer did not print the pats correctly. For this reason, I added a second hole on servo attachment 1 so you can try that position instead if needed rather than reprinting immediately.

8. Attach the "PanelHolder" and "RaisedServoCase" to the "TopConnector". This should be done last because the spacing is really tight. Screws can be used for this step or super glue. If you chose to use screws then M2*8 screws should be used for their length.

9. (Optional). This part is optional but I suggest it anyway to take some weight off of servomotor 2. Using superglue you can add 4 braces in parallel in the middle of the box. This will make everything a bit more stable.

10. Next, attach the top connector to "servomotor 2" and slide the "2-inch rod" through the aligned holes. This will make sure the weight is evenly distributed when turning and the design will not slip out.

11. Finally attach the AMX 3d solar panels to the PanelAssembley by sliding the wires through the holes

That's it for the hardware setup! The rest of the work will take place in the Arduino coding software!

Arduino Board Setup

MakeCircuitDesign.JPG
Arduino_board_setup_.jpg

The Arduino board setup is pretty simple. It only takes two servo motors an Ir Receiver and a 1k ohm resistor if you would like.

1st for the IR receiver plug the middle pin into ground and the right pin into power either on the Arduino board or the power rail on the breadboard. Finally, attach the left pin to one of the inputs on the Arduino board. I chose pin 11 for mine. (Optional you can attach a 1 k ohm resistor from the right pin into the power rail instead of just the wire directly to the power rail). That's it for the Ir receiver.

2nd for the Servo motors I followed this exact method for hooking these up for both. The brown wire will lead to ground, The orange wire will lead to power, and the yellow wire will lead to one of the inputs on the Arduino board. For me, Servo 1 led into input 9 and servo 2 led into input 10. The above-simulated picture will show how this is all done as well as a picture I took from my setup. In my setup, I decided to have the 5v and GND pins go into the rails on the breadboard as well.

Part Functionality:

Servomotor 1: Used to rotate the design on the X-axis Plane

Servomotor 2: Used to rotate the design on the Y-axis Plane

Ir Remote: Used to send signals to Ir receiver

Ir Receiver: Used to take inputs from Ir Remote

Arduino-Uno board: Used to control Servo 1 and 2 based off of Ir receiver input

That's it for the Arduino Board Setup, Next will be the final piece to this design which will be the code used to control the Arduino board and servo motors.

Arduino Code

Serial Monitor and Board Selection.JPG
Code Part 1.JPG
Code Part 2.JPG
Code Part 3.JPG

Important!: Very Very important, 1st you want to have the IRremote.h library and Servo.h library, or else this code will not work. Furthermore, when you plug your Uno board into your computer you want to make sure you select the board in the top left corner. Finally, the results.value== (hexadecimal) number will most definitely change depending on your Ir remote. I personally am using a Car Mp3 IR remote but depending on what type of remote you use the signals being sent will have different codes. So to receive a signal according to what button you want to use to rotate the servo motor you should use the serial monitor. Once you click on the serial monitor, click a button you want to use and the code for that button will show on the serial monitor (make sure the Arduino board is set up properly from the previous step). Simply replace the original hexadecimal number with the new value and it will work for that remote.

Code Description:

Here I'll be going over the main portions of the code. Most of the code is pretty straightforward and commented so you know what each line is doing should you want to change anything. Screenshots of the entire code will be posted as well as the entire code itself so you can run it immediately if you would like. The code uses the Ir receiver to receive inputs from the IR remote buttons. The code then decodes the inputs from the Ir remote and changes the angle of the servo motors depending upon what button is pressed. Essentially the servo motors rotation is tied to multiple buttons on the Ir remote, giving us the ability to change the position of the solar panels using the Ir remote. The codes for each remote vary depending on what you are using, but the serial monitor can display which code is tied to a specific button (more detail above). Function If statements are used to differentiate which button is tied to the servo motor rotation. Furthermore, Irrecv. decode is used to decode and differentiate the input from the Ir remote. The function results.value is used to assign the results based on the input from the Ir remote and myservo.write is used to change the angle of the servo motor once the function if statement is true.

Summary and Contact Information

That's it the design is done! Overall I think most of the time with this project will be 3D printing the components especially because every 3D printer is different. I suggest trying to print the part again if the dimensions do not match up immediately. I'll attach a video of the final design below as well as my email should you need to ask any questions. Thanks!

Email: cmwalker1@usf.edu