1
\$\begingroup\$

Please forgive my ignorance, I'm a software programmer who is new to the electrical and hardware side.

Our Panasonic HS300G video switcher has a Tally connector. Below is the pin diagram and circuit diagram.

Pin 1-6 are for telling me which Camera input is active (Camera 1-6).

Using a Raspberry Pi 3, I need to be able to detect which pin is "active", and my software will then use that to run a software-based tally system.

I've been trying to research as much as possible myself to understand how "open collector outputs" work, but I'm still confused, and I don't want to fry anything on this video mixer by sending 3.3V to a wrong pin.

Would this design work as follows?

  1. Attach Pin 9 to GROUND on the Raspberry Pi.
  2. Attached Pin 1-6 to 6 individual GPIO pins set as "input" on Raspberry Pi
  3. Send 3.3V from a Raspberry Pi GPIO to Pin 7.
  4. Result: My GPIO "input" pins (1-6) will receive 3.3V whenever the corresponding camera input is selected. This will give the GPIO a "high" reading and my software will know that camera is active.

I would like to test this theory but I can't afford to send too high voltage and mess something up on this mixer! Please help me understand what is going on here, really appreciate it.

Panasonic HS300G tally pinout

EDIT: How do I wire up the 3.3V into the circuit properly? What am I missing?

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Everyone, your responses have been an enormous help. I have some resistors coming in the mail and will give this a go after the holiday and let you know how it goes. This forum is super welcoming for a beginner, much thanks. \$\endgroup\$ Nov 22, 2017 at 16:35
  • \$\begingroup\$ I forgot to come back and mark answer as solution. All 3 answers contained different info that helped me get it working. How do I decide which to choose as the Solution? (and thank you to all...the final project works beautifully!) \$\endgroup\$ Feb 26, 2018 at 17:04

3 Answers 3

2
\$\begingroup\$

Send 3.3V from a Rasberry pi GPIO to Pin 7.

No. Pin 7 should simply be left unconnected. The outputs are enabled when pin 7 is left open.

Other than that, a simple 1k to 10k resistor as a pull up to 3.3V on each output is all you need. You have the general idea., except as another answer mentioned, these are active low outputs. Open collectors are pulled up to VCC and actively pulled low to turn on. So your RPi code requires you to look for a high to low change, a 0 For on instead of 1. This is inverted logic.

This is the typical connection scheme. The 3.3V is connected to the resistors, which pull the lines up (hence, pull-ups).

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ OK that makes sens but I can't wrap my head around where does the 3.3V get input to the circuit? I uploaded a diagram showing my understanding up to this point. \$\endgroup\$ Nov 21, 2017 at 23:17
  • \$\begingroup\$ @Rastographics so did I ;) \$\endgroup\$
    – Passerby
    Nov 22, 2017 at 0:06
1
\$\begingroup\$

You've already got good answers for some of your points from Spehro Pefhany and Passerby so I won't repeat those parts.

I'll just answer (and correct) one of your points which hasn't been mentioned so far:

Would this design work as follows?
[...]
4. Result: My GPIO "input" pins (1-6) will receive 3.3V whenever the corresponding camera input is selected. This will give the GPIO a "high" reading and my software will know that camera is active.

No. Look at this (partial) schematic which you kindly supplied:

partial schematic from the question

Assuming that the example LED shown in that schematic, turns on when that camera is active, the transistor shown will conduct to switch on the relevant LED.

That means the truth table will be:


  • Output OFF (Camera not active)

    Transistor not conducting = voltage on connector pin is same as voltage used for the pull-up resistor (internal or external to the Raspberry Pi) - should be 3.3V (logic High detected on Raspberry Pi input connected to that pin)


  • Output ON (Camera active)

    Transistor conducting = voltage on connector pin is 0V (logic Low detected on Raspberry Pi input connected to that pin)


Therefore your point 4 is exactly the wrong way around i.e. your GPIO inputs (assuming pull-ups to 3.3V) will be logic Low when the device output is selected and that camera is active, and logic High otherwise.

\$\endgroup\$
1
\$\begingroup\$

You can connect them directly, but you must configure the internal pullup resistor on the relevant GPIOs. The grounds must also be connected together and there should be nothing else (other than the Raspberry Pi) connected to those pins.

If you want to be ultra-cautious, put a 470 ohm resistor in series with each of the outputs. Since the pullup is around 50K it won't affect the signals much.

The internal pullups are rather high value so if you have a long cable it may pick up noise- in which case each output could have a resistor such as 4.7K to the 3.3V supply of the Raspberry Pi.

Edit:

In your diagram.

Option 1: Configure GPIO16/20/21 to be inputs with internal pullups in your RPi code. Replace 10K resistors with something between 0 and a few hundred ohms (eg. 470 ohms). Don't connect the 3.3 anywhere (it's supplied internally by switches in the Broadcom SOC with series 50K-ish pullups).

Option 2: Leave internal pullups off. Replace 10K resistors with (say) 470 ohms. Connect a separate 10K resistor between each open collector output (D-sub pins 1-4) and RPi pin 17 (+3.3V). You can use shorts rather than 470 ohms.

Schematic- two outputs shown.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ How should I connect the 3.3V to the outputs? Please refer to the new diagram i uploaded in my question. \$\endgroup\$ Nov 22, 2017 at 0:01
  • 1
    \$\begingroup\$ See above. The 470R resistors are optional, but they will prevent the OC outputs from seriously 'fighting' the RPi GPIOs if you misconfigure them as outputs. \$\endgroup\$ Nov 22, 2017 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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