OpenSprinkler Forums Hardware Questions OpenSprinkler OS 3.0 Lan Adapter

Viewing 25 posts - 1 through 25 (of 26 total)
  • Author
    Posts
  • #60807

    dun4cheap
    Participant

    Anyone know if the now available lan adapter option for the OS3 will work for all of the OS3’s? Also does it limit the amount of zones?

    Thanks

    #60925

    Ray
    Keymaster

    I’ve already communicated with you offline, but as a public record: the version with wired Ethernet module (officially numbered OS 3.2) is a very recent release. Only the recently purchased (like May 2019 and onward) OS 3 controllers are compatible with the Ethernet module, the previous versions use different sets of pins and are not compatible with the module.

    I will make an official announcement of OS 3.2 shortly. The short story is that capability wise, it’s the same with all OS 3’s, except it has a cable that can link to a wired Ethernet module (ENC28J60-based). When the Ethernet module is plugged in, the controller functions in wired Ethernet mode; otherwise it’s in WiFi mode. It currently doesn’t support both at the same time, but will function in one or the other depending on whether the module is plugged in or not. Over-the-air firmware update is only supported in WiFi mode (so you can temporarily remove the Ethernet module, update firmware in WiFi mode, then plug in the Ethernet module again). Other than this feature, there is no distinction between OS 3.2 and other OS 3’s. The expanders are the same for all of them.

    #62330

    rastafd
    Participant

    hi,

    i have build a 3.0 version and wired a enc28j60 to it but it dose not work. i have to disconnect the pcf8574 then is work. how come?
    its seems to work only if it detect a 3.2 version. but i don’t have a Pca9555 on hand only pcf8574 and pcf8575.

    thanks

    #62346

    rastafd
    Participant

    hi,

    i have build a 3.0 version and wired a enc28j60 to it but it dose not work. i have to disconnect the pcf8574 then is work. how come?
    its seems to work only if it detect a 3.2 version. but i don’t have a Pca9555 on hand only pcf8574 and pcf8575.

    thanks

    #62350

    Ray
    Keymaster

    Since you built your own hardware, it’s really hard to tell. Which schematic did you follow? The only version that supports ethernet is OS 3.2:
    https://github.com/OpenSprinkler/OpenSprinkler-Hardware/tree/master/OS/3.0/Master
    yes the firmware detects the specific hardware version. ENC28J60 uses SPI, which requires 4 GPIO pins. Only version 3.2 made the SPI GPIOS available for ENC28J60, all previous versions use some of the SPI pins for other purposes.

    #62387

    rastafd
    Participant

    Thanks for the reply i will ordre some pca9555. Here a picture of my oppensprinkler. You did a great job.
    The only thing missing is one siol moisture for each zone . That way it will be use for multiple plant watring

    #62396

    Ray
    Keymaster

    Your picture was not successfully uploaded. You can try to reduce the size and upload again, or upload it to Google photos or anywhere photo site that you can share a link to.

    #62412

    rastafd
    Participant

    Here it is

    #62420

    Ray
    Keymaster

    Since you are using a 8-zone relay board: one thing you need to be careful with is not double use any GPIO pin for two purposes. ESP8266 has a fairly small number of GPIO pins, if each of your relay takes over one pin, I don’t know how you can manage to also have ENC28J60 (requires SPI, 4 pins) and LCD (requires I2C, specifically GP4 and GP5). The total seems to exceed the number of available GPIO pins, so I assume some of your relay pins are shared with either SPI or LCD, and that will definitely cause problems. This is the reason OS 3 uses I2C expander for zone control, so that it uses the same I2C bus and can still expand to a large number of zones.

    #62423

    rastafd
    Participant

    The ecn26j60 will only work if i disconnect the 2 pfc8574, But i don’t have any relays working

    For now the enc28j60 is not working . There is a pcf8574 x20 under the nodemcu for the button. The relays are connected to the red pcf8574 x22 that you can see. The way i understand it is when i receive the pca9555 and address it to x22 and remove the 2 pcf8574 the system will detect version 3.2 and the enc28j60 will work and the relays.

    #62434

    Ray
    Keymaster

    “The ecn26j60 will only work if i disconnect the 2 pfc8574, But i don’t have any relays working” — that’s just because the firmware detects the existence of these chips to tell which version of hardware it is, and as you know, it only enabled ENC28J60 for OS 3.2. There is a good reason for that, because earlier hardware versions use some of the SPI pins for other purposes, so if you enable ENC28J60 for the earlier hardware versions, then those SPI pins will have unexpected behavior that should be avoided. So my suggestion really is to follow OS 3.2 design.

    #62595

    rastafd
    Participant

    received the pca9555 and rewired everything. all seems fine except the trigger from the pca9555 seems to have change to high and before it was low.

    is this normal? or i am missing something.

    is there a easy fix.

    thanks

    #62613

    Ray
    Keymaster

    “the trigger from the pca9555 seems to have change to high and before it was low” — I don’t fully understand this. Do you mean the ‘output from pca9555’ is previously low and is now high? There are 16 IO pins on pca9555, which ones are you referring to?

    #62616

    rastafd
    Participant

    hi,

    not exactly,

    to activate the 8 stations whit my previous setup, pcf8574, the pcf8574 send low “0V” to active the relay board.

    and now the pca9555, it send high “5V” to activate my 8 channel relay.

    so previously, pcf8574, wen a activate a station the relay activated and now 9ca9555 the relay is always activated except wen a start a station.

    does that make scene?

    #62628

    Ray
    Keymaster

    Ah, ok, yes, that’s correct. Here are the details: previously, with PCF8574, it uses P-channel MOSFET on each output (because 8574 cannot drive high current load), so the logic is reversed. With PCA9555, because it uses Totem output, the output can drive high current load in both high and low states, so there is no such inversion. You can take a look at the source code:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/OpenSprinkler.cpp#L1041
    which shows the difference with using PCF8574 vs. PCA9555.

    Your relay board is probably active-low type, which explains why it works with PCA8574 out of box, since it matches the reversed logic. There are two solutions for you: one is to modify the source code to reverse the bits for PCA955 in exactly the same way as PCA8574; the other is to replace your relay board by using active-high type.

    #62638

    rastafd
    Participant

    i was afraid that was the answer :-).

    i had a lot of trouble compiling the code whit Arduino ide on windows . son i took my linux computer and was able to add the tiny character “~” to reverse the trigger. and thanks for pointing me to the right file.

    everything now is working.
    the repository on github is not the 2.1.8 (6) only 2.1.8 (4) is that correct?

    #62647

    rastafd
    Participant

    i think that i found the answer. it is in the branch ether4os32?

    #62649

    Ray
    Keymaster

    Yes, minor revision (6) is in the ether4os32 branch. Will merge that to master shortly.

    #62655

    rastafd
    Participant

    great. thanks it work perfectly

    #63725

    litronas
    Participant

    Hi, I’m very novice but I built 3.2, but the relays are going badly for me. I need to change the output, but my English is very bad and I can’t find where in the .cpp file.
    The same happens to me as my partner.
    Is there an easy way to do it?

    thanks to everyone.

    Sorry for the Google translation.

    #63742

    litronas
    Participant

    In the end I put transistors and correct the outputs. great job. I love it, it hurts not to have a garden …

    #63746

    rastafd
    Participant

    hi,

    if you had the same “problem” that i have. find the section below in opensprinkler.cpp
    you have to add ~ in the pca9555 section so it will look like this reg = (reg&0xFF00) | ~station_bits[0]; // output channels are the low 8-bit

    // Handle driver board (on main controller)
    if(drio->type==IOEXP_TYPE_8574) {
    /* revision 0 uses PCF8574 with active low logic, so all bits must be flipped */
    drio->i2c_write(NXP_OUTPUT_REG, ~station_bits[0]);
    } else if(drio->type==IOEXP_TYPE_9555) {
    /* revision 1 uses PCA9555 with active high logic */
    uint16_t reg = drio->i2c_read(NXP_OUTPUT_REG); // read current output reg value
    reg = (reg&0xFF00) | station_bits[0]; // output channels are the low 8-bit
    drio->i2c_write(NXP_OUTPUT_REG, reg); // write value to register

    #63747

    litronas
    Participant

    thanks

    #71094

    FelipeRojas
    Participant

    Hello!

    On the actual firmware i have setup a PCA9555 with an esp8266
    I got the same problem. Actually on default status, the pca9555 is set on high, when you trigger an station it sends low.
    I just wandering how to invert it.

    There is the issue:
    i have edited this line on opensprinkler.cpp file. (actual line on this date 1120)

    reg = (reg&0xFF00) | station_bits[0];

    to

    reg = (reg&0xFF00) | ~station_bits[0];

    Recompile and seems to be fine.
    The defaultstatus is now low, but when i trigger an station… nothing happen.

    Also a bug:
    The station 8 seems to be not working properly… the original code is not working (expected is goes to low)
    on the modified firmware it goes to high, after finish the time, it continues high (the spected is to it goes to low)

    #71105

    Ray
    Keymaster

    First, this thread is now off topic: the title of the thread is “OS 3.0 Lan Adapter” but now it’s discussing firmware compilation issues. It would be good if you can create a new thread with an matching title.

    If I understanding correctly from your description, it sounds like you are saying your station 8 behaves differently from the other stations. This seems more of a hardware problem — the reason is that the code does not single out station 8 in any way, it does the same thing to a whole byte, which corresponds to all 8 stations. If anything, you may want to check if your station_bits (it’s an array) is of type byte (aka uint8_t) or did you declare it to be some other type, like bool. If it’s not a byte type, I can certainly see it may produce different behaviors on station 8.

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

OpenSprinkler Forums Hardware Questions OpenSprinkler OS 3.0 Lan Adapter