Introduction: IV Swinger 2 - PCB (PV Module, EMR)

About: I used to get paid for designing computer and networking hardware and software. Now I design stuff for fun and give it away.

This Instructable is a variant of the original IV Swinger 2:

https://www.instructables.com/id/IV-Swinger-2-a-50-IV-Curve-Tracer/

If you came here from there, welcome!

Otherwise, please visit that Instructable first. You may or may not end up back here depending on which variant you have chosen.

Step 1: Understand the HW Design / Choose Variant

Please refer to Step 1 in the original Instructable:

https://www.instructables.com/id/IV-Swinger-2-a-50-IV-Curve-Tracer/

If you are back here, it means you have chosen:

PCB - PV module version, electromechanical relay (EMR)

Attached to this step are the following:

  • PDF of the steps of this Instructable
  • PDF of the schematic of this version
  • PDF with images of the top and bottom of the PCB

Step 2: Install Software

Before spending time building the hardware, install the Arduino software and the IV Swinger 2 application on the laptop that you’ll be using.

  • Install Arduino IDE:

https://www.arduino.cc/en/Main/Software

  • Install IV Swinger 2 app:

https://github.com/csatt/IV_Swinger/releases/latest

Make sure both of the above come up before proceeding. If necessary, upgrade the OS on your computer

Step 3: Order PCB

Currently, the PCB must be purchased from a manufacturing house that will actually fabricate it for your order. The downside of this is that you’ll probably have to buy more than you need. I have used the following two:

OSH Park:

PCBWay:

Amazingly, I have put in orders to PCBWay on a Monday and had the boards in my hands in California on Friday.

I have shared this PCB design on PCBWay, and you can order it directly using the following link:

https://www.pcbway.com/project/shareproject/W112835ASR3_IV_Swinger_2_module_Rev_B_2019_01_06.html

Alternately, you can order PCBs from OSH Park (or anywhere else) by uploading the ZIP archive of the Gerber files, which are found in the GitHub repository:

