Top Level Design help for a 'switching array'

Thread Starter


Joined Dec 6, 2021

I was hoping to get some help/advice on a personal project I'm working on that requires quite a bit more electronic hardware involvement than I'm used to. I can manage code, computers, microcontrollers etc fine but I'm not very well educated in general electronic hardware at all besides some basic theory from Mech Eng at uni some years back. So it would be good to get advice from someone in the field or with good knowledge of the subject.

The scenario I have is: A series of plates in contact with each-other that each need to be provided with current in a certain direction. The current is intended to be in the 1A-5A range (it will be a fixed current once design is finalised). Assume there will be between 100-500 plates, the exact amount will depend on how scalable the potential solutions are. For the purposes of the electronics discussion, picture a copper rod/bar sliced into a couple hundred plates but still held in contact. Each of these elements can be connected to up to two wires each without too much trouble. The idea is then that a microcontroller/custom circuit board will control the current flow through these elements.

From the software side, a program would determine which elements need current to be flowing in direction A and which need it in direction B (the reverse). This would then be broken into which elements need to be connected to pos and which to neg. i.e elements 1-4 need current in direction A, so element 1 would connect to positive and element 4 connect to negative. If elements 5-7 needed it in Dir B, then element 5 would be connected to neg and element 7 connected to pos. Hopefully that all makes sense.

From this then I've come up with the following basic solution:
Basically each element is connected to the positive rail and negative rail, each by a digital switch - an N mosfet seems the best option from quick research. These digital switches would then be controlled by general control board like an arduino/pi etc. (the final solution would ideally be one combined PCB but this will work for a prototype). The issue here is obviously that I need nElements*2 switches and this nElements*2 output pins on the control board.
The next refinement idea I had would be to only check/change 5 or so elements at a time and to 'scan' through the full array. I doubt this would cause issues from a timing perspective, as long as a full scan could be done in say 5ms or so. But this is reaching the full extent of my knowledge of how to implement this. I was trying to read up on timing blocks but there seems to be a billion different types. I figured it would be best to have a timing block with an output for each number i.e at t=1 the t=1 output is live and thus the circuit is connected to say elements 1,6,11,16 and at time 2 the t=2 output is live and thus elements 2,7,12,17 are accessible. and so on. But my search seemed to turn up counters that varied output voltage, is there a common off-shelf chip that I'm describing here and if so, what's it called?

In short:
Is there a better way to arrange the 'primary' pos/neg circuit that would reduce transistor count or simplify the circuit in general?
Does the scanning solution seem the best option for up to 500 elements or is there another, better way?
If the scanning option is the best way, I'd really like some advice on the scanning circuit set up in regards to the counter etc, or if there's a better way to do it than with a 'counter separated circuit'?

Looking at this while I'm about to post I'm now realising there's also an issue with how it's set up in my quick sketch that if multiple 'current paths' were open then it's in parallel so the current would drop if I'm looking at it right with hindsight now... So I need to re-arrange it such that is would run in series and 'loop around' which will add some additional complexity... any ideas there would be great :)
Edit : I think it would work with minimal changes if each N channel Mosfet was instead a 'tri-directional digital switch' instead of bi-directional - such that current normally flows between A-B, but if current is applied to the gate, then it follows path A-C. I'm sure this must be a common off-shelf component that exists, could someone tell me what I'm describing here?

Any help would be massively appreciated, I'm a bit out of my depth here! :)
Last edited:


Joined Apr 11, 2010
My first impression is that a microprocessor is not going to have ~500 GPIO pins. To control/read that many pins, one approach is to daisy-chain several n-bit parallel shift registers. 64 74595 ICs could control 512 connections with 2 pins. You could also assign 3 pins, and control 2 sets of 256 pins simultaneously (both options control 522 pins total; ignore unused pins). Or 4 pins could control 3 sets of 170 pins (510 total). And so on… The reason for using multiple pins is to reduce the amount of time to shift out/in the parallel data bits serially from one output/input pin.

You would need more than 1,000 pins total. One for each side (+ or -) of each plate. And while N channel BJTs or MOSFETs would be appropriate for switching the ground side, you should use P channel BJTs or MOSFETs to switch the positive side. You might avoid needing 2xN individual transistors by multiplexing the plates.