Need module to show time of day when a relay opens or closes - Page 1
Forum section: electronics / projects

author: calzap
author_rank: Frequent Contributor
timestamp: April 03, 2025, 10:35:35 pm
content: It’s for an irrigation system that pumps from a pond. Sometimes the pump quits operating, usually because the loss of prime detector has signaled a loss (sometimes spurious). We keep a written log of when valves are switched on and off, so if the pump protective systems cause a shutdown, we’d like to know when. This knowledge would allow compensatory irrigation to be added to the areas that didn’t get the full amount because of the shutdown.I can add a relay to the system, NO or NC, that will activate when the system is OK (or not OK).What would work best would be a module connected to the relay that:1. has a display that shows the time of day at all times2. has a display that: a. at the press of a button, automatically begins to continuously display current time of dayb. when relay mentioned above changes state, the current time of day will be heldc. has on/off switch for this display only3. has on/off switch for whole moduleFlexible on power. Lots of 9 VDC, 12 VAC and 24 VAC already available. Can supply any voltage but want to keep it low.A simpler approach, but not as desirable, would be a resettable digital timer.Ideas?Mike

author: xvr
author_rank: Frequent Contributor
timestamp: April 04, 2025, 11:57:31 am
content: Arduino/RaspberryPi + small LCD screen (I2C or SPI) + RTC HAT

author: BILLPOD
author_rank: Frequent Contributor
timestamp: April 04, 2025, 01:41:28 pm
content: Good Morning Calzap, Perhaps a DMM with logging capabilities. Many of them can produce graphs and charts that can be printed from Office-type software.

author: jwet
author_rank: Frequent Contributor
timestamp: April 04, 2025, 01:48:55 pm
content: Inexpensive data loggers can be had for pretty cheap. They usually run on a coin cell for a year and store events in BB ram or an EEPROM. An old standard was the HOBO series by Onset but there are tons and probably very inexpensive ones from China. The most common one log temperatures using a thermistor probe that plug in with a mini phone jack. You could make a dummy probe that had a resistor across the lines and then a second resistor in parallel with your contact closure. Pick the two resistances so they would read some temperature that you could tell open or closed.Some DMM meters will do logging like the EEVBlog 121GW does logging. Many can transmit data over BT or WiFi.As the last poster said, it might be fun to build something with an Arduino or ESP32 (WiFi enabled) You could even sense the contact closure and pump inlet pressure and detect a loss of prime. Sky's the limit. Have fun. I have a pump house on my vacation property that's a bit up the road- it services a dozen houses. I has a red/green light on the outside that shows status. I take a look everytime I go up the road. The red is a fail and the green tells me if the power has failed- the most common problem.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 04, 2025, 07:21:00 pm
content: Quote from: calzap on April 03, 2025, 10:35:35 pmYou could do both?Add an hour-meter to each pump that has LCD and stays with the machine, and then a removable more complex data logger, if you need more detailed time information.The hour meter is very simple and can be read by untrained staff.

author: calzap
author_rank: Frequent Contributor
timestamp: April 04, 2025, 09:12:26 pm
content: I need something relatively nontechnical folks can do … like push a button or read a display. The time of day or the elapsed time when the safeties stopped pump operation needs to be comprehended quickly just by reading a very visible display and then written by hand in the irrigation log. A data logger is out of the question.I haven’t found a ready-made module that does time of day as described in my original post. Yes, I could design, build and program an Arduino-based module to do it, but don’t want to invest the time. There’s no shortage of resettable elapsed time meters, so that’s probably the route I’ll go.Thanks for all the input.Mike

author: mariush
author_rank: Super Contributor
timestamp: April 04, 2025, 11:18:04 pm
content: A RTC clock/calendar chip solves the time problem.For display, you could use a raw lcd screen with segments and a lcd segment driver chip or you could use a classic 16x2 display ... both will give you enough screen real estate to show time and the "freeze time" ... a 16x2 screen would give you space for date, time, last 2-3 events, even draw menus...example 16x2 screen :https://www.lcsc.com/product-detail/LCD-Screen_HS-HS1602A_C5329588.htmlloads of them on digikey as well :https://www.digikey.com/short/m4ztf789You could add a FRAM chip to log stuff to it, something in the 4 KB to 32 KB would be plenty, each record could be something like 4-8 bytes of data ... date and time and event code , and then user could use a bunch of buttons ( up , down , ok , hold OK for 2-3 seconds to exit menu / go back , or hit ok on a menu entry that says go back) and a on-screen menu can allow user to see last N events recorded in the fram chip.You could also consider adding support for a thermal printer, so you could print one or a few lines of text each time something happens. User would have the paper log to look back and see if something went bad.For example, seehttps://www.amazon.com/Thermal-Printer-Embedded-Serial-Ticket/dp/B07PXB7P37Has serial input so it should be easily controllable with a microcontroller.

