How to set a 4040 ripple counter with a 12 position DIP switch

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
With your single didgits -with decimal pt- connect center display DP to +12 via 820 Ω. On divide by 10 4017, do not forget to ground clock enable & reset so that it will count. The 4024 is functionall identical to 4040. I have not seen yet the caution that all IC inputs need to go somewhere, unused inputs go to ground or +V, except for the diode and gate, they can float.
So you're confirming that it IS a good idea to connect all pins? I've read that they should be connected to gnd or V+, are you saying this is true, or that you don't see the need for this?
Suppose I only use the divide by 10 output of a 4017, can the Q1-Q10 pins go to gnd OR V+ without shorting/heating anything internally?
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
With your single didgits -with decimal pt- connect center display DP to +12 via 820 Ω. On divide by 10 4017, do not forget to ground clock enable & reset so that it will count. The 4024 is functionall identical to 4040. I have not seen yet the caution that all IC inputs need to go somewhere, unused inputs go to ground or +V, except for the diode and gate, they can float.
OH, Is this what you meant: That is I disconnect some of the pins with DIP switches on the 4040 (or 4024 as I think I'll be using) that those pins will no longer be connected to anything! Hmmm, How do I get around this? Is there such a thing as a STDP DIP switch? They could then disconnect the pins from the big AND gate, and connect them to gnd. If not, do I need to order an extra DIP switch and put in there in parallel with the one I've got, where the switches connect the pins to ground went closed?
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I'm asking a lot of different questions here, all pertaining to the same project, so let me know if I should be asking them in a new post.
This is the flow sensor I've ordered:
http://www.seeedstudio.com/depot/datasheet/water flow sensor datasheet.pdf

It says 5-24 volts, max current 15mA
With my 12 volt system, do I just hook it up to my 12 volt supply, or do I need to restrain the current with a resistor?

Then with the signal coming back to my 4024 pulse counter, do I need to add a resistor in there to do something?
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
The flow sensor red wire goes to +12 V,black to ground & yellow to clock input- no resistor needed. If you are eleminating SW-2, Reset, then R 12 is not needed- was there to prevent shorting U 16 outputs. On big AND, diode, gate, open switches are no problem. If using 8 in IC NAND gate, 4048, then resistor pull-up resistors would then be required on all inputs. ' Hope I have not muddied the waters again.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
The flow sensor red wire goes to +12 V,black to ground & yellow to clock input- no resistor needed. If you are eleminating SW-2, Reset, then R 12 is not needed- was there to prevent shorting U 16 outputs. On big AND, diode, gate, open switches are no problem. If using 8 in IC NAND gate, 4048, then resistor pull-up resistors would then be required on all inputs. ' Hope I have not muddied the waters again.
...no, I think I follow all that. I'll post a new drawing after I swap out the 4040 for a 7 bit ripple...
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
In case anyone would like to know, I'm going to mount this in the box pictured. 2 displays on the front, a 2 digit, and a 3 digit.
A 5 position rotary switch will control the 2 digit, so it reads '2,4,6,8, or 10'

A nice blue illuminated stainless steel pushbutton switch turns power on to everything, and a second matching white illuminated momentary push button starts the water flow, showing it's progression on the 3 digit display, with 10th's.

Just think of the time I'll save with my automatic coffee pot filler!
 

Attachments

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I think I'm getting somewhere. I sectioned my drawing a little, as the displays will be on a separate pc board. But I kept is easily readable.
I think I even figured something out myself: The connection that went from SW1 back to the Reset input on U16; I also tied it to U17, and U19. Is that correct? So when you start, it reset all the counts? This way if I don't actually power off the whole unit, it should still work?

There's some values/transistors in there I'm not sure about yet (I made note of them if someone cares to expound)

Anything else that doesn't look right, minor or major...

I did not use the 8 in NAND gate chip, so I'm not missing any pull up resistors in the first stage am I?

Speaking of pullups, U20 has them, (R25-27) 1K, is that large enough? And since I have them on U20 (IC 4511), do I need them on U7, which is also a 4511?

Lastly, you said, "might need a power-up reset".
Not sure what that means. I've read about a debouncer on a switch... ???
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
The Q4 transistor that drives the 575mA solenoid needs a base current of 57.5mA to turn on well. But the CD4001 driving it has a max output current of only 18mA and the 1k series resistor reduces the current to only 8mA. So it probably will not work.
Replace Q4 with a Mosfet.

Power-up-reset automatically creates a reset when the power supply is turned on.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
The Q4 transistor that drives the 575mA solenoid needs a base current of 57.5mA to turn on well. But the CD4001 driving it has a max output current of only 18mA and the 1k series resistor reduces the current to only 8mA. So it probably will not work.
Replace Q4 with a Mosfet.
I don't know enough about Mosfet or transistors to know which one to get, there's like thousands. I'm hoping I can get the right one at Radio Shack.

...I see they carry this:
MOSFET - IRF510 transistor with a TO-220 case

Will this work? It's looking like this is the only MOSFET RadioShack has.

I'll try to find a datasheet for it, but I'm not 100% sure what I'm looking for if I do find one.
 

Audioguru

Joined Dec 20, 2007
11,248
Use 330 ohms for the gate resistor for the old IRF510 Mosfet.
The Mosfet has a max on-resistance of 0.54 ohms when turned on with a gate voltage of 10V to 12V so with your solenoid current of 575mA the voltage loss is 0.31V max and the Mosfet won't even get warm.

The Mosfet has a fairly high gate capacitance so the low drive current will not allow it to run at a high frequency.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Use 330 ohms for the gate resistor for the old IRF510 Mosfet.
The Mosfet has a max on-resistance of 0.54 ohms when turned on with a gate voltage of 10V to 12V so with your solenoid current of 575mA the voltage loss is 0.31V max and the Mosfet won't even get warm.

The Mosfet has a fairly high gate capacitance so the low drive current will not allow it to run at a high frequency.
Thanks, I think that should about do it for that part of my circuit. My parts come in Monday, so I'll be able to find lots of new problems!
 
Top