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

Bernard

Joined Aug 7, 2008
5,784
Another thought: Use 7812 , 12 V output for logic ckt & connect solenoid to un regulated supply, might add 5Ω, 3 to 5 W in series.
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I am testing this out by using a NAND oscillator, and it seems to be working good, (which surprised me!). Except for one thing: U4 (4017) is used to set the number of cups. 2,4,6,8, or 10. But the outputs are Q0-Q9. I assumed that Q0 would be one cup, Q1 would be 2 cups, etc. But what ever Q value I jumper to my shutoff pin 13, the 3 digit counter counts to that number. Hence, If I connect Q4 to pin 13, then it counts to 04.0 on the 3 digit counter. I don't understand what Q0 is for then, because if I connect it, the 3 digit counting circuit doesn't count at all. I thought the first count would be Q0.
So, my problem is this: I can't get 10 cups of coffee! (Some days I just NEED 10 cups) No, really, I mean, Q9 will stop the counter at 09.0 cups, but there is no Q10. I connected the divide by 10 overflow to the shutoff pin, only to learn from the datasheet, that it is high for the first 5 counts and low for the last 5 counts, so the counter never runs with it connected.
I'm hoping there's a simple solution to this, without having to add more IC's...
Any thoughts?
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
Digital things start counting at zero.
So the first cup of coffee has no coffee in it.
The second cup has 1 cup of coffee.
...Then the 10th cup of coffee also has 1 cup of coffee in it plus has 8 cups of coffee spilling all over the place!
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Digital things start counting at zero.
So the first cup of coffee has no coffee in it.
The second cup has 1 cup of coffee.
...Then the 10th cup of coffee also has 1 cup of coffee in it plus has 8 cups of coffee spilling all over the place!
hmmm, I reckon I'll just have to settle for 2,4,6,8, & 9
Actually, that'll make my super cramped enclosure, slightly less cramped, because I can drop the 3 digit counter from 10.0 to 9.0, or 3 digits to 2 digits. And I can drop the 2 digit selector readout from 2 digits to 1 digit, since I won't need the 2nd digit for "10".


About the 7812 regulator. I think I'll just run the whole thing through it to simplify things. It's supposed to handle 1 amp, and my solenoid only pulls 575 mA. I doubt if this ckt pull much... I'll put a little heat sink on the 7812, and the solenoid only runs for about 1 minute max (10 cups, make that 9 cups)...
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Is a micro JST conn that has 28 gauge wire heavy enough to use for my switch? I'll only have about 4 inches in length. My max current won't be more than 1 amp.
It seems a bit small to me, but one gauge chart I read said 1.5 amps for 28 gauge wire. If it's big enough, I'd like to use it so as to keep everything tidy looking...
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
@ 1 A & 4 in. # 28 will drop about 21 mV- not much of a problem, mechanical strength questionable, but in a bundle I see no problem.
 

thatoneguy

Joined Feb 19, 2009
6,359
Congrats!


Glad you got this version going, your helpers have been top notch!

Not to hijack, but:
When you are done, swing by the embedded systems area to see if you are interested in microcontrollers (PIC, AVR, Arduino, PICAxe, etc).

If you plan on many project like this, your life can be simpler (or harder, depending on how you look at it).
 

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
Well, this circuit DOES work. I'll post a picture of my board I made, and it was counting, and I could control the count with the dip switch which was very effective. However--the IC sockets I used made it neaerly impossible to solder the top side traces, so I had to really mess around with them-finally removing some and putting the IC's directly on the board. But I've soldered/desoldered so much that I've messed up too many traces and now it doesn't work. I see why commerical made boards have plated holes, connecting the top solder to the bottom solder!
Anyway, I'm not going to bother making another board, I'm switching gears and bought an Arduino! So when it gets here I'll see what I can do with it. Thanks for all the help here! I've learned a lot.
 

Attachments

Thread Starter

SouthernAtHeart

Joined Jan 2, 2011
126
I don't even have an Arduino Duelimanove (sp?)yet (it's coming), and I've never done C++ programming, but just reading through the Arduino's commands reference, and asking a few forum questions, I think I've about got this whole project completed already!
bye.
...gone to the dark side
 
Top