Activating a digital timer using light as a trigger

MisterBill2

Joined Jan 23, 2018
27,514
Easily fixed...
Once again, when the switch is simply enabling the timer counter, the few milliseconds of contact bounce are not an issue because they just result in the loss of a few milliseconds of a count of 50 to 100 seconds. And a millisecond = 0.001 second. So the error introduced is far less that 0.1%, quite good enough for most scientific measurements. This is not a trigger to start, trigger to stop application.
 

Irving

Joined Jan 30, 2016
5,119
This is not a trigger to start, trigger to stop application.
It is if following the OP's original plan. I looked for a small, neat, panel timer that starts and stops on a single switch contact. I couldn't find anything suitable, that wasn't a DIN rail mount, or only a 5 digit counter, and was under $60. The best I came up with was this one which is massive overkill and physically much larger AND needs a 24v supply so adding to the cost. Maybe you have better sources.

I understand that you're coming at this from an industrial engineering perspective, and appreciate your views on reliability and quality. But we mustn't lose sight of the OP's original objective and overcomplicate things. This isn't a process control problem; the OP was looking for a cheap (<$90) hobby level, non-microcontroller, home-built, alternative to a commercially available solution. So far we've collectively failed... :)
 

MisterBill2

Joined Jan 23, 2018
27,514
OK, for a cheap timer there are just plain counters, and a divide by 6 or 5 off the AC mains will provide the cheapest accurate ten hertz signal to count. That would give a time reading in tenths of a second with a 5 digit counter.
And I am thinking that the "cool factor" of a time counter matching the temperature controller would make a somewhat higher price quite acceptable.
But to get around any possible contact bounce issues, adding a set of one-shots, one triggered on contact closing and the other triggered on contact opening can be used to create a one-second pulse for start and stop for use with a cheap stop watch. That would use a CD4538 dual one-shot IC. But now it would also need a power source and an enclosure, although the circuit board could be about one inch square.
OR the TS could use one of those little computers, such as an arduino, to emulate a time counter.
 

MisterBill2

Joined Jan 23, 2018
27,514
With that red stopwatch shown, does it function correctly if the start button is pressed and held? and does it stop properly and hold the display if the stop button is pressed and held? If it works under those conditions then the answer is at hand, and rather simple as well. And since a real stopwatch application will ignore the length of the start and stop commands, provided that they do not overlap, the answer will be both simple and cheap and will allow the use of that stopwatch shown. The detailed description awaits the answer to these first two questions.
 

Thread Starter

flyboy320

Joined Jul 21, 2020
37
With that red stopwatch shown, does it function correctly if the start button is pressed and held? and does it stop properly and hold the display if the stop button is pressed and held?
It will start if the button is help down, and then after a few seconds if you release the button and press and hold it again, it will stop.
 

Irving

Joined Jan 30, 2016
5,119
It will start if the button is help down, and then after a few seconds if you release the button and press and hold it again, it will stop.
Yes, the one I have here is the same, seems identical to the one you linked to in post #1, same generic chip. I have something breadboarded that seems to work, bit more testing later when I'm finished teaching for the day.
 

MisterBill2

Joined Jan 23, 2018
27,514
Yes, the one I have here is the same, seems identical to the one you linked to in post #1, same generic chip. I have something breadboarded that seems to work, bit more testing later when I'm finished teaching for the day.
OK, then the solution is at hand. Use the other side of the mains power switch to trigger a long start puls when it switches on and a long stop pulse when it switches off. The pulses being many times longer that the contact bounce time. One IC, not a 555, but a dual oneshot, one triggering on rise and the other triggering on fall. Then an OR function and a driver to interface with the buttons on the timer circuit.
 

Irving

Joined Jan 30, 2016
5,119
OK, then the solution is at hand. Use the other side of the mains power switch to trigger a long start puls when it switches on and a long stop pulse when it switches off. The pulses being many times longer that the contact bounce time. One IC, not a 555, but a dual oneshot, one triggering on rise and the other triggering on fall. Then an OR function and a driver to interface with the buttons on the timer circuit.
Yes, but it needs to run on 1.5v as these timers use an AAA cell.

So I opened it up, as you do...

1596206550126.jpeg

The contacts are commoned to +1.5v and require ~10uA to recognise a closure. They appear to debounced already as even using a hand-held resistor to tweak them I couldn't make it misbehave...

1596207457052.jpeg

External circuit needs to be connected between Batt+ (top right after on/off switch) and the test pad on the trace near the RH switch contact. As its a single-sided board, I'd probably drill through the centre of the test pad and bring the wire in from behind. Interestingly the contacts are on the battery side of the on/off switch.
 

MisterBill2

