Activating a digital timer using light as a trigger

Thread Starter

flyboy320

Joined Jul 21, 2020
37
I am trying to build a circuit that can trigger the starting and stopping of a typical digital timer using a light source as the trigger. I came across an old web page that does almost what I need, but as I know almost nothing about circuits I would like some advise if it will do what I need. This project is for an espresso machine to time how long the espresso water pump is on when making the espresso. The timing range is from 0-60 seconds. I figure I can either use a current sensor to trigger when the pump is activated, or use a light sensor (photodiode/photoresitor) to "see" when a light is activated (by using a LED wired to the pump circuit to illuminate when the pump is on).

The circuit I came across is here

I'm unsure about the value of C1 as it states "value of C1 depends on the exposure time to be measured and on the photo diode used". So would this circuit work for my use on a typical timer like this? Also it says that a photoresistor could be used instead of the photodiode, how would I modify the circuit to work with a photoresistor (my local store sells photresistors, but not photodiodes)?
 

Bernard

Joined Aug 7, 2008
5,784
If it turns out to be line V then might use a neon light with proper resistor & sense with LDR.
Could not bring up your circuit. Might look for a timer with electronic control.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Do you know what voltage the pump runs on before you start connecting things to it?
The pump is a 120v pump.

If it turns out to be line V then might use a neon light with proper resistor & sense with LDR.
Could not bring up your circuit. Might look for a timer with electronic control.
Yes a neon light was what I was thinking of, like this one here.

Here is the link to the web page with the circuit on it.
https://www.edn.com/hack-into-a-stopwatch-to-make-a-phototimer/
 

Irving

Joined Jan 30, 2016
3,845
A neon flickers on and off so needs more than just a comparator.

Or use a proper safe optocoupler designed for the job to give a logic level output and not mess around with analog-y stuff.

Is the purpose of this to measure a single run-time, or log/calculate average run-times, or to accumulate the total number of minutes of espresso making? Do you not need to reset to zero? Else why not just stand there and time it manually?
 
Last edited:

DickCappels

Joined Aug 21, 2008
10,152
Quick note: Your neon lamp will require a series resistor of something like 47 k to 100 k to limit current through it. Get a lamp for which you can obtain a specification sheet so you will know the maximum current you should put through it.
 

Irving

Joined Jan 30, 2016
3,845
Quick note: Your neon lamp will require a series resistor of something like 47 k to 100 k to limit current through it. Get a lamp for which you can obtain a specification sheet so you will know the maximum current you should put through it.
Which is about the same current as you'd put through the LED of an AC optocoupler but results in a much higher current transfer ratio (CTR) than a neon/LDR combo so needs far fewer components to achieve the same result.

Or find a 110/120vAC coil relay, there are Omron G5 series relays available online for as little as $6. A simpler, easier and arguably safer option.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Is the purpose of this to measure a single run-time, or log/calculate average run-times, or to accumulate the total number of minutes of espresso making? Do you not need to reset to zero? Else why not just stand there and time it manually?
Yes the purpose is to measure one run time, and then it needs to be reset to zero before the next run. Right now I am timing it manually using a typical dollar store timer. It would be nice to automate it hence why I'm looking for a circuit to trigger the start/stop of the timer.

Here is a commercial device that does what I want, but I thought I may be able to build something similar for much less. The espresso machine has a three way solenoid valve which directs water depending on what it's doing and this device uses a hall sensor to know the pump is running.

https://prima-coffee.com/equipment/luminaire-coffee/shot-timer
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Well hall sensors are easy to come by.... where is it placed and what does it 'detect'?
It would be placed on the three way solenoid valve to detect the switching of the solenoid (which happens when the brew pump is switched on and that's what I'm trying to time). The picture shows the boiler removed from the machine, and the solenoid is the black square near the bottom right.
tn_IMG_3433.jpg
 

Irving

Joined Jan 30, 2016
3,845
Can you find a link to the solenoid in your coffee machine, what brand of machine is it? I think I've found another option...
 

Tonyr1084

Joined Sep 24, 2015
7,853
Here it comes - the two dumbest things I can think to ask:

1) how strong a magnetic field does the motor produce when running? If strong enough, it can close a reed switch.
2) why do you want/need to know the exact amount of time it runs? What's gained/done with this knowledge?
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Here it comes - the two dumbest things I can think to ask:
Not dumb at all, there are no dumb questions!

1) how strong a magnetic field does the motor produce when running? If strong enough, it can close a reed switch.
That I'm not sure of. If it helps, this is the motor in the machine.

2) why do you want/need to know the exact amount of time it runs? What's gained/done with this knowledge?
To get a good quality espresso, the stars must align, there are so many variables like water brew temperature, quality of coffee, grinder used to grind the coffee, and it goes on and on :) One of the variables is how long the water runs through the coffee. Generally speaking, too long it can make it taste bitter, and too short can make it taste more sour, so being able to time the "shot" is just another variable in improving the taste.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Is it the pump motor or the solenoid you need to monitor, or will either do?
It's actually the pump running duration I want to time, but it coincides with the solenoid actuating since when the pump turns on the solenoid re-directs the water flow, so in essence detecting when either one activates will work.
 

Tonyr1084

Joined Sep 24, 2015
7,853
To tell if there's sufficient magnetic energy, hold a magnet close to the motor. Almost touching. If the magnet is vibrating in your fingers then there's plenty of magnetic energy to close a reed switch. Simply showing us the model number of the motor doesn't help. I doubt anyone in a data sheet will state how much magnetic flux leakage there is. My guess is that a coffee maker manufacturer isn't going to be so picky about magnetic leakage; as long as it doesn't cause radio interference. Given that the motor is AC driven, it's either 50 or 60 cycles per second. That's not going to cause much interference with anything. Except maybe a stereo. But those are typically well enough shielded so that stray magnetic noise isn't going to bother them.

If you have a reed switch, just place it adjacent the motor. If it closes then it can act as a sensor for your timer circuit.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
If I use something like a reed switch, or say a 110/120vAC coil relay like Irving suggested above, I'm assuming I would have to change the circuit since I am no longer using a photodiode as a trigger (sorry, my turn for a dumb question)?
 
Top