Activating a digital timer using light as a trigger

Irving

Joined Jan 30, 2016
5,118
Yes, we could replace the rocker switch with a relay and push button and an Arduino to start the motor and run a precise number of milliseconds... :):rolleyes:

and maybe a touch screen to set the time...
and read out the water temperature...
and...
 

MisterBill2

Joined Jan 23, 2018
27,514
Attached is the schematic for the slightly older model, I cannot find the current one (Gaggia Classic Pro N.A. model). There is a slight difference in the front panel switches, but may be close enough to be of use?
The book DOES NOT contain a schematic diagram of the portion related to motor control, nor ant information about it. So it was a waste of time, no benefit at all.
To determine the motor running time the solution is to have a time counter, not a stopwatch.
A time counter has a high frequency source and a counter that is started by an outside signal turning on and that same input stopping the count when the signal switches off. They are available from many different sources, in a variety of ranges. For this application I suggest at least 4 digits, 5 digits is better seconds, thenths, and hundredths of seconds should be good enough for everybody.
 

MisterBill2

Joined Jan 23, 2018
27,514
And now I see that some are saying to use an arduino to either count the time, or possibly control the time. There are FAR BETTER timers available that can control time very precisely, and they are already in a package so no need to package the toy computer board and Power supply and interface board and output relay. Instead just connect to terminals and set the time.
 
Last edited:

Irving

Joined Jan 30, 2016
5,118
@MisterBill2 no, that was said tongue in cheek, having a little dig at those getting carried away with solutions that weren't relevant, and you've missed the OP's original need, which was simple & cheap, not an industrial solution...
 

Tonyr1084

Joined Sep 24, 2015
9,744
At 1:16 he clicks the pump switch on. At 1:44 he clicks the switch off. That's 28 seconds. And it's wholly 100% NOT automated. Are you hoping to automate yours? And the 28 seconds was his best estimate of the needed time. Then he applied steam at 2:48, then off at 3:20 for 32 seconds. It all seems so arbitrary to the process.

I know NOTHING about latte's. Never had one. No idea of how to make one. Even if I had a machine.

So, are you wanting to automate your pump? Different cup sizes will require different pump times.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
@flyboy320 Did you do the PID temperature controller upgrade yourself?
Yes, from a kit designed from someone in the UK. Works great at maintaining a constant boiler temperature.

@MisterBill2 no, that was said tongue in cheek, having a little dig at those getting carried away with solutions that weren't relevant, and you've missed the OP's original need, which was simple & cheap, not an industrial solution...
Yes, this is what I'm after. I know I can use an Arduino or Raspberry Pi, but what I'm after is ideally the device I linked in post #9;
https://prima-coffee.com/equipment/luminaire-coffee/shot-timer

But as an alternative, a simple dollar store timer, stopwatch, whatever, that starts and stops using the proposed circuit in my OP would suffice.

At 1:16 he clicks the pump switch on. At 1:44 he clicks the switch off. That's 28 seconds. And it's wholly 100% NOT automated. Are you hoping to automate yours? So, are you wanting to automate your pump?
Although that device and design is available, it's not what I'm after. I'm looking for a simple timer to see how long the pump was running for. How long I let the pump run for is based on how much coffee has been extracted, for example 2oz. The volume (or sometimes weight) is the determining factor for how long I let the pump run for. So if I stop my shot when I get my 2oz out, and it only took 15 seconds for that, I know there is a problem (30 seconds is the ideal), conversely if it takes 50 seconds to get my 2oz, that also can point to a problem.
 

MisterBill2

Joined Jan 23, 2018
27,514
OK, now I see that the whole production sequence is more complex, and also full of diagnostic opportunities. So really a light industrial PLC would work because it can sense levels using only a probe, and control a pump and monitor the time, and let you know immediately if the time was outside a window. Yes, the PLC from Automation Direct costs more than a toy computer BUT it comes ready to write code and play, just connect the sections of the machine to the durable screw terminals.
 

Irving

Joined Jan 30, 2016
5,118
Yes, this is what I'm after. I know I can use an Arduino or Raspberry Pi, but what I'm after is ideally the device I linked in post #9;
https://prima-coffee.com/equipment/luminaire-coffee/shot-timer

But as an alternative, a simple dollar store timer, stopwatch, whatever, that starts and stops using the proposed circuit in my OP would suffice.
Well, a Pi would be overkill, and getting to the elegance of the luminaire, with its (probable) custom chip, will be difficult, though I reckon I could get close, but maybe not that small or so self-contained. The repurposed stopwatch rankles a bit as too Heath-Robinson . Have you found a stopwatch that would do?
 

MisterBill2

Joined Jan 23, 2018
27,514
If a part of the purpose is a perfect portion production, with the intent of being impressive, then certainly the route to take is with a PLC, since it can not only run the whole sequence, it can report on the time for each step, and flag any deviation. And it can do it with a package that has indications for every I/O point. Better yet, the package will not need cobbling together of a bunch of rather fragile pieces. The cost can be about the same, the reliability about 100X better.
An added benefit is that if a market develops, producing duplicates will be simple.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
That might work well, could be worth an experiment.

Adafruit do this tiny sensor, basically a switch that closes when it's vibrated. Available through various outlets including Digikey (part # 1528-2166-ND )

Will need a little signal conditioning to drive that timer, but I think we can do better than a repurposed stopwatch anyway... will get back to you on that shortly...

As a first experiment you try and get one, and use a multimeter on the ohms/continuity setting to beep when the switch is closed. Bit of double sided tape to stick it to the motor housing and it should beep continuously when the motor is running and stop when it isn't. You may need to experiment with location and padding so moving stuff around the machine doesn't trigger it unexpectedly.
The sensor arrived today, but it does not seem to work with the motor. I tried placing in different orientations but it never shows continuity when the motor is running.

When I had the top off the machine I was looking at the switch which activates the motor (shown in the attached picture). There are two unused leads coming off the switch which ground when the switched is turned on, effectively doing what we were trying to do with the vibration switch? The two unused leads are isolated from the other two which route to the pump. Could we not just wire directly to this switch to act as the trigger for the pump running?

IMG_20200727_203019.jpg
 

MisterBill2

Joined Jan 23, 2018
27,514
Do you mean that the two terminals become connected to each other ? Or that they become connected to ground?If they connect to each other then that could work very well to operate the time counter while the motor is running.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
Do you mean that the two terminals become connected to each other ? Or that they become connected to ground?If they connect to each other then that could work very well to operate the time counter while the motor is running.
They connect to each other, show 0 ohms.
 

MisterBill2

Joined Jan 23, 2018
27,514
They connect to each other, show 0 ohms.
If the second set of contacts can be used then that will work very well to run the time counter to show the motor runtime. The switch connection for the timer control needs to be kept away from the power wires to avoid picking up noise, so the wires should be twisted together and not run right next to the power carrying wires. Sometimes simple solutions do work out.
Contact bounce, no matter how much, will not be a problem for the reason that the switch is turning the counter on, NOT giving it a start counting command. And so the 5 milliseconds of bounce will not matter. When the switch opens the counter will stop. So any time not counted will be on the order of a few tenths of a millisecond when the switch was open during a bounce time. Panel mount time counters are available and they look way more cool than some cobbled stopwatch arrangement, plus the numbers are much taller. And using that second switch section, that is about as easy as it can get.
 
Last edited:
Top