October 28, 2021 at 11:57 am #71510
I am using ESP8266 version with PCF8574, so hw ver is 3.0 and not being able to see any GPIO when defining through the web UI. I pick up GPIO station, but then never get the GPIO # to select.
Not sure if I have to define the pin free list in defines.h , and if yes, what numbers, since these GPIO will be attached to PCF8574 .
On main PCF8574, I have free P0,P2,P4…to P7 and then on the expansion all eight pins.
martinOctober 28, 2021 at 1:48 pm #71511
GPIO stations are not defined for OpenSprinkler 3.0 (including 3.1 and 3.2), because ESP8266 doesn’t have enough GPIO pins. In the firmware code, the PIN_FREE_LIST is empty for ESP8266:
The GPIO pins referred to by the GPIO stations are assumed to be pins on the microcontroller, not through IO expander. This can certainly be modified in the firmware to provide support for expanded GPIO pins.October 28, 2021 at 8:14 pm #71518
Thanks Ray . I was not aware that stations should be “standard” (not GPIO). So S01 is mapped to P0 in PCF8574 (on the expansion), S02 mapped to P1…..and so on, until S08 mapped to P7 .
Question is why you did not use the spare pins on “main” PCF8574. According to the schematic, only two pins are used . One for B1 and the other for B3, so it seems there are 6 unused pins .October 28, 2021 at 9:21 pm #71519
OK, maybe I misunderstood the questions in your first post. Perhaps you weren’t asking about the GPIO stations. In any case, I think there were only 4 unused pins on the main PCF8574 — for DC-powered OpenSprinkler 3, it needs two additional pins from the main PCF8574 for voltage booster control, so including B1 and B3 these are 4 pins being used.
Also, because OS 3 uses two layer design, if you want to map any unused pin on the main PCF8574 to the bottom layer for zone control, it would have to be through the pin header between the top and bottom layers. I didn’t want to have that many pins between the two layers. And since the first version of OpenSprinkler, the main controller always has 8 and only 8 zones, so I just left the 4 unused pins on the main PCF8574 as is.
The current OpenSprinkler 3.2 uses a single PCA9555 on the bottom layer, so there is no more PCF8574. PCA9555 is more cost effective than two separate PCF8574s, and it can both source and sink large amount of currents, which is desirable. If you are interested in reading the design choices, I’ve just recently published a blog post about IO expanders (https://opensprinkler.com/i-o-expander-options/).
This may not be obvious at first: but leaving some unused pins can come quite handy when there is need to expand the controller’s functionality. For example, while AC-powered OpenSprinkler 3.2 leaves 7 unused pins on PCA9555, the Latch OpenSprinkler 3.2 uses all the spare pins because it needs several additional pins for controlling the H-bridge of the COM line, and controlling a 74HC595 shift register. So in a way it’s good that there were unused pins on PCA9555, as they have been necessary by the time that I designed the latch version.October 29, 2021 at 7:22 am #71521
Thanks Ray for the clarification
- You must be logged in to reply to this topic.