3

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.

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" from 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 a 4026 IC for the sole reason of keeping it easier to work with. Also I'm using a 9 V battery simply because that is one I have a breadboard connector for. On the eventual PCB I intend to use a 3.3 V 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.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
MartinE
  • 31
  • 4
  • 1
    I use a German ECM E61 system at home. There's a display and a timer there, already. I had a look at the Mirage and I can see why you are considering the idea. There are levers being manipulated and I'm wondering why you didn't simply attach a tiny permanent magnet to something that moves, such that the motion to start causes the magnet to go into proximity of the reed relay. Could you discuss that question? (It's good to have context for questions asked here. +1 for that. I think it shows a respect for the time of others and respect for your own question.) – jonk Nov 13 '18 at 21:38
  • Thanks for your reply, jonk. Our mirages are built without levers and use simple push buttons as actuators for the various programmed settings. Using the magnetic field of the solenoid valves seemed like the best way to go without risking to void the warranty of the machines by modifying existing cables or logic boards. (By the way, nice espresso machine to have at home!) – MartinE Nov 13 '18 at 21:44
  • 1
    I wanted something I could actually get into and repair. I was disheartened by looking at typical home espresso machines, their incredibly complex innards almost impossible to repair, etc. So everything was about having access to the service manual, full access to parts at reasonable cost from a variety of sources including the original manufacturer (which they promised, in writing.) I see your point about the button. But isn't there something that "moves" in response to the button, then? Actuator arm? Something? It avoids this entire AC DC question, I think. – jonk Nov 13 '18 at 21:58
  • Unfortunately all that moves is the button itself (too small a movement, obviously), and the pin in the solenoid valve (also too small a movement and can’t attach anything to it). Behind the buttons is just a simple pcb that sends an electric signal to the machine’s computer that in turn activates the solenoid valve; no usable mechanical movement. – MartinE Nov 13 '18 at 22:05
  • 1
    That's annoying, but clear to me now. I have been through the process of adding functionality to existing equipment (for example, turning an IBM Model 85 Electronic typewriter into a printer back in 1982 or so) and all the work required to investigate and then design an approach to solving problems like this. This isn't to say that I know how best to approach this. I don't. But if I were tackling this and wanted to create an adaptable unit that was cheap yet full featured, I'd be using an MCU and hall effect. AC and DC vagaries can be "managed in software" easily. Fewer parts, cheaper, etc. – jonk Nov 13 '18 at 22:12
  • Thank you very much for the suggestion! It’s late here now but I will most certainly look into that tomorrow! Gets me all excited thinking about a new approach and about all the things I could learn. – MartinE Nov 13 '18 at 22:20

2 Answers2

1

Your circuit looks fine, with 1.5 adjustments. First, add a decoupling capacitor across the power pins of each IC. A typical value is 0.1 uF, such as a small ceramic type. As close as possible to the power and GND pins, with short leads. Second, a minor thing, you can eliminate R20. R18 can pull both Reset inputs down to GND.

The problem is that your reed switches are designed to work with a steady magnetic field, such as that from a permanent magnet, while the field around the solenoid is reversing polarity 60 times each second. SW1 is chattering, constantly resetting the counters. SW2 also is chattering, interrupting the clock signal such that the counters would see many more clock edges than intended it they weren't being constantly reset.

I completely get your need for a non-contact sensing mechanism, but it does complicate things. The industrial way is to put a small coil of wire near the solenoid, acting like the secondary of an air-core transformer. The coil will produce a very low energy 60 Hz voltage that can be turned into an on/off signal. An alternative is a Hall effect sensor, a solid-state device that produces a square wave that can do the same thing.

There are others on this forum with more experience in the today's hobby electronics world. Someone like Adafruit might make a little sensor module to do this.

AnalogKid
  • 16,865
  • 1
  • 13
  • 25
0

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.