|
Post by triggerfish on Sept 27, 2018 21:09:51 GMT -8
I have a number 100217-01-001 printed on my board. I am not using the grove connector. I have it wired as the tutorial says.
WatchDog Board JP5/VDD Raspberry Pi GPIO Header Pin 1/3.3V Female to Female Jumper Wire WatchDog Board JP5/GND Raspberry Pi GPIO Header Pin 6/GND Female to Female Jumper Wire WatchDog Board JP7/Dog1 Raspberry Pi GPIO Header Pin 11/GPIO17 Female to Female Jumper Wire WatchDog Board JP4/ArduinoReset USB PowerControl TP3/COUT – Soldered To Pad (DO NOT CONNECT THIS WIRE UNITL YOU ARE DONE TESTING AND MODIFYING THE SOFTWARE!) Cut one end of 12 inch Female to Female Header Jumper Wire and solder it to TP3/COUT pad as shown below I have not made any code change, nor wired anything other than this. Should this work? Or is there more to do. I was wondering about the warning changing the software, but could not find anything about it.
|
|
|
Post by triggerfish on Sept 28, 2018 8:29:27 GMT -8
I disconnected my yellow wire and connected both boards with a grove cable. Now at least it boots when powered on... Not sure if all my problems are gone now, but at least it boots.
Any more info on my boards number?
|
|
|
Post by SDL on Sept 28, 2018 9:14:17 GMT -8
Peter,
You have the latest board. This is a tricky thing to help you debug as we can't see every wire and where you have put it!!
Stop the software and see if the watchdog will now work with the grove connector plugged into it.
BP
|
|
|
Post by triggerfish on Sept 28, 2018 9:56:00 GMT -8
Peter, You have the latest board. This is a tricky thing to help you debug as we can't see every wire and where you have put it!! Stop the software and see if the watchdog will now work with the grove connector plugged into it. BP Remote debugging is nearly impossible  All I can say about the wiring is that I by now triple checked that everything is where it supposed to be according to the tutorial, with the exception of the powercontroller-watchdog wire, which is now disconnected and both board are connected with a grove cable.
|
|
|
Post by roadkingrandy on Sept 29, 2018 7:46:12 GMT -8
I have version 100217-01-001. I get the same behavior (no power from the USB Power Control board) using the Watchdog Grove connector going to Pi2Grover D12/13 or using the original setup trying Dog1 Reset to GPIO17 and connecting VDD and Gnd with jumper cables. If I understand the script on that link correctly, we want to connect the Watchdog reset to GPIO6 and then see if we are getting the reset signal. I connected VDD and Gnd to the Watchdog board and only connected Dog1 Reset to GPIO6. There is nothing connected to the Grove connector. Here's my output: Waiting for rising edge on port 6 Rising edge detected on port 6. Edge Detected at:2018-09-29 11:26:55 Waiting for rising edge on port 6 Rising edge detected on port 6. Edge Detected at:2018-09-29 11:27:04 Waiting for rising edge on port 6 Rising edge detected on port 6. Edge Detected at:2018-09-29 11:27:12 Waiting for rising edge on port 6 I shut the A+ Pi down and connected Dog1 reset to the USB Power Control board. Still no power coming from the USB Power Control board to the Pi.
|
|
|
Post by SDL on Sept 29, 2018 14:51:49 GMT -8
How did you connect Dog1 to the USB Power Control board? Which line specifically on the Dog and where to on the USB PowerControl board? Your output looks perfect for a functioning WatchDog timer with the delay set to about 9 seconds. Which is pretty short. Try connecting a GPIO from the Raspberry Pi to Grove connector pin 1 (Dog 1 reset) - yes, you could use the pin headers but then you have to tristate the output between pulses to low. With Grove pin 1, you just need to set it high and then pulse it low for say, 50msec. Take a look at this posting too for debugging: forum.switchdoc.com/thread/685/gpio-18-watchdog-inputBP
|
|
|
Post by roadkingrandy on Sept 29, 2018 17:19:27 GMT -8
How did you connect Dog1 to the USB Power Control board? Which line specifically on the Dog and where to on the USB PowerControl board? Your output looks perfect for a functioning WatchDog timer with the delay set to about 9 seconds. Which is pretty short. Try connecting a GPIO from the Raspberry Pi to Grove connector pin 1 (Dog 1 reset) - yes, you could use the pin headers but then you have to tristate the output between pulses to low. With Grove pin 1, you just need to set it high and then pulse it low for say, 50msec. Take a look at this posting too for debugging: forum.switchdoc.com/thread/685/gpio-18-watchdog-inputBP I had the timer set to around 240 sec like the GroveWeatherPi instructions said, but dialed it down for this test so it cycled faster. I connected the Grove connector on the Watchdog to D12/13 on the Pi2Grover board and Dog JP4 Arduino Reset to GPIO6 and ran the test script again. Same output as before: Waiting for rising edge on port 6 Rising edge detected on port 6. Edge Detected at:2018-09-29 21:12:14 Waiting for rising edge on port 6 Rising edge detected on port 6. Edge Detected at:2018-09-29 21:12:22 I think the Watchdog is working fine except for what's being sent to the USB PowerControl board. The GroveWeatherPi instructions say to connect Dog JP4 Arduino Reset to the TP3 pad on the USB PowerControl. When that line is connected before you switch on power via the SunAirPlus board, no power is passed through the USB PowerControl board. Whether connected via the jumpers or the Grove connection, the Dog board is acting consistently the same.
|
|
|
Post by SDL on Sept 30, 2018 11:47:06 GMT -8
OK. I'm going to have to try this when I get back to the lab later today. I can't quite diagnose what is going on here with out a test unit.
BP
|
|
|
Post by roadkingrandy on Oct 4, 2018 14:00:33 GMT -8
... So if you use the Grove connector, you'd need to mod the python script so you are sending the reset signal on the correct GPIO... OK, since I just have "a general idea" of what I am doing. I am no hard core technician, nor python programmer. I work my way around readme's  I did not got that I would need to modify the python code to make it work, so that might me my problem...Could you point me to those changes? Besides that, I can try the grove connector, because if my setup fails because of the wrong code, I might get lucky with the grove cable. In either case it would be wordth trying. On the other hand... When all is powered off, there is no code that would cause the setup not powering on... I think... The basic function of the Watchdog is to send a signal on the external reset lines (like JP4 Dog1 Arduino Reset) every 30-240 seconds - when that happens is based on what you have the timer set to. To prevent this from happening, you need to send a signal to the Watchdog to start the timer over. So if I tell the Watchdog to send out the external reset signal every 240 seconds, I'll need to tell it to reset the timer in less than that amount of time. What the Switchdoc guys call "patting the dog". That's what we're doing on jumper going to Pi2Grover GPIO Pin 11. GPIO Pin 11 is GPIO17. If you look at the GroveWeatherPi.py python script you'll see this snippet of code that defines the patTheDog function: WATCHDOGTRIGGER = 17 def patTheDog(): # pat the dog print "------Patting The Dog------- " GPIO.setup(WATCHDOGTRIGGER, GPIO.OUT) GPIO.output(WATCHDOGTRIGGER, False) time.sleep(0.2) GPIO.output(WATCHDOGTRIGGER, True) GPIO.setup(WATCHDOGTRIGGER, GPIO.IN) WATCHDOGTRIGGER is the GPIO were using to communicate to the Watchdog board, #17. If you use the Grove connection to connect back to the Pi2Grover board, you're going to be changing the GPIO line connected back to the Watchdog. The Grove connection on the Watchdog is Pin1 - Dog1, Pin 2 - Dog2, Pin 3 - Power, Pin 4 - Ground. On the Pi2Grover board the connections are labeled D4/5, D5/6, etc. That's the GPIO you're connecting to. So you need to change the value of WATCHDOGTRIGGER to match what you are plugging the Grove connector to. For example, if I connect it to D12/13, then I would use 12 since Dog1 is connected to D12 and Dog2 is connected to D13. Make sense?
|
|
|
Post by triggerfish on Oct 4, 2018 21:45:43 GMT -8
It does. I understand the watchdog principle. Now the pins fall into place. Basically... If all is connected and the unit stays powered on, the watchdog communication is working. If I would stop the python script, the dog is not patted anymore and the power should go off after the time set on the watchdog.
|
|
|
Post by triggerfish on Oct 5, 2018 1:17:45 GMT -8
Man, this is puzzeling...So the grove connector replaces the watchdog line, not the soldered power reset line? Then why do i have the grove on the watchdog connected to the grove on the powercontroller? I was under the assumption the grove would replace the soldered reset cable, but apparently that is not true. That also might explain why the watchdog never blinks when the software is stopped, or not even when I shut down the rapspberry... It will stay up from a power signal from the powercontroller...
The grove cable on the watchdog should plug in on one of the pi2grover plugs then?
If I would re-attach the soldered one to the watchdog I end up with the not powering again. I will have to disconnect the cable shortly to allow the set to power on.
|
|
|
Post by roadkingrandy on Oct 5, 2018 9:44:03 GMT -8
It does. I understand the watchdog principle. Now the pins fall into place. Basically... If all is connected and the unit stays powered on, the watchdog communication is working. If I would stop the python script, the dog is not patted anymore and the power should go off after the time set on the watchdog. Exactly.
|
|
|
Post by triggerfish on Oct 6, 2018 4:24:24 GMT -8
OK, I have started in the SunAir manual to see what is is, what it does en why it does it... Them I moved on to the watchdog manual to do the same, planning to work through the whole system that way... I noticed something not quite logical to me. So either I got it wrong, or right  In my case, if all is wired as described, nothing happens when I switch on the power (switch on SunAir). When I briefly disconnect the reset wire from the watchdog, all starts up. Following instructions, I wired WatchDog Board JP5/VDD to Raspberry Pi GPIO Header Pin 1/3.3V WatchDog Board JP5/GND Raspberry Pi GPIO Header Pin 6/GND But... When the powercontroller powered down everything, the Raspberry is also powered down... So the watchdog has no power to decide on anything? Shouldn't the watchdog be powered by JP13/3 and JP13/4 on the SunAir board in stead? I hope I am not making an utter fool of myself with this suggestion, but somehow this makes more sense to me...
|
|
|
Post by SDL on Oct 6, 2018 9:13:43 GMT -8
You have a SunAir board? What is the exact board you have for the power controller. Makes a difference.
BP
|
|
|
Post by triggerfish on Oct 6, 2018 10:12:42 GMT -8
You have a SunAir board? What is the exact board you have for the power controller. Makes a difference. BP With my girlfriend for the weekend. Will check for the exact numbers when I get home.
|
|