timer without avr?

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a float switch in the aquarium that supose to open an electric valve when water level goes down, the problem is that sometimes the water level is OK but because of the flows in the water the float swith is sometimse activated for a short time and it damaging the electric valve, I want to make some delay between the floats witch to the valve so that the walve will be open only if the float switch is activated for one minute. I can take avr and make the switch activate a counter and if counter is full it opens the valve but i wonder if there is a way doing it without avr only with analog components?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are plenty of possibilities, analog or digital. Just google 'time delay relay' and you'll find finished products and schematics galore.

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan is probably right, you should change your float switch against one with larger hysteresis.

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't understand how i can solve it with schmitt trigger, The float swith is a mechanical switch(just like a pushbutton) it is not enought just to add a delay I need to check that the switch is activated during all the time of the delay.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't get it, even the lowliest AVR would give you far more programmable control over this than just about any analog/discrete solution. Do you really think your non-MCU solution will come in under $1.03 in one-off quantities?:

http://search.digikey.com/script...

(they're $0.58 if you buy 100)

Dear I even do "a Leon" and mention:

http://search.digikey.com/script...

$0.58 one-off and drop to $0.38 for 100.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
The float swith is a mechanical switch(just like a pushbutton) it is not enought just to add a delay I need to check that the switch is activated during all the time of the delay.

OK, so we are in the time domain. Now you need to ponder solutions where there is a delay from the moment that the signal from the switch goes low to the time where the signal to the valve goes high. Something involving a capacitor and a resistor (and maybe still a schmitt-trigger;-)) comes to mind. Or setting up a 555 timer.

Then again, as Cliff pointed out you will get much more flexibility using the smallest cheapest AVR to do the job. For the application at hand you need no external clock source, one input and one output. ATtiny10?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

True the Tiny10 is listed "one-off" at $0.80 and $0.50 for 25 but the problem with that is you need an STK600 and the Tiny10 card to TPI progrm it. So the overall solution (unless industrial quantities) is far more costly than an AVR you can easily ISP with the equipment you already have.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is a bit puzzling to me how "wave action" seems to be causing damage...UNLESS you are triggering a fixed amount of fill with the switch.

Even a "false trigger" shouldn't be harmful, if you soon close off the intake.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK so I will but ATtiny13 because I have STK500.
How you suggest implementing it? What you say about starting to run counter if switch open and reset the counter if switch closed and if counter get to a desired value only then open the valve?
(the delay time dont have to be precise any delay between 1-5 minutes is fine)

theusch wrote:
It is a bit puzzling to me how "wave action" seems to be causing damage...UNLESS you are triggering a fixed amount of fill with the switch.

Even a "false trigger" shouldn't be harmful, if you soon close off the intake.


It's a little long to explane if you still want to know I will tell you but basically it doesnt damage the valve but it damage the R/O filter that before the valve.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I suppose the wave action is triggering the switch every couple of seconds for a second or so. This adds up to thousands of cycles per days causing damage to the valve because of excessive wear.

A time delay relay can solve the problem as it will trigger the valve only if the switch remains open for a while, let say 1/2h and it can keep the valve open for another 30s after the switch is closed. It will essentially add hysteresis.

Any small AVR can do that, but the cost is in the infrastructure (power supply, valve driver, avr programmer) etc.

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just for grins I punched in "time-delay relay" into Digi-Key's search mechanism.

It found 5 options, none of which were less than $100!! :shock: Hokey smokes, it seems to me that a 555 timer driving a relay would be cheaper than that!

I think that Cliff has the right of it. A Dragon would run $50, choose a moderate AVR which would be a few bucks, learn how to interface it to a relay (see this forum!!) and you end up with a solution and a development tool for more projects.

$100!?! Egad!

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Years ago I would have done this in analog... not these days.

Remove the float switch from the rest of the circuit. Use it, with a pull up resistor, as an input to the avr. Rewire the valve to always run, as if the float switch was telling it to run. Then use the AVR to turn the valve's power on and off. There are many ways to do this, a relay, a solid state relay, a transistor driver... Much depends upon the valve's control voltage.

If I were you I would actually use TWO Float valves, or at least two water level sensors. One is the primary sensor for controlling the water level. The other is a BACK-UP, safety device. This way, if the primary system, (float switch, micro, software, etc.), fails, you won't flood your house.

Redundancy and back-up systems are important in real-world applications where failure could cause undesirable consequences.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LM555

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a few of those I don't use any more since I started using AVR ;)

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

$100!?! Egad!

Sounds reasonable to me. 'Course, I make my living with that kind of stuff.

What is always enlightening is that the fully-populated circuit board including display (and factoring in my firmware-writing time) is ALWAYS less than the case, connectors, and switches/keypad. Yet during design/development the electronics parts cost and time-to-develop will be repeatedly hammered, then the same P.H.B. will think nothing of spending well into 5 figures on the case and pay a hefty premium to get it expedited 'cause they didn't start early enough with that.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hazic wrote:
I have a float switch ... but because of the flows in the water the float swith is sometimse activated for a short time and it damaging the electric valve,
Unless you really do want to implement a technology solution, I would recommend a simple solution ... a stilling well.

http://www.websters-online-dicti...

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
'cause they didn't start early enough with that

I feel your pain...boy do I feel your pain :-) .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Without mcu,this would be complicated.Having a loop that reads an input pin and as the switch is closed a register increases until a desired value is reached.If switch open before desired value reached register resets and start from beginning in next close of switch.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think 555 can do the job. Cheap and cheerful.

You didn't specify voltages / currents for the psu and valve etc. So I just guessed.

I've simulated the float switch using a transistor FLOAT_SWITCH. VALVE is 1mH 18R Inductor.

R1-C1 set time constant that is compared to voltage at CV pin of the 555. This is one shot so it discharges C1 after activation.

May be an error in this sch, so any other eyes appreciated.

oddbudman

Attachment(s):