2017/01/28: An issue regarding the front page of /jp/ has been fixed. Also, thanks to all who contacted us about sponsorship.
I would like to mod a kitchen timer which you press to start/stop once and then press start/stop again to stop.I would like to use it to count how long a mechanical switch has been pressed.Any one have thoughts on how to mod the kitchen timer to trigger (press start/stop) when the mechanical switch has been pressed and then to trigger again (press start/stop) when the mechanical switch has been released?
Buy a timer with a pause function?
>>1132396depending on build of the timer and precision you want it have, it may as well be easier to build one from scratch.just use a simple counter clocked at suitable frequency and trigger counting when button is pressed.
>>1132398I'm not sure how that'd work...>>1132415I'm looking for timings around 30s, it's for an espresso machine to time the espresso shots.There is a mechanical lever switch on the machine which triggers the pump solenoid and pours the espresso, I would just like to hook up a kitchen timer to this switch.I have previously modded a wireless door chime to trigger from the output of a photoelectric switch and that is still working pretty well.I saw someone do an arduino project for this very problem, he used a hall effect sensor with the arduino to sense the pump solenoid activating (the mechanical lever switch activates the pump solenoid ) https://www.youtube.com/watch?v=mLaiLHmd-CUHowever, I think it'll be much more expensive in terms of time and materials to do the arduino well, as I would need a power supply, waterproof box, separate housing for the LCD if it's mounted separately from the arduino, etc.Do electronic button press timers exist?
>>1132426Would the timing be set and never changed?
>>1132430I'd be happy if it was just an elapsed time, i.e it would just show how long the espresso shot was poured for (25-40s).
>>1132432how familiar are you with digital electronics?
>>1132433I'm a bit rusty but I know fundamentals and have worked on some circuits...
>>1132396These timers have another nice function: when you set it to 00:00 (e.g. by pressing min+sec together) and you press start/stop, it starts counting up time. start/stop then pauses and un-pauses the counting.If I get it correctly, you want to know how long some button was pressed.So use an edge detection circut and wire it to the clock.Oldschool edge detection = clock (ne555) + some flip-flop (sn74hc74) + xnor/xor gate (cd74hc7266)But it's expensive when compared to effort of DIY'ng it with a cheap mcu (even if you'd count rtc in!).
>>1132450Yes I do want to know how long a button was pressed.>rtcWhat do you mean by rtc? Real time clock?Do you think completely making a circuit and then getting the housing (or printing it) and the LCD is cheaper than getting a cheap timer from China and then making the edge detection circuit for it?
>>1132460> Do you think completely making a circuit and then getting the housing (or printing it) and the LCD is cheaper than getting a cheap timer from China and then making the edge detection circuit for it?Yes, it is. $2 LPC1111 : http://uk.farnell.com/nxp/lpc1111fhn33-202-5/mcu-32bit-cortex-m0-50mhz-hvqfn/dp/2072184$2 7-segment 4 digits: https://www.aliexpress.com/item/4-Digit-LED-Display-Tube-7-segments/32591091564.html (I bet you can fin even less expensive ones)Plus you need a PCB and housing.Altogether no more than $10.
>>1132470Is there any reason for using that specific MCU as opposed to arduino?
>>1132554>Is there any reason for using that specific MCU as opposed to arduino?Price.You could go also for a PIC, attiny, 8-bit STM or MSP430, it'd be even less expensive.A shitty arduino clone from aliexpress is $3 and takes a month to ship.
>>1132655The espresso mechanical lever switch which I want to monitor operates a microswitch that has 230V AC as COM. The pump solenoid is connected to the NO terminal, the NC terminal is free.Do you think it'd be easier to monitor when the 230V AC is triggered or alternatively when the solenoid pump is activated (via a hall effect sensor)?
>>1132396Don't use a kitchen timer, use a stopwatch instead, they're designed to work the way you want them to work.You can't mod things like this to function differently anyway. It's all one integrated circuit, and the die is bonded directly to the PCB, under a blob of epoxy; there is nothing to modify.
btw OP, dunno if you're still around, but i had a go and simulated (in logisim) a simple circuit which does what you need. it consists of two d-flip-flops (available for example in 74* series as 7474 (dual D positive edge triggered flip-flop)), one inverter and one or gate (the latter two can be done using four nand-gates that are very conveniently available in one package 7400 (quad 2-input NAND gate)).instead of clk-source on pic you would have your sensor and instead of the counter on pic you would have your start/stop button.doesn't really get much more simpler that this.
>>1134317you'd need debouncing on the switch input, plus a 5V regulated supply, so not very practical. CMOS would help if it uses a 3V or better battery. also, if the start/stop switch is in a matrix, you'd need to add a 4016 analog switch on the output.
>>1132426>Do electronic button press timers exist?They're called RC circuits.