Author Topic: logic cmos switching thingys help!  (Read 2312 times)

0 Members and 1 Guest are viewing this topic.

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
logic cmos switching thingys help!
« on: March 17, 2018, 12:31:14 pm »
Hi , I currently have managed to get the following circuit working well


I 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




 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: logic cmos switching thingys help!
« Reply #1 on: March 17, 2018, 01:07:12 pm »
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
 

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #2 on: March 17, 2018, 01:32:31 pm »
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 hack
below is 1 of 3 identical layouts i used

I appreciate your quick response
I 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

 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: logic cmos switching thingys help!
« Reply #3 on: March 17, 2018, 02:32:07 pm »
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 mouser https://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 amouser https://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   8) ?

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 

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: logic cmos switching thingys help!
« Reply #4 on: March 17, 2018, 03:44:30 pm »
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.
 

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #5 on: March 18, 2018, 05:20:13 am »
like this?   i feel like Im flying blind!

ive been looking at data sheets and other layouts online using either chips
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: logic cmos switching thingys help!
« Reply #6 on: March 18, 2018, 12:08:23 pm »
like this?   i feel like Im flying blind!

ive been looking at data sheets and other layouts online using either chips


Wrong chip. Cd40147, not cd4017.
 

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #7 on: March 18, 2018, 12:38:47 pm »
Quote
- The input block, 10 inputs to BCD, based on the CD40147 (datasheet here: http://www.ti.com/lit/ds/symlink/cd40147b.pdf, 50c at mouser https://www.mouser.de/Semiconductors/Logic-ICs/Encoders-Decoders-Multiplexers-Demultiplexers/_/N-4s67o?P=1z0z44d&Keyword=CD40147B&FS=True),


i just read it again  i left out the 4 when i named the part but the part in schematic is cd40147  (16 pin)
« Last Edit: March 18, 2018, 12:41:23 pm by njkmonty »
 
The following users thanked this post: Wimberleytech

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: logic cmos switching thingys help!
« Reply #8 on: March 18, 2018, 08:33:27 pm »
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
 
The following users thanked this post: Wimberleytech

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #9 on: March 18, 2018, 09:58:10 pm »
can that have more than 3 switches?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: logic cmos switching thingys help!
« Reply #10 on: March 18, 2018, 10:18:06 pm »
can that have more than 3 switches?
Yes. 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.
« Last Edit: March 18, 2018, 10:34:06 pm by Hero999 »
 

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #11 on: March 18, 2018, 10:53:03 pm »
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!
 

Offline njkmontyTopic starter

  • Contributor
  • Posts: 43
  • Country: au
Re: logic cmos switching thingys help!
« Reply #12 on: April 02, 2018, 12:43:30 pm »
i stumbled on Arduino,  looks like i can do something with that platform
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf