I have a dual watchdog timer connected to a raspberry pi, breaking the power connection with a relay. Once my program is running, if it's then stopped the watchdog will trigger. If I run it from boot without running the program then it won't. Appears to be something tri-state related. When the program is running the trigger pin sits around 4V and is then pulled to GND to pat the dog. When the program hasn't booted, the trigger pin sits around 1.6V and will not trigger the pulse high reset line on the watchdog. I thought I'd had it working on another Pi but the second one is proving difficult.
Just to add to the above... I was previously using JP7 to trigger the timer but after finding out that this needed to be left at high impedance, I struggled to get it to work with the way the pi boots. I tried using the Dog2 trigger on the Grove header and it seemed that this just needed to be left floating in order for the watchdog timer to start continue counting. This appeared to work on one pi but I have since been struggling with a second. Unfortunately I don't have the first with me still to compare but I don't think anything is different.
Pleased tell me what the numbers are on the bottom part of the board. You should have at least the 110216-01-001 board or higher.
I really have no idea what your Pi is doing and I really don't understand what you are doing in the second message "one pi works and the other doesn't". I can't really help you there. John gave me some information on what your problem was last week.
However, let's look at our problem. JP7 needs to be left in high impedance. That is correct. You pull it down to pat the dog and then put it high to let the dog run. It is hard to measure a tristated line with a volt meter, BTW.
You have to quickly get to the dog after boot up on the Pi to start patting it. This means you have to have the same power supply for the Raspberry Pi as the Watchdog board. And you have to have a common ground. You need to leave it in high impedance after the Pat.
I would use the Grove connector instead.
Using the Grove Connector, You connect Pin 1 of the D0 Grove Connector (right side) to your GPIO pin. Pin 1 has a 100K resistor pulling it high by default so it will always be in the 1 state on powerup.
Then you can pat the dog by writing a 0 to the GPIO pin connected to the WatchDog and then either tristating it or writing a 1. The grove connector has a buffer and the aforementioned pullup.
I would use the Dog1 trigger in most cases. Then you don't have to worry about possibly cascading the timers.
I've sent you the schematic on the chat channel to help out.
This board works. We have hundreds of customers for this board and we use it a number of our designs.
Also, when power cycling the Pi with a relay, would you break the ground or VDD? I've been breaking the ground as I found VDD wasn't resetting the device. Could that cause a problem as you mentioned common grounds? They are only broken during the 300ms period that pulse high is triggered on the watchdog.
Relay is a 5V coil but can be switched with 3.3V - it does react to 300ms signals. The relay will the break circuit and power cycle the Pi, it just then won't start counting again after, it seems to get stuck.
With a regular Pi, should breaking VDD (with a relay) and keeping ground connected reset the pi?
This sounds like my problem. I have another thread in the GroveWeatherPi section. When de power is shut down, due to low battery power, the system does not boot automatically when the battery is recarged again. I need to disconnect the powercontrol wire the let the system power up and then reconnect it to have the watchdog functionality back again. At the moment I just leave the wire disconnected. The unit now shuts down due to low power. I would love a solution for this!