author: ledtester
author_rank: Super Contributor
timestamp: April 05, 2025, 12:15:16 am
content: Quote from: calzap on April 04, 2025, 09:12:26 pmCould a Wifi door/window alarm work in your situation? They just sense when a reed switch is opened/closed. Automatically logs the event to the cloud.

author: calzap
author_rank: Frequent Contributor
timestamp: April 05, 2025, 07:02:26 am
content: Don’t want or need any digital record keeping. The folks who operate the irrigation system most of the time don’t understand electronics, computers or digital data. Data logging to electronic memory, a computer, phone app, the cloud, etc. is not on the table and not needed anyway. The operational folks can respond to indicator lights, audio alarms and analog/digital displays of time, pressure, flow, etc. They can flip switches, press buttons, turn valves and write data (dates, water pressures, valve open/close times, etc.) on paper; and tell me if there is a problem they can’t handle … and nothing else.So, all I want is a module to show in a display either the time of day or elapsed time when the pump became non-operational. That way the operators can provide correct amounts of additional water to lines that didn't get their normal amount because of the pump shutdown. This would be done the same day or the next or not at all. And I am not going to build anything from scratch. So, it looks like it will be a resettable elapsed time display.I do really appreciate the responses.Mike

author: Poroit
author_rank: Frequent Contributor
timestamp: April 05, 2025, 07:29:18 am
content: G'day calzap,There may be something in the these ranges that suit your application and budget.My company used to sell the Texmate series and write macros for the Tiger series.https://www.texmate.com/products/...https://www.texmate.com/search-results/?q=timer+counterhttps://www.omron.com.au/products/family/1539/https://www.hengstler.de/en/s_c10010416/Counter/Time_counters/636_DC_-_Hour_meter_/_Hour_counter/

author: Solder_Junkie
author_rank: Frequent Contributor
timestamp: April 05, 2025, 08:27:57 am
content: Quote from: xvr on April 04, 2025, 11:57:31 amIt's a "walk in the park" job for a Raspberry Pi. Many school kids create projects for these versatile computers, while I am no programmer, I have a routine running on one of mine that monitors the internet at home and activates a relay to remove the power from the router/modem if it fails to ping a site. It does this every 4 minutes and stores a log of the result. The log is deleted every morning at 11am and it starts logging again.I appreciate you wanted something simple and not involving a computer, but a Pi with a local screen and remote access to a log file would be an elegant solution. Incidentally the home router is running on cellular broadband, very cheap here in the UK.Image of the log produced below.SJ

author: RoGeorge
author_rank: Super Contributor
timestamp: April 05, 2025, 09:08:05 am
content: The easiest non-technical I can think off would be to put a jar in the field, and next day to look at how much water is still in the jar, then compensate for the missing quantity.If evaporation is too high for an open jar, add yet another sprinkle with a very, very low water debit, that sprinkles inside a bottle or inside of a long cylinder, such that the water level in the bottle will become an indicator of how much water was put in the field.Or, if the debit is not too high, add one of those water-meter indicators on the incoming pipe, and manually log the numbers on the water meter (or the Wi-Fi kind of water-meters for the more techie kind that wants to read the total water volume remotely).

author: calzap
author_rank: Frequent Contributor
timestamp: April 06, 2025, 02:41:43 am
content: The Autonics FX4Y timer (https://www.digikey.com/en/products/detail/industrialemart/FX4Y-I2/14324296) looks like it might work. Very readable display. Lots of options. Would use in timer count-up mode in hours. I can mount it and power and reset switches in a box over the switchboard for the valves. Easy for operator to punch the reset button after they flip valve control switches. The Brannon timer that Dave did a video on should work too, but I prefer a bright display.Will have timer controlled from float switch module. This module indicates prime status of pump and is the most frequent cause genuine and spurious shutdowns. Actually, it’s the float switch, not the module per se, that can cause spurious shutdowns, but that’s a topic for a different post. A schematic of the float switch module is in the pic below. For electrical isolation, a relay would be added, activated from terminal 5 of the current relay (this terminal provides power to the blue, “prime OK” LED). Contacts from the new relay would be connected to a new jack mounted on the box of the float switch module. Then a cable would go from there to the timer module. The system would be setup so that when the relay activated, inhibit (hold) mode would be invoked in the timer.Mike