Transfering 6 switched states across 2 (or 3) connections...

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
I'm afraid I don't have any circuit diagrams, sorry about that.

I have a board game that I am trying to "electrify", and there is one part I am having difficulty working out.

I need to transfer the state of several switched to a "mobile" display panel. This panel is the players piece, and to make it easy for the player to move and as robust as possible I am planning to use a mono or stereo jack plug to complete the circuit.

The problem is the number of switched states I need to transfer.

There are 6 switches which are either on or off. On the playing piece there are 6 lights/LED's corresponding to the 6 switches. The idea is that various patterns are displayed on the playing piece depending on the the position of the switches.

So how do I condense the 6 switch states down 2 or 3 wires and then split them back out again?

I am presuming it is going to be some form IC, but this is an area I have no experience in.
 

MikeML

Joined Oct 2, 2009
5,444
First, there is "encoding". Six switches have 2^6= 64 possible states. Direct encoding implies 7 wires; six for the signals, and the seventh for the common.

Then there is transmitting the states to remote location. I can think of some ways...

Parallel-in, serial-out shift register. Wires: Load, Shift, Data, common.

Arduino: Parallel read the switches, send the state of the switches as an ascii character using the built-in RS232 hardware. Wires: data, common.

Digital-to-analog: use a DAC to convert six bits to 64 different voltage levels. Wires: analog, common.
 
Last edited:

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
Hmmm.

If I'm trading that correctly, the Arduino and DAC solutions seen the best as they only need 2 wires.

I could use the shift register, but I don't like soldering 4 pole mini jacks.

Of the Arduino and the DAC, of the DAC is a single chip solution I think that would be my preferred method due to costs (4 pieces would equal 8 Arduino's).

Can you recommend an IC?
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
Interesting - cheaper than I thought!

I have very little experience with those, I was given a kit a while back (EDTracker) which I successfully built, but that needed programming.

Does this need programming? Or is it plug and play?

And would the DAC be just plug and play?
 

MrSoftware

Joined Oct 29, 2013
2,188
If you're going as high level as an arduino, don't bother with voltage levels and dac/adc, just send serial data. Either on schedule, or when you detect a switch change, send a sync word followed by one data byte, each bit can represent the state of one LED. 1 is on, 0 is off. You can get fancy with encoding and checksums if you want to ensure data integrity. Actually I would be surprised if the arduino serial library wouldn't do this for you automatically. Heck, with the arduino you could also use SPI or i2c to send the data, lots of options, all will work.
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
Thank you for your advice.

The Arduino is looking more promising, although I will have to work out how to program it. The last one I built had specialist software so it was plug it into the PC and run a programming and done.

If I wanted to experiment with the DAC/ADC are there any pre packaged IC's that would meet my needs.
 

MrSoftware

Joined Oct 29, 2013
2,188
In my limited experience, I recommend against trying to use voltage levels for this. i think binary data is the way to go. My guess is there is a hardware only solution for sending the data over as serial, or something similar, without coding. Maybe one of the more hardware experienced guys can chime in with suggestions.
 

crutschow

Joined Mar 14, 2008
34,285
The Arduino with a serial digital interface would seem to be the best solution.
Time to enter the world of programming.
For your application, the program should be minimal, especially if you use the standard SPI or I2C interfaces.
 

ian field

Joined Oct 27, 2012
6,536
I'm afraid I don't have any circuit diagrams, sorry about that.

I have a board game that I am trying to "electrify", and there is one part I am having difficulty working out.

I need to transfer the state of several switched to a "mobile" display panel. This panel is the players piece, and to make it easy for the player to move and as robust as possible I am planning to use a mono or stereo jack plug to complete the circuit.

The problem is the number of switched states I need to transfer.

There are 6 switches which are either on or off. On the playing piece there are 6 lights/LED's corresponding to the 6 switches. The idea is that various patterns are displayed on the playing piece depending on the the position of the switches.

So how do I condense the 6 switch states down 2 or 3 wires and then split them back out again?

I am presuming it is going to be some form IC, but this is an area I have no experience in.
An old trick was to use AC along 2 wires with a changeover switch and 2 diodes on the other end - with a centre off switch that can give you 3 possible states; off, + half cycles and - half cycles. A make before break switch with a centre position would replace the off condition with both half cycles.
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
If I am understanding you correctly, I think you have mis-understood me.

I need to transfer the state of 6 switches to their corresponding lamps, but only have 2-3 wires to do this with, not the 7 I would have with a direct connection.

If I am mis-understanding you, could you elaborate a bit?

Many thanks.
 

ian field

Joined Oct 27, 2012
6,536
If I am understanding you correctly, I think you have mis-understood me.

I need to transfer the state of 6 switches to their corresponding lamps, but only have 2-3 wires to do this with, not the 7 I would have with a direct connection.

If I am mis-understanding you, could you elaborate a bit?

Many thanks.
With AC on 2 wires - you can decode to 2 lamps with 2 more diodes.
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
I've done some further random research...

The "Arduino" way looks good, but it is still a little large for my liking... But I have found PIC's!

I'll still need to learn to program, but the smaller footprint looks like it will be perfect.
 

MrSoftware

Joined Oct 29, 2013
2,188
The Atmel chips used in the arduino can be placed onto a PCB smaller than the Arduino. The actual chip that does the work is tiny. There are other small chips too, the ATTiny, etc.. It depends on how dirty you want to get your hands. ;)
 

paulktreg

Joined Jun 2, 2008
833
Why make things so complicated when some 8 core cable and 8 pin DIN plug and sockets are so inexpensive?

If you wish to learn a little more then fair enough.
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
Because I want the piece to be able to rotate in the socket and just be blindly chucked in.

I did consider the simpler approach, but it requires too much faffing with orientating the plug and socket.
 

Thread Starter

Jonathan David Bond

Joined Nov 10, 2015
25
It's for a board game where the piece will be picked up by different people in different directions and moved to another space. For ease the piece just needs to "drop in". The only way I can see to do that is with a stereo jack.

All other connectors are either "keyed" or rotating them would change the outputs.

The only other way I see it could be done is with concentric circles in the board and sprung contacts in the base of the piece - but getting a good contact there would be tricky.
 
Top