Building an AV switchbox - electronic or analogue switching?

Discussion in 'Modding and Hacking - Consoles and Electronics' started by MangledLeg, Jan 23, 2013.

  1. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    Unless you're talking arcade boards, the signal voltages should always be the same. 0.7Vpp for RGB, 1Vpp for composite. SCART uses some other signalling voltages for presence, aspect, RGB/composite, but you could generate those inside your switch box with a DC-DC converter, and simply ignore any signalling pins coming from the consoles.

    Digital logic is "on" and "off". Relays are "on" and "off". ;)

    I see what you're saying, and your reservations are understandable since you're not an electronics guy, but solid state logic is designed to be reliable.

    I am wondering though, you've got your contact wires wrapped around those hex-nuts, are the wires insulated from the nuts, or are the nuts insulated from each other? I can't really see from the photo.

    In terms of best practice, definitely. With the 4017B you can usually get away without one.
     
    Last edited: Jan 30, 2013
  2. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    Once again, thanks for the assistance guys - I'll do some research into how to debounce a switch. I did a little bit of reading before, but didn't go into too much depth. With the help you've all given me in this probably drawn-out process, it has helped me get an understanding of all the different components involved in creating this amazing box of AV joy since it has been gradual, which has helped my brain get around the theory and execution of things. It's certainly a fair whack more in depth than most of the console mods or arcade cabs I've had experience with in the past! Although I remember getting pretty overwhelmed with my cab when I first got it, but am now very comfortable rewiring them!

    Just to check, is there any danger with connecting the metal frame in the case to the DC GND from the power supply? Figured this would help with isolating noise (kind of like how RF shielding in consoles are always tied back to DC GND) and also might fall in line with best practice for this kind of project?
     
  3. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    Last edited: Jan 30, 2013
  4. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    Thanks for the link RetroSwim.

    I've had a read through and for the purpose of the 4017B, do I need to go for the simplified circuit in the link you posted (I.e. only using a cap to smooth the transition from high to low across the switch), or is it best practice to add a 74C14 and use that as part of the circuit to properly debounce the switch? I had a look at a datasheet (here), and it looks like one of these would be ample to drive the four switches driving each family of inputs so it wouldn't be too tricky to add from my understanding of things according to the circuit in the link you posted.

    Also thanks for confirming that DC GND'ing the chassis should be fine as well!
     
  5. bacteria

    bacteria I am the Bacman

    Joined:
    Apr 8, 2008
    Messages:
    978
    Likes Received:
    61
    The contact wires are superglued to the wood struts, and the hex nuts are insulated from each other, and maintain pressure on the contact wires from the rubber bands above them.
     
  6. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    The 4017B contains a schmitt trigger on the clock input, the resistor+cap setup should be ample.

    That setup does give you an active low, but it just means the counter will increase when you release the button. If that's not desirable then yeah, a schmitt inverter will do the trick.
     
    Last edited: Jan 31, 2013
  7. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    Thanks mate!

    I was having a look at some materials on debouncing, and someone mentioned using a MC14490 IC (data sheet).

    If I grabbed one of those, I could take care of the switching for all four families of inputs from what I can tell since it is designed to allow up to 6 input/outputs for debounced switches. However, I'm not sure if I have the right idea yet.

    From what I can see, I would have GND that, when I press a momentary-on micro switch, connects GND to pin 1, and then the debounced output generated by the IC exits from pin 15, and pin 15 then feeds into the clock input for the 4017b.

    To make the MC14490 work, I supply +5v to pin 16 and GND to pin 8, then connect a capacitor between pins 7 and 9 to complete the oscillator circuit with a capacitor with the positive leg aligned to pin 7 (doesn't look like I need to also feed in an oscillator to generate the clock).

    Assuming I'm on the right track, the only other detail I would need is the type of capacitor required - would something like a 220uF one do the job? If so, what voltage? I have stacks lying around that might save me buying more stuff!

    Make sense, or should I investigate the other options outlined in the linked document posted above?
     
    Last edited: Jan 31, 2013
  8. bacteria

    bacteria I am the Bacman

    Joined:
    Apr 8, 2008
    Messages:
    978
    Likes Received:
    61
    Probably best to get enough parts to just make one unit for one of your consoles, and then test it on a variety of them. Reason being, I found myself that some systems (eg NES composite mod, and RGB SNES) aren't happy having their signals going through capacitors, you get a blank screen, and on a couple of other systems you can get a dark image; others no problem. What that means is different systems output different levels and strengths.
     
  9. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    In the simple pull-down design I mentioned earlier, the capacitor is tiny, like 10nF, with a 10K resistor. If you used 220uF, you might need to hold the button down for a bit before the schmitt trigger's threshold is crossed. I haven't used the MC14490 before, I'd have to read the datasheet and get back to you, but I suspect it would be a similarly small value. It's a good solution, but quite expensive ($7.50 from Element14!!) compared to a cap + resistor.

    In fact, I was chatting with a friend about this yesterday, and we worked out that it would be cheaper to use an AVR microcontroller as a software debouncer, than using a 4490. Atmel's ATTiny4 can be had for just $1.24, and you can get a USB programmer from Hong Kong for under $4 delivered. So you get a fully customisable solution for less than the cost of a dedicated chip. Bonkers.

    Just another option to consider! :)

    There isn't any reason to route the signals through capacitors in our switches. The caps and resistors we're talking about here aren't related to the video signals. They pass through completely untouched.

    If individual consoles need pull-down resistors or coupling caps on their video outputs, those should be part of the console's own video cables, not part of the AV switch.
     
  10. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    @RetroSwim: Thanks for the further details mate - the question on the cap was more to do with the MC14490, but the details you've given me also means I can proceed with the simpler circuit as an option.

    I've taken a very quick look at the programmable microcontroller, and while I like the nerdy factor going down that path I'm not familiar with programming one!!

    Might have to get started buying some components and a breadboard to create some test circuits to see if I can put all this discussion into practice I reckon!
     
  11. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    That sounds like an awesome idea, breadboards are heaps of fun! :)
     
  12. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    Yay my parts arrived today!

    [​IMG]

    1x Atmel ATMega328
    5x 22pF 50V ceramic caps
    1x 16MHz crystal
    1x 5.5x2.1mm barrel socket
    1x 5x2 pin header
    15x 82ohm 1/4w resistors
    15x 5mm blue LEDs
    12x TI 74CBT3244 bus switches
    12x Right-angle PCB mount SCART sockets

    Still waiting on a (on)-off-(on) momentary rocker switch. I'll be picking up some blank PCB and a case from Jaycar this week.
     
  13. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    Nice! Looking forward to seeing how your switching turns out.
     
  14. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    With some gear coming in in prep for making a test system, thought I'd bump this with a couple of questions.

    First up, with the diodes recommended in the switch design, any particular type I should be using?

    Finally, can anyone recommend some software that'd help build a circuit diagram? I want to put one together to get everything into context. Pretty sure I have Visio at home, but wasn't sure if there are other pieces of software more suitable. Also, is there anything out there useful for putting together a diagram of laying out electrical bits on veroboard as well? I swear I've seen Mamejay use some cool software to do that for his diagrams, so I might have to chase up what he used...
     
  15. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    A 1N4004 diode should do the trick.

    I don't know off-hand what kind of voltages the relays produce when the magnetic field collapses, but a 1N4004 should handle it, plus they're small and cheap.

    For laying out your schematic and components, get CadSoft Eagle. The operating methodology is a bit funny compared to other CAD or graphics software you might be used to, but it's really a great tool. It's what I used to do my PCB layout:

    [​IMG]
    (Click for bigger view) http://i.imgur.com/ZyTgruF.jpg

    It is geared towards PCB design, but you can turn on a grid with standard perfboard spacing, so you could re-purpose it for prototype layout! :)
     
  16. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    Tidy looking PCB design! I take it you have the tools to create your own PCB then? Had a look at the software and it looks like it might do the job nicely - I'll grab the freeware version and have a play!

    BTW, looking forward to more pics and info as your setup evolves too!
     
  17. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    I just use the laser-transfer method of making PCBs. No special tools needed, just the etching chemicals, an older B&W laser printer, a clothes iron, and loads of patience.

    My PCB layout is still being refined too, I'll be sure to post pics! :)
     
    Last edited: Feb 11, 2013
  18. MangledLeg

    MangledLeg Peppy Member

    Joined:
    Jul 11, 2010
    Messages:
    353
    Likes Received:
    4
    The laser method looks pretty awesome - not sure if I'm confident to create one for this application, but it was pretty cool watching some of the before/after and some videos of the technique. Looking forward to seeing how yours turns out!

    I was thinking that rather than using standard perf board where every hole sits on its own that I might try and find one of the ones where everything if grouped in joined pairs - would save having to bridge as many spots, at least in my mind. Next question is where to source one - I get most of my stuff from Jaycar, but might have to look elsewhere depending on price and availability. Before that though, I'll build up a schematic and a layout (can the software you linked to above also do circuit schematics?) and that'll determine what I need, which should save wasting money on excess gear.
     
  19. RetroSwim

    RetroSwim <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Dec 10, 2012
    Messages:
    605
    Likes Received:
    26
    I think Veroboard is nicer to work with than the "pairs" stuff. You just cut the strips with an exacto/stanley knife/scalpel where you need separation.

    With Eagle, you build up your schematic in one mode, and then it brings your components through to the PCB layout mode when you toggle over. You have to lay it out manually, but it maintains the link between the schematic and the PCB layout.

    Edit: Oh, the tool I used to make those schematics earlier was iCircuit. It's got an extremely primitive component library compared to Eagle, and doesn't do PCB layout, but it does let you run simulations.
     
    Last edited: Feb 13, 2013
  20. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    If someone want a software similar to Eagle, but free and open-source, there's KiCad. The libraries aren't as big as eagle's though, but it's easy to create your own part/footprint.
    I used it for some RF stuff and it worked pretty well.

    Good luck on that project!
     
    Last edited: Feb 19, 2013
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page