Solar Irradiance Device (SID): an Arduino Based Solar Sensor

The Solar Irradiance Device (SID) measures the brightness of the sun, and is specifically designed to be used in the classroom. They are built using Arduinos, which allows them to be created by everyone from junior high students to adults. This instructable was produced by the 2017-2018 teachers in the QESST program at ASU.

Step 1: Gather Supplies

SID
Cost Analysis

1. An Arduino (the nano was used for this project) $19.99/5 = $4.00

2. A breadboard $3.99/6 = $0.66

3. A 4.7K ohm resistor $6.50/100 = $0.07

4. A 2.2 ohm resistor $4/100 = $0.04

5. 1 two-ended RCA cable $6/3 = $2.00

6. Temperature probe $19.99/10 = $2.00

7. A solar sensor $1.40/1 = $1.40

8. Four (4) jumper cables $6.99/130= $0.22 (unavailable right now, but other options are available)

9. Solder iron and solder

10. Wire cutters

Total $6.39

In order to create your own box (instead of 3D printing it), you will also need:

1. Black box $9.08/10 = $0.91

2. Two (2) RCA female inputs $8.99/30 = $0.30

3. Drill, size 6 bit, and step drill bit

Total $1.21

Cumulative Total $7.60

Step 2: Constructing Your Case

Because K-12 students are expected to be using these sensors, it's helpful for all the wiring to be enclosed in a box. One side of the box has a larger hole for the feed to the computer, and the other has two holes for the RCA female inputs. Use a size 6 drill bit to drill the holes for the RCA inputs, and a step drill bit to drill a hole for the computer feed. Your breadboard and Arduino need to be comfortably plugged in, so it would probably be wise to measure where the holes need to be before you drill them. Once this is accomplished, you can screw in your RCA inputs. If you choose to not include a temperature sensor in this project, you will only need one RCA input and can drill accordingly.

Your Arduino needs to be pressed into the breadboard, as shown in the picture. The breadboards used in this project have a sticky bottom, so after the box has been drilled, it can be helpful to stick the breadboard to the box to help organization.

If you have access to a 3D printer, you could alternatively print a box for SID.

Step 3: Connect Your Leads to the RCA Inputs

Connect two jumper cables to each RCA input. Although these leads could be soldered to the inputs, it is faster and easier to simply crimp the wire around the input. Be sure that no uncovered wires touch each other, or your circuit could be shorted. In this case, the yellow and blue wires are connected to the ground, while the red and green wires are connected to the leads. These colors are not necessary for the device construction, but do make it easier to see how the wires are connected to the Arduino.

Step 4: Prepare Your RCA Cable

Cut a double-sided (male to male) RCA cable in half, and strip about an inch off of each side of the cable. Twist together the outer wires that act as the lead, then strip and twist together the inner wires that are the ground (in these, pictures, the ground wires are initially surrounded by white wire, although the color of coating often depends on the color of the RCA cable). Do this for both wires. These will connect your RCA inputs with your solar and temperature sensors.

Step 5: Build Your Solar Sensor

The panels used in this process are inexpensive, but often have leads that fall off easily. It is a good idea to secure the leads with a piece of electrical tape to fix this problem.

Strip an inch of wire off the wire leads from the solar panel, which are in this case yellow (positive) and brown (negative). Twist together the end of a 2.2 ohm resistor, the lead from the RCA cable, and the positive end of the panel (here in yellow). Twist together the negative end of the solar panel (here in brown), the ground of the RCA cable (here in white), and the other side of the resistor. Note that the resistor is in parallel here.

Solder the wires from the panel and the RCA cable together. The device will not work correctly if the lead and ground wires cross, so use electrical tape or heat shrink to enclose the wires.

Step 6: Wire Your Solar Sensor

On this model, the solar sensor is wired for the right RCA female input, which has green (lead) and blue (ground) cables. Although you can use either RCA input, this will prevent you from needing to cross wires over to the opposite side of the Arduino.

Plug the lead cable (here in green) to the Arduino A5 pin. Connect your ground lead (here in blue) to the ground (GND) pin on the analog side (all of the pins on this side of the Arduino start with A).

If you finish this project and the solar sensor is reading 0 volts, try switching your ground and lead wires. If the sensor was soldered incorrectly, these might need to be switched.

Although there is a resistor in these pictures, you do not need to include a resistor if you choose to not include a temperature sensor.

Step 7: Build Your Temperature Sensor

Because the voltage output of solar cells fluctuates so greatly with heat, a temperature sensor is helpful in determining how well the solar sensor may be working. However, you can choose to build this device without the temperature probe, and it will still function quite well as a solar sensor.

Optional Thermometer Instructions:

Strip an inch of wire for each of the three wires coming off of the temperature probe. Twist the yellow and red wires together. Twist the black wires (ground) up separately. Using your second RCA cable, twist the black (ground) wires from the temperature sensor together with the white (ground) wires from the RCA cable. Solder together and wrap with electrical tape or heat shrink. Twist the red and yellow (lead) wires from the temperature probe to the lead wires on the RCA cable. Solder and wrap with electrical tape or heat shrink.

Step 8: Wire Your Temperature Sensor

Optional Thermometer Instructions:

On this model, the temperature sensor is in the left RCA input, which has red (lead) and yellow (ground) leads.

Bend the sides of and connect a 4.7k ohm resistor from the 5V pin to the D2 pin on the breadboard (you will see the labels for these on the Arduino, but you will actually plug the resistor into the breadboard).

Connect your ground cable (yellow) into the ground (gnd) pin next to D2.

On the second column of the D2 pin, plug in the lead cable (here in red). This set up allows the current to flow across the resistor before being read by the Arduino.

Step 9: Program Your Arduino

This is the code used in this project. It outputs voltage in volts and temperature in Celsius using the serial monitor. If this code does not immediately work, try switching the lead and ground for your solar sensor.

You'll need to download the Dallas Temperature (https://github.com/milesburton/Arduino-Temperature-Control-Library) and the One Wire (https://github.com/PaulStoffregen/OneWire) libraries and include them in your arduino program.

const int sunPin = A5; // connector to use on the Arduino board

float sunValue = 0; //declare the variable

float avgMeasure(int pin, float scale, int num) { analogRead(pin); //discard first value delay(2); float x = 0; for (int count = 0; count < num; count++) { x = x + analogRead(pin); //delay(5); } x = x / num; return (x * scale); }

#include #include // Data wire is plugged into pin 2 on the Arduino #define ONE_WIRE_BUS 2 // Setup a oneWire instance to communicate with any OneWire devices // (not just Maxim/Dallas temperature ICs) OneWire oneWire(ONE_WIRE_BUS); // Pass our oneWire reference to Dallas Temperature. DallasTemperature sensors(&oneWire); void setup() { analogReference(INTERNAL); //use the 1.1 V reference Serial.begin(115200); // communicate at 115200. Faster than the standard of 9600 Serial.print("Voltage"); //Title for the voltage Serial.print(" "); //spacer Serial.print("Temperature"); //Title for the temperature sensor

// Start up the library sensors.begin();}

void loop() { sunValue = avgMeasure(sunPin, 1.0, 100); //call the subroutine to take 100 measurements an average sunValue = sunValue * 1.07422; //Converts the Arduino's counts to voltage, since there are 1024 counts and 1.1V. sensors.requestTemperatures(); // Send the command to get temperatures Serial.println(""); //begin new line Serial.print(sunValue); //outputs the voltage Serial.print(" "); //spacer Serial.print(sensors.getTempCByIndex(0)); //outputs the temperature delay(1000); //reads the data once every second.

}

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest

    3 Discussions

    0
    None
    zza

    Question 2 months ago on Step 1

    Hello Sir, What sensor are you using to get the solar irradiance? I mean, can I get it in W/m^2?
    Thank you.

    0
    None
    Swansong

    1 year ago

    That's neat, how do you plan to implement it in the classroom?

    1 reply
    0
    None
    allisonwolf93Swansong

    Reply 1 year ago

    I think there's a lot of different applications for teachers, but personally I plan on having my high schoolers collect data on voltage, convert to power, and talk about the benefits and restrictions of solar panels.