Controller Electronics

The controller electronics can be assembled entirely by through-hole soldering. Several excellent soldering tutorials can be found online, including those from Adafruit, SparkFun, and Instructables.

Most components can be assembled with no special considerations. Exceptions are noted below, and should be handled in the order described. In general, the names of components are printed on the circuit board. Resistors (R1, &c.) and most capacitors (C1, &c.) are symmetric, and so either lead can be placed in either hole. A few capacitors (C4 and C10), along with all other components, must be installed in specific orientations indicated by markings on the circuit board, which should line up with markings or other features of the component packages.

Ordering Information

The printed circuit board design files can be found in design/circuit/. The band-single-feather.brd file can be uploaded directly to printed circuit board fabricators such as Oshpark. Order it as a two-layer board, with a 63 mil (1.6 mm) thickness FR4 board with 1 oz copper.

The list of components needed for circuit board assembly can be found in design/circuit/ as well. The band-single-feather-bom.csv file is a list of each component with ordering information. The band-single-feather-bom-order.txt file is a simplified list of component quantities and part numbers that can be uploaded directly to DigiKey.

Equipment

Consumables

Assembly

  1. Nephelometer LED The SFH 4547 IR LED (Osram) is connected to the controller by hookup wire on screw terminals.

    1. Cut matched ~15cm lengths of red and black hookup wire and strip both ends.

    led-01-cut-wires

    1. Wrap the black wire around the cathode lead (longer with a flat region on the package) just at the thick point of the lead.

    led-02-wrap-wire

    1. Solder the wire to the lead and trim away the remaining lead along with any excess wire.

    led-03-solder-wire

    led-04-trim-lead

    1. Wrap the red wire around the anode lead, solder it, and trim.

    led-05-second-wire

    1. Slide 1cm pieces of heat shrink tubing along each wire up past the solder joints to the base of the package

    led-06-heatshrink

    1. Shrink the tubing with a heat gun, using a piece of cardboard (or something else) to shield the case itself.

    led-07-heatshrunk

    1. For stranded hookup wire, twist and tin the other ends

    led-08-tin-leads

    1. Wind the wires around themselves

    2. Insert the wires into the screw terminal, taking care to put the red lead in the +.

    led-09-screw-terminal

    1. Screw down the connectors firmly onto the wires.
  2. Peristaltic pump connector A short cable with a female JST PH 2-pin connector is attached to the screw terminal. This 2-pin connector can be cut from a JST PH extension cable, as described in the Peristaltic Pump section. A short female cable can be purchased as well (Adafruit 261).

    1. Strip and tin the ends of the cable, if they are not already stripped and tinned.

    2. Insert the wires into the screw terminal, placing the red wire on the positive side marked with a “+”

    mot-01-jst

    mot-02-polarity

  3. Feather microcontroller board We prefer to use “stacking” header (Adafruit 2830) on the Feather board itself. The header must be installed with the correct alignment in order to fit into the headers on the controller electronics.

    1. Use the Arduino software to load the controller software onto the Feather M0.

      The Feather should not be connected to the controller board and powered on before loading the software onto the microcontroller. Inappropriate configuration of certain microcontroller pins as “output” pins when the Feather is attached to the detector board could damage the microcontroller. The software ensures that pins are configured correctly for the detector board.

      1. Plug a micro-USB cable into the Feather
      2. Place the Feather on a non-conductive surface
      3. Plug the USB cable into a computer with the Arduino software and the Adafruit Feather board definitions installed
      4. Open the “firmware” Arduino project.
      5. From the “Tools” menu, use the “Board” submenu to select “Adafruit Feather M0”.
      6. From the “Tools” menu, use the “Port” submenu to select the USB port connected to the Feather M0.
      7. From the “Sketch” menu, select “Upload”. The Arduino IDE will compile the firmware and upload it onto the Feather
      8. Remove the micro-USB cable from the Feather
    2. Put ordinary male header into the female side of the stacking headers

    feather-01-headers

    feather-02-headers-together

    1. Insert the pins of that male header into the controller PCB itself, or another Feather board, on order to maintain proper alignment.

    feather-03-upside-down

    1. Place the Feather board over the pins of the stacking header, with the long pins protruding from the bottom.

    feather-04-upside-down

    1. Ensure that the boards and the headers are square, and then solder one pin on each header in place in order to stabilize the headers.

    2. Solder the remaining pins of the header onto the bottom of the Feather board.

    feather-05-soldered

    1. Insert the male pins on the Feather header into the female sockets on the printed circuit board.

    feather-06-mounted

    feather-07-mounted

  4. Headers for Feather microcontroller board Place the headers on the bottom pins of the Feather board. Mount the header onto the controller board and solder it in place. Remove the Feather from the controller board.

  5. Nephelometer photodiode The design depends on the sensitivity and physical package of the BPV10NF (Vishay) photodiode and so the use of this specific part is important. The photodiode is mounted on the opposite side of the circuit board relative to all other components. Insert the diode through the holes in the correct orientation until the wider parts of the lead bind against the holes in the circuit board. Solder the photodiode in place from the “top” side of the circuit board with the circuit board level and the photodiode hanging vertically down from the bottom, with the leads fully inserted.

