Custom RGBS and Audio Switch - Page 1
Forum section: electronics / projects

author: 7th_Star
author_rank: Contributor
timestamp: June 21, 2021, 09:48:47 am
content: I am trying to design a custom rgb video/audio switch. Mainly for Retro video game console connected to a PVM style monitor.It will also control my monitor via wired remote control for input selection and tally light.Other switcher were considered. Scart in the US seems to be an expensive hassle with many adaptors. Extrons need custom sync stripping bnc cables that seem difficult to make, both because of the bnc connectors and sync stripping. If this custom switch idea does not work out an Extron is the next choice. Using component and rgb alternating on this monitor involves a switch on the rear of the monitor. Which is mounted in a server rack. This makes component a poor choice. Most premade cables are on backorder.I have never built anything like this so any and all help is appreciated.Chip SelectionI was thinking about this for rgb videohttps://datasheets.maximintegrated.com/en/ds/MAX4887.pdfAnd this for Composite Sync and audio 4751https://datasheets.maximintegrated.com/en/ds/MAX4751-MAX4753.pdfDb15 for the inputs using custom cables.Parts for an example cable.https://console5.com/store/sony-playstation-1-2-ps1-ps2-av-multi-out-plug-for-custom-rgb-cables-repair.htmlhttps://uk.rs-online.com/web/p/twisted-multipair-industrial-cable/1757358/https://www.showmecables.com/db15-male-solder-connector-kit-plastic?gclid=CjwKCAjw8cCGBhB6EiwAgORey6VomNB4xNaLKl51ug3MzMZtQSaats0ZCe2rIuD9whPzaKOB4gWTFRoCAAgQAvD_BwEMounted in a 2u rack case.Attached is a prototype design. Made in kicadPrototype is for three inputs, final will have ten.Prototype does not have the tv control.Prototype uses db15 for output. Final will use db15hd for video output and something else for audio output.Final will have a separate panel for input selection. Possibly an Arduino with a display for input labeling, with a custom design anything is possible.QuestionsGround and power planes what should they be like?I know I need some capacitors right?Am I using vias and planes correctly?Power circuit? on board ac? external dc?Are these chips good choices?Any special note about clearances for the db connctors?Board layout?Rca connections in footprints in kicad?Thanks Again

author: 7th_Star
author_rank: Contributor
timestamp: June 23, 2021, 09:54:00 am
content: Worked on version 1.1 of the prototype design.-Changed video out to db15hd for this style cablehttps://www.monoprice.com/product?p_id=568-Added separated audio out (RCA)-Fixed potential problem if device on first input is turned on when an another input is active then the signal would overlap. Added another max4751 before second input.-Removed switch. Input control TBD.-added temporary power connector.QuestionWhich package version of the chip should I use?

author: Renate
author_rank: Super Contributor
timestamp: June 23, 2021, 11:04:35 am
content: You're going to have to capacitively couple and bias the audio.The 4751 does not go below ground.

author: 7th_Star
author_rank: Contributor
timestamp: June 24, 2021, 01:42:41 am
content: Thank You!I think the sync (composite video) would have the same problem.Would these chips work without coupling?Synchttps://datasheets.maximintegrated.com/en/ds/MAX4529.pdfAudiohttps://datasheets.maximintegrated.com/en/ds/MAX14689.pdfThanks

