0
\$\begingroup\$

Please excuse the naivity of this question, I am not an electrical engineer. I need a quick solution, and don't have time to ask our electrical engineer to help. A supplier will bring a device they want to show me, and I would like to see it in action. They will not have a cable to connect it (yes, strange). So they told me, if I can improvise a required cable, I can see the device working.

It is about an optical fibre switch: light comes in via an input fiber and leaves via one of the few output fibres. The switch is powered has one D-sub 25 connector. Power requirements are 5 V, 150 mA. The output is selected by providing a TTL signal on 4 pins in the connector. I want to use only the 1st and the 2nd outputs, for which the codes are 0 and 1. Here is the instruction they sent me:

enter image description here

So I wonder, will the following trivial circuit do what I want?

enter image description here

I hope that in switch position 1, it outputs a TTL code 0000, and in switch position 2, it outputs 0001, according to the table above. I also hope that by connecting things like this I have zero chance of burning the device. As the power supply, I am planning to use a simple prototype board power supply circuit powered via USB (from a phone charger).

enter image description here

\$\endgroup\$
4
  • 1
    \$\begingroup\$ a SPDT switch may, or may not work ... it is unknown what would happen when the input floats between contact closures ... perhaps a SPST switch and a pullup resistor (or pulldown resistor) would work \$\endgroup\$
    – jsotola
    Commented Nov 12, 2022 at 19:59
  • \$\begingroup\$ @jsotola, I think I only have an DPDT ON-ON switch lying around. Was going to use it a SPDT. How is it different, in terms of floating a contact during switching, from an SPST switch? Would a 1 MΩ resistor between pin 2 and ground be a good idea? \$\endgroup\$
    – texnic
    Commented Nov 12, 2022 at 20:17
  • \$\begingroup\$ try 10 kΩ ... pin 2 to ground or pin 2 to +5 V \$\endgroup\$
    – jsotola
    Commented Nov 12, 2022 at 20:32
  • \$\begingroup\$ Tried it today (with 47k resistor), it worked like charm, thanks for your help @jsotola \$\endgroup\$
    – texnic
    Commented Nov 15, 2022 at 19:18

1 Answer 1

1
\$\begingroup\$

It should work for configuration purposes, as jstola points out there could conceivably be issues from switching it during operation.

Check and triple check polarity and pinout (the DB25 connector will have molded-in markings) in case this supplier device does not have reverse polarity protection. If possible ask the supplier to check and confirm before plugging it in and powering it.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Made it, used today, it worked beautifully, thanks for your help! \$\endgroup\$
    – texnic
    Commented Nov 15, 2022 at 19:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.