Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I need to count pulses---need a bit of help

Status
Not open for further replies.

qrper

Member
Gang..

I have a greenhouse that overheats when the sun is bright. To keep the plants happy, i use misters to spray water.

what I want to do is count how many times the misters come on and when n is reached, I'll fire up the big fans.

I'm thinking about 100 events per 8 hours. So, I need to count to 100 and then do something. Out put can be High or low, makes no difference I'll take care of the that.

right now, when the valve closes, i generate a 2 second low to high pulse. That's what I want to count.When I see 100 of them, I want to do another event (turn on the bigger fans)

Two items:

1. No PIC or micoprocessors
2. Don't want a dozen 4017s to count 'em either

so? Anyone with any ideas?

mike
 
N=100 is not carved into stone. Fan timer would not work because like a day like today with temps about 70 deg and no sun, the fan would come on when it's not suppose to.
 
A timer and/or thermostat might make more sense with dual fans. Low speed fans to prevent fungus growth with air flow and high speed fans to reduce the air temp by evaporation from the misters
 
that may work, but I'd like to know how many times the misters went on. That's why I want to count the cycles

mike
 
I suggest a 12 bit Binary counter like CD4040 run off 3~15V and have very high count values (2e12 or 4,024) but you would want to reset daily by design. A simple LED + Rs on each port could serve as binary count indicator.

many different types of binary counters exist in DIP packages with 7,8,12, or 14 bit exist. **broken link removed** with 5V being the most common Vcc.
 
Last edited:
What is the signal level that you want to count?
 
4 digit decimal counter modules are on ebay for under $20. The tech data is a bit thin, but they have a relay onboard and I think they can be preset. If you want to grow your own, a CD4020, 4024, 4040, or 4060 has enough counter outputs to drive gating that detects 100. 64 or 128 would be easiest, but decoding 96 would take one 2-in gate or some diodes.

ak
 
Last edited:
I have a 4024 and iam sending pulses to it with a 555 time just to experiment. About one pulse every ten seconds

128 pulses would be fine. 100 was only a random guess.

However I am seeing the Q 12 output change states before 100 pulses occur.

Just using the data sheet for the IC.

Something is not quite right

Mike
 
YOu probably need to filter signal and use Schmitt Trigger Input and use twisted pair wires between.
 
However I am seeing the Q 12 output change states before 100 pulses occur.
Do you mean Q6? The 4024 has outputs from Q0..Q6, for 128 count capacity. Q6 will go high on the 64th count, and low again on the 128th count.
 
As dougy says. It's easy to forget, when working with binary counters, that the most significant output bit goes high at half the maximum count.
 
I was looking at the Q7 output on pin 3. trying to recall what was what after a week of 12 hour shifts.

But, ah ha! didn't realize that the output goes high at half the maximum count.... Interesting.

so, would I need TWO 4024 counters to get my output at 128 pulses?
 
so, would I need TWO 4024 counters to get my output at 128 pulses?
Yes, or a single 4040. Another option is to use an AND gate (or two diodes) on Q5 & Q6 to make the output high at 96 counts (that's 64 + 32).
 
upload_2015-7-1_10-37-57.png
Output goes high at 96 counts, then low 32 counts after that (unless you reset it manually).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top