Maker Pro
Maker Pro

4017 count to 20

pyrohaz

Oct 28, 2012
33
Joined
Oct 28, 2012
Messages
33
Hi guys,
I need 20 inputs to my arduino simple. I'm using mosfets to switch the inputs (already devised the circuit and tested, that works fine!) All I need to know is:

How can I use two decade counters to count to 20? I know I could do this with 3 shift registers clocking 1 bit in and shifting it up 20 bits but that would require 3 chips and 2 decade counters only require a reset and clock.

Anyone know the answer?

Cheers,
Harris
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Look at the 4017 datasheet, I'm pretty sure it has a circuit to do just this.

However a number of 74HC165's is probably better if you want digital inputs as you won't have to have all those mosfets.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I would just program and slave another micro to do it, that is if I was looking to save parts count on an existing design or platform...
 

pyrohaz

Oct 28, 2012
33
Joined
Oct 28, 2012
Messages
33
Look at the 4017 datasheet, I'm pretty sure it has a circuit to do just this.

However a number of 74HC165's is probably better if you want digital inputs as you won't have to have all those mosfets.

Thanks for the reply, i'm not actually reading a digital input, i'm using the mosfets to really shoddily multiplex 20 capacitors into a 555 timer (a weird form of DCO I suppose). By seeing the frequency of each capacitor I can get a very rough estimate of capacitance.

Hence why using another micro would be a bit annoying as it would literally only be doing what 2 decade counters would be doing, and i'd have to buy another chip!
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Please explain exactly what you are trying to accomplish. You posts scream that you are making something more difficult than it is.

Bob
 
Last edited:

pyrohaz

Oct 28, 2012
33
Joined
Oct 28, 2012
Messages
33
Happily!

What i'm trying to do is find a method of multiplexing lots of capacitive switches, going off the ESD model, a human can be modelled as a 100pF capacitor in series with a 1.5k resistor. What I have thought is to have a free running oscillator with the output in series with a resistor. Mosfets are used to couple this output to each touch switch/pad where if the pad is touched, it has capacitance, if not, it has a smaller capacitance.

By then doing this, the amplitude of the signal can be detected using a single peak detector circuit and by running through each mosfet and subsequently reading each input, can detect whether the input is being pressed or not.

Is there a better way to multiplex many capacitive inputs? This method only required 3 pins!
(Analog read, clock and reset, reset isn't completely required, just adds the option to start at zero again).
 

sheldonstv

Jul 17, 2007
68
Joined
Jul 17, 2007
Messages
68
here you go-easy to alter this circuit to have as many outputs as you want by using the last op as a reset-remember each additional ic gives only 8 usable outputs.....
 

Attachments

  • 4017cascade.pdf
    19.2 KB · Views: 140
Last edited:
Top