Continue to Site

# Need help with counter

Status
Not open for further replies.

#### op337

##### New Member
Hi. I need a circuit that can for example count(x) and trigger a relay for 2 seconds when x = 10 the. Reset x to 0 .
Thanks if anyone can help , I don't want to use arduin. .
Thanks.

Mike.

ak

A remote control button is depressed for a number of seconds to activate a 12v smoke machine the machine needs each button press to count until it reaches a set number (not known yet) to acitvate the liquid pump for x seconds (not know yet) . . Or for the chip to count the total amount of time the button is depressed and activate the relay to pump for x seconds would be the better solution

Powering s pump for x seconds each time a button is pressed is easy. Is that all you need or do you need some type of TOTALIZER that tells you how much time for the sum of all button presses? Or a way to monitor how many button presses were made?

Powering s pump for x seconds each time a button is pressed is easy. Is that all you need or do you need some type of TOTALIZER that tells you how much time for the sum of all button presses? Or a way to monitor how many button presses were made?
No it's the sum of the amount of presses or the total time pressed that activates the pump for x seconds.

X= button pressd
If x = 10 then activate pump for 2 second

Or
X = total time button depressed
If x =23 seconds. Activate pump for 2 seconds

Don't you mean,
If x = randomNumber
How do you decide this secret number?

Mike.

X is an event accumulator that is increased by 1 with each button pressed. Sometimes this is called a "counter".

op - the event counter method is much easier than the time counter method. Is that ok, or do you want *both* methods operating at the same time, and the pump comes on when *either* 10 presses or 23 seconds accumulated button time is exceeded?

ak

Also, do both conditions need to reset if the pump activates.

Mike.

X is an event accumulator that is increased by 1 with each button pressed. Sometimes this is called a "counter".

op - the event counter method is much easier than the time counter method. Is that ok, or do you want *both* methods operating at the same time, and the pump comes on when *either* 10 presses or 23 seconds accumulated button time is exceeded?

ak

A s the level of fluid in the tank gets used over a period of time not presses (if the user presses 10 times really short the tank would still be full but the pump would trigger) so a time based accumulator would be ideal but if that's to complex I can deal with a normal counter , and yes it all resets after the pump has triggered. So no not running simultaneously , one or the other time preferable And thanks for your reply !

Why not just use float switches to control the level?

Mike.

Power-on reset.
Any number of button presses for any length of time adds up to 23 seconds of press time.
At 23 seconds, pump is activated for 2 seconds, no matter what the button state is.
After 2 seconds the pump stops, the time counter resets to zero and starts accumulating press time again.

Yes / No ?

-------------------------

What power source is available for the circuit? What is the load the output is controlling? Can it be switched with a transistor, or does it have to be a relay?

This can be done with one chip and a few diodes and passive components. If a CD4060 has its oscillator running at 356 Hz, the Q14 output will go high 23 seconds after the Reset input is released.

With two decoding diodes (a wire-AND circuit), the motor will run for 2.15 seconds.

Q14 and the button input are wire-ORed to enable the oscillator.

I don't mind using a few diodes to decode states, but they make some people nervous. The wire-AND and wire-OR can be replaced by one quad NAND chip.

ak

Last edited:
Thanks for your help , mike as the fog machine may be used on different angles a float will give false readings and Thetank size is tiny , thanks Ak. I am thinking to simplify I may just slow down the pump to deliver the liquid at the same rate it's being burned . . I think that will work . With a 555 timer for a small delayed start so the pump doesn't engage with a quick press , and a primer button in case the tank runs dry after long period without use . Hmmm also great to find you guys for help I have basic knowledge but my father was electronics engineer who built juke boxes and pinballs worked in radio for awa he was my fountain of knowledge . Sorely missed. So thanks !

Last edited:
Status
Not open for further replies.