0

Trying to latch a 200 mS, LOW event to log the event. LOW only occurs when external Watchdog timer sends reset pulse to the Arduino.

Is a D Latch suitable for this application? It has been years since my digital class; help most appreciated.

How would you proceed?

3
  • Just as a side-note; you know the arduino chips have build in watchdog timers, right?
    – Gerben
    Commented Jan 24, 2016 at 19:32
  • I am using Switchdoc Labs, "Dual Watchdog Timer" with an Arduino Mega running a Data logger/web server.
    – William
    Commented Jan 26, 2016 at 2:44
  • Project web page: tinyurl.com/Data500
    – William
    Commented Jan 26, 2016 at 9:11

1 Answer 1

1

I understand your question to be : you want to latch (and indicate) whenever an external watchdog timer has reset your Arduino.

D type flip flop (latch) can be used. You would use the clock input as the trigger. However, most D types clock on a rising edge. You could use an inverter on the input to the clock to get the D type to clock on a falling edge. You would also connect the D (Data) input high (logic 1). Then when your input (event) goes low, the Q output will latch high. The 200 mS is irrelevant because the latch ocurrs at the change from high to low (low to high on clock input).

You would also need a means of resetting the latch, which many D types have a reset input or a clear input.

enter image description here

You could also use a more simple SR latch (set reset latch) using 2 Nand gates. SR latch changes state when the “set” input goes low (providing that R input was high). Make the R input go low to reset the latch.

enter image description here

POSSIBLE ALTERNATIVE : If you have some means of operator intervention (or even a switch). You could have your program light an LED at startup. Operator (person) could reset LED. Then afterwards, any reset (restart of program) would light the LED.

7
  • I tried a S-R Latch (74LS279); so far it is not working. What voltage should I expect on a LOW to the S input? Measured 150mV, is this a failed 74LS279?
    – William
    Commented Jan 25, 2016 at 19:13
  • First, power from 5 volts. Second : Tie all unused inputs HI. On the SR latch that you are using, R must be high (except when resetting). When S goes low, the Q output should be near 5 volts.
    – Marla
    Commented Jan 26, 2016 at 0:43
  • I have the 74LS279 wired and working; however, there is not enough drive from the external Watchdog timer output. Will two inverters in series give me more drive? Measured 2.5 volts at the bottom of the pull-up resistor. Need to go to the Arduino Mega reset and to the S input of the Latch. --Thank you for the help!
    – William
    Commented Jan 26, 2016 at 2:40
  • Documentation on the Dual WatchDog is poor. The output is reported as "pulled to ground", "otherwise high-impedance". You didn't say what value of pull up resistor you are using. Measuring 2.5 volts indicates that your pull up resistor might be too large of a resistance.
    – Marla
    Commented Jan 26, 2016 at 12:54
  • Normal operation of Arduino (program running) Q= HIGH, S" HIGH, and R= LOW. When a WATCHDOG reset occurs I see Q go momentarily LOW (0.565 Volts. --HIGH being 4.77 Volts.) Observation made with voltmeter. Problem is that it happens so fast by the time the Arduino reads the pin for Q status; it is already a HIGH. I never get a Q value Of LOW when I read the pin connect to Q. I am trying to do a conditional based on the status of Q. Suggestions?
    – William
    Commented Jan 27, 2016 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.