|
Post by svart on Oct 6, 2017 11:27:44 GMT -6
So this project has taken me months to finally complete due to how busy I've been.. With the new tape machine, I needed a way to switch between the tape deck and the conversion easily. I created a 24x2 relay matrix to be able to switch one set of inputs to either set of outputs. It could also go the other way as well. I sent the boards off to be made last week, but won't be back for a while. I also need to code up some control for these things which will take some time. There's 24 individual switches for switching each I/O, or a couple auxiliary switches to possibly switch in banks/groups, etc. An LCD will show the status of the channels, etc. Years ago I bought a few thousand telecom relays to do some other things that never turned out, so I'm re-purposing them for this. I'll have limited numbers of these boards built up and available to purchase if anyone is interested.
|
|
|
Post by rocinante on Oct 7, 2017 17:01:00 GMT -6
I am doing something very similar. Pm'ed you.
|
|
|
Post by rowmat on Oct 7, 2017 23:17:42 GMT -6
Sounds like something I might be interested in.
I'm using two Alesis HD24XR's, one as a dedicated A to D and the other as a dedicated D to A with an analog console.
I want to be able to select whether the playback comes from the line outputs of the A to D during tracking (for latency free live monitoring and overdubbing) or from the line outputs of the D to A for DAW playback.
|
|
|
Post by svart on Oct 9, 2017 15:31:13 GMT -6
Sounds like something I might be interested in. I'm using two Alesis HD24XR's, one as a dedicated A to D and the other as a dedicated D to A with an analog console. I want to be able to select whether the playback comes from the line outputs of the A to D during tracking (for latency free live monitoring and overdubbing) or from the line outputs of the D to A for DAW playback. This would be something that the relay boards would work on.
|
|
|
Post by svart on Oct 10, 2017 9:55:44 GMT -6
So more info on the design.
The control switches are right-angle tactile switches. Those are read and debounced by the micro, much like they were in my converters. They are a lot cheaper than using mechanical switches, and generally much longer lasting too.
The 24VDC input allows the relays to run at lower currents, so I can use less copper on the board. It's cheaper, cooler running, and overall less current noise on both power and ground traces.
The board is only 2 layer, because at this size, a 4 layer board is over double the cost and doesn't get you much besides being able to plane out the power and grounds.
I tried to separate the audio traces as much as possible for crosstalk.
|
|
|
Post by EmRR on Oct 10, 2017 10:28:52 GMT -6
Could be of interest, will follow.
|
|
|
Post by svart on Oct 14, 2017 11:01:20 GMT -6
So I got the boards! Turns out I messed up the footprints of the relays by making them multi-layer, rather than single layer.. So they're copied on the bottom of the board and shorting some traces out. A few minutes with a razor blade should fix these prototypes.
|
|
|
Post by noah shain on Oct 15, 2017 12:40:43 GMT -6
Following this
|
|
|
Post by svart on May 1, 2019 7:10:46 GMT -6
Whoa has it really been so long since I touched this? I need to work on it!
|
|
|
Post by rocinante on Oct 14, 2019 22:40:04 GMT -6
Yeah you do. Any progress?
|
|
|
Post by svart on Oct 15, 2019 8:06:21 GMT -6
Yeah you do. Any progress? I pulled the boards out a while ago and never did anything with them. Unfortunately my personal need for this project has not materialized, so I haven't been terribly compelled to complete it. The sad thing is that I could likely get it working fairly quickly too but got stuck doing research on how to do some of the code better than I currently know how to do, but then ran out of time and haven't been back since.
|
|
|
Post by svart on Oct 15, 2019 16:30:36 GMT -6
I'll tell you what I need to do..
I was studying arrays in C code, and got to the point where I was needing to figure out how to read 26 buttons, denounce them, store their current values and compare them to both previous values in memory and in ROM. The ROM values are written anytime there's a change so that reboots will return to previous states as an automatic recall of settings.
So on the converter project, I actually read the button state twice and compared to the eeprom value, but on a single button. This ate up 3 cycles, which naturally denounced the circuit as well, without needing timers/counters/delays like most code debouncers utilize. On that project I also simply had various states that were called wholesale if a specific menu value was obtained. On this project I don't need a ton of special states, so an array of high/low values would be fine.
So here I need an array of previous button values in eeprom, an array of current values in RAM, and a function that reads and compares input pins and writes the current array values.
Seems like it should be all of a few lines of code, but I'm working through it the hard way it seems.
|
|
|
Post by christopher on Oct 28, 2019 15:30:24 GMT -6
I have zero business contributing here but I do wish I could learn more about this stuff. Quite a simple task, yet very much over my head. Here’s my first idea, to make math with absolute values and write only when a change is detected.
Since there are 26 switches, I figure one could represent each as a letter in the alphabet?
1= write RAM value to EEPROM 0= do nothing
RAM A.. value 1 EEPROM A .. value 1 | 1-1=0 | = 0 no change
RAM A.. value 0 EEPROM A .. value 1 | 0-1=-1 |=1 write RAM value to EEPROM
RAM A.. value 1 EEPROM A .. value 0 | 1-0=1 | =1 write RAM value to EEPROM
RAM A.. value 0 EEPROM A value.. 0 | 0-0=0 | = 0 no change
|
|
|
Post by christopher on Oct 28, 2019 15:37:21 GMT -6
Another brainstorm was up/down could be represented in bits?.. 1 for up, 0 for down. Then every possible configuration could be assigned and take up 26 bits worth of a 32bit word, like how ADC assigns a value to level.
1001 1111 0011 1011 1011 0100 00
and then uses 0’s to finish off the rest of the 32bit word.
That way a word would tell exactly each position. I have zero clue how to implement that either, just hope it helps spark something.
|
|
|
Post by svart on Oct 29, 2019 14:00:44 GMT -6
I have zero business contributing here but I do wish I could learn more about this stuff. Quite a simple task, yet very much over my head. Here’s my first idea, to make math with absolute values and write only when a change is detected. Since there are 26 switches, I figure one could represent each as a letter in the alphabet? 1= write RAM value to EEPROM 0= do nothing RAM A.. value 1 EEPROM A .. value 1 | 1-1=0 | = 0 no change RAM A.. value 0 EEPROM A .. value 1 | 0-1=-1 |=1 write RAM value to EEPROM RAM A.. value 1 EEPROM A .. value 0 | 1-0=1 | =1 write RAM value to EEPROM RAM A.. value 0 EEPROM A value.. 0 | 0-0=0 | = 0 no change Yeah, that's about how you do it. I was investigating doing it in a single function, something like this test code on my Arduino test board to read button pushes and display which button has been pushed: const byte buttonPins[] = {A1, A2, A3}; //buttons attached to these pins void setup() { Serial.begin(115200); for (int x = 0; x < 3; x++) { pinMode(buttonPins[x], INPUT_PULLUP); //set button pins as inputs } } void loop() { for (int x = 0; x < 3; x++) { if (digitalRead(buttonPins[x]) == LOW) { Serial.print("The button on pin "); Serial.print(buttonPins[x]); Serial.println(" is pressed"); } } } And then add a compare at the end like the bottom of the function I made to read buttons in my previous work: void topButton() //Function to handle top button settings on line 1 { if (buttonStateTop && buttonStateTop != lastButtonStateTop) //read the top button state twice in a row and compare to the last button state { if (CounterTop < 9){ //if the counter is less than 9, CounterTop +=1; //increment by 1 ResetNeeded = 1; //change reset status to 1 to reset part } else CounterTop = 0;{ //if it's going to be 9 or more, make it 0 to start at the beginning again ResetNeeded = 1; //change reset status to 1 to reset part } menuRestartValueTop = EEPROM.read(menuRestartAddrTop); //Read restart menu number, which is number of last menu choice if (menuRestartValueTop != CounterTop) //Compare the EEPROM menu number to the current counter menuRestartValueTop = CounterTop; //if it's not the same, write the counter value to the EEPROM integer EEPROM.write(menuRestartAddrTop, menuRestartValueTop); //write the eeprom with the value But I haven't had time this last week to amalgamate all of this into something useful yet.
|
|
|
Post by rocinante on Dec 2, 2019 22:35:38 GMT -6
Scary, It's still a cool project. Just so you know.
|
|