Skip to content
russdill edited this page Apr 25, 2012 · 6 revisions

The DTR is a serial pass-through dongle and solid state power switch. The power switch funcionality is activated by using the DTR (Data Terminal Ready) line of the serial connection. When DTR is active, the switch is on, otherwise, DTR is off. The purpose of the dongle is to control the power supply of a target system via software. The default behavior on Linux for serial ports is to assert DTR when the port is opened, and deassert it when the port is closed.

The 'hup' flag of stty can be used to modify this bevaiour, by clearing the hup flag (stty -F /dev/ttyUSB0 -hup), DTR will be left asserted after the port is closed. When this flag is cleared, DTR can still be deasserted by setting the baud rate to zero (stty -F /dev/ttyUSB0 0). Communication programs will generally toggle DTR when asked to hang up, so under minicom, ctrl-a+h will cycle power. The git repo associated with this wiki also has a small command line program for toggling DTR, here.

The solid-state switch used is a p-channel mosfet. The typical on-state resistance for the chosen mosfet is 240mΩ. This gives a voltage drop of 240mV at 1A and a power loss of 240mW. The mosfet obtained for these prototypes is not ideal, future runs could include a power mosfet with a much lower on state resistance. Additionally, this device does not contain any ESD protection circuits so it is an ESD sensitive device.

To connect up a board, the power cable must be cut in order to be intercepted by the blue terminal block. When looking at the terminal block with the screws on top and the insertion points towards you, the far right position is ground, the middle position is input from the power supply, and the far left position is output to the target.

There are two versions of the board, one for when a Null modem connection is required, and one for when a Standard connection is required (or for when null modem is provided by an existing cable). Either dongle can be used to cycle power for systems without a serial port (such as Snowball or Beaglebone).

Example conmux usage (The extra '-' is to avoid a bug in conmux command line passing):

command 'hardreset' 'initiate a hard reset' 'rs232_power /dev/serial/by-path/pci-0000:00:10.3-usb-0:1.2:1.0-port0 cycle -'
command 'off' 'power off machine' 'rs232_power /dev/serial/by-path/pci-0000:00:10.3-usb-0:1.2:1.0-port0 off -'
command 'on' 'power on machine' 'rs232_power /dev/serial/by-path/pci-0000:00:10.3-usb-0:1.2:1.0-port0 on -'
help 'hardreset' 'initiate a system hard reset for this machine'
help 'off' 'cut power to this machine'
help 'on' 'apply power to this machine'
Clone this wiki locally