Shop OBEX P1 Docs P2 Docs Learn Events
Help with Prop video switcher — Parallax Forums

Help with Prop video switcher

kochevnikkochevnik Posts: 30
edited 2011-09-29 15:15 in Propeller 1
I am working on a system to switch CCTV signals (not power) on/off using the Prop & a transistor - just trying to get this to work in it's most simple form).

I found a website where someone did what I am trying to do - only with a parallel port signal instead of a signal from a Prop.

http://www.vwlowen.co.uk/radio/videoswitch2/index.htm
and this one seems to be wired the same way :
http://web.comporium.net/~shb/ppswitcher.htm

My problem is I cannot get this simple circuit to work, and worse, I don't see how it is supposed to work. My understanding of using an NPN transistor as a switch is that the signal goes from the Prop to the base on the transistor and then to a ground thru the emitter. This schematic just puts a signal on the base, but I dont see where the current flows thru to ground other than back to the ground on the parallel port - I dont see any kind of ground on the transistor side (if that all makes sense)

But I wired it all up anyways and tried it, using 2 different NPN tranistors and for me, it does not work. I get the LED to light on the base side which means I have current to the base, but the tranistor is not turning ON to allow the CCTV signal to pass thru. I tried an LED + resistor as a load thru the emitter/collector and that did not work either, unless I tied the ground for the signal and the ground from the emitter together - then the transistor worked exactly like the switch is supposed to be.

I know this is a pretty simple circuit - but maybe someone who knows a lot more than I do can give me some pointers as to what I am doing wrong ?


Many Thx

===========================

Solution :

Using a transistor to switch the video works (at least in my application) - the wires were just hooked up incorrectly. As Phil P helpfully pointed out, the camera ground, the video in ground and the ground from the propeller (or whatever ground your 3.3v signal comes from) need to be tied together. In addition, the transistor needs to be used to switch the Ground / - wire on the cctv signal, NOT the + wire.

I hooked it up thusly and it works fine - caveat being that my video input goes to a GVI CCTV mux so it might be doing some synching and adjusting before it sends the signal on to the monitor.

Cheap, works good. Wiring Diagram attached.
640 x 512 - 13K

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-09-15 12:00
    I am guessing that the voltage from the parallel port gets to make transistor's collector/emitter a low resistance and hence pass through the signal. This is a very unconventional way of switching the video or the audio and certainly wouldn't give a good performance, but it is supposed to be "el cheapo".

    For the base/emitter junction to be biased the emmiter would have to be referenced to ground somehow. I wonder if they are assumming that this has the 75 Ohm, to deck, without any capacitors ??

    The audio bit would be the same but probably about 1K Ohm ??
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-15 12:20
    The video IN, video OUT, and Propeller grounds have to be tied together for the circuit to work.

    -Phil
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-15 16:34
    I have built a video switcher and used relays. Cheap and simple and you don't have to worry about introducing distortion, impedance matching etc.
  • zoopydogsitzoopydogsit Posts: 174
    edited 2011-09-15 16:39
    About 15+ years ago before you could buy cheap video capture solutions, I built a custom solution for a friend to capture the images from 8 cheap BW CCD cameras to files on a frame grabber on a Unix box. I designed it to output data via the parallel port, which I decoded using a 74x138 and used that to select a switch within one of two 4016. The 4016 was more than adequate to act as a video switch for BW video. In prototyping I was not able to get the 4051 to work at all (it would have saved the need for the 74x138). This turned out to be a cheap and elegent solution at the time. As we powered the cameras and switch box from the same power supply then it worked with little trouble.

    So if you want a cheap video switch solution without individual transistors then you may want to try the 4016. I only used it on low end BW cameras, so I can't comment on color, if you are using you'd have to experiment. You can also buy video mux chips that will do this, probably more expensive than a 4016. But they will probably have higher bandwidth, better stability and designed to handle different electical conditions (power surges etc) or at least have design notes that would give you design considerations.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2011-09-15 22:28
    it may be relying on the video riding on an DC offset from a DC level restore which would set the actual video levels of sync, blanking and video components (BAS) at a predetermined level. That coupled with the video signal riding on the DC level may be enough to turn on and pass through the enabled transistor. The ground path would be through the termination resistances to the video input connections. If the video source uses capacitive coupling, it probably will not work beyond some level of video signal being capacitively coupled through the transistor as noise giving lousy performance.

    If there is a measurable DC level in the video, run the circuit through spice and see what it says. use a 1vP-P wave form to simulate RS-170 video.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-15 22:49
    i'm fairly certain of two things.. base-emitter current should be at a certain level for saturation, the led may be scavenging needed current from the prop pin. Base resistor maybe 1K? also see "diode switch".
  • kochevnikkochevnik Posts: 30
    edited 2011-09-16 13:58
    Thanks to everyone - gave me lots of ideas to think about. I got it working and included the solution in the original post - which was pretty much tying the grounds together as Phil P suggested and the other thing was that the transistor should be 'switching the ground / - wire from the camera to the video IN, not the + wire. Made those changes and it is working fine. My setup is a little different than a bare video in tho, as I am using cat5 baluns for the cctv signal and a GVI mux for cctv camera as my video IN.

    Anyways, works, and thx to all who responded.

    Zoopy - I ordered some mux IC's and am going to see if those work as well.
  • zoopydogsitzoopydogsit Posts: 174
    edited 2011-09-28 02:31
    Just in case anyone is skeptical on the use of a 4016 quad analog switch as a video switch. I found I had an hour or so free on the weekend to wire it up as an example. I used 4 video sources, 3 NTSC B/W cameras and the Parallax Propeller Graphics demo. All of the cameras and the LCD display are connected to the same +12V DC power source and all share a common ground, all video connections are DC coupled. I found I had a bunch of 4016's in my junk box, only one gave a clear output labelled "PC74HC4016P", the other Mitsubishi branded 4016's worked by gave a very dim video output. It's likely they have different bandwidth and impedence. So if you wanted to use this for a cheap video switch then you may want to do some research in the supplier datasheets and some testing.

    I took a video of it and had some free time this evening to upload it to YouTube.
    http://www.youtube.com/watch?v=oPF8Dfoue2A

    Enjoy.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-28 10:45
    The HC parts have a lower series resistance. For best results, the series resistance of the switch has to be much less than the 75-ohm source impedance of the cameras. The old 4000-series CMOS family doesn't come close.

    -Phil
  • Luis DigitalLuis Digital Posts: 371
    edited 2011-09-28 11:33
    TV Control, use the parallel port and transistors to open / close the video signal. The software runs on Linux / Windows.
    Documentation in Spanish.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-09-29 02:13
    I am a great fan of relays, too, as they give an isolated closure of next to zero Ohms. They even give an audible indication that they have changed states.

    (and if the little toads get stuck then all your years of training, and self improvement, allow you to select a suitable sized screwdriver handle to give them a good thwack)
  • frank freedmanfrank freedman Posts: 1,983
    edited 2011-09-29 15:15
    The diode switch should be able to be done using pretty much any gate TTL HC, etc. to replace the mechanical switch shown in the circuit "diode switch" from RC #7. As long as the composite voltage (video+DC offset) at the pass diodes can be pulled at least 1V lower than the bias level of the diodes then it should not be able to pass the video through to the output. The gates should be able to out enough to pull the bottom of the sync pulse to > turn-on bias level of the diode for the channel in question. Then the video can be decoupled via the cap. As to the gate, I would use a 2-4line 7734, use a 74xx154 for a 4 line to 16 line selection capability. Put in a shift register, and then control all 16 inputs with a couple of prop I/O pins.

    Frank
Sign In or Register to comment.