Jump to content
 

Diode matrix array


eddieprice
 Share

Recommended Posts

I want to build a 32 bit to 5 bit encoder using a diode matrix.  I am happy with the circuit for the diode matrix - there are 32 rows with 5 columns with diodes placed at the appropriate intersections to generate a 5 bit BCD code.  The code for each of the 32 rows is obtained by closing a switch to +5V.  My question relates to a need to note which switches have been operated to set-up the required route for the turnouts and feeds for a z gauge model railway. I would like to place an LED against each switch which would illuminate and stay illuminated as each switch is operated - the switch is operated once and then returned to its OFF position.  I need some sort of latch.  I thought of a D-type such as the SN74HC373 octal latch.  I have tried various connections but cannot achieve the effect that I want. Is a D-type the right sort of thing or is there something else?

 

Eddie Price

Link to post
Share on other sites

You don't really want 'D' Type flip-flops for this.

A Set/Reset latch type such as the CD4043BE would probably be better as you can then control when the previous number is cleared by commoning the Reset pins together.

The 4043 has four such latches per package. You could instead form the latches from standard gates, of course, but that would entail considerably more wiring up.

Do you actually need a BCD output? Wouldn't the resulting BCD value tell you which switch was pressed anyway?

 

An alternative to the diode matrix would be to use a set of cascaded priority encoders such as the 74LS348. These would give a binary output rather than BCD.

See http://www.ti.com/lit/ds/symlink/sn74ls348.pdf for an application diagram showing how to accommodate up to 64 inputs.

Link to post
Share on other sites

Ok if the switch illuminates an LED as it is closed and the LED then stays illuminated, what switches the illumination off when a new route is set?   Another switch?

My since abandoned over complicated layout needed reset switches to switch off the latching circuit for my relays.  It needed a sequencer to ensure trains had cleared a route before it was reset and that defeated me and it sounds like your system migh meet a similar fate 

 

What stops you resetting the route when a train is crossing the pointwork. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...