Forum Replies Created

Viewing 25 posts - 376 through 400 (of 4,248 total)
  • Author
    Posts
  • in reply to: ESP8266 Use native GPIOs #71998

    Ray
    Keymaster

    I2C address at 0x24 is assumed to be the first expander, and by default all expanders have 16 zones. The OpenSprinkler expander first version used PCF8575 which is a 16-channel GPIO expander; the current version uses PCA9555, also 16-channels. Because these chips along with PCF8574, all have the same base I2C address, there is no easy way to tell them apart from the firmware’s point of view (although PCA8575 and PCA9555 can be distinguished from each other because PCA9555 has certain registers that PCA8575 doesn’t have). This is the reason why if you hook up another PCF8574 at I2C address 0x24, the firmware assumes it’s a PCA8575 instead, so assumes it’s 16 zones. Because of this, it will always send 2 bytes to that chip (16 bits) instead of 1 byte. If PCF8574 receives 2 bytes, I think the second byte overwrite the first byte, that explains why your 0x24 board drives zones 17-24.

    There is another forum thread that also discusses PCF8575:
    https://opensprinkler.com/forums/topic/driving-14-valves-or-12-main-pump-from-os-3-0/#post-71927

    I would recommend you to consider using a PCF8575 board if possible (or PCA9555). If not, you will need to modify the firmware code so that it only sends 1 byte to the expander instead of 2.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71991

    Ray
    Keymaster

    Hmm, I am not sure. When using PCF8575, as I mentioned above, since it uses weak pull-up by default all channels are HIGH at start-up, so what I did was to use a PNP transistor per channel to reverse the logic, such that at startup the output becomes low. For this to work I think you will need a pull-down resistor at the output, otherwise the output will be in high-impedance state instead of low.

    in reply to: ESP8266 Use native GPIOs #71989

    Ray
    Keymaster

    The UI (javascript) is not part of firmware. The way this works is that these javascript files are stored on opensprinkler server, when you type in the IP address of the controller in the browser, the firmware returns code to the browser to reference the javascript code on opensprinkler server. And if you use the mobile app, these javascript files are embedded in the app.

    Since you are going to customize the UI, what you should do is to download the UI code, unzip, and run the index.html in a browser. If you type in the IP of opensprinkler in a browser, or use the mobile app, those javascript codes are not your customized code so it won’t work.

    in reply to: ESP8266 Use native GPIOs #71984

    Ray
    Keymaster

    Hi, what you did sounds correct for the firmware part. But you will also need to modify the UI if you want those pins to show up in the UI. In the UI code, the free pins are hard-coded, and not transferred from the firmware to the UI, hence you have to modify the UI code:
    https://github.com/OpenSprinkler/OpenSprinkler-App/blob/master/www/js/main.js#L5038

    You can download the UI code, unzip it, and run it locally in a browser.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71942

    Ray
    Keymaster

    Expander I2C address starts from 0x24. See my post 71924 above.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71933

    Ray
    Keymaster

    There is one small problem about removing the baseboard: the firmware will not be able to detect the baseboard and using its I2C address to decide which type of baseboard it is, and will consequently default to AC driver board (instead of DC in your case). The only issue with this is that it won’t engage the boost converter to generate the boosted voltage. If you don’t need the boosted voltage, this is ok. Pretty much the only difference between AC driver board and DC driver board, in terms of software operation, is the boost converter.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71924

    Ray
    Keymaster

    The easiest way is probably to configure your PCF8575 as an expander, i.e. on zones 9-24. The reason is that this is already in the design of an older version of OS expander. The hardware design files are here:
    https://github.com/OpenSprinkler/OpenSprinkler-Hardware/tree/master/Expander/3.0/DC
    look for the exp30dc one (you will have to install EagleCAD to view the files). The expander I2C address starts with 0x24 (i.e. A0=1, A1=0, A2=0). You can add up to 4 expanders (0x25, 0x26 and 0x27). The particular design of expander 3.0 uses a lot of components (it uses a PNP transistor per channel for logic inverse, because PCF8575 has persistent internal pull-up so it defaults to high on each output, and the PNP transistor reverses that to default low).

    So the short answer is that yes you can connect PCF8575 as an expander. This way you existing 8 zones are usable and you get 16 additional zones.

    If you can get a PCA9555 board, though, the circuit can be a lot simpler. That’s what expander 3.1 DC is based on.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71855

    Ray
    Keymaster

    It could be a UI problem. You can try the following approach to use buttons to edit the option value:
    – remove power from OpenSprinkler, then power it back on, as soon as you see the OpenSprinkler logo, press and hold the third pushbutton (B3) and continue holding until it shows ‘Setup Options’.
    – click B3 as many times as you need until it goes to the ‘Boost Time’ option. Then use B1 or B2 to change the value
    – when you are done, please press and hold button B3 again until the controller reboots itself.

    If this still doesn’t work, it’s likely a flash memory problem. You may have to do a factory reset. Before factory reset, please save a copy of your configurations so you can recover the settings later. Factory reset and import/export configurations are all explained in the user manual.

    in reply to: Strange problem, (at least strange to me) #71789

    Ray
    Keymaster

    If you have a AVR ISP programmer (like USBtinyISP, or USBASP), you can program the microcontroller directly without using the USB port on the controller. I think this may help fix the issue. If you don’t want to do this yourself, you can send a support ticket to support.opensprinkler.com and send the controller back to us so we can take a look.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71788

    Ray
    Keymaster

    The time for boosting depends on the input power supply voltage. The booster circuit itself has been configured to boost to ~21VDC (so even if the booster is turned on indefinitely it won’t go past 21V). The higher the input power supply voltage, the faster it is to reach that limit. With 7.5VDC input (the default), it probably will take 500ms to 750ms. You can leave the boost time to 1000ms if you want to make sure it reaches the maximum.

    in reply to: Strange problem, (at least strange to me) #71778

    Ray
    Keymaster

    I’ve occasionally seen this before. I am not sure what’s the root cause, but I think it has to do with the fuse bits settings. AVR microcontrollers have a notorious problem where in some cases if the fuse bits are programmed incorrectly it might require a high voltage programmer to reset that.

    in reply to: Driving 14 valves or 12 + Main Pump from OS 3.0 #71777

    Ray
    Keymaster

    Wow, that’s a very clever idea. By splitting the zones into two sets, one set of which drives relays that supply ‘com’ wire to the other set of valves, you can drive a large number of zones. Thanks for sharing! It also sounds like an interesting math problem to find out how to split the zones to achieve the maximum number of valves.

    in reply to: Firmware Upgrade & What Is “OS”? #71729

    Ray
    Keymaster

    On this technical help page:
    https://openthings.freshdesk.com/support/solutions/articles/5000859137-troubleshooting-and-technical-help
    there is a paragraph about what’s the difference between Hardware version, Firmware version, and App version.

    “from firmware 2.1.9, only OS 2.3 (and above) will be supported” — this sentence means: firmware 2.1.9 and future firmwares will only support hardware version 2.3 and above (i.e. hardware 2.3, 3.0, 3.1, 3.2 etc.). You have OS 2.3, which means OpenSprinkler 2.3, i.e. Hardware version 2.3, that means your controller can be upgraded to firmware 2.1.9 and future firmwares.

    App refers to Mobile app, you can always update your app in the app store, this is regardless of what hardware or firmware version you have. You don’t even need an OpenSprinkler to install the mobile app. Firmware is the software running on the controller, it is different from the mobile app. Mobile app can be thought of as the ‘front end’ or ‘graphics user interface’ of the controller.

    in reply to: ESP8266 Datasheet and Logic Levels questions #71653

    Ray
    Keymaster

    Yes, I am aware of the datasheet, but we’ve never had any problem using 3.3V ESP8266 to drive 5V PCA9555. If you believe it’s a problem you can simply add a diode in series between 5V and PCA9555’s VCC pin, so that will drop 0.7V and supply 4.3V to PCA9555. This way 3.3V/4.3V > 75%.

    in reply to: There is option to connect rain sensor ? #71645

    Ray
    Keymaster

    The current OSPi design no longer uses external pull-up — it relies on RPi’s internal pull-up resistor, which is about 50~60K ohm. So 4.7K series resistor is fine with internal pull-up.

    in reply to: External antenna option for OS3.2? #71627

    Ray
    Keymaster

    When you place the order, you can leave a note saying you want the external antenna option. So instead of the standard ESP-12F, the controller will come with ESP-07S WiFi chip, which looks like this:
    https://www.mouser.com/datasheet/2/975/1494602250ESP-07S_Datasheet-1589078.pdf
    and you can plug in an external antenna. There is no surcharge, so all you need is to leave a note. There will be a one-week lead time as we don’t normally stock these versions.

    in reply to: ESP8266 Datasheet and Logic Levels questions #71567

    Ray
    Keymaster

    ESP8266’s technical documents are all listed here:
    https://www.espressif.com/en/products/socs/esp8266

    PCA9555 is a I2C device, for I2C device, because the data lines are pulled high by the microcontroller, and the slave devices only pull these data lines to ground, it’s ok to have a 3.3V microcontroller interfacing with a PC9555 powered by 5V. 3.3V is within the high logic range of PCA9555, so this works fine.

    in reply to: Firmware Upgrade & What Is “OS”? #71566

    Ray
    Keymaster

    OS = OpenSprinkler
    OS 2.3 = OpenSprinkler hardware 2.3
    You can find a summary of App version, Hardware version, Firmware version here:
    https://openthings.freshdesk.com/support/solutions/articles/5000859137-troubleshooting-and-technical-help

    in reply to: GPIO assignment #71519

    Ray
    Keymaster

    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.

    in reply to: GPIO assignment #71511

    Ray
    Keymaster

    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:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L304

    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.

    in reply to: Provide installation instructions for wiring provided fuse #71492

    Ray
    Keymaster

    Thanks for bringing this up. Yes it should be included in the user manual and I will add that shortly. It’s a fuse for the COM line, you can connect it between the COM terminal and your COM wire. It’s not entirely necessary but does provide some protection against shorted solenoid and mis-wiring of solenoids.

    in reply to: OpenSprinkler v2.1u DIY fuse blown seeking replacement #71454

    Ray
    Keymaster

    You can submit a support ticket at
    support.opensprinkler.com
    with your delivery address, and we can send you a few of these fuses.

    in reply to: Opensprinkler on ESP8266 #71439

    Ray
    Keymaster

    All these messages look fine: it got NTP synced correctly, and seems to be able to connect to the weather server as well. If you know it’s IP address, you should be able to type that into a browser, or use the OpenSprinkler app, to access the controller.

    in reply to: OpenSprinkler v2.1u DIY fuse blown seeking replacement #71438

    Ray
    Keymaster

    Can you post a picture of the fuse? v2.1 has been a while ago and I don’t particularly remember which type of fuse it uses.

    In addition to replacing the fuse, I recommend you to remove power and measure resistance between VIN (i.e. 5V) to GND and also VCC to GND. VIN-GND should be at least 4 kilo ohm or above, VCC-GND should be at least 1 kilo ohm or above. If they look suspiciously low, some parts may have shorted and need to be replaced.

    in reply to: Opensprinkler on ESP8266 #71430

    Ray
    Keymaster

    You may not overthinking the difficulty of compiling the firmware. If you use Arduino IDE, you can simply install the required libraries in the IDE. Or, you can install virtualbox in Windows, and install linux in virtualbox.

Viewing 25 posts - 376 through 400 (of 4,248 total)