IV_Swinger/PCB/IV_Swinger_2_module/Gerber/*.zip

Soon, I hope to find someone who wants to sell individual PCBs on eBay (possibly in kits, that include all the other parts too).

Step 4: Buy Other Parts

The other necessary parts to build an IV Swinger 2 can all be purchased online from Amazon and Digi-Key.

The EMR PV module version bill of materials (BOM) is attached to this step. It can also be downloaded from:

https://github.com/csatt/IV_Swinger/raw/master/PCB/BOM/emr_mod_BOM.pdf

The BOM has an Amazon link and a Digi-Key link at the bottom. The Amazon link is a “wish list” that can be used to populate your cart. Some of the items come in quantities larger (in some cases much larger) than needed to build a single IV Swinger 2. You may, of course, choose to find equivalents that are offered in smaller quantities. Also, many of the items are things that you may already have, so don’t necessarily just blindly order everything on the list.

The Digi-Key link is a pre-populated shopping cart. Again, you’ll want to check if you already have any of the items before ordering.

In both cases, it is possible (or probable) that certain items will go out of stock or be discontinued, so you’ll have to find suitable substitutions. Note that some of the Digi-Key items have ALT_n (e.g., ALT_1, ALT_2) in the “Customer Reference field. These should only be ordered if the primary version of the same part is marked as “backorder”.

Alternately, the following CSV file may be used to order from Digi-Key, Mouser or possibly other suppliers that support uploading a BOM spreadsheet. It includes the manufacturer, manufacturer’s part number, Digi-Key part number, and Mouser part number: 

https://github.com/csatt/IV_Swinger/raw/master/PCB/BOM/DigiKeyMouser/emr_mod_DigiKey_Mouser.csv

Also included below is the link to donate to the original Arduino developers. I donate $5 for each $10 Arduino clone that I buy. This is your choice, but I think it is the right thing to do.

Donate to Arduino.cc:

https://www.arduino.cc/en/Main/Contribute

Step 5: Gather/buy Tools

  • Holding:
    • Vise
    • 3rd hand tool with magnifying glass
    • Tape (preferably Kapton, but Scotch ok)
    • Long/needle-nosed pliers
  • Soldering:
    • Soldering iron (preferably temp controlled solder station)
    • Tip cleaner
    • Rosin core solder (see Step 8 for recommended type)
    • Solder sucker or solder wick
  • Cutting:
    • Wire cutter (flush cut)
    • Wire stripper
  • Drilling:
    • Drill
    • 1/16" bit (pilot for 9/64")
    • 9/64" bit (standoffs)
    • 11/64" bit (pilot for 13/64")
    • 13/64" bit (binding posts)
    • 3/8" Forstner bit (preferred - USB cable hole)
      • Alternate: 1/8”, 3/16”, 7/32”, 1/4”, 9/32”, 5/16”, 11/32”, 3/8”, and 25/64” normal bits
  • Other:
    • Digital Multimeter (DMM)
    • Small Phillips screwdriver
    • 9V battery
    • Sharpie
    • Ruler
    • Water spray bottle

Step 6: Manually Test the Relay Module

This will confirm that your relay module is the correct type (active-low trigger) and that it is functional.

  • With Arduino powered off:
    • Connect relay module GND to Arduino GND with female-to-male jumper ___________
    • Connect relay module VCC to Arduino 5V with female-to-male jumper ___________
    • Connect female-to-male jumper to relay module IN (male end not connected) ___________
  • Connect Arduino to laptop with USB cable:
    • Arduino: green LED should be on ___________
    • Arduino: yellow LED should be blinking once per second (assuming fresh-out-of box Arduino, running the default "Blink" sketch) ___________
    • Relay module: red power LED should be on, green LED should be off ___________
    • Relay module: C (middle) terminal should have continuity with NC (bottom) terminal and no continuity with NO (top) terminal ___________
  • Connect the male end of the jumper from the relay module IN pin to the GND socket near the blinking yellow LED on the Arduino ___________
    • Relay module: should click and green LED should come on ___________
    • Relay module: C (middle) terminal should have continuity with NO (top) terminal and no continuity with NC (bottom) terminal ___________
  • Connect the male end of the jumper from the relay module IN pin to the "13" socket near the blinking yellow LED on the Arduino ___________
    • Relay module: should click once per second ___________
    • Relay module: green LED should blink exactly opposite from the Arduino's yellow LED ___________

NOTE: If your relay module behaves in the opposite manner from that described in each of the above three steps, that indicates that it is the wrong type, i.e. it has an active-high trigger instead of an active-low trigger. Your relay module may have a jumper that selects active-high/low, in which case you should change the jumper and try again. Otherwise, don’t despair – there is a configuration setting in the software Preferences that will allow you to use your active-high relay.

Step 7: Prepare for Soldering

Soldering NOTES:

  • If you don't have a lot of soldering experience, read this:
    Adafruit: Common Soldering Problems
  • Soldering components to the PCB is pretty mistake-proof, but doing it in the order described is recommended (shortest -> tallest).
  • Some components have a correct and an incorrect orientation and some don’t matter. Pay attention to the instructions.
  • I highly recommend using 63/37 0.031” (or 0.8mm) rosin core solder. Yes, it is 37% lead, but it is not a health risk for you (really), and environmentally insignificant when used by hobbyists. You’ll solder like a pro.

Step 8: 1/4W Resistors

Solder 1/4W resistors to PCB:

  • Resistors can be inserted in either orientation. It is very important to use the correct value for each, however.

Insert all resistors before soldering. Tape down on front to hold in place OR bend leads slightly on back.

  • PV module version (EMR) – 16 joints:
  • R1 (150k): _______
  • R2 (7.5k): _______
  • R3 (1k): _______
  • R4 (1k): _______
  • R5 (22k): _______
  • R6 (22k): _______
  • RF (75k): _______
  • RG (1k): _______
  • Flip board upside down and hold with vise or 3rd hand tool OR tape board to work surface. Solder all 16 leads

_______

  • Inspect with magnifying glass to make sure all joints are good and there are no solder bridges

_______

NOTE: A solder bridge is ok between the ends of RF and RG

  • Trim all leads

_______

Use multimeter to measure exact resistances of soldered resistors:

  • With the PCB still upside down, measure the resistances with a DMM. The resistances (but unfortunately not the names) are marked on the back. Record the exact values of the ones marked with an asterisk (*) below – these values will be used later (“Step 28: Apply resistor calibration”). The others should just be close to their specified value (should be 1%, but don’t worry as long as it is < 10%) - the main point is to catch any mistakes you might have made.

PV module version (EMR):

  • R1 (150k): _______ *
  • R2 (7.5k): _______ *
  • R3 (1k): _______
  • R4 (1k): _______
  • R5 (22k): _______
  • R6 (22k): _______
  • RF (75k): _______ *
  • RG (1k): _______ *

Step 9: IC Sockets

Solder IC sockets to PCB – 16 joints:

  • Insert both sockets before soldering. Tape down on front to hold in place.
  • Make sure notch is on the left end as marked on the PCB
  • Flip board upside down and hold with vise or 3rd hand tool OR tape board to work surface and solder all 16 pins

________

  • Inspect with magnifying glass to make sure all joints are good

________

If you have opted not to use sockets, solder the ICs directly to the PCB instead of the sockets. Make sure dot is on the left end of the TLV2462 (pin 1). Make sure notch and dot are on the left end of the MCP3202 (pin 1).

Step 10: Stacking Connectors and Female Header

Solder stacking connectors and female header to PCB – 30 joints:

  • Insert stacking connectors A1, A2, and A3 and female header FH. These connectors are symmetrical, so there’s no “backwards”. Tape down to hold in place.

A1 (10 pin): ________

A2 (8 pin): ________

A3 (8 pin): ________

FH (4 pin): ________

NOTES: Stacking connector A4 is not needed. Stacking connector A1 can be 8-pin (pins 9 and 10 are not used).

  • Flip board upside down and hold with vise or 3rd hand tool OR tape board to work surface and solder all pins

________

NOTE: the pins on A1, A2, and A3 that are actually used on the PCB are circled on the back of the PCB. Soldering the others provides physical support only.

  • Inspect with magnifying glass to make sure joints are good and there are no solder bridges ________

Step 11: Screw Terminal Blocks

Solder screw terminal blocks to PCB – 4 joints:

  • Insert screw terminal blocks with the openings facing left. Tape down to hold in place.

J1: ________

J2: ________

NOTE 1: The screw terminal blocks may be 2-pin or 3-pin. If 2-pin blocks are used, insert them in the lower two holes and leave the top hole open.

NOTE 2: The screw terminal blocks may be omitted entirely, soldering the 18ga wire directly to the holes in the PCB (later).

  • Flip board upside down and hold with vise or 3rd hand tool OR tape board to work surface and solder all joints

________

  • Inspect with magnifying glass to make sure joints are good and there are no solder bridges

________

Step 12: Filter Capacitors

The small filter capacitors are not polarized, so it doesn’t matter which lead goes in which hole.

Solder 0.1uF capacitors to PCB - 4 joints:

  • Insert both capacitors before soldering. Bend leads on back to hold in place.

C3: ________

C6: ________

  • Flip board upside down and hold with vise or 3rd hand tool and solder all four joints

________

  • Inspect with magnifying glass to make sure joints are good and there are no solder bridges

________

  • Trim all 4 leads

_______

Solder 2.2nF (2200pF) capacitors to PCB - 4 joints:

  • Insert both capacitors before soldering. Bend leads on back to hold in place.

C4: ________

C5: ________

  • Flip board upside down and hold with vise or 3rd hand tool and solder all four joints

________

  • Inspect with magnifying glass to make sure joints are good and there are no solder bridges

________

  • Trim all 4 leads

_______

Step 13: Bypass Diode

The purpose of the bypass diode (15SQ100, 15A/100V) is to protect the electronics in case the PV is connected to the IV Swinger 2 backwards.

NOTE: The PCB was designed for two 15A, 45V bypass diodes (15SQ045), but this was a design error. The single 100V diode must be used.

NOTE: The attached photos show both options, and the rest of this Instructable shows the two 45V diodes, but be aware that you must use the single 100V diode if PV modules with a Voc above 45V are to be supported.

Solder bypass diode(s) to PCB – 2 or 4 joints:

  • Bend lead on striped end of diode around the diode so that it points in the same direction as the other lead.
  • 100V diode (1x 15SQ100). Insert leads as follows:
  • Pad D1 (cathode), striped end (top): ________
  • Pad D4 (anode), non-striped end (bottom): ________
  • Flip board upside down and hold with vise or 3rd hand tool and solder both leads

________

  • Trim leads

_______

  • Re-flow/add solder on both leads

_______

(This is because leads are thick, and may not have heated well before trimming)

  • Inspect with magnifying glass to make sure joints are good

________

Step 14: Vertical Shunt Resistor

The shunt resistor is oriented vertically on the PCB and should be soldered on at this point.

Solder vertical shunt resistor to PCB – 2 joints:

  • Bend one lead (either one) of the 5mΩ shunt resistor around the resistor so that it points in the same direction as the other lead:

________

  • Insert bent lead in lower hole and unbent lead in upper hole. Tape in place.

SHUNT: ________

  • Flip board upside down and hold with vise or 3rd hand tool and solder both leads

________

  • Trim both leads

_______

  • Re-flow/add solder on both leads

_______

(This is because leads are thick, and may not have heated well before trimming)

  • Inspect with magnifying glass to make sure joints are good

________

Step 15: Vertical Bleed Resistor

The bleed resistor is oriented vertically on the PCB and should be soldered on at this point.

Solder vertical bleed resistor to PCB – 2 joints:

  • Bend one lead (either one) of the 47Ω bleed resistor around the resistor so that it points in the same direction as the other lead:

________

  • Insert bent lead in lower hole and unbent lead in upper hole. Tape in place.

RB: ________

  • Flip board upside down and hold with vise or 3rd hand tool and solder both leads

________

  • Trim both leads

_______

  • Re-flow/add solder on both leads

_______

(This is because leads are thick, and may not have heated well before trimming)

  • Inspect with magnifying glass to make sure joints are good

________

Step 16: Load Capacitors

Solder load capacitors to PCB:

Module versions use 1000µF, 100V load capacitors.

These are polarized electrolytic capacitors, so orientation is important.

  • Insert load capacitors in position. Stripe side (shorter lead) goes to the right – this is the negative lead. Tape to hold in place.

C1 ________

C2 ________

  • Flip board upside down and hold with vise or 3rd hand tool

________

  • Solder all 4 leads

________

  • Trim all 4 leads

_______

  • Re-flow/add solder on all 4 leads

_______

(This is because leads are thick, and may not have heated well before trimming)

  • Inspect with magnifying glass to make sure joints are good

________

Step 17: Optionally Clean Flux Residue From PCB

Some people think it is important to clean off the flux residue from the PCB after soldering. It makes it looks nicer, but since the PCB sits on top of the Arduino, you don’t see the back anyway.

Functionally, it shouldn’t matter. The solder manufacturer Kester says this:

  • “Rosin flux residues are non-conductive and non-corrosive. Under normal circumstances they do not have to be removed from a printed circuit assembly. Rosin residue removal would be for cosmetic considerations. In an environment where the working temperature of the assembly will exceed 200°F the rosin residues will melt and become conductive, in these situations flux removal is required.”

If you do want to clean it off, see this Instructable: https://www.instructables.com/id/Cleaning-up-your-PCB/

Step 18: Check for Shorts

Using the digital multimeter (DMM) set on the continuity check (beep), check that there is no continuity between the following:

Power to ground (mandatory):

  • Left IC socket, pin 8 to pin 4

OR

  • Right IC socket, pin 8 to pin 4

Other (recommended):

  • All “neighbor” pins or solder joints. None should indicate continuity, except the pairs circled in the pictures which are connected.
  • The idea is to find solder bridges that you didn’t see visually

Step 19: Insert ICs

Static electricity can destroy ICs. Take off your shoes and touch something metal connected to ground before handling them, if possible.

  • Insert TLV2462 in left socket _________
    • Make sure dot is on the left end (pin 1)
    • Legs may have to be bent inward slightly
  • Insert MCP3202 in right socket __________
    • Make sure notch and dot are on the left end (pin 1)
    • Legs may have to be bent inward slightly

Step 20: Prepare Load Circuit Wires

Prepare load circuit wires:

NOTE: This can be any stranded AWG 18 or AWG 16 insulated wire such as from a typical household extension/lamp cord or heavier speaker wire. AWG 18 solid core is fine too(see alternate instructions below).

  • "PV-": PV- (black) binding post to PV- screw terminal on PCB (J1)

Stranded wire:

  • Cut to length: 9 cm

________

  • Strip 1 cm on each end and twist strands

________

  • Crimp cable ring connector on one end using pliers (or vise / ViseGrips / crimping tool)

________

  • Heat crimp with the soldering iron and flow solder into strands

________

  • Heat the strands of the other twisted end and flow solder into the strands (i.e. "tin" it)

________

Solid core wire (alternate):

  • Cut to length: 10 cm

________

  • Strip 1 cm from one end and 2 cm from the other end

________

  • Use long-nose pliers to bend the 2 cm end into a loop

________

  • "PV+": PV+ (red) binding post to relay module NO terminal and to PV+ screw terminal on PCB (J1)

Stranded wire:

This is a “Y” with a cable ring connector in the middle.

  • Cut two wires to length: 9cm each

1: ________

2: ________

  • Strip 1 cm on each end of both and twist strands

1: ________

2: ________

  • Insert one end of each into the cable ring connector and crimp cable ring connector using pliers (or vise / ViseGrips / crimping tool)

________

  • Heat crimp with the soldering iron and flow solder into strands

________

  • Heat the strands of the other twisted ends and flow solder into the strands (i.e. "tin" them)

________

Solid core wire (alternate):

This is a “Y” with two looped ends in the middle.

  •  Cut two wires to length: 10 cm

1: ________

2: ________

  • Strip 1 cm from one end and 2 cm from the other end of each

1: ________

2: ________

  • Use long-nose pliers to bend the 2cm end of each into a loop

1: ________

2: ________

  • "Relay C": Relay module C terminal to Relay C screw terminal on PCB (J2)

“Relay NC”: Relay module NC terminal to Relay NC screw terminal on PCB (J2)

  • Cut two wires to length: 9 cm each

Relay C: ________

Relay NC: ________

  • Strip 1 cm on each end of each and twist strands (if stranded wire)

Relay C: ________

Relay NC: ________

  • If stranded wire is used, heat the strands of both ends of each and flow solder into the strands (i.e. "tin" them)

Relay C: ________

Relay NC: ________

Step 21: Make Load Circuit Connections

Refer to the drawing of off-PCB connections for this step. These connections use the load circuit wires that were prepared in the previous step.

Make binding post connections:

  • Remove outer nuts and washers from threaded posts

________

  • Insert threaded post of black side through the cable ring connector (or loop, if solid core wire is used) on load circuit wire:

“PV-“

________

  • Insert threaded post of red side through the cable ring connector (or loops, if solid core wire is used) on load circuit wire:

“PV+"

________

  • Put washers back on

________

  • Put nuts on and tighten

________

Make PCB connections:

  • Loosen screw and insert the other end of the load circuit wire from the black binding post into the lower hole of screw terminal J1 and tighten down the screw.

“PV-“

_________

  • Loosen screw and insert the other end of the load circuit wire from the red binding post into the adjacent hole of screw terminal J1 and tighten down the screw.

“PV+“

_________

  • Loosen screw and insert one end of the “RELAY NC” load circuit wire into the upper hole of screw terminal J2 and tighten down the screw.

“RELAY NC”

_________

  • Loosen screw and insert one end of the “RELAY C” load circuit wire into the lower hole of screw terminal J2 and tighten down the screw.

“RELAY C”

_________

Make relay module switching side (screw-down) connections:

  • Loosen screw and insert the other end of the “PV+” load circuit wire into the top (“Normally Open” - NO) screw terminal hole on the relay module and tighten down the screw.

“PV+”

_________

  • Loosen screw and insert the end of the “RELAY C” load circuit wire into the center (“Common” - C) screw terminal hole on the relay module and tighten down the screw.

“RELAY C”

_________

  • Loosen screw and insert the end of the “RELAY NC” load circuit wire into the bottom (“Normally Closed – NC) screw terminal hole on the relay module and tighten down the screw.

“RELAY NC”

__________

Step 22: Make Relay Power/control Side Connections

Refer to the drawings of off-PCB connections for this step. These connections use the 4-inch male-to-female jumpers.

Make relay module control/power side (jumper) connections:

  • Connect the BLUE jumper from PCB connector A2, pin 6 (Arduino pin D2) to the IN pin on the relay module

__________

  • Connect the BLACK jumper from PCB connector A3, pin 7 (Arduino, GND) to the GND pin on the relay module

__________

  • Connect the RED jumper from PCB connector A3, pin 5 (Arduino, +5V) to the VCC pin on the relay module

__________

Step 23: Check All Off-PCB Connections

Check all off-PCB connections:

  • Use the drawing of off-PCB connections and double-check that all connections match the drawing.

__________

  • Tug all wires connected to screw-terminal blocks gently to make sure they are securely connected.

__________

Step 24: Mate PCB With Arduino

Mate PCB with Arduino:

  • Put tape on metal USB connector housing where PCB will touch it

________

  • Line up stacking connector pins on bottom of the PCB with the corresponding connectors on the top of the Arduino and press the boards together, taking care not to bend any of the pins.

________

Step 25: Smoke Test

NOTE: The video above is from the original non-PCB Instructable. It was much easier to see the Arduino LEDs without a PCB on top of it!

Smoke test:

  • Connect Arduino to laptop via USB
  • Check for smoke ☺

_______

  • Check that relay module red power LED is on and green LED is off

________

  • Check that Arduino yellow LED is blinking once per second (assuming that it’s still loaded with “Blink” sketch)

_______

Step 26: Load Arduino Sketch

NOTE: The video above is also from the original non-PCB Instructable.

Load IV Swinger 2 Arduino sketch:

  • Open Arduino application on your computer

________

  • Find where the Arduino software looks for sketches:
  • Arduino->Preferences->Sketchbook location
  • Use your browser to go to:
  • https://raw.githubusercontent.com/csatt/IV_Swinger/master/Arduino/IV_Swinger2/IV_Swinger2.ino
  • Right-click and use “Save As” to save IV_Swinger.ino to the Arduino sketchbook folder found above (make sure your browser doesn’t add an extension like .txt to the file name)
  • Go back to the Arduino application and find the IV_swinger2.ino sketch using:
  • File->Open
  • The Arduino application will inform you that IV_Swinger2.ino must be in a folder named IV_Swinger2 and it will offer to do that for you. Accept its kind offer.
  • Click on arrow button or select “Upload” from “Sketch” menu

_________

  • Check Arduino LEDs: Yellow LED should be blinking. This is not the same yellow LED that the Blink sketch controls.

_________

Step 27: Connect Via IV Swinger 2 App

NOTE: The video above is also from the original non-PCB Instructable. It also includes the first test of Step 29 in this Instructable

Connect via IV Swinger 2 application:

  • Open the IV Swinger 2 application

________

  • Verify that “Swing!” button text changes to RED and the message below it changes from “Not connected” to “Connected” (briefly, then disappears). The yellow LED should no longer be on.

_________

  • If not, pull down the “USB Port” menu and select the correct port. If it isn’t obvious which one to select
  • Close the IV Swinger 2 application and disconnect the IV Swinger 2 USB cable from the laptop
  • Re-open the IV Swinger 2 application (leave the cable disconnected)
  • Pull down the USB Port menu and take note of the listed ports
  • Connect the USB cable from the IV Swinger 2 hardware to the laptop
  • Pull down the USB Port menu and select the port that is new to the list

Step 28: Apply Resistor Calibration

Apply resistor calibration:

  • In the IV Swinger 2 app, select “Resistors” from the “Calibrate” menu

________

  • Enter the values you measured and recorded in “Step 8: 1/4W resistors” above.
  • Values are in ohms

________

Step 29: Sanity Tests

NOTE: The video above is also from the original non-PCB Instructable. The "nothing connected" test is in the video attached to Step 27.

Sanity tests:

  • “Nothing connected” test
  • Click the “Swing!” button. You should see an error dialog saying “ERROR: Voc is zero volts”

_________

  • Battery test

Use 9V battery

  • Strip both ends of two wires and screw one end of each into the side holes of the binding posts. If you happen to have a battery connector or holder with wires, use that.

_________

  • Connect the wire from the RED binding post to the positive terminal of the battery (you can either tape it or hold it with your thumb/finger)

_________

  • Connect the wire from the BLACK binding post to the negative terminal of the same battery

_________

  • Click the “Swing!” button. You should get an IV curve that looks like the photo.

_________

  • If you get an error dialog that says: “ERROR: Voc is zero volts” check that you don’t have the battery backwards and that the wires are making good contact with the terminals.
  • If you get an error dialog that says: “ERROR: Timed out polling for stable Isc”
  • Click on Preferences, click on Arduino tab, change value of “Isc stable ADC” to 500, click OK
  • Retry the battery test; it should work
  • Click on Preferences, click on Arduino tab, click on “Restore Defaults”, click OK

Step 30: Prepare for Case and Final Assembly

The acrylic baseball display case used for the IV Swinger 2 enclosure needs to have several holes drilled through it for attachments.

Case side definitions (see photo):

  • Front: side with the USB connector
  • Back: side opposite from front
  • Left: side with binding posts and relay module
  • Right: side opposite from left
  • Bottom: side with Arduino
  • Top: side above PCB

The case comes in two U-shaped halves:

  • Base: Left / Bottom (with fins) / Right
  • Lid: Front / Top / Back

All the attachments are made to the base half. The lid half has nothing attached to it, but does need a 3/8” hole in the front for the USB cable.

Care must be taken when drilling acrylic or else it will crack:

  • Use a drill press if you have one
  • Use vise (with rubber guards) to hold case
  • Position so that the hole being drilled is close to the vise jaw
  • Start with 1/16” pilot for all holes
  • Drill slowly with light pressure
  • Spray water on hole as it is being drilled to cool (if you go slowly enough, this really isn't necessary)
  • Use a Forstner bit to drill the 3/8” hole for the USB cable. Otherwise, you’ll have to start with 1/16” pilot and drill incrementally larger holes until you get to 3/8” (actually 25/64”)

Step 31: Mark Holes for Arduino Standoffs

IMPORTANT: For this step and the next three, look straight down with one eye when making the Sharpie dots (the plastic distorts/refracts if you look at an angle, and you’ll miss the mark).

Mark holes for Arduino standoffs:

  • Attach four 15mm standoffs to Arduino:
  • Unplug the USB cable from the Arduino

_______

  • Carefully remove the PCB from the Arduino

_______

  • Insert threaded/male end of each standoff through its hole in the Arduino from the back

________

  • Screw nuts onto the threaded ends of the standoffs on the front of the Arduino – hold the nut with your finger and turn the standoff to tighten it. Use pliers to tighten more.

NOTE: The hole nearest the Arduino reset button doesn’t have room for a nut

________

  • Place the Arduino in position, standing on its standoffs (including the one without a nut). The Arduino should be touching the right side of the case, with the USB connector facing the front. The single fin should be facing toward you so the fins look like a “Y”. See photo.

________

  • PUT LID ON THE CASE. This is important because the fit is very tight!

________

  • Turn the case over and look at it from the bottom. The Arduino will probably stay in place, but you can make sure by squeezing the front and back together with the hand you’re holding it with. Use a Sharpie to mark the centers of the four holes.

________

  • Remove the lid from the case and remove the Arduino

________

Step 32: Mark Holes for Relay Module Standoffs

Mark holes for relay module:

  • Attach 4 standoffs to relay module:
  • Disconnect all wires from relay module

________

  • Insert threaded/male end of each standoff through its hole in the relay module from the back

________

  • Screw nut on the threaded end on the front of the relay module and tighten it

________

  • Use the Sharpie to make a dot on the left side of the case at the following position:
  • 0.5 cm from the left (i.e. back) edge
  • 0.5 cm from the top edge (see note on photo)

________

  • Hold the relay in position inside the case, with the hole of the upper left standoff aligned with the Sharpie dot. You can hold it with one hand and mark with the other – or use a small clamp to hold it in place.

_________

  • Use Sharpie to mark the centers of the other three holes

_________

Step 33: Mark Holes for Binding Posts

Mark holes for binding posts:

  • Remove top nuts, washers, cable rings, and bottom nuts from the binding posts. Remove the black plastic backing plate.

________

  • Hold the plastic backing plate in position on the inside of the left side of the case. It should be about 1mm from the front inner edge of the case and about 1mm from the bottom.

________

  • Use Sharpie to mark the centers of the two holes

________

Step 34: Drill Marked Holes

NOTE: The video above is also from the original Instructable which has a slightly different hole pattern. But it is very similar. Note that I've had complete success without using water.

Drill 10 marked holes:

  • Use something pointy to make an indentation in the middle of each of the Sharpie marks. The tip of the Forstner bit is perfect for this, but you can also use a needle or the tip of an X-acto blade (poke and twirl). This will keep the drill bit centered when you start drilling the hole.

________

  • Drill 1/16” pilot holes

________

  • Switch to 9/64” bit and re-drill all holes

________

Enlarge holes for binding posts (2 holes only):

  • Switch to 11/64” bit and re-drill the binding post holes

________

  • Switch to 13/64” bit and re-drill the binding post holes one more time

________

Clean up case:

  • Remove burrs around holes with X-acto knife or your fingernails

________

  • Wash case off and dry

________

Step 35: Install Binding Posts

Install binding posts:

  • Insert the binding posts through their holes with the RED terminal toward the TOP of the case

________

  • Slide backing plate over the posts on the inside of the case

________

  • Thread nuts on the posts and tighten down

________

Step 36: Install Arduino and PCB

Install Arduino (without PCB) in case:

  • Attach the one Arduino standoff that won’t have a nut onto the bottom of the case with an M3 screw

________

  • Insert the Arduino, put the lid on the case, and screw down the other three standoffs with M3 screws.

TIP: start all screws before tightening any of them.

________

  • Remove the lid

________

Mate PCB back onto Arduino:

  • Load circuit wires should still be screwed to PCB. If not, insert them back to into their correct screw terminal block openings and tighten them down.

________

  • Line up stacking connector pins on bottom of the PCB with the corresponding connectors on the top of the Arduino and press the boards together, taking care not to bend any of the pins.

________

Step 37: Install Relay Module

Reconnect wires to screw-down side of relay module:

This needs to be done BEFORE the relay module is attached to the case, while you still have screwdriver access.

  • Restore connections as before, following the off-PCB connections drawing.

_________

Install relay module in case:

  • Insert the relay module into the case and screw down its standoffs with four M3 screws. TIP: start all screws before tightening any of them.

________

Restore relay module control/power side (jumper) connections:

  • Restore connections as before, following the off-PCB connections drawing.

_________

Step 38: Restore Binding Post Connections

Restore connections to binding posts:

  • Restore connections as before, following the off-PCB connections drawing. Tighten nuts securely.

_________

Step 39: Drill USB Connector Hole

Drill USB connector hole:

  • Put the lid on the case

_________

  • Make indentation in the exact center of the USB connector using the tip of the Forstner bit (or whatever pointy thing you used for the other drill-starting indentations). NOTE: it is very important that this hole is precisely centered. You need to look at it from all four directions before making the indentation since the refraction through the plastic distorts the apparent position (you’ll see what I mean as soon as you turn it 90 degrees).

_________

  • Use 3/8” Forstner bit to drill the hole
  • Drill slowly, spraying with water often
  • Reduce pressure when hole is getting close to “punching through”
  • Alternative to Forstner bit is to use following succession of normal bits: 1/16”, 1/8”, 3/16”, 7/32”, 1/4”, 9/32”, 5/16”, 11/32”, 3/8”, 25/64”

_________

  • Clean up the edge of the hole with X-acto knife or your fingernail

__________

  • Wash lid off and dry

________

  • Put lid on and insert the USB cable to make sure it fits

________

  • If it doesn’t, try loosening the Arduino standoff screws. This might give you enough “play” to get the connector in. Then, with the connector still in, re-tighten the screws
  • If that isn’t enough, you may have to enlarge the hole with a round file or some other way

Step 40: Make PV Cables

Make PV cables:

To connect to a standard PV module, you need cables with MC4 connectors.

It is not necessary to use the same heavy gauge cable that is used in a rooftop solar installation (and on the modules themselves), assuming you only need them to be a few feet long. The nice thing about the binding posts is that you can easily swap cables with longer or shorter ones depending on the situation. The main reason for longer cables would be so the laptop and IV Swinger 2 can be in a shady spot away from the panel. These instructions intentionally do not specify the length or type of the PV cables because it is so dependent on the usage.

If you decide that shorter cables are OK, you can just use the same load circuit wire that you used for the internal load connections. The only tricky part is that crimping the MC4 connectors onto smaller wire gauge doesn't really work - you need to solder them on. You also should use solder to tin the bare ends that insert into the binding posts so they are more durable.

The downside to the binding posts is that it is possible to connect the wrong cable to the wrong post. The bypass diode(s) protect against this, but it's still a good idea to make it as foolproof as possible. Put some red tape around the one that connects to the red binding post and some black tape around the one that connects to the black binding post.

The cable with the female MC4 connector connects to the RED binding post.

The cable with the male MC4 connector connects to the BLACK binding post.

Step 41: Final Test

Your IV Swinger 2 is now complete!

Repeat the tests you did in “Step 29: Sanity tests” to make sure everything got hooked back up correctly.

You may now test it with a real PV module.

If accuracy is important to you, see the IV Swinger 2 User Guide for instructions on how to perform a calibration. There is also a Help dialog available from the Calibrate menu in the application.