Author Topic: one push button to shift between 8 outputs  (Read 1677 times)

0 Members and 1 Guest are viewing this topic.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
one push button to shift between 8 outputs
« on: November 03, 2022, 11:46:51 pm »
Hello

I want to have only one push button that can deliver a high pulse to an IC and this IC has 4 or 8 output bits, all of them are GND except for one output which is 3.3v (or 5v...etc).

Then with the press of push button, this 1 is shifted. Like from output 1 to output 2, making output 1 is ground and output 2 is high, then from 2 to 3, etc... once reaching output 8 it returns to output 1.

I think shift registers can do this but I couldn't figure out how to make all that controllable with just one push button without the need for any clock or micro controller.


for your help please... I need this to be ultra cheap xD

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #1 on: November 03, 2022, 11:49:23 pm »
push button -> debouncer -> MC14017/CD4017/74HC4017.
Done.
« Last Edit: November 03, 2022, 11:52:48 pm by Benta »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #2 on: November 04, 2022, 12:01:36 am »
push button -> debouncer -> MC14017/CD4017/74HC4017.
Done.

hello

seems nice but i need smt ic with only 8 outputs and another one with only 4 outputs. also without the need to do any reset once it reaches final output, it has to return to start by itself.

can this be used for 4-bits: https://www.digikey.com/en/products/detail/onsemi/MC74HC160ADR2G/2512496

this one too: https://www.digikey.com/en/products/detail/texas-instruments/CD74HC192PWR/475916


I found them cheap on digikey.

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: gb
Re: one push button to shift between 8 outputs
« Reply #3 on: November 04, 2022, 12:20:28 am »
Quote
can this be used:
no,that counts in binary ,the 4017 mentioned above will do exactly what you want,you can set were it resets by connecting the reset pin to out 5 for a 4 count or 9 for an 8 count
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #4 on: November 04, 2022, 12:25:12 am »
^ what he said.
Outputs 4 or 8 to the reset input and you have 1...4 or 1...8 (or rather 0...3 and 0...7. Same thing).
Easy.
« Last Edit: November 04, 2022, 12:28:15 am by Benta »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #5 on: November 04, 2022, 12:29:13 am »
Quote
can this be used:
no,that counts in binary ,the 4017 mentioned above will do exactly what you want,you can set were it resets by connecting the reset pin to out 5 for a 4 count or 9 for an 8 count

I have updated the last post which I removed the old part and added newer ones, kindly check.

I noticed your suggested part is about 0.54$ @ quantity of 100, which is not bad. from Rochester:

https://www.rocelec.com/part/ONSMC14017BDR2
https://www.rocelec.com/part/ONSMC14017BF

seems a lot cheaper, is it the same part though?

so connecting reset pin to out5 pin will make it count 1 2 3 4 then return to 1?

also, when i goes from 1 to 2, does it put 1 to ground and 2 to high or just leave 1 to high??

do you know any cheaper part?

thanks a lot my friend

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: gb
Re: one push button to shift between 8 outputs
« Reply #6 on: November 04, 2022, 12:35:35 am »
Quote
so connecting reset pin to out5 pin will make it count 1 2 3 4 then return to 1?
yep
Quote
also, when i goes from 1 to 2, does it put 1 to ground and 2 to high or just leave 1 to high
all the outputs will be low when 2 is high
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #7 on: November 04, 2022, 12:37:33 am »
74HC4017 from TI or Nexperia might be cheaper, but these are not normal times. I don't quite understand why you go to Rochester, these are not obsolete parts, but in full production.
Plenty of sources for them.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #8 on: November 04, 2022, 12:42:35 am »
74HC4017 from TI or Nexperia might be cheaper, but these are not normal times. I don't quite understand why you go to Rochester, these are not obsolete parts, but in full production.
Plenty of sources for them.

https://www.digikey.com/en/products/base-product/texas-instruments/296/74HC4017/13404

seems too many as you said. CD means CMOS right? so all can be used with 3.3v?

I was just seeing which supplier has the cheapest offer, that is all. Not necessary to have it from Rochester... maybe LCSC will have better price if it has it but since it is in Digikey I think I will be ok.

EDIT:

LCSC Chinese clone (0.09$ @ 100 qty): https://lcsc.com/product-detail/Counters-Dividers_HGSEMI-CD4017BM-TR_C356694.html
LCSC TI part (0.19$ @ 100 qty): https://lcsc.com/product-detail/Counters-Dividers_Texas-Instruments-CD4017BM96_C11349.html

interesting..

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #9 on: November 04, 2022, 12:46:22 am »
CD means nothing. Just read the data sheets, OK? And for 3.3 V, stick with 74HC4017.

 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #10 on: November 04, 2022, 12:55:47 am »
CD means nothing. Just read the data sheets, OK? And for 3.3 V, stick with 74HC4017.

