ADS1115 InstESRE Pyranometer
A pyranometer measures the sun's irradiance (power/area, basically "brightness") on a surface. Despite the similar names, it is completely different from a pyrometer, so stop right here if that is what you are looking for.
This Instructable describes how to build and test a modified version of the pyranometer kit offered by Dr. David Brooks of the Institute for Earth Science Research and Education (InstESRE):
http://www.instesre.org/construction/pyranometer/pyranometer.htm
This version of the InstESRE pyranometer interfaces with an Arduino using an ADS1115 analog-to-digital converter (ADC) and also supports temperature correction using a TMP36 temperature sensor co-located with the photodiode.
The IV Swinger 2 IV curve tracer supports this pyranometer design as an optional sensor, and that was the motivation for the modifications. However, since other users of the InstESRE pyranometer may find it useful, this Instructable describes the design independently from the IV Swinger 2 project.
The following GitHub repository contains the documentation and software:
https://github.com/csatt/ADS1115_InstESRE_Pyranometer
Please download and read the document before proceeding. The document contains a text-only version of the steps in this Instructable and can be used as a checklist during construction. It also describes how to order the kit from Dr. Brooks and what additional parts to buy. Those are not repeated in this Instructable.
Gather Tools
I used the tools shown in the photo.
Prepare Enclosure
- Insert the grommet into the hole at the end of the case. Use a small blunt object such as a small screwdriver. Be careful not to cut the grommet. (The grommet is the soft rubber O-shaped item.)
_______ - Spread a small amount of superglue around the inside of the larger of the two holes in the top of the case. Insert the bubble level from the inside of the case. Make sure the bubble level's shoulder seats firmly against the top of the case. Set the case aside, upside down, to let the glue dry for several minutes.
[NOTE: the bubble level is not needed for the IV Swinger 2 application, and it is not shown in the photos.]
_______
Prepare Photodiode and Diffuser
- Make sure the PDB-C139 photodiode leads are straight and parallel to each other, making adjustments if necessary.
_______ - Insert PDB-C139 photodiode into the LED holder. It should snap into place. Do NOT use any superglue.
_______ - With the PDB-C139 photodiode leads pointing up and with the longer lead to the left and the shorter to the right, VERY SLIGHTLY bend both leads away from you.
_______ - Insert the photodiode assembly into the housing tube from the top. Again, do NOT use any superglue. Make sure the top of the diode is clean and dust free.
_______ - Pick up the Teflon diffuser disk with a paper towel or tissue and rub both surfaces gently to remove any dust or debris that might be there. Snap the disk into its recess at the top of the housing tube. Do NOT use any superglue. If it is a very loose fit, you will have to use some superglue LATER, but NOT YET.
_______ - Flip the assembly upside down (leads pointing up, longer one to the left). Make sure the diffuser disk didn't fall out. Use 4 pieces of tape to hold it down on a hard, smooth work surface. The tape should be below the machined rim of the tube. Wrap one more piece of tape around the tube.
_______
Add TMP36 (optional)
- Insert the TMP36 into the hole on the near side of the photodiode leads, with the flat side of the TMP36 toward the leads, and the rounded side towards the wall of the tube. Press it down by the ends of its leads. It should fit nicely with minimal deflection of the photodiode leads.
_______ - Remove the TMP36, apply superglue to its top, flat side, and rounded side and promptly insert it back into the hole in the same position. Use only enough glue so it should stick to the LED holder, diode leads, and inside of the tube, but don't use so much that it could possibly flow around the photodiode. Make sure to press it into the hole quickly, so the glue doesn't grab it before it is all the way in.
_______ - Adjust the two photodiode leads and the three TMP36 leads so they are all pointing as straight up as possible
_______
Glue Sensor Tube to Case
- Apply some superglue to the machined rim of the tube and then promptly lower the case over that, so the tube is glued into the hole in the case. The long dimension of the case should be in line with the rows of leads coming through the hole and the end hole with the grommet should be to your right. Make sure the tube is fully seated in the hole.
_______ - Use some tape to hold the case in position so that it is level and the tube is perpendicular to it.
_______
Add ADS1115 Board
- Apply a blob of superglue to the back of the ADS1115 board right in the middle. Quickly, but carefully, lower the ADS1115 board down with the longer photodiode lead coming through hole A0 and the shorter one coming through hole A1. The three TMP36 leads will be along the edge of the ADS1115 board and may deflect slightly. Adjust the position of the ADS1115 board so the A0 and A1 holes are centered over the tube hole and hold the board in place for about a minute so it sticks to the case.
_______ - Leave this untouched for a couple hours so the glue will be sure to have dried. Do not proceed with the following steps until then.
_______
Add Load Resistor
- Cut both leads of the resistor to 1 cm. Bend 2mm on the end of each lead at a right angle and insert those 2mm ends into holes A0 and A1 of the ADS1115 board, alongside the photodiode leads. The reason for the 2mm length is so there's no possibility that the ends can touch the TMP36 leads or the other photodiode lead underneath the board.
_______
- Solder the resistor and photodiode leads to holes A0 and A1.
_______
- Trim the photodiode leads.
_______
Solder TMP36 Middle Lead to A2 (optional)
- Gently bend the two outer TMP36 leads away from the edge of the ADS1115 board.
_______ - With long-nosed pliers, carefully bend the middle TMP36 lead toward the A2 hole and solder it to the hole. You may need a small piece of stripped hookup wire in the hole to solder to if the lead isn't quite long enough to actually go into the hole. Make sure this lead is not making contact with the A1 solder joint or photodiode lead stub.
_______
Prepare Cable
- Untape the whole assembly from the work surface
_______ Shake it to make sure the Teflon diffuser disk doesn't fall out. If it does, set the disk aside for now.
_______
- Cut the female end off of the cable. Push the cut end through the grommet into the case and pull it through. Don't worry about pulling it too far, you will be able to pull it back out later. Use a drop of dish soap if it is difficult to push through.
_______ - Cut away the outer cable sheathing on the cut end to expose the four wires inside, being careful not to damage the insulation on the inner wires. Cut away at least 2 cm of the sheathing.
_______ - Strip 8 mm of the insulation from the inner four wires and twist the ends of each.
_______ “Tin” the twisted ends by heating with the soldering iron and applying some solder to the strands.
_______- Use a digital multimeter (DMM) to determine the connectivity between the inner wires and the four parts of the 3.5mm plug on the other end of the cable. Write down the colors:
Color:
Tip: _________________ [+5V]
Ring 1: _________________ [SCL]
Ring 2: _________________ [SDA]
Sleeve: _________________ [GND]
NOTE: these colors will almost certainly NOT match the colors in the connections diagram, so this is very important.
_______ - Pull the cable back out through the rubber grommet until the insulation of the inner wires just reaches the VDD hole of ADS1115 board.
_______
Solder Cable Wires and Hookup Wire to ADS1115
- Cut the following lengths of hookup wire (only needed forTMP36)
- Black, 2.5cm
- Red, 2.5cm
Strip 6mm from each end of each.
_______
- Solder the cable wire that is connected to the plug Tip (+5V) to the VDD hole, along with one end of the 2.5cm red wire.
_______ - Solder the cable wire that is connected to the plug Sleeve (GND) to the GND hole, along with one end of the 2.5cm black wire.
_______ - Solder the cable wire that is connected to the plug Ring 1 (SCL) to the SCL hole.
_______ - Solder the cable wire that is connected to the plug Ring 2 (SDA) to the SDA hole.
_______
Solder TMP36 Power/ground Leads (optional)
- Solder the other end of the 2.5cm black wire (from the GND hole) to the TMP36 lead on the right. Make sure it doesn't contact the middle lead.
_______ - Solder the other end of the 2.5cm red wire (from the VDD hole) to the TMP36 lead on the left. Make sure it doesn't contact the middle lead.
_______
Cut and Solder Wires to Jack
- Cut four hookup wires. Make them long enough for whatever enclosure you'll be putting the Arduino in (9cm for IV Swinger 2):
- Black: __________
- Red: __________
- Blue: __________
- Green: __________
Strip 1cm from the end of each.
_______
- Insert the cable plug into the 3.5mm jack.
_______ - Use the DMM to determine which solder connection on the back of the 3.5mm jack is connected to the VDD hole on the ADS1115 board.
Twist the RED wire to that solder connection on the jack.
_______ - Use the DMM to determine which solder connection on the back of the 3.5mm jack is connected to the GND hole on the ADS1115 board.
Twist the BLACK wire to that solder connection on the jack.
_______ - Use the DMM to determine which solder connection on the back of the 3.5mm jack is connected to the SCL hole on the ADS1115 board.
Twist the BLUE wire to that solder connection on the jack.
_______ - Use the DMM to determine which solder connection on the back of the 3.5mm jack is connected to the SDA hole on the ADS1115 board.
Twist the GREEN wire to that solder connection on the jack.
_______ - Use DMM to confirm the connections. Test continuity from the end of the hookup wire to the ADS1115 hole. At the same time, test that there is NO CONTINUITY to the other three.
- Red to VDD: __________
- Black to GND: __________
- Blue to SCL: __________
- Green to SDA: __________
- Solder all four hookup wires to the 3.5mm jack
_______
Final Assembly
- Put the cable tie around the cable and use pliers to pull it tight right next to the grommet on the inside of the case. Trim.
_______ - Screw the cover to the case.
_______ - Use the small piece of fine abrasive paper included with the kit and gently abrade the surface of the Teflon with a circular motion, just enough to remove the "shine" from the disk.
_______ - If the Teflon diffuser disk did not snap tightly into its recess, use a TINY amount of superglue around the recess to hold it in. Make sure not to get any glue on the photodetector! A toothpick can be useful to apply the superglue, but move quickly. Use a small clamp to hold it in while the glue dries.
_______ - Connect to Arduino:
Connect the four wires from the back of the 3.5mm jack to the Arduino as shown in the photos.
_______
Running Tests and Calibrating
The document in the GitHub repository describes how to load and run the tests. It also describes what is required to calibrate the pyranometer.