Joined Jan 23, 2018
27,514
The external logic does not need to operate on the same battery as the stopwatch, it can use either 3 AA batteries or a 9 volt battery. Hopefully they can be triggered by a saturated transistor, either FET or bipolar. THAT couold be the big challenge indeed. Adding two driver transistors and two small relays to the package would take the volume well over a cubic inch.
But since they need a pull-up to trigger, possibly just 2 clamping diodes and they could be driven off the appropriate CMOS outputs directly. THAT would be the simple way to go.
 

Tonyr1084

Joined Sep 24, 2015
9,744
This 1596226750889.pngis a switch on the timer. Whichever is the start stop button is the only place you need to connect to the timer. As for the electronics circuitry needed to activate this switch, a simple transistor across the switch should serve to turn it on and off. I believe the circuitry has already been described. The two thin wires shown at the top and bottom of the illustration needs to be connected polarity correct when using a transistor or FET.
 

MisterBill2

Joined Jan 23, 2018
27,514
The statement was very specific, that the button connected that input to the battery positive. So a CMOS output, limited to an appropriate voltage, can provide the drive. Atransistor may not saturate to a low enough Vce to do the job, and besides, it would need to pull positive. Hence my thinking that a CMOS output pulling up, with series diodes to drop the excess voltage, will work.
 

eetech00

Joined Jun 8, 2013
4,705
Hi

What about something like this?
Its timer is programmable and shows a load of 220v but can be used with other voltages.
Could be powered by 9v wall wart.
Its $14 USD.

BTW- I don't know why the LCD screen says PO:OP. Maybe for waste management?:D


1596298161018.png
1596298641695.png
 

Irving

Joined Jan 30, 2016
5,119
Ok, this works in simulation, I've not had a chance to breadboard this final one, but it should play. It gives a 120mS second pulse on both switch transitions, which works well on my timer.

1596452198833.png
 

MisterBill2

Joined Jan 23, 2018
27,514
An MC14538 dual one-shot can do the same with only 2 resistors and 2 capacitors. And it is already able to trigger on either rising or falling edges. OOPS, a pull down resistor will also be needed, so make that three resistors.
 

Irving

Joined Jan 30, 2016
5,119
Agreed, it can be done simpler, but I liked the intellectual challenge of meeting the original requirement, using discrete parts as per the original circuit (which couldn't be repurposed) and that ran off the existing battery. I could have equally implemented it with an LMC555 (which will run on 1.5v) instead of Q1/Q2 but you still need Q3 to invert the trigger pulse.

But as the MC14538 it won't run on 1.5v, it will need at least one other AAA battery and an on-off switch, and some signal conditioning on the outputs to 'OR' the two oneshot outputs together and limit it to 1.5v so add 2 diodes, 2 resistors.

:D
 

MisterBill2

Joined Jan 23, 2018
27,514
Agreed, it can be done simpler, but I liked the intellectual challenge of meeting the original requirement, using discrete parts as per the original circuit (which couldn't be repurposed) and that ran off the existing battery. I could have equally implemented it with an LMC555 (which will run on 1.5v) instead of Q1/Q2 but you still need Q3 to invert the trigger pulse.

But as the MC14538 it won't run on 1.5v, it will need at least one other AAA battery and an on-off switch, and some signal conditioning on the outputs to 'OR' the two oneshot outputs together and limit it to 1.5v so add 2 diodes, 2 resistors.

:D
No, given that the input voltage and current requirements of the timer are as has been posted, the 4538 will not need any output conditioning, only some voltage dropping, most easily done with two diodes forward biased towards common when the input is high. And since each side ot the 4538 has a true and complement output no logic inversion is required.
One last thought is that while I have not seen published specs for lower voltage operation that does not mean that it will not work at the lower voltage. Certainly it would be worth an experiment.
And finally, while the circuit in post #75 would work, it is rather complex to be suggesting that a relative newby construct and package. Regardless of any cesign brilliance it still has a whole lot og components and connections.
 

Irving

Joined Jan 30, 2016
5,119
And finally, while the circuit in post #75 would work, it is rather complex to be suggesting that a relative newby construct and package. Regardless of any cesign brilliance it still has a whole lot og components and connections.
You clearly didn't look at the circuit the OP was asking about in post #1 then. Its not hugely more complex than that, and my understanding - from actually discussing the requirement with the OP rather than thrusting the brilliance of my umpteen years of heavy industrial engineering solutions at the thread without reading/understanding the back story - is that the OP is more than capable of doing this... whether he thinks it worth doing is entirely up to him.

And yes, it would be worth an experiment, as it would be with the LMC555, to see if they'll work at 1.5v. Why don't you go ahead and try it?
 

eetech00

Joined Jun 8, 2013
4,705
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)?
How long must the button be held down to start the brewing?
I know this is on a limited budget, but how much are you willing to spend?
 
Top