photodiode

Testing

  1. Connecting to the Feather
    1. Plug a micro-USB cable into the Feather installed on the detector board
    2. Plug the USB cable into a computer
    3. Connect to the Feather with a serial terminal program
    4. Typing h in the serial window should provide a list of all commands

      # band-dsp-feather manual [acghmpsz] > h
      # COMMANDS:
      #   a               Annotate   Type a note into the log file
      #   c       Start Controller   Start configured controller: NONE
      #   g               Set Gain   Set nephelometer gain
      #   h                   Help   Print help information
      #   m                Measure   Take online measurements
      #   p                   Pump   Manually switch on a pump
      #   s                  Setup   Set parameters for a controller
      #   z      Test Nephelometer   Switch to test nephelometer stub
      # CONFIGURED CONTROLLER: NONE
      # CONTROLLERS:
      #   m                                             Manual
      #   t                                        Turbidostat
      #   r                                  Turbidostat Ratio
      #   i                                 Turbidostat Induce
      #   c                        Turbidostat Cycle Time Conc
      #   g                     Turbidostat Gradient Time Conc
      #   l                 Turbidostat Log-Gradient Time Conc
      #   d                       Turbidostat Density Gradient
      # band-dsp-feather manual [acghmpsz] >
      
  2. Testing the optical turbidity measurement
    1. Type m into the serial window in order to begin periodic measurements
    2. Block light from the LED from reaching the photodiode and ensure that the system reports a small, positive value, typically 0.1 - 0.5
    3. Point the LED and the photodiode at a piece of paper in order to produce a strong reflected light signal and ensure that the system saturates at a measurement of roughly 40.

        # band-dsp-feather manual [acghmpsz] > m
        M	time.s	neph	gain
        M	75.6	 0.347	2
        M	76.1	 0.348	2
        M	76.6	 0.353	2
        M	77.1	 0.330	2
        M	77.6	 0.336	2
        M	78.1	 0.325	2
        M	78.6	 0.336	2
        M	79.1	 0.341	2
        M	79.6	31.886	2
        M	80.1	40.799	2
        M	80.6	40.800	2
        M	81.1	40.800	2
        M	81.6	40.800	2
        M	82.1	40.800	2
        M	82.6	40.800	2
        M	83.1	 8.606	2
        M	83.6	 0.364	2
        M	84.1	 0.301	2
        M	84.6	 0.319	2
        M	85.1	 0.304	2
        M	85.7	 0.309	2
        M	86.2	 0.300	2
        M	86.7	 0.305	2
        M	87.2	40.803	2
        M	87.7	40.802	2
        M	88.2	40.807	2
        M	88.7	40.796	2
        # band-dsp-feather manual [acghmpsz] >
      
  3. Testing the pumps
    1. Plug in the 12VDC power converter to the controller board and the wall outlet.
    2. Type p into the serial window in order to manually activate a pump
    3. Select pump A
    4. Type 5 followed by Enter to request 5 seconds of pumping
    5. The red LED for pump A should light up for five seconds.

        # band-dsp-feather manual [acghmpsz] > p
        # Which pump [A,B,C,D]: a
        # Enter pump duration (sec): 5
        # Planned pumping time: 5 sec (any key to interrupt)
        # Pumped 5.000 seconds
        # band-dsp-feather manual [acghmpsz] >
      
    6. Repeat this procedure to activate pump B.

        # band-dsp-feather manual [acghmpsz] > p
        # Which pump [A,B,C,D]: b
        # Enter pump duration (sec): 5
        # Planned pumping time: 5 sec (any key to interrupt)
        # Pumped 5.000 seconds
        # band-dsp-feather manual [acghmpsz] >