Use a USB serial to TTL converter as a TTL shutter (new proposed adapter)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Use a USB serial to TTL converter as a TTL shutter (new proposed adapter)

Egor Zindy
Hello list,

I wrote a device adapter which makes possible the use of any USB
serial -> TTL converters directly as TTL shutters. No microcontroller

The code is on my github fork, but I wasn't able to keep my branches
in check, so no PR until I do:

Basically, the adapter controls the two output lines (RTS or DTR).
Connect those to a TTL input and you have yourself a shutter!

There are two ways to wire the cable. You can solder a BNC connector onto either
  * centre pin: RTS or DTR line (whichever is available)
  * casing to ground
  * centre pin: +5V
  * casing to RTS or DTR

If this gets accepted in the main tree, I can write about various
converters on the MM wiki.

Which is best, I don't know yet. This may likely depend on the actual
make/model. I am pretty sure the operating system can/will access or
reset the converter at any point during initialisation and normal
operation (when not controlled by the adapter), and this may trigger
the RTS / DTR lines as a result.

One converter I am waiting for is a "6 Pin PL2303HXD USB to RS232"
cable from ebay, which could be the best suited converter for the
task. Because it's already a cable and the converter chip is encased
in plastic. But any other chip should work (FTDI, PL2303, CH340,
CP2102...) or even a real RS232 port through a level shifter (e.g.

I have put two options in the adapter setup. This should cover pretty
much any case scenario (other than using both lines as shutters
  * Output line (RTS or DTR)
  * Type of logic (positive or negative)

The code was written for both Windows and Linux, but I'm away from my
work machine, so I have only tested this in Linux for now (with a
CH340 chip).

I totally agree that controlling the RTS or DTR lines on a serial
device isn't the best way to build a shutter. Probably one of the
worst to be honest! Also, my code is "a bit" of a hack. In my defence
the converters are dirt cheap, and in a pinch, I guess this will work!


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
micro-manager-general mailing list
[hidden email]