author: Renate
author_rank: Super Contributor
timestamp: June 24, 2021, 11:42:05 am
content: The 4529 is a "T" switch, a much better switch than the normal "SPST" CMOS switches.It also goes for $3 in single units.You've got 4 different signals:RGB = 0 to 0.7HV = TTLComposite = -0.3 to 0.7Audio = ~ -0.5 to 0.5With the RGB & composite you have to watch for crosstalk.Especially since your sources aren't synced.A good layout and the 4529 will certainly do the job, but is it overkill?Do you really want to bundle the RGB and composite?No device is going to put out both (and if they did you'd just take the RGB).I dunno, wouldn't you just modify anything composite with an RGB output?That seems easier/better to me.

author: 7th_Star
author_rank: Contributor
timestamp: June 24, 2021, 10:02:43 pm
content: Sorry my inconsistent terminology usage seems to have caused some confusion. The switch will be used for RGBS not RGBHV.The "Sync" line might carry "C sync", Luma or Composite Video. Preferably Luma but possibly composite video.https://www.retrorgb.com/sync.htmlThanks

author: Renate
author_rank: Super Contributor
timestamp: June 24, 2021, 10:37:28 pm
content: Um, right. You did say that you were using a PVM monitor.Why don't you use normal BNC cables for the output at least.Why not sync-on-green?Are you planing on looping through the composite input to the sync input for the RGB?You really wouldn't rather just retrofit whatever is composite to RGB?

author: 7th_Star
author_rank: Contributor
timestamp: June 25, 2021, 01:45:35 am
content: Quote from: Renate on June 24, 2021, 10:37:28 pmSync-on-green is not output by many consoles but might be the best choice for compatible consoles.I was debating of just bnc cables from the switch to the monitor.I was thinking about the board space saved by the vga to bnc. When I decided on the vga to bnc cable. I but I am not set on the vga to bnc option.Most of the consoles will use luma for sync if possible. "C Sync" seems vary greatly between console. I don't plan on using Composite video for sync unless luma or "C Sync" are not compatible with that tv and console combination. This switch currently designed for the RGBS output devices only. A separate switch will be used for composite and s-video only devices (laserdisc, vhs, NTSC Gamecube...)

author: 7th_Star
author_rank: Contributor
timestamp: July 03, 2021, 12:22:57 pm
content: Updates:Ordered parts for cables. These will be tested separately with a temporary breakout cable.Began work on the full scale design.Changes:9 Inputs2 Switchable Outputs (not matrixed)Bypassable Processor loop (Extron 202vRGB RXi for supergun/consolized arcade video alignment)Questions:Input controlTo select an input two lines must driven high and one driven low.I was thinking a microcontroller would be an good way to control the inputs and possibly display the name of the input.There are a lot of choices how to accomplish this, standalone Arduino, integrated micro or a different standalone.Any suggestions or notes for microcontroller use. Or buttons and latches instead?

author: Renate
author_rank: Super Contributor
timestamp: July 03, 2021, 01:46:20 pm
content: Why don't you move that inline coneector closer in or on the top.Every square inch of PCB you save is money.I don't mean for you to move the backplane connectors closer, but there is a bunch of trimming that you can do.I built a 4 in/4out matrix once.Since the matrix itself was a bunch of work the first controller I had was 4 BCD thumbwheel switches.Later I build a controller that worked off an existing control bus.It didn't even require a µC, just some latches and stuff.Well, what kind of control do you need? Network? IR? Pushbutton?An OLED display would look nice.Anything on the AVR8-STM-RPi continuum would do the job.Most people would just grab what they know best.

author: 7th_Star
author_rank: Contributor
timestamp: July 05, 2021, 09:33:35 pm
content: Quote from: Renate on July 03, 2021, 01:46:20 pmI was initially thinking pushbuttons, but now maybe a simple menu with a rotary encoder and screen on an Arduino.It would be nice to use the Arduino to send an ir command out to the secondary switch(composite/svideo) which has an ir remote allowing the Arduino to control the entirety of video switching.It seems like some sort of latching control could help the number of pins needed to control the switch, but I am not sure if it would help enough to figure it out.

author: Renate
author_rank: Super Contributor
timestamp: July 05, 2021, 10:08:48 pm
content: So now it's 12 inputs?Why so much control wiring coming in?Don't you just need 4 bits going to a 1 of 16 demux?Unless you want to split to select the A & V separately.Some might use an I²C latch or use SPI to reduce line count but 4 is already pretty low.

author: 7th_Star
author_rank: Contributor
timestamp: July 05, 2021, 11:46:44 pm
content: Quote from: Renate on July 05, 2021, 10:08:48 pmA demux exactly what I needed. Thanks!That will make it much easier to control. (I thought I would need 2 pins for every input, one for the 4887/4751(high) and one for the 4529(low).Now I need to figure out how to use the output of the demux to drive one line low while driving the other line high.ThanksThe number of input and outputs has not changed. (9in, 2out and 1 processor loop)

author: 7th_Star
author_rank: Contributor
timestamp: July 10, 2021, 11:20:46 am
content: For input control my thought is to use one CD74HC4514 (4529 high = unselected input) and one CD74HC4515 (low = unselected input). I tried flip flops but could not find a way that did not end up super complicated.https://www.ti.com/lit/ds/symlink/cd74hc4515.pdfAttached is the page describing the monitor remote connecter. It recommends a series of interconnected switches to make the remote. This leads me to think relays would be the best way to control it with a Arduino??

author: Renate
author_rank: Super Contributor
timestamp: July 10, 2021, 06:09:51 pm
content: Relays would certainly work, but they are big and old-fashioned and not really hip.Optoisolators would do the job, but since you are connected with big fat grounded coax cables they won't be isolating anything.You could just just use transistors as switches or even a low threshold MOSFET like the ubqiuitous 2N7200 or 2N7202 (lower threshold).You can check the resistance of the pullups by connecting your milliamp meter between ground and a switch input.I presume it will be a milliamp or two?The fact that they say "parallel control input" presumes that there is a serial control input somewhere.It's probably more homework to do the same thing, but you get points for being cool.

author: 7th_Star
author_rank: Contributor
timestamp: July 10, 2021, 10:16:04 pm
content: Transistors would be better than relays. All but the tally light measured at 3mA with the tally light measuring 27mA. (Note the tally light is just for fun and might stay off most of the time)I could use a good resource on how to choose and connect an appropriate transistor.I have the power supply(working) from a non functioning extron IN1508. It has +5v and -5v. Pic attached I think this might make a great power supply for the video switch. Unless there is a reason it will not work.Cable came in and I started on the test breakout cable and the video cables. I think this will make for amazing video cables.

author: 7th_Star
author_rank: Contributor
timestamp: July 26, 2021, 01:09:53 am
content: I figured out a way to reduce the control lines by changing the signal path in what now seems obvious.Decided on this for the tv control.https://www.ixysic.com/home/pdfs.nsf/www/CPC1217.pdf/$file/CPC1217.pdfThe control screen came in and I started on the Arduino control.Here is the current version. I think that I will have to move up to a better Arduino. I am out of ram and can not find a solution. All of the features (outputs, input display, screen timeout, last input remember, input set indication) are there and work until it runs out of ram. (the screen buffer eats most of the ram)I think a Arduino with more ram should work unless I am missing something."Sketch uses 23286 bytes (72%) of program storage space. Maximum is 32256 bytes.Global variables use 1556 bytes (75%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 2048 bytes.Low memory available, stability problems may occur."https://youtu.be/A79wkH5ajHUHere is the code if anyone has any ideasCode:#include <Arduino.h>#include <U8g2lib.h>#include <EEPROM.h>#include <Wire.h>#define CLK 2#define DT 3byte currentStateCLK;byte lastStateCLK;byte input = EEPROM.read(0);byte currentinput = 0;byte dplayedinput = 1;unsigned long lastdisplaychange = 0;unsigned long currenttime = 0;unsigned long encodewait = 0;const byte demuxout[] PROGMEM = {B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00100000,B00000000,B00100000,B00000000,};const byte x1[] PROGMEM = {13,16,20,3,33,34,32,25,8,35,42,5,15,38,14};const char console_1[] PROGMEM = "Playstation";const char console_2[] PROGMEM = "Gamecube";const char console_3[] PROGMEM = "Laserdisc";const char console_4[] PROGMEM = "Playstation 2";const char console_5[] PROGMEM = "Saturn";const char console_6[] PROGMEM = "Xbox";const char console_7[] PROGMEM = "SNES";const char console_8[] PROGMEM = "Genesis";const char console_9[] PROGMEM = "Master System";const char console_10[] PROGMEM = "VCR";const char console_11[] PROGMEM = "PC";const char console_12[] PROGMEM = "Casio Loopy";const char console_13[] PROGMEM = "PC Engine";const char console_14[] PROGMEM = "NES";const char console_15[] PROGMEM = "Super Nova";PGM_P const console[] PROGMEM = {console_1,console_2,console_3,console_4,console_5,console_6,console_7,console_8,console_9,console_10,console_11,console_12,console_13,console_14,console_15};const char tvset_1[] PROGMEM = "AUX RGB 0";const char tvset_2[] PROGMEM = "Y/C 1";const char tvset_3[] PROGMEM = "Video A 2";const char tvset_4[] PROGMEM = "AUX RGB 3";const char tvset_5[] PROGMEM = "AUX RGB 4";const char tvset_6[] PROGMEM = "AUX RGB 5";const char tvset_7[] PROGMEM = "AUX RGB 6";const char tvset_8[] PROGMEM = "AUX RGB 7";const char tvset_9[] PROGMEM = "AUX RGB 8";const char tvset_10[] PROGMEM = "Video B 9";const char tvset_11[] PROGMEM = "Video B 10";const char tvset_12[] PROGMEM = "Video B 11";const char tvset_13[] PROGMEM = "Video B 12";const char tvset_14[] PROGMEM = "Video B 13";const char tvset_15[] PROGMEM = "AUX RGB System";PGM_P const tvset[] PROGMEM = {tvset_1,tvset_2,tvset_3,tvset_4,tvset_5,tvset_6,tvset_7,tvset_8,tvset_9,tvset_10,tvset_11,tvset_12,tvset_13,tvset_14,tvset_15};const char switchb_1[] PROGMEM = "";const char switchb_2[] PROGMEM = "Switcher 2 Input 1";const char switchb_3[] PROGMEM = "";const char switchb_4[] PROGMEM = "";const char switchb_5[] PROGMEM = "";const char switchb_6[] PROGMEM = "";const char switchb_7[] PROGMEM = "";const char switchb_8[] PROGMEM = "";const char switchb_9[] PROGMEM = "";const char switchb_10[] PROGMEM = "Switcher 2 Input 2";const char switchb_11[] PROGMEM = "Switcher 2 Input 3";const char switchb_12[] PROGMEM = "Switcher 2 Input 4";const char switchb_13[] PROGMEM = "Switcher 2 Input 5";const char switchb_14[] PROGMEM = "Switcher 2 Input 6";const char switchb_15[] PROGMEM = "Kaneko";PGM_P const switchb[] PROGMEM = {switchb_1,switchb_2,switchb_3,switchb_4,switchb_5,switchb_6,switchb_7,switchb_8,switchb_9,switchb_10,switchb_11,switchb_12,switchb_13,switchb_14,switchb_15};U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);void setup(void) {u8g2.begin();if (input < 0 || input > 14){input = 0;}//Serial.begin(9600);DDRB = B00111111;DDRD = B00000010;//pinMode(CLK,INPUT);//pinMode(DT,INPUT);lastStateCLK = digitalRead(CLK);attachInterrupt(0, Encoderchange, CHANGE);attachInterrupt(1, Encoderchange, CHANGE);//bootscreen();displayinput();setinput();}void loop(void) {currenttime = millis();if (dplayedinput != input){displayinput();}if (input != currentinput && currenttime > lastdisplaychange){setinput();}if (currenttime + 1001 - lastdisplaychange > 10000){u8g2.clearBuffer();u8g2.sendBuffer();}//input++; //Repeat all inputs//delay(1000);}void displayinput(){u8g2.clearBuffer();if (input == 8) {u8g2.setFont(u8g2_font_crox4t_tf);}else if (input == 14) {u8g2.setFont(u8g2_font_helvB12_tf);}else{u8g2.setFont(u8g2_font_crox5t_tf);}byte buffer6 pgm_read_byte(&x1);char buffer1[strlen_P(console)];strcpy_P(buffer1, (PGM_P)pgm_read_word(&console));u8g2.drawStr(buffer6,38,buffer1);u8g2.setFont(u8g2_font_t0_12_mr);char buffer2[strlen_P(tvset)];strcpy_P(buffer2, (PGM_P)pgm_read_word(&tvset));u8g2.drawStr(7,55,buffer2);u8g2.setFont(u8g2_font_t0_12_mr);char buffer3[strlen_P(switchb)];strcpy_P(buffer3, (PGM_P)pgm_read_word(&switchb));u8g2.drawStr(7,15,buffer3);//Serial.println(input);u8g2.sendBuffer();lastdisplaychange = currenttime + 1000;dplayedinput = input;}void Encoderchange(){currenttime = millis();currentStateCLK = digitalRead(CLK);if (currentStateCLK != lastStateCLK && currentStateCLK == 1 && currenttime >= encodewait){if (digitalRead(DT) != currentStateCLK){if (input > 0) {input --;}else {input = 14;}}else{if (input < 14) {input ++;}else {input = 0;}}encodewait = currenttime + 350;}lastStateCLK = currentStateCLK;}void setinput(){byte buffer5 pgm_read_byte(&demuxout);PORTB = buffer5;EEPROM.write(0, input);u8g2.drawFrame(0,0,128,64);u8g2.sendBuffer();currentinput = input;}//void bootscreen(){//u8g2.setFont(u8g2_font_t0_12_mr);//u8g2.drawStr(15,20,"Custom Video");//u8g2.drawStr(25,35,"Switch");//u8g2.drawStr(50,55,"V.75b");//u8g2.sendBuffer();//delay(3000);//}

author: Renate
author_rank: Super Contributor
timestamp: July 26, 2021, 11:05:42 am
content: You've got 200 lines of code... and a big u8g2 library which takes 1024 bytes just for the frame buffer.(That is a 64 x 128 OLED?)Try commenting out all the u8g2 stuff just to see how big that builds.Sure, you could go to a bigger processor.If you keep your text aligned with the eight 8 bit "stripes" you don't need a frame buffer.Probably your smallest text would be 16 pixels high.You could make the big stuff 24 or 32 pixels high.Of course you'd have to rewrite your display library.That's interesting the IXYS optoisolator.The form factor, pinout is as a replacement for those SIP reed relays.Even the fact that they put a resistor in.

author: 7th_Star
author_rank: Contributor
timestamp: July 26, 2021, 11:13:35 pm
content: Quote from: Renate on July 26, 2021, 11:05:42 amI compiled this with the u8g2 lines commented out and the result is ...Sketch uses 3296 bytes (10%) of program storage space. Maximum is 32256 bytes.Global variables use 144 bytes (7%) of dynamic memory, leaving 1904 bytes for local variables. Maximum is 2048 bytes.Code:#include <Arduino.h>//#include <U8g2lib.h>#include <EEPROM.h>#include <Wire.h>#define CLK 2#define DT 3byte currentStateCLK;byte lastStateCLK;byte input = EEPROM.read(0);byte currentinput = 0;byte dplayedinput = 1;unsigned long lastdisplaychange = 0;unsigned long currenttime = 0;unsigned long encodewait = 0;const byte demuxout[] PROGMEM = {B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00000000,B00100000,B00100000,B00000000,B00100000,B00000000,};const byte x1[] PROGMEM = {13,16,20,3,33,34,32,25,8,35,42,5,15,38,14};const char console_1[] PROGMEM = "Playstation";const char console_2[] PROGMEM = "Gamecube";const char console_3[] PROGMEM = "Laserdisc";const char console_4[] PROGMEM = "Playstation 2";const char console_5[] PROGMEM = "Saturn";const char console_6[] PROGMEM = "Xbox";const char console_7[] PROGMEM = "SNES";const char console_8[] PROGMEM = "Genesis";const char console_9[] PROGMEM = "Master System";const char console_10[] PROGMEM = "VCR";const char console_11[] PROGMEM = "PC";const char console_12[] PROGMEM = "Casio Loopy";const char console_13[] PROGMEM = "PC Engine";const char console_14[] PROGMEM = "NES";const char console_15[] PROGMEM = "Super Nova";PGM_P const console[] PROGMEM = {console_1,console_2,console_3,console_4,console_5,console_6,console_7,console_8,console_9,console_10,console_11,console_12,console_13,console_14,console_15};const char tvset_1[] PROGMEM = "AUX RGB 0";const char tvset_2[] PROGMEM = "Y/C 1";const char tvset_3[] PROGMEM = "Video A 2";const char tvset_4[] PROGMEM = "AUX RGB 3";const char tvset_5[] PROGMEM = "AUX RGB 4";const char tvset_6[] PROGMEM = "AUX RGB 5";const char tvset_7[] PROGMEM = "AUX RGB 6";const char tvset_8[] PROGMEM = "AUX RGB 7";const char tvset_9[] PROGMEM = "AUX RGB 8";const char tvset_10[] PROGMEM = "Video B 9";const char tvset_11[] PROGMEM = "Video B 10";const char tvset_12[] PROGMEM = "Video B 11";const char tvset_13[] PROGMEM = "Video B 12";const char tvset_14[] PROGMEM = "Video B 13";const char tvset_15[] PROGMEM = "AUX RGB System";PGM_P const tvset[] PROGMEM = {tvset_1,tvset_2,tvset_3,tvset_4,tvset_5,tvset_6,tvset_7,tvset_8,tvset_9,tvset_10,tvset_11,tvset_12,tvset_13,tvset_14,tvset_15};const char switchb_1[] PROGMEM = "";const char switchb_2[] PROGMEM = "Switcher 2 Input 1";const char switchb_3[] PROGMEM = "";const char switchb_4[] PROGMEM = "";const char switchb_5[] PROGMEM = "";const char switchb_6[] PROGMEM = "";const char switchb_7[] PROGMEM = "";const char switchb_8[] PROGMEM = "";const char switchb_9[] PROGMEM = "";const char switchb_10[] PROGMEM = "Switcher 2 Input 2";const char switchb_11[] PROGMEM = "Switcher 2 Input 3";const char switchb_12[] PROGMEM = "Switcher 2 Input 4";const char switchb_13[] PROGMEM = "Switcher 2 Input 5";const char switchb_14[] PROGMEM = "Switcher 2 Input 6";const char switchb_15[] PROGMEM = "Kaneko";PGM_P const switchb[] PROGMEM = {switchb_1,switchb_2,switchb_3,switchb_4,switchb_5,switchb_6,switchb_7,switchb_8,switchb_9,switchb_10,switchb_11,switchb_12,switchb_13,switchb_14,switchb_15};//U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);void setup(void) {//u8g2.begin();if (input < 0 || input > 14){input = 0;}//Serial.begin(9600);DDRB = B00111111;DDRD = B00000010;//pinMode(CLK,INPUT);//pinMode(DT,INPUT);lastStateCLK = digitalRead(CLK);attachInterrupt(0, Encoderchange, CHANGE);attachInterrupt(1, Encoderchange, CHANGE);//bootscreen();displayinput();setinput();}void loop(void) {currenttime = millis();if (dplayedinput != input){displayinput();}if (input != currentinput && currenttime > lastdisplaychange){setinput();}if (currenttime + 1001 - lastdisplaychange > 10000){//u8g2.clearBuffer();//u8g2.sendBuffer();}//input++; //Repeat all inputs//delay(1000);}void displayinput(){//u8g2.clearBuffer();if (input == 8) {//u8g2.setFont(u8g2_font_crox4t_tf);}else if (input == 14) {//u8g2.setFont(u8g2_font_helvB12_tf);}else{//u8g2.setFont(u8g2_font_crox5t_tf);}byte buffer6 pgm_read_byte(&x1);char buffer1[strlen_P(console)];strcpy_P(buffer1, (PGM_P)pgm_read_word(&console));//u8g2.drawStr(buffer6,38,buffer1);//u8g2.setFont(u8g2_font_t0_12_mr);char buffer2[strlen_P(tvset)];strcpy_P(buffer2, (PGM_P)pgm_read_word(&tvset));//u8g2.drawStr(7,55,buffer2);//u8g2.setFont(u8g2_font_t0_12_mr);char buffer3[strlen_P(switchb)];strcpy_P(buffer3, (PGM_P)pgm_read_word(&switchb));//u8g2.drawStr(7,15,buffer3);//Serial.println(input);//u8g2.sendBuffer();lastdisplaychange = currenttime + 1000;dplayedinput = input;}void Encoderchange(){currenttime = millis();currentStateCLK = digitalRead(CLK);if (currentStateCLK != lastStateCLK && currentStateCLK == 1 && currenttime >= encodewait){if (digitalRead(DT) != currentStateCLK){if (input > 0) {input --;}else {input = 14;}}else{if (input < 14) {input ++;}else {input = 0;}}encodewait = currenttime + 350;}lastStateCLK = currentStateCLK;}void setinput(){byte buffer5 pgm_read_byte(&demuxout);PORTB = buffer5;EEPROM.write(0, input);//u8g2.drawFrame(0,0,128,64);//u8g2.sendBuffer();currentinput = input;}//void bootscreen(){//u8g2.setFont(u8g2_font_t0_12_mr);//u8g2.drawStr(15,20,"Custom Video");//u8g2.drawStr(25,35,"Switch");//u8g2.drawStr(50,55,"V.75b");//u8g2.sendBuffer();//delay(3000);//}

author: Renate
author_rank: Super Contributor
timestamp: July 27, 2021, 12:05:10 am
content: You could even just compose graphics on your desktop.Each frame is only 1k, but of PROGMEM, not RAM.This is something I did with the "stripes" idea.There are 2 stripes chars, 1 stripe space, 2 stripes char, 1 stripe space, 2 stripes char = 8 stripes.Flash: 14958RAM: 1081

author: Terry Bites
author_rank: Super Contributor
timestamp: July 27, 2021, 12:28:39 pm
content: https://www.amazon.co.uk/Component-Switch-Splitter-Selector-Converter/dp/B01M4LOU12Will be far chepaer than your build.

author: Renate
author_rank: Super Contributor
timestamp: July 27, 2021, 05:22:16 pm
content: Quote from: Terry Bites on July 27, 2021, 12:28:39 pmNotice that that doesn't take any power in.I'd guess that it's a mechanically interlocked switch?

author: 7th_Star
author_rank: Contributor
timestamp: July 29, 2021, 01:09:07 am
content: Quote from: Terry Bites on July 27, 2021, 12:28:39 pmI think there might be some confusion involving the prototype sketch and the final design features.The finished switch will have 9 RGBS inputs, two switchable outputs, bypassable processor loop, and tv input control.Implemented the solution to the memory problems. Page mode with Bitmaps instead of text in full buffer mode.An LED (now represented by the built in LED) will show that the input is set. Fixed the known bug involving switching back to the same quickly did not set the input. Once the board design is finished then the pin output patterns can be programed and then the control software will be finished.https://youtu.be/Msq2QOIPO8USketch uses 29028 bytes (89%) of program storage space. Maximum is 32256 bytes.Global variables use 692 bytes (33%) of dynamic memory, leaving 1356 bytes for local variables. Maximum is 2048 bytes.

author: Renate
author_rank: Super Contributor
timestamp: July 29, 2021, 10:26:16 am
content: Looking good.Are you using the knob pushbutton for "take"?I'd think that switching on knob rotation itself would be kind of distracting.

author: 7th_Star
author_rank: Contributor
timestamp: July 30, 2021, 09:32:06 am
content: Quote from: Renate on July 29, 2021, 10:26:16 amEvery time the knob changes the screen the input set light turns off and a 1sec counter is started if the knob has not moved after that 1sec then the selected input is set and the "input set" led turns on. So the inputs are not changing as the knob is moving.

author: Renate
author_rank: Super Contributor
timestamp: July 30, 2021, 10:48:55 am
content: I have a headless Raspberry Pi Zero project with an 0.96" OLED display.I use a knob to select video output format (HDMI, DGI, NTSC, various res).One line shows the current format, another line shows knob selection.The pushbutton "takes".I also have "Shutdown" as a selection.

author: 7th_Star
author_rank: Contributor
timestamp: July 31, 2021, 08:25:23 pm
content: Made a git hub for the project to make it easier to share the latest version.Hardwarehttps://github.com/7th-Star/Custom_RGBs_and_Audio_Switch/tree/main/HardwareSoftwarehttps://github.com/7th-Star/Custom_RGBs_and_Audio_Switch/tree/main/SoftwareChanged the shape of the board to fit the chassis. Added some mounting holes. Found the correct power connector. Spaced the solid state relays so they can be folded down. Changed the connector to the front panel.

author: Renate
author_rank: Super Contributor
timestamp: July 31, 2021, 10:58:10 pm
content: Normally such a ton of DB connectors would be attached to the back panel with the 4-40 (or 3 mm) male/female standoffs.Maybe a couple of screws in the corner of the PCB and maybe one near the audio connectors.Does the height of the audio connectors work with the DB connectors?Do you have some CNC to cut the back panel?

author: 7th_Star
author_rank: Contributor
timestamp: July 31, 2021, 11:44:47 pm
content: Quote from: Renate on July 31, 2021, 10:58:10 pmThis looks like a good resource for me to figure out how to mount the connectors.https://itm-components.co.uk/pages/d-subminiature-faqWith the connectors mounted to the panel then there does not need to be as many mounting holes. I will have to mount some though hole things on the back. (power front, panel connector) I will research the audio connector height relative to the db connector issue.I do have access to CNC mills to cut the panels.

author: 7th_Star
author_rank: Contributor
timestamp: August 01, 2021, 09:26:03 pm
content: Made the first cable. It turned out amazing! Spellcaster on the master system to RGBS on a Sony PVM.

author: Renate
author_rank: Super Contributor
timestamp: August 02, 2021, 04:39:58 pm
content: Quote from: 7th_Star on July 31, 2021, 11:44:47 pmAnd while you're at it triple-check the DB9, DB15 & HDB15 to see that they all match.

author: 7th_Star
author_rank: Contributor
timestamp: August 03, 2021, 01:26:39 am
content: Quote from: Renate on August 02, 2021, 04:39:58 pmDB connectors are 6.0mm 6.1mm 6.2mm which should be fine.For the audio connectors there are two styles.10mm with plastic base.https://www.cuidevices.com/product/resource/rcj-05x.pdf3.8mmhttps://www.cuidevices.com/product/resource/rcj-02x.pdfIs grounding concerns the reason for the different designs. The 10mm base could stick out and the 3.8mm seems long enough the be recessed. The audio grounds are separate on the cables when possible depending on the console if that make any difference. (Xbox has separate grounds for each video, sync and audio. but some only have a single ground for everything.)

author: Renate
author_rank: Super Contributor
timestamp: August 03, 2021, 12:01:37 pm
content: You could use dual right angled sockets and put it on a little riser circuit board.https://www.digikey.com/en/products/detail/rdi-inc/RH1039M040G-NL/This is my favorite, dual vertical and enough slack in the pins to get the height right.Also, this is the only one I've seen with an "island" for the opening.https://www.elecbee.com/en-3379-rca-connector-solder-dual-port-rca-phono-chassis-mount-socket-audio-video-red-white-female-connector?search=EB-016-0034&description=true

author: 7th_Star
author_rank: Contributor
timestamp: August 07, 2021, 11:50:14 am
content: Quote from: Renate on August 03, 2021, 12:01:37 pmI think will use the 10mm long base connectors and cut a square hole in the plate and let the base stick out.Changed the control software to use a stripe of symbols for input set (lock), output (a or b), and processor (fx).https://youtu.be/ltRwe0AtmgUhttps://github.com/7th-Star/Custom_RGBs_and_Audio_Switch/tree/main/Software/VideoSwitcher0-876bI would like to use something like thisCode:void fxoutunlockset(){if (outputselect == 0 && inputset == 1 && fx == 0) {fxsetnum = 1;}if (outputselect == 1 && inputset == 1 && fx == 0) {fxsetnum = 3;}if (outputselect == 1 && inputset == 0 && fx == 0) {fxsetnum = 4;}if (outputselect == 0 && inputset == 0 && fx == 0) {fxsetnum = 2;}}const char *outfxlockset[] = {"aoutlock_pic","aoutunlock_pic","boutlock_pic","boutunlock_pic"};void playstation (){u8g2.firstPage();do {u8g2.setFont(u8g2_font_ncenB14_tr);u8g2.drawXBMP(0,0, 128,16, playstation_pic);u8g2.drawXBMP(0,22, 128,16, aux1_pic);u8g2.drawXBMP(0,49, 128,16, outfxlockset);} while ( u8g2.nextPage() );}But everything I try returns some variation of this error."warning: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]"So instead I have to use this ugly bit of code for every input.Code:void playstation (){if (outputselect == 0 && inputset == 1 && fx == 0) {u8g2.firstPage();do {u8g2.setFont(u8g2_font_ncenB14_tr);u8g2.drawXBMP(0,0, 128,16, playstation_pic);u8g2.drawXBMP(0,22, 128,16, aux1_pic);u8g2.drawXBMP(0,49, 128,16, aoutlock_pic);} while ( u8g2.nextPage() );}if (outputselect == 1 && inputset == 1 && fx == 0) {u8g2.firstPage();do {u8g2.setFont(u8g2_font_ncenB14_tr);u8g2.drawXBMP(0,0, 128,16, playstation_pic);u8g2.drawXBMP(0,22, 128,16, aux1_pic);u8g2.drawXBMP(0,49, 128,16, boutlock_pic);} while ( u8g2.nextPage() );}if (outputselect == 1 && inputset == 0 && fx == 0) {u8g2.firstPage();do {u8g2.setFont(u8g2_font_ncenB14_tr);u8g2.drawXBMP(0,0, 128,16, playstation_pic);u8g2.drawXBMP(0,22, 128,16, aux1_pic);u8g2.drawXBMP(0,49, 128,16, boutunlock_pic);} while ( u8g2.nextPage() );}if (outputselect == 0 && inputset == 0 && fx == 0) {u8g2.firstPage();do {u8g2.setFont(u8g2_font_ncenB14_tr);u8g2.drawXBMP(0,0, 128,16, playstation_pic);u8g2.drawXBMP(0,22, 128,16, aux1_pic);u8g2.drawXBMP(0,49, 128,16, aoutunlock_pic);} while ( u8g2.nextPage() );}}Making process on the board.

author: Renate
author_rank: Super Contributor
timestamp: August 07, 2021, 12:49:53 pm
content: Quote from: 7th_Star on August 07, 2021, 11:50:14 amNo, use this:Code:const uint8_t *outfxlockset[] = {aoutlock_pic, aoutunlock_pic, boutlock_pic, boutunlock_pic};Or even just:Code:uint8_t *bm;if (blah-blah-blah) bm=aoutlock_pic;else if (other-thing) bm=aoutunlock_pic;Why are you setting font? Are you actually using them?The point I was making about stripes is that there are 8 independent stripes to a display.If you want to write a full stripe you don't need to consider at all what the display is showing or use a frame store.If you use u8g2 and you write u8g2.drawXBMP(0,22, 128,16, aux1_pic) it will have to read 6 bits at the top and 10 bits from the bottom from the frame store.If you made that my_lib.drawXBMP(0, 16, 128, 48, aux1_pic); then you could write 3 full stripes without any frame store.Your graphic would be 128 x 48, which would involve the same amount of writing to the OLED anyway.(Yes, I get that the 6 bits at the top and the 10 bits at the bottom in the first case are blank, but u8g2 doesn't know that.)All these graphics are being stored in PROGMEM, right?

author: 7th_Star
author_rank: Contributor
timestamp: August 07, 2021, 03:05:30 pm
content: ThanksTaking out the "" was the key. I tried const uint8_t * before but using "" and that did not work.The bmp are stored in PROGMEM. These are stored in a separate header file lol. I got tired of scrolling past a huge wall of Hex.That cleans up the displayinput alot. I now understand what you meant by stripes, it needs no buffer. The page buffer mode uses much smaller amount of memory than the full buffer mode. Enough that I have plenty left.Now I use 4 bmp as rows that can allow a section to change independent of the rest, like when the monitor out changes or when the processor loop is on/off.Code:void displayinput(){fxoutunlockset();PORTB = PORTB & B11011111;u8g2.firstPage();do {u8g2.drawXBMP(0,0, 128,16, intputdis);u8g2.drawXBMP(0,17, 128,16, intputdis2);u8g2.drawXBMP(0,33, 128,16, switchsel);u8g2.drawXBMP(0,49, 128,16, outfxlockset);} while ( u8g2.nextPage() );lastdisplaychange = millis();dplayedinput = input;}https://github.com/7th-Star/Custom_RGBs_and_Audio_Switch/tree/main/Software/VideoSwitcher0-88b

author: Renate
author_rank: Super Contributor
timestamp: August 07, 2021, 04:12:40 pm
content: Don't you mean:Code:u8g2.drawXBMP(0,0, 128,16, intputdis);u8g2.drawXBMP(0,16, 128,16, intputdis2);u8g2.drawXBMP(0,32, 128,16, switchsel);u8g2.drawXBMP(0,48, 128,16, outfxlockset);

author: 7th_Star
author_rank: Contributor
timestamp: August 08, 2021, 01:17:08 pm
content: Quote from: Renate on August 07, 2021, 04:12:40 pmActually I meant this. lol. I was once trying to change parameter on a piece of equipment "p50b.03 to 1" and could not figure out. Turns out you have to start with the 0th digit from the right.Code:u8g2.drawXBMP(0,0, 128,32, intputdis);u8g2.drawXBMP(0,32, 128,16, switchsel);u8g2.drawXBMP(0,48, 128,16, outfxlockset);Implemented all of the changeshttps://youtu.be/5OEp97mux8Yhttps://github.com/7th-Star/Custom_RGBs_and_Audio_Switch/tree/main/Software/VideoSwitcher0-9b

author: 7th_Star
author_rank: Contributor
timestamp: August 14, 2021, 10:07:06 am
content: Thinking about the chassis, I realized that taking out the Arduino the update the software would be a hassle. I would to include a way connect the Arduino to a computer while in the chassis. Isolating the USB seems like a good idea. Lots of articles and device use something like a Analog Devices 3160 but that seems like overkill and is expensive $7.92US. I assume for just the data side to communicate with an Arduino there should be a cheaper solution.https://www.mouser.com/ProductDetail/Analog-Devices/ADUM3160BRWZ-RL?qs=WIvQP4zGaniZo3xx1fxm1A%3D%3D#.YReUqQLw67o.linkGetting close to working on the power and ground on the pcb layout.

author: 7th_Star
author_rank: Contributor
timestamp: August 28, 2021, 08:58:36 pm
content: Case came in, It looks great.https://www.circuitspecialists.com/rackmount-enclosure-37-2u.htmlI am unsure if the ADuM3160 is overkill or if needed for the usb isolation. But until another solution is found I am proceeding forward with it.

author: 7th_Star
author_rank: Contributor
timestamp: August 29, 2021, 11:15:39 am
content: Which of these BOM styles works better?Every Ref gets it's own line or every type of component gets a line with a range of Refs?

author: Renate
author_rank: Super Contributor
timestamp: August 29, 2021, 11:56:20 am
content: In a database world you'd have two tables: (, Ref, PartNum) and (PartNum, Datasheet, [Supplier, Price...])As a human, I like to see: 2N3904 - Q1, Q4-8, Q27, especially for resistors!Such a report can be with a bit of effort generated from the two tables above.Having list-like values in your raw data like "U2, U4, U6" can be difficult to work with.Having list-like values in a report is only a sleight of hand.In the best case, both visualizations would be possible to answer questions like "How many 2N3904 do I use?" and "What is Q34?" (if there are hundreds of parts).This may be complete overkill for you.