I found this on Digikey, seems cheapest: https://www.digikey.com/en/products/detail/texas-instruments/CD74HC4017M96/475935

since it is HC type, it can be powered from 3.3v?

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
 
The following users thanked this post: tooki

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #12 on: November 04, 2022, 09:12:30 pm »
https://www.ti.com/lit/ds/symlink/cd74hc4017.pdf
https://assets.nexperia.com/documents/data-sheet/74HC_HCT4017.pdf
Read and understand. We help, but do not spoon feed.

Ok, I saw 74HC4017 being CMOS level which I can still power it up with 5v. I found in my design that not much stuff need 3.3v anyway so I will try to eliminate it all together if I could. and since CMOS level accepts lower voltages I think "HC" can still work with 3.3v... but as I said, feeding it 5v is easier and will help me remove 3.3v rail if I can.

thanks

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #13 on: November 04, 2022, 09:20:18 pm »
READ THE DATA SHEETS!!!! That's why I linked to them.
Operating supply voltage is 2...6 V and the device parameters are specified at 2 V, 4.5 V and 6 V. Interpolate between 2 and 4.5 V and you'll get the 3.3 V figures.

Over and out!
« Last Edit: November 04, 2022, 09:25:48 pm by Benta »
 

Offline inse

  • Frequent Contributor
  • **
  • Posts: 786
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #14 on: November 04, 2022, 09:37:58 pm »
Did anyone already propose an Arduino?
😜
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #15 on: November 04, 2022, 09:51:43 pm »
Did anyone already propose an Arduino?
😜
Best comment ever!
 :-DD :-DD
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #16 on: November 04, 2022, 10:49:05 pm »
READ THE DATA SHEETS!!!! That's why I linked to them.
Operating supply voltage is 2...6 V and the device parameters are specified at 2 V, 4.5 V and 6 V. Interpolate between 2 and 4.5 V and you'll get the 3.3 V figures.

Over and out!

I did read them again, the HC CMOS version accepts 2~6v power supply. let's say 3.3v, and I have my inputs to it is just a push button (tact switch) feeding either nothing or 3.3v. its output will be 3.3v according to "high-level output voltage".

at typical conditions, for "high-level input voltage" I understand that it means what voltage is considered "High" to it... for 4.5v supply it is typical value of 2.4v... so 2.4v and up are considered "High". for 2v it is 1.2v, so maybe 3.3v lies in 1.7~2v or so.

there are rise times\transition\etc.. but for my application they are not important. it is a simple tact switch to activate shift register in order to change video source... so the user will use it once per session.

therefore, supplying the device with 3.3v and have my inputs at exactly 3.3v is ok for "HC" version.. but I also wanted to get rid of 3.3v rail, went on the design and found that it is necessary for other stuff.

is there anything wrong with my understanding?


Quote
Did anyone already propose an Arduino?

I get that you assume i need an already made solution where understanding is not important, you are wrong. arduino won't help here, actually the design doesn't have a microcontroller.

Online Benta

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #17 on: November 05, 2022, 12:10:28 am »
OK, one thing you need to know that's so common knowledge that it's not written anywhere (I know that feeling when entering new area: everyone takes it for granted, so no one mentions it. Also known as a "Secret Polichinelle").

For CMOS, no matter whether it's 74HCxxx or CD4xxx or 74ACxx..., "high" and "low" are defined like this;
High: >(0.8 x VDD)
Low: <(0.2 x VDD)
This applies to all standard CMOS logic families except 74HCTxx.

Yes, it's really that simple.
« Last Edit: November 05, 2022, 12:16:08 am by Benta »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: one push button to shift between 8 outputs
« Reply #18 on: November 05, 2022, 12:28:09 am »
OK, one thing you need to know that's so common knowledge that it's not written anywhere (I know that feeling when entering new area: everyone takes it for granted, so no one mentions it. Also known as a "Secret Polichinelle").

For CMOS, no matter whether it's 74HCxxx or CD4xxx or 74ACxx..., "high" and "low" are defined like this;
High: >80% x VDD
Low: <20% x VDD
This applies to all standard CMOS logic families except 74HCTxx.

Yes, it's really that simple.

in my readings I saw some posts say for cmos, high is >2/3 of Vdd and low is <1/3 of Vdd but some other posts said that it depends on IC manufacturer...

so if Vdd is 3.3v, I will be totally ok with inputting either a 3.3v "high" signal or 0v "low" signal.

However, when powering the HC CMOS with 5v, assuming your 80 20 rule... "high" is >4v and low is <1v which means that using 3.3v as my "high" input won't work, or at least risky which means better of using 5v as high input too.


Offline inse

  • Frequent Contributor
  • **
  • Posts: 786
  • Country: de
Re: one push button to shift between 8 outputs
« Reply #19 on: November 05, 2022, 06:31:57 am »
Did anyone already propose an Arduino?
😜
Don‘t take it seriously, I was just joking…
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf