In need of long imprecise timer for 230v ac electromagnet.

Thread Starter

taith

Joined Apr 1, 2017
28
I need to make small electromagnet valve taken from washer to open for short period of time, and remain closed for longer period.
Electromagnet works at 230V AC, 40mA. Works on 230V DC as well.
Available power sources: 230v AC or 12v DC 1.2A.
It needs to power electromagnet for about 1-10s and then charge/wait for another 5-10min. Doesn't have to power electromagnet right away, it can charge mentioned 5-10min before turning on.
Does not have to be 1ms precise I look for some simple, cheap and reliable solution.

More wordy description:
The electronics steering it are working with use of 12v DC power supply (electronics take 100mA supply is 1.2A)
When probe detects PH to be too low or too high proper switch is closed.

Even more wordy description of system:
I have small potato hydroponic system and it require to adjust PH of nutrients at least 2 times a day, that means I can not leave it going by itself.
I have found cheap and simple automatic PH adjusting system for aquariums, however it only opens and closes circuit until PH reach set point.
Thing about hydroponics is slow self mixing process and slow PH probe response (the the more worn out probe the slower response). So it might end up dumping LOTS of PH regulator to system, burning roots. Dilluting PH- and PH+ are not best option as with 1:10000 dillution I could make it work but pure PH dilluting water added to system alone would cause problems (too much water dilluting nutrients, plants starve, water overflow).
 

MrChips

Joined Oct 2, 2009
34,628
That is very straight-forward and very doable.
What is your electronics background and experience? Can you put together an electronic circuit?
Do you have someone with experience who can help you?
Can you supply more information on the pH sensor? Make and model or a link to specifications and datasheet.
What is the optimum pH? What chemicals are you using to modify the pH? Are you using pH buffers?
 

AnalogKid

Joined Aug 1, 2013
12,044
I see two separate aspects to the project, the sensor and conditioning it to a digital signal, and the timer with a 240 Vac driver. For any long-period timer, mu go-to part is the CD4060. you can get very long output periods without a large timing capacitor, and with a couple of diodes you can set up the on/off ratio you want. Also, at only 40 mA output current you can use an optocoupler rather than a full sized solid state relay.

I've posted similar circuits; I'll hunt for one.

ak
 

Thread Starter

taith

Joined Apr 1, 2017
28
I am hobbyist with knowledge... that is capable of making obvious mistakes.
I can read circuit schematics, thought of long charging cap, or coil discharge (for 12vDC) however I lacked knowledge/imagination to come up with element that will decide when cap have enough charge and dump charge on said electromagnet. Charging current would be so minor that even potentiometer could be used for charging speed regulation.
I have soldering station with regulated temperature and soldered quite few DIY kits, but if I would be to make something myself I feel totally lost or making simple mistakes (big smoothing capacitor for AC bridge without resistor? yes please, lights were SO BRIGHT at 325V and that one time when blew fuse because cap gave up at some point, true marvel)
As of PH probe and circuit, I assumed that is rather unimportant, both being locally made within my country and of course PH callibration and tests are PH meter 101 things. I do not have this system around me right now (mobile) but if that is really necessary I will provide all data later.
My self built system is partially responsoble for it as water mixing within it is just slow and when you add slow probe response you are ready for some root burning, this system is not hooked up yet, just made tests and they just went ballistic on me.
 

AnalogKid

Joined Aug 1, 2013
12,044
There are three problems with the approach of charging up a large capacitor and then dumping that charge into the solenoid coil.

First, you need a *very* large capacitor. For this calculation, we'll use the DC equivalent of 240 Vac RMS, 240 Vdc. Your coil draws 9.2 W, so to deliver that for 1 second you need 320 uF. For 10 seconds it's 3200 uF, at a rating of at least 400 V. Not only is that a very large capacitor.

Second, the capacitor leakage current probably is greater than the calculated charging current. Sure, you can increase the charging current to compensate for this, but the leakage current will vary with room temperature and aging. This is not a stable solution.

Third, while the numbers in the first part are correct for the total power needed by the coil and the total energy stored in a capacitor, in practice you can't use all of the energy. As the capacitor powers the coil for second after second, the output voltage sags down to the point where it is too low to keep the solenoid energized. This happens way before the capacitor is completely discharged. This means that the actual capacitor has to be several times larger than first calculated.

Looks good on paper, but does not perform well in practice.

ak
 

WBahn

Joined Mar 31, 2012
32,703
I need to make small electromagnet valve taken from washer to open for short period of time, and remain closed for longer period.
Electromagnet works at 230V AC, 40mA. Works on 230V DC as well.
Available power sources: 230v AC or 12v DC 1.2A.
It needs to power electromagnet for about 1-10s and then charge/wait for another 5-10min. Doesn't have to power electromagnet right away, it can charge mentioned 5-10min before turning on.
Does not have to be 1ms precise I look for some simple, cheap and reliable solution.
There's a LOT of room between "about 1-10 s"/"another 5-10 min" and "does not have to be 1 ms precise".

What are your actual needs? If the power up time is 5 s and the wait tome is 8 min and if both of those vary by 20% from one cycle to the next, will that be good enough?

These times are well within the capabilities of a 555 timer circuit. If you can live with 10 s on and 5 min off, then the duty cycle is about 3% so the ratio of the two timing resistors would need to be about 28.

This is possibly the easiest and simplest circuit to try out.
 

Thread Starter

taith

Joined Apr 1, 2017
28
Now I see.
Good idea would be placing timer before relay to turn on 230v AC. Not sure what is max current from driver, I will make photo of this PH driver in 1h or so.
 

WBahn

Joined Mar 31, 2012
32,703
Now I see.
Good idea would be placing timer before relay to turn on 230v AC. Not sure what is max current from driver, I will make photo of this PH driver in 1h or so.
A picture is unlikely to tell us anything of use about what is needed. Somehow you are going to need the output of the timing circuit, the output of the pH meter, and this valve to interact. So first describe how they are supposed to play together? Which component is supposed to do what in relation to the other two? Don't worry about HOW they will play nice with each other (yet).

What is then needed are the voltage/current specifications for each of those circuits at the points where they interact.

Start with the ones you have no control over. How much voltage and current is required to operate the valve? What kind of output does the pH meter produce? What are its drive capabilities?
 

Thread Starter

taith

Joined Apr 1, 2017
28
This is not PH meter but PH driver, once PH drops/raises above limit I set it up (PH should drift between 5.5-6.5) it will trigger relay seen on photo, and keep it continuously turned on until PH changes within acceptable margin. And with slow mixing as mentioned before, PH was going up and down 4-8, dumping lots of PH regulator and making all unreliable. Limiting liquid flow and diluting it was not enough. Could buy peristaltic pump, but these also pump 100ml/min so even with it I would end up with 0.5L of buffer. Where system itself have only 10L tank. So will stick with 230V/0.04A valve.

And this driver was meant to be used with aquarium, there solution is simple either turn on oxygen or CO2 slowly changing PH, but I don't have such comfort.
 

WBahn

Joined Mar 31, 2012
32,703
Okay, so if I understand correctly one relay is activated if the pH is below the lower limit and the other is activated if it is above the upper limit. Does the system have hysteresis in it? Say the pH rises above 6.5 and one of the relays turns on. When does it turn off? As soon as the pH falls back below 6.5? Or does it stay activated until the pH has fallen back to the middle of the range (or somewhere else)?

How does the pH driver interact with the timer? Do you simply want the on/off cycling to continue for as long as the relay is active? If, then this is pretty straight forward.

Have the 555 circuit free run so that it is always going on for a short period of time and then going off for a long period of time. Route the power for the valve through a relay and then through a transistor switch (or a second relay) that is operated by the 555. The valve will only operate when both the pH driver has the relay activated AND the 555's output is HI for the brief ON portion of its cycle.
 

Thread Starter

taith

Joined Apr 1, 2017
28
OK this should explain clearly, slight possibility of ON OFF time change would be nice.
I hope it would be simple enough to make it without need of making custom PCB.
 

Attachments

WBahn

Joined Mar 31, 2012
32,703
A topology like that is certainly possible, but the "timer" block has to incorporate both the timing functionality and the enabling functionality, which slightly complicates the circuit. There are a few ways to accomplish this and none of them are too hard.

What I'm suggesting is to keep the two functions separate and to integrate them via how they are wired together. I'll throw together a sketch and post it later.

You shouldn't need a custom PCB for this. A simple soldered proto board should do fine. Building in adjustability for both the ON and OFF times is also not a problem.
 

Alec_t

Joined Sep 17, 2013
15,103
I share AnalogKid's doubts about a 555 giving consistent timing for such long intervals. However, if you want to try a 555 here's my suggested circuit :-
RelayTimer.JPG
This assumes that a positive signal (>1V) from the PH meter is available to turn the timing function on for as long as is needed, and that the timing capacitor C1 has low leakage. There is separate adjustment for the on' time and 'off' time.
 
Last edited by a moderator:

Thread Starter

taith

Joined Apr 1, 2017
28
Signal from PH driver can be 12v as said signal is pretty much 230v relay switch that was meant to power up to 10A device (can see on photo).
I imagined that whole timer would be turned on by PH driver on OFF stage to give said 1s signal by the end, and once PH drops to acceptable level whole circuid would get unpowered.

However here I see it is just steering reset node (PH) and said circuit would be turned on all the time, waiting for reset to be turned off.
If timer circuit consume close to no power it is no problem.

PS. I intend to use 2 separate timing circuits for PH+ and PH- , however for now I will build just one because (in theory) properly functioning, healthy hydroponics should by itself turn solution to be acidic as plant feeds and only PH- would be necessary to use.
 

Thread Starter

taith

Joined Apr 1, 2017
28
So reset wont have to be powered and GND should be connected with V- if I read it right yes?
And circuit on turning on will start from OFF stage yes?
At the moment I am at work, but circuit seem to be straight forward, will buy parts tommorrow and see how it works.
Going to try it on next plant as latest got killed by root rot... such are charms of hydroponic begginners ha.
 

WBahn

Joined Mar 31, 2012
32,703
I share AnalogKid's doubts about a 555 giving consistent timing for such long intervals. However, if you want to try a 555 here's my suggested circuit :-
View attachment 123806
This assumes that a positive signal (>1V) from the PH meter is available to turn the timing function on for as long as is needed, and that the timing capacitor C1 has low leakage. There is separate adjustment for the on' time and 'off' time.
The key is that it doesn't need to be consistent at all -- if it's ten minutes this time and twelve minutes next time and nine minutes the time after that it won't matter. All he's trying to do is, if the sensor says that the pH needs to be adjusted, is injecting a small amount of solution during a short interval and then waiting ten to fifteen minutes and, if the sensor is saying that it still is out of the acceptable range, give it another small shot.

But you CAN get reasonably consistent times of this length from a CMOS 555. The very first paying design I ever did (as a sophomore) was for the Taco Bell where I worked. They wanted a "hospitality timer" that would go off every 15 minutes to remind the crew that someone needed to go out and clean up the front area of the store. Since I didn't know anything about digital electronics, let along microcontrollers, a 555 timer was the only way I knew how to approach it. I had to use a slightly bigger cap than I should have (which is how I found out about leakage currents in electrolytic caps), but it maintained a quite consistent timing for the several months that they used it.
 

Alec_t

Joined Sep 17, 2013
15,103
I'm surprised you got fairly consistent timings. You must have had a high quality low leakage capacitor.
So reset wont have to be powered and GND should be connected with V- if I read it right yes?
Correct re V-. Reset would go directly to V+.
 
Top