Author Topic: 12-input BCD encoder circuit  (Read 1591 times)

0 Members and 1 Guest are viewing this topic.

Offline LomaxTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
  • Country: eu
  • Minimalist
12-input BCD encoder circuit
« on: January 05, 2020, 06:06:29 pm »
Hi all,

I'm repairing an old synthesizer which has a broken (as in clean off) 12-position C&K (or ITT, or Jeanrenaud) "RT-A" rotary BCD switch (RTA-P-3-ES12-M-25N-S). It turns out (of course) that these are basically impossible to get hold of - unless you want to order a minimum of 480pcs (which I don't). In contrast, physically identical 12-position single pole rotary switches (RTA-P-3-1S12-M-25N-S) are easy to find - indeed I have a couple lying around already. So I'm thinking a 16-input BCD encoder on a prototyping board could save the day, but it turns out that's not even a thing. Ok, fine, I can use two 8-input BCD encoders instead. But now I'm thinking... hmmm... there might be an easier way, e.g. "diode logic", or... something I'm not aware of. Yet. So, my fellow eevbloggers, I come here to ask: how would you deal with this conundrum?

903210-0

Basically:

000000000001 > 0000
000000000010 > 0001
000000000100 > 0010
000000001000 > 0011
000000010000 > 0100
000000100000 > 0101
000001000000 > 0110
000010000000 > 0111
000100000000 > 1000
001000000000 > 1001
010000000000 > 1010
100000000000 > 1011
« Last Edit: January 05, 2020, 06:34:02 pm by Lomax »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: 12-input BCD encoder circuit
« Reply #1 on: January 05, 2020, 06:09:48 pm »
As often these days, the probably lowest cost and lowest part count solution would be to use an ultra-cheap MCU for this.
 
The following users thanked this post: Lomax

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: 12-input BCD encoder circuit
« Reply #2 on: January 05, 2020, 06:26:40 pm »
At first glance, looks like four OR gates which could be implemented with diode logic.
 
The following users thanked this post: Lomax

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: 12-input BCD encoder circuit
« Reply #3 on: January 05, 2020, 07:31:01 pm »
I'd use an EEPROM with your inputs going to the address lines and your outputs coming from the data pins. Programming only sixteen addresses will be quicker than writing code for an MCU
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 
The following users thanked this post: Lomax

Offline LomaxTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
  • Country: eu
  • Minimalist
Re: 12-input BCD encoder circuit
« Reply #4 on: January 05, 2020, 10:10:24 pm »
At first glance, looks like four OR gates which could be implemented with diode logic.

That's what I'm thinking, though a quick sketch indicates I would need twenty of them. Not a problem; there's plenty of room - just a little fiddly. That said, the transposition selector (which is what the switch is for) apparently uses negative logic; there are no meaningful voltages present between common and any of the bit outputs. So the synth detects the switch position by pins being pulled low.
« Last Edit: January 06, 2020, 12:57:51 am by Lomax »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: 12-input BCD encoder circuit
« Reply #5 on: January 05, 2020, 10:20:05 pm »


That's what I'm thinking, though a quick sketch indicates I would need twenty of them. Not a problem; there's plenty of room - just a little fiddly.



Just for yucks, I created this LTSpice sim.  Yup...20 diodes.
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3464
  • Country: us
Re: 12-input BCD encoder circuit
« Reply #6 on: January 05, 2020, 10:26:45 pm »
If you'd like to do it with logic ICs, the 74HC148 datasheet shows how.

http://www.ti.com/lit/ds/symlink/sn74hc148.pdf
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1048
  • Country: ca
Re: 12-input BCD encoder circuit
« Reply #7 on: January 06, 2020, 12:24:02 am »
There are two optimizations to reduce the number of diodes needed:

1.) the single bit BCD codes don't need diodes as the contacts are already isolated.  This saves 4 diodes for BCD codes 1, 2, 4 & 8

2.) if the control board can safely interpret two diode forward voltage drops (ie. 1.2 V) there is a recursive solution where diodes from another code are re-used. eg., 7 is logically the same as 6 ored with 1 so input 7 will have a diode connected to input 6 and another diode to output 1.  Likewise input 11 will have a diode connected to input 10 and another diode to output 1.
« Last Edit: January 06, 2020, 12:26:52 am by duak »
 
The following users thanked this post: Lomax

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: 12-input BCD encoder circuit
« Reply #8 on: January 06, 2020, 01:06:41 pm »
If you'd like to do it with logic ICs, the 74HC148 datasheet shows how.

http://www.ti.com/lit/ds/symlink/sn74hc148.pdf

^ This, or the MC14532.

 

Offline LomaxTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
  • Country: eu
  • Minimalist
Re: 12-input BCD encoder circuit
« Reply #9 on: January 06, 2020, 01:54:06 pm »
This looks doable:

« Last Edit: January 06, 2020, 02:12:01 pm by Lomax »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf