|
Post by James on Feb 4, 2019 12:49:30 GMT -8
Hi there,
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.
Does anyone have any idea how to correct this?
Many thanks,
James
|
|
|
Post by James on Feb 4, 2019 15:18:10 GMT -8
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.
|
|
|
Post by SDL on Feb 4, 2019 16:50:47 GMT -8
James,
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.
Hope this helps.
BP
|
|
|
Post by James on Feb 4, 2019 16:59:17 GMT -8
BP,
Numbers on the bottom of the board are: 100217-01-001 (I bought them from you last week)
I have the same power supply for the watchdog and the Pi, and a common ground. I've been using the Grove connector - I assume VDD and GND are the same for the Grove connector and JP5?
Is there a difference between Dog1 and Dog2 then? That wasn't overly clear on the documentation and I've been using Dog2 (assuming that there wasn't a difference)
I'm not saying your board doesn't work, this is the frustrating thing - I know it should but I'm struggling.
Thanks for the schematic.
|
|
|
Post by SDL on Feb 4, 2019 17:02:31 GMT -8
There is not supposed to be a difference, but I'm just trying to limit the variables here.
You are running the board at 3.3V if you are driving it with GPIOs from the Raspberry Pi directly?
You have the latest board. Just being careful.
BP
|
|
|
Post by James on Feb 4, 2019 17:04:45 GMT -8
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.
|
|
|
Post by James on Feb 4, 2019 17:05:58 GMT -8
BP,
I'm running the board at 5V - from the same supply as the Pi
James
|
|
|
Post by SDL on Feb 4, 2019 17:07:40 GMT -8
Ground must stay common. Does your relay take 3.3V inputs? Does it react to 300ms signals? Get this to work by watching the lights first with the relay disconnected.
If you break the grounds, I have no idea what would happen. You must have a common ground.
BP
|
|
|
Post by James on Feb 4, 2019 17:14:22 GMT -8
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?
|
|
|
Post by triggerfish on Feb 5, 2019 6:13:57 GMT -8
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!
|
|