0
\$\begingroup\$

I have made several "programmer" boards for different MCUs (ATTiny85, ESP8266-1, etc.). They are pretty simple - there is a socket for the MCU, socket for the programmer interface (Arduino as ISP, FTDI, etc., depending on the case), headers for the MCU pins broken out and the proper connections between the MCU and the programmer. All this slapped on a protoboard.
It basically is this:
enter image description here

Converted into this:
enter image description here

They work fine and are pretty useful and handy, but there is a little problem. If I have something more "sensitive" that is to be connected to the GPIO pins (like a servo for example) I cannot simply use the GPIO breakout headers. Because it would be always connected, even during programming. Which would mean it would "see" all the signals sent from the programmer to the MCU during programming, since it is connected to the same pin. In some cases it could lead to unwanted and even destructible effects.
For now in such situations, I just have the circuit being prototyped somewhere else (usually on a breadboard), I take the MCU, put it into the programmer (with nothing else connected to it), program the MCU, take it out, put it on the circuit, power on, test, power off, repeat. It works, but it is tedious. Plus, all these chip removals and insertions may eventually damage the chip legs if not done carefully.
I hope my explanation is clear enough.
So, I am looking for a way to "redirect" the MCU pins to either the programmer, the circuit being prototyped or floating (as if the chip was removed).
For that I would need a device which acts like (or is) a multiple pole triple throw switch. So when I want to program the chip I flick the switch to "programming" position, program it, then switch to "neutral" to effectively power down the MCU and disconnect it from everywhere, then flick to "operational" mode where its pins are connected to the target circuit.
I tried to find such mechanical switches, but with no success. The ones that were remotely close to what I want were enormous in size and quite expensive.
Then I thought of doing it with multiple relays, controlled by a single SP3T switch. It could work, but would require quite a lot of relays and again - the size and cost of the "device" would be too big.
I looked into analogue (or bilateral) switch ICs and they look like almost what I want. The problems I have with them are two - they are double throw, not triple throw and they are not "ideal" switches - they have limitations for the voltage and current passing through them, and they add resistance and eventually crosstalk. I guess I could use 2 8PDT analog switches as one 8P3T switch and pretend they act like normal switches - after all, they will be switching low voltage and current GPIO pins, plus MCU's VCC and GND but it probably won't be a problem.
My question is - is there a better way? Like a device that is small, cheap and does exactly what I want - acts as or is a multi-pole-triple-throw switch? Either mechanical or electronic.

\$\endgroup\$
1
\$\begingroup\$

enter image description here

It seems to me that one 4P3T (4-pole, triple-throw) switch would get you half-way to your objective. Two side by side would give you eight ways. You could "gang" the sliders so they both move at once but since this will most likely be operated by you only there's probably no need.

\$\endgroup\$
  • \$\begingroup\$ Thanks for digging it out. Unfortunately, these things are huge, not suitable for breadboard/protoboard and, the ones I can actually buy (being in eastern europe) cost around 7.50 EUR each, which is more than what the programmer itself costs (less than 5 EUR), so it kind of doesn't make sense to use them. \$\endgroup\$ – Mishony Mar 13 '16 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.