• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching and display fun and games, and inputs,

    Blog entry posted in 'Test equipment', November 29, 2012.

    I finally worked out how to do the switching for the functions. Originally, I'd realised that some functions needed to latch a relay, and other functions would just tell the microcontoller to do something. So (with some help on this forum) I found the 74HC148 priority encoder to turn my button presses into binary, and also found the 74HC259 to latch output lines to the relays as required. This way each button press would produce a binary code to tell the microcontroller what to do, and also switch the circuit.

    I spend far too many hours trying to work out how to get the '148 to make the '259 latch correctly, ignoring transient states, especially when I believed the reset and latch enable pins on the '259 needed to be toggled separately. As it is they can be tied together, with a slight risk of a transient bogus output appearing. The trouble is the '148 has EO and GS outputs, which produce outputs when an input is activated, but likely this appears before the address is output. Connecting them directly to the '259 therefore would not work. All this is on paper, since I don't have the means to test anything at the moment because of moving house and stuff.

    Anyway, I eventually found my way to one-shot multivibrators. Putting one of these in the circuit looks as though it should solve the problem.

    In order to obtain the non-latching function I've put some diodes from the relevant inputs to disable the one-shot circuit when those buttons are pressed.

    A second '148 is used to provide 8 non-latching inputs, which don't need any diodes. This also provides the AC/DC function, which I realised is best implemented by toggling a microcontroller pin. I was going to have separate ACV, ACA, DCV, DCA, but this way is simpler. No need for diodes or multivibrators on this one since there is no '259.

    I did try to come up with a way to make the DC and AC lines latch directly, but they need to have their own latching circuit, so using the micro was simpler. I've come up with a toggle circuit, but I'm not happy with it - maybe a monostable is the thing to use.

    The two '148's are connected via some nand gates to give a 4 bit interface to the micro.

    Looking at the display control now, I spent far too long barking up the wrong tree with that, too. Having looked at schemes for latching, decoding and multiplexing using various chips, I revisited the advice someone gave me on these forums to use a MAX7219. It's a nifty device that takes a serial input, latches in the instructions, and displays whatever you want. It gives you bdc decoding with additional blank, -, H,E,L,P characters, or you can address each segment directly. Solves my problem neatly, and it's an 8 digit device, so I can use the eighth digit to drive status led's instead of segments/dp.

    Been looking at input circuits again too. Discovered op-amps with differential outputs, so one of those will make a nice single to differential converter for me. However, it then needs a buffer on the input to get back the high impedance. Also been having a look at input dividing resistors which have a 10M at one end on it's own, then a chain of 1.1111M, 101.01K, 10.01K and 1.001K. They are not exact ratio's, but the error is very small, and I wonder if it's done that way on purpose to enable standard values to be used elsewhere.

    Lots of stuff still explore.

    Comments
 

EE World Online Articles

Loading

 
Top