OpenSprinkler Forums Hardware Questions OpenSprinkler PCA9555 issues with homebuilt OS Latch

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #67272

    DrNeon
    Participant

    I’ve put together a OS Latch build from scratch (to incorporate some rechargeable 18650 batteries and a solar panel and battery charge level measurements), and it works and it’s great…until the output section locks up. A reboot via the web interface (or hard reset) will fix it for a few days until the next lock up. What seems to be happening is that the PCA9555 is resetting when a station is being turned on or off (usually on, but not always)…but only sometimes (maybe once a week or so, even if programs are run daily). The only time this will happen is when a station is being turned on or off; it never happens when the system is idle. I am pretty sure that the PCA9555 is resetting because the outputs that are driving the boost enable and the capacitor discharge seem to change to inputs; these are connected via optoisolators to some relays and the voltages measured at the PCA9555 after a lockup are neither high nor low but in the middle. The output section consists of these two optoisolated relays and some L293D H-bridges. Additionally, because the L293D chips have a very high quiescent current, I have another relay that disables power to the entire output section unless a station is being turned on or off. Again, as stated above, this configuration works perfectly most of the time, but every so often the PCA9555 acts up, and the output section doesn’t work until the system is rebooted. I don’t suppose anyone has any thoughts regarding what may be happening? The voltage rails coming from the battery supply seem pretty consistent, and no other component (ESP8266, RTC, etc) powered by them is resetting when this occurs.

    #67277

    Ray
    Keymaster

    I have never seen PCA9555 resetting, nor what the lockup looks like. Maybe you can just reinitialize its state instead of triggering a reboot of the controller. Each GPIO pin on PCA9555 can be configured as input or output. Perhaps when this happens, it’s being set to input mode for some reason. You can call pinMode to reset its state to OUTPUT mode. Also, without seeing the schematic of your built, it’s difficult to guess what may be causing this issue.

    #67290

    DrNeon
    Participant

    Hi Ray, thanks for the rapid response. Yeah, according to the datasheet, when the PCA9555 undergoes a power-on reset, all GPIO are set to input, which is what I think is happening. But I’m not sure why it is happening. I think, when the OS is rebooted, all the necessary PCA9555 initialization steps take place again, which is why it recovers.

    #67291

    DrNeon
    Participant

    The one thing I just realized I may have missed in the PCA9555 hookup is the INT line going to ESP8266 GPIO12, but I don’t see how that might cause this kind of intermittent issue. It’ll take me some time to put together a schematic (but the basic idea is ESP8266 with a PCA9555, with BPE/BVE controlling optoisolated relays to turn on the booster and discharge the capacitor over the output section, and the other output GPIOs, COM included, going to a pair of L293D ICs…I realize this isn’t specific enough). There is some slight possibility it is a wire connection issue that only occurs when a station is enabled/disabled, but that seems rather unlikely. Something may be drawing too much current from the PCA9555 during a station state change, but that doesn’t seem right either, and not sure that would cause this kind of problem. The fact that the bug is so intermittent makes it tricky to troubleshoot….

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler PCA9555 issues with homebuilt OS Latch