Skip to content

Jayich-Lab/pcb-fiber-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcb-fiber-switch

A 8-channel SPDT optical fiber switch box

Note: You might need to do modifications if you want to build a fiber switch based on this repository. See #1 for a (probably incomplete) list of issues in the current version. We avoid many issues mentioned in the above link by mounting the switch boards at the bottom of the enclosure, and add spacers between the front panel and the box.

This switch box provides 8x SPDT optical fiber switches that can open/close in a few ms. This can be used for fiber multiplexing to a wavemeter (e.g., High-Finesse WS8 with 1x8 switch).

It uses Agiltron fiber-to-fiber MEMS switches, which costs around $300-700 each depending on the fiber, wavelength, and connector. A teensy 3.2 is used to control those switches. It can be programmed to turn on/off switches periodically and/or directly controlled by a computer. Secondary TTL control can be used with each switch instead of the teensy. It is compatible with both 3.3 V and 5 V logic levels (Any voltage between 3 to 10 V works) and needs 15 mA current.

Expected lifetime

The lifetime will likely be limited by the solid state switch and the fiber-to-fiber switch. The solid state switch states a lifetime of >50 million operations, and the fiber-to-fiber switch with 10 million cycles. Assuming a channel changes its state every 5 seconds 24 x 7, the fiber-to-fiber switch has a lifetime of ~3 years. Both the solid state switch and the fiber switch can be relatively easily replaced as they are both through-hole mounted parts.

Delay

The delay from input TTL / microcontroller state change to the fiber switched is approximately 4 ms, with 1 ms delay from the solid state switch, and 3 ms delay from the fiber-to-fiber switch.

Part list

Enclosure

Power and USB

Ribbon cable and connectors

Controller board

Switch boards (8x)

Mechanical

Assembly Instruction

Switch board

  • Install R1 first with the 300 ohm resistor. A 150 ohm resistor could work here, but we found the LED to be too bright.
  • Solder the IDC connector on the bottom side of the board (the other side of the surface mounted R1). This connector must be installed before the IDC connector on the front side, as the pins will be covered by the other connector. Consider not pushing the connector all the way in to prevent "floating" the other connector. If it is pushed all the way in, its pins may need to be trimmed in order for the other connector's pins to be soldered easily.
  • Install all other components in the order of your perference. Make sure the solid state relay U1 is installed all the way in, and consider tilting it a bit to reduce the height. Otherwise the switch will take much height in a compact setup. Consider installing the fiber-to-fiber switch at last to prevent damage when soldering other components.
  • The switch board should look like switch_board_top.jpg and switch_board_bottom.jpg.
  • Test the switch board without the fiber-to-fiber switch. To do that, provide 5 V on the VCC pin, and 0 V on the GND pin. Connect a 1 Hz, 0 to 5 V square wave on the BNC input, and switch the toggle switch to left when viewing from the top side of the board. The LED should flash at 1 Hz.

Control board

  • Solder the surface mount capacitor.
  • Solder the teensy board and pins together. To ensure the pins are vertically soldered, a breadboard can be used to help maintaining the position of pins. The control board itself can be used too.
  • Solder the control board and pin sockets together. Similarly, the teensy can be used to ensure alignment.
  • Connect the voltage regulator with the heat sink.
  • Solder everything else. Solder 2 wires from PAD1 and PAD2 for testing, and later for connecting to the power supply. PAD1 should be +8V, and PAD2 should be GND.
  • The control board should look like control_board_top.jpg.

Wiring

  • The polarities of the cables matter. The cable between the control board and the first switch board should look like control_board_switch_board_connection.jpg.
  • The cable between switch boards should look like the one below. TO DO: Add image.
  • If using the frontpanel design in the repository, the length of the cable between the control board and the first switch board should be TO DO, and the length of the cable between switch boards should be TO DO.
  • Test the control board by loading the teensy with controller.ino. Change manual_switch_overrides array to all false to start all channels in auto mode. Remove the USB cable to the computer before putting the teensy on the control board, and connect the control board to a switch board (or more). Change the toggle switches on switch boards to right when viewing from the top. Connect 8 V power to the control board. Use a jumper to select a TTL channel from 1 to 8 on the 2x10 connector on each jumper board. Currently, TTL1-8 are connected to the teensy channels 9-2 respectively. GND and VCC pins are connected together and do not need jumpers across. The LED on each of the switch boards should change corresponding to the teensy channel output.
  • Separate the USB power from the board power. Choose a solution from Using External Power and USB.

Computer control

The teensy can be controlled using USB serial connnections, with baud rate 57600, 8 data bits, parity none, and 1 stop bit. Line termination is "\n" (LN).

Command syntax

S{channel},{state}\n: Sets the state of a channel.

  • channel: 1 to 8, switch channel to set. This corresponds to switch boards with the corresponding TTL jumper shorted.
  • state: "HIGH", "LOW", or "AUTO". Sets the channel state to high, low, or auto switching.

Example: "S1,HIGH\n".
Returns the new state of the switch if successful, otherwise returns an error string.

S{channel}?\n: Gets the state of a channel.

  • channel: 1 to 8, switch channel to get. This corresponds to switch boards with the corresponding TTL jumper shorted.

Example: "S1?\n".
Returns the state of the switch if successful, otherwise returns an error string.

T{channel},{time}\n: Sets the auto switch time of a channel in ms.

  • channel: 1 to 8, switch channel to set. This corresponds to switch boards with the corresponding TTL jumper shorted.
  • time: integer, auto switch time for the channel in ms. It must be longer than MIN_SWITCH_TIME defined in controller.ino.

Example: "T1,10000\n".
Returns the new auto switch time if successful, otherwise returns an error string.

T{channel}?\n: Gets the auto switch time of a channel in ms.

  • channel: 1 to 8, switch channel to get. This corresponds to switch boards with the corresponding TTL jumper shorted.

Example: "T1?\n".
Returns the auto switch time if successful, otherwise returns an error string.

Error strings

If a command fails in an error, an error string in the format of "ERROR {error_code}\n" may be returned. See controller.ino for a list of error codes.

About

A 8-channel SPDT optical fiber switch box

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages