Electronic – Timer activated by Reed on AC solenoid

7segmentdisplayreedswitchestimer

Let me start by saying thank you for taking the time to read this – I really appreciate it!

To the point: I am trying to create a 2-digit timer that resets and then starts at the activation of an external AC solenoid, and pauses at the solenoid's deactivation. The circuit I have created (see schematic below) works fine with a neodymium magnet, but not with an AC solenoid (it will only reset the timer, not start it)

Extended explanation: I work as a barista for a company with various coffeeshops, and in order to improve the quality – and especially the consistency of quality – of our coffee, I want to create an automatic shot-timer for our espresso machines. The time it takes for an espresso (or lungo) shot to complete is important information for a barista to ensure quality, and I want to eliminate the necessity to use separate, manually operated timers.

At the start of this project I had no experience with electrical engineering, and no knowledge of electrical components whatsoever. I have been "self"-teaching with the help of online resources. It has been a very educative experience, and a lot of fun to boot. But right now I believe I have reached a point where I need some professional advice to help me finish the project.

We work with Kees van der Westen espresso machines (Mirages, mostly), and the water supply to the groupheads is regulated by solenoid valves. As I mentioned before, my current circuit (which, as you can see, uses two Reed switches) works fine with neodymium magnets, but not with an AC solenoid. It will only reset the timer, and not start it. And when I place the reed sensors inside the espresso machine, near the solenoid valve, the result is a chaotic flickering of the 7 segment display (presumably because of "noise" form all the power cables).

I would really appreciate some advice as to how to modify the circuit to get it to work with an AC solenoid, and to protect it from any unwanted interference from nearby magnetic fields (if this is really an issue).
Also, this is my first time designing a circuit and a schematic, so any general tips and comments will also be very much appreciated.

shot timer circuit

I have also uploaded a video demonstration of my current breadboard prototype. As you can see in the video, the reed switches are connected with wires, as they will be when I eventually turn this into an end-product, because the display will be on the outside of the espresso machine, with the reed switches inside of it.
Also, on this breadboard I have connected only one display and 4026 ic for the sole reason of keeping it easier to work with. Also I'm using a 9v battery simply because that is one I have a breadboard connector for. On the eventual PCB I intend to use a 3.3V button battery.

Link to the video (be sure to set to HD): https://youtu.be/Iy0TjIrrIA4

Edit: in the video you can see that sometimes (or more accurately: one time in this video) the timer acts erratically. I believe this to be solely due to the position and approach of the magnet; I can get it to work consistently if I place the magnet right and approach it in the same manner and orientation

Best Answer

I strongly suspect your reed relay is too fast to stay closed during the zero crossings of the AC field. If I'm right, it's resetting and starting the timer 120 times a second. If you put a cap across it, or a debounce circuit, it will probably work.