How to automate DIP switches - Page 1
Forum section: electronics / beginners

author: rthorntn
author_rank: Frequent Contributor
timestamp: February 11, 2021, 02:50:17 am
content: Hi,So a board I have has 5 DIP switches, the switches are used to select games, is there a way to use just an MCU GPIO to replace the switches, if so, how does it work, or would it need to be an MCU and some sort of SSR relay?Thanks.Richard

author: bob91343
author_rank: Super Contributor
timestamp: February 11, 2021, 03:29:51 am
content: Without seeing the circuit it's hard to say. You can brute force it by putting in relay contacts for all the switches and selecting from a panel switch. Otherwise, no clue.

author: pqass
author_rank: Super Contributor
timestamp: February 11, 2021, 04:43:18 am
content: If the DIP switches are (typically) SPST and one pin on each of them is grounded, then you should be able to use a NPN driver like a ULN2003 or an open-drain inverter like 74HC05 from MCU to target board. Vcc of both the MCU and target board can be the same or different; 3.3V or 5V.CORRECTION: both 74HC05 and ULN2003 have reverse diodes on their outputs. So in the case of the 74HC05 the Vcc of MCU must be greater than or equal to that of the target board. In the case of the ULN2003, leave the COM pin unconnected.ALSO, you don't really need an MCU but should still use a buffer chip (like 74HC05 or ULN2003) close to the board.That way you don't invite noise via the long-ish lines between some front-panel switch and board.

author: srb1954
author_rank: Super Contributor
timestamp: February 11, 2021, 04:44:54 am
content: Quote from: rthorntn on February 11, 2021, 02:50:17 amYou could replace 4 of the DIP switches with a single hexadecimal rotary switch which would make it much easier to select the first 16 games. You would need to retain one of the DIP switches to select the second bank of 16 games.

author: rthorntn
author_rank: Frequent Contributor
timestamp: February 11, 2021, 05:03:20 am
content: Thanks everyone, I'm trying to find out the circuit.Somebody has hacked together a switcher with an Alps SKHCBFA010 Tactile Switch and a Hartmann PT65503 Rotary Dip.

author: rthorntn
author_rank: Frequent Contributor
timestamp: February 11, 2021, 06:14:55 am
content: This is what I assume is an MCU driven selector, I'm guessing its a 32-pin ATMEGA chip under the OLED...

author: rthorntn
author_rank: Frequent Contributor
timestamp: February 11, 2021, 07:50:11 am
content: This is from the game board designer:"The DIP circuit is dead simple, DIP switches simply toggle signals high or low. Each combination corresponds to one game. The selector header has 2x5 pins, upper ones are all +5V, bottom ones go to the DIP switches. If you leave everything unconnected all DIPs are 0. Then bridging one bottom pin with one upper pin changes the state to 1."

author: ledtester
author_rank: Super Contributor
timestamp: February 11, 2021, 08:24:40 am
content: Found this pic of the board:So, yeah, it appears the pins of the 2x5 header nearest the edge are directly connected to the atmega.Update:Another pic of the board:https://www.arcade-projects.com/threads/sega-system-16-multi-oled-based-game-selector.12735/page-7#post-223637