Hi, this is my first foray into the world of Arduino and electronics bar basic soldering / desoldering skills and swapping out capacitors in a guitar effects pedal, so I'm trying to get my head around which components to buy for the project I'm working on. I'll start with a broad sketch of what the project is trying to achieve to provide some context for the circuit design, then I'll ask my questions, which all relate to what I put as the topic. I apologise in advance if I'm misusing terms, please do correct me.
So the project is a programmable guitar effects switching system. It will have two main sections: the control module to choose which effects get turned on by which foot switches (and the foot switches themselves- a bit like this); and the switching modules consisting of relays set up to do true bypass (here is an explanation of true bypass if you're not a guitar gear nerd). I want as many of these true bypass switches as I can because I have a stupid amount of effects. I want to make it myself rather than buying the G2 primarily because it sounds fun to me, and also because I have no intention of gigging so can't justify spending over $1000 on something that robust.
First I want to work out the switching module, as for me the electronics seem the hardest part. On a breadboard I have built this relay driving circuit (third graphic down) - note the extra capacitors to slow the transistor switching down as I'll come back to it. I've successfully got my Arduino Mega to switch it by setting a digital pin high or low sending to the base of the transistor. So far so good, and if I only wanted a few loops and to use the Mega in the final version this would probably be fine, I would just repeat this circuit. But I want to make this as scalable as possible, and preferably use a Nano or similar in the final version.
It seems using shift registers such as the 74HC595 would be the way to go, but before I get too carried away and buy a whole bunch I thought it wise to stop and really plan this circuit. I've attached a rough schematic of what I have so far (please excuse the erroneous symbols, I drew it with the first schematic tool I could find on SourceForge and only spent fifteen minutes on it using the closest symbols I could find). Currently I'm planning on using the 74HC595 chip for the shift register, and the 2N3904 for the transistor. I'm still deciding on the relay, but candidates from the following telecom/small signal relay series:
- Altronics S4130B 12VDC DPDT Relay
- Altronics S4130C 12VDC DPDT Relay
- NEC E series
- Panasonic TQ Series
- Takamisawa A Series
From my limited understanding of electronics, it seems like the main limit on the number of relays I can control from an Arduino is the current draw for all the components. Now, I will power the relays and shift registers with a separate power supply from the Arduino so I don't fry that part of the circuit, but most power supplies seem to have about 1A available. Also the pins from the 74HC595 only allow for 6mA, so the transistors need to be able to switch with something less than that.
So, my questions:
- Other factors aside (such as price and quality), will the best choice of relay be the one with the highest coil resistance to switching voltage ratio, or have I completely misunderstood Ohm's Law?
- Is the 2N3904 a good choice here, particularly for minimising current draw rather than because I have 100 of the things, or does someone have a better recommendation? I know there are ICs available with internal Darlington arrangements, but would these allow for the slowing down of the switching via capacitors as in my current circuit, or some other arrangement?
- Is the 74HC595 the best chip here?
- How many of these shift registers can I sensibly chain together so the operate off the same Arduino pins? Is there a point at which the communication between the Arduino and the shift registers at the end of a long chain slows down?
- Am I missing some other important factor that might limit how many relays I'm able to control from the one micro controller?
I may not want to have the maximum number of relays in the end, but I'd like to be able to work out what that is before I get to far into planning. If you need clarification or more details for any of this in order to help me, please ask. However I only have an hour or two a day when I will get a chance to reply.