logic  cmos switching thingys help! - Page 1
Forum section: electronics / beginners

author: njkmonty
author_rank: Contributor
timestamp: March 17, 2018, 12:31:14 pm
content: Hi , I currently have managed to get the following circuit working wellI was wondering if anyone new of how (without arduino and microprocessors) to get more channels for switching?i built 3 of these and wired them up together(plus extra diodes) however they began resetting etc when lights etc turned on.the above circuit works how i want it , but i wasnt sure if there was another way?ie using a diiferent ics? 74hc series etc? octal chip? Im using relays btw

author: DC1MC
author_rank: Super Contributor
timestamp: March 17, 2018, 01:07:12 pm
content: Hi, let's take them in order:- The latch resets when there are electrical perturbations around:This could be caused by 2 sources of of noise: power supply is being noisy so you need to put a low ESR capacitor as close as possible on the chips power supply pins and make sure that the ground plane/wires are separate for logic and the relays or other hi-current paths you may have around. The second source is induction in switch wires, you've used 47K pullup resistors, that gives you a pretty high impedance, I would strongly reduce that resistors to something like 2k2 and put some little ferrite beads in series with the switches wires, as close as possible to the inputs, coupled with a small (1nF) capacitor to ground. also if possible use shielded or twisted pairs to the switches to minimize interference.- Increasing the number of channels, just put an 74C139 and a MC14028 together with your latch in between them and (left as an exercise) devise a nice 4 diodes/4?aps/4resistors output change detector for latch loading, and voila, up to 10 switches. I did this stuff in something like 40yrs ago on the communistic equivalent of boy scouts and it was so fun, this technical clubs for "gifted" kids were the best part of the miserable communistic regime.Good luck (and don't be afraid to ask questions),DC1MC

author: njkmonty
author_rank: Contributor
timestamp: March 17, 2018, 01:32:31 pm
content: this is how i stumbled across getting 9 switches to work (combining 3 separate boards and a few diodes and some dpdt momentary switches to (turn off the other 2 boards)but when fluoro lights came on in my shed etc it caused problems and I just assumed it was due to my bodgy hackbelow is 1 of 3 identical layouts i usedI appreciate your quick responseI wouldnt know where to start with your 74C139 and a MC14028 suggestion!ive got plenty of caps and resistors not sure if i have low esr ones,any particular value?not sure if i have some ferite beads lying around

author: DC1MC
author_rank: Super Contributor
timestamp: March 17, 2018, 02:32:07 pm
content: Well, actually the 3 chip design I proposed you it's very simple, much simpler and easy to understand IMO.Let's reason a bit on what you're trying to accomplish: I think you want to have something like 10 latched relays that should be active only one at a time and it should keep the state until a new one is selected. Also, you probably want to eject invalid combinations, like two or more switches being pressed simultaneously.OK, not let's look at my proposal and split it in parts:- The input block, 10 inputs to BCD, based on the CD40147 (datasheet here:http://www.ti.com/lit/ds/symlink/cd40147b.pdf,50c at mouserhttps://www.mouser.de/Semiconductors/Logic-ICs/Encoders-Decoders-Multiplexers-Demultiplexers/_/N-4s67o?P=1z0z44d&Keyword=CD40147B&FS=True), this chip has, well, 9 inputs (0 is default on if none of the others are pressed), it only needs the pull-ups at the inputs and it produces nicely 4 BCD outputs, all nice and dandy but if you lift your finger from the button, the value is gone, so we have to store it. This brings us to the...- Storage block and hey, let's make it simpler and use a latching decoder, MC14514, (https://www.onsemi.com/pub/Collateral/MC14514B-D.PDF,1,32EUR amouserhttps://www.mouser.de/ProductDetail/ON-Semiconductor/MC14514BDWR2G) this guy will store AND decode the whole 16 bits, it just needs to be toled when his inputs are stable to memorize them, ain't that cool?So we have to connect the outputs of the first one with the inputs of the second one and we are (almost) done. What is left is to look on the 4 bits and detect a state change and generate a load pulse for the MC14514B, this can be simply done, but if I'll tell you this as well, it will take all the fun from the experimentation.For the decoupling capacitors, solder in parallel a 10uF elco and 0.1 to 0.047uF ceramic close to the pins of each chip, this should be enough protection if the power supply is not absolute crap or the interference doesn't come via inputs (remember to lower a bit the pull-up values).Cheers,DC1MC

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 17, 2018, 03:44:30 pm
content: DC1MC idea is clever and should work. My idea uses a transparent latch and some inverters for delay and has some similarities but using an 8-bit register, only gets you 8 inputs and not 10. But, this idea may trigger yet another idea.This is a Logisim schematic with buttons on the left side (0 or 1) and LEDs on the right side.

author: njkmonty
author_rank: Contributor
timestamp: March 18, 2018, 05:20:13 am
content: like this? i feel like Im flying blind!ive been looking at data sheets and other layouts online using either chips

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 18, 2018, 12:08:23 pm
content: Quote from: njkmonty on March 18, 2018, 05:20:13 amWrong chip. Cd40147, not cd4017.

author: njkmonty
author_rank: Contributor
timestamp: March 18, 2018, 12:38:47 pm
content: Quotei just read it again i left out the 4 when i named the part but the part in schematic is cd40147 (16 pin)

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2018, 08:33:27 pm
content: This the the simplist way I know of. Obviously you'll need to add MOSFETs to drive any decent load.https://www.eevblog.com/forum/projects/discrete-logic-design-vs-a-super-cheap-micro/msg624939/#msg624939

author: njkmonty
author_rank: Contributor
timestamp: March 18, 2018, 09:58:10 pm
content: can that have more than 3 switches?

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2018, 10:18:06 pm
content: Quote from: njkmonty on March 18, 2018, 09:58:10 pmYes. You'd need gates with more inputs: try NOT gates and diode ORs, if you can't get gate ICs with enough inputs. I admit, it might not be practical for your application. I remembered the thread and thought it was cool, how simple it could be.

author: njkmonty
author_rank: Contributor
timestamp: March 18, 2018, 10:53:03 pm
content: I appreciate your help,, i wouldn't know which chips to use or even how to implement!I know I need to do as much for myself as possible!

author: njkmonty
author_rank: Contributor
timestamp: April 02, 2018, 12:43:30 pm
content: i stumbled on Arduino, looks like i can do something with that platform