OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266

Tagged: ,

This topic contains 138 replies, has 18 voices, and was last updated by  Jisse154 6 days ago.

Viewing 15 posts - 16 through 30 (of 139 total)
  • Author
    Posts
  • #41723

    fivos
    Participant

    OK, I’ll start building and help you debug as soon as you post your design.

    #41724

    pbecchi
    Participant

    For….anybody interested!

    HARDWARE for OpenSprinkler with ESP8266.

    The code is compatible for several different hardware configurations:

    MCU: ESP8266 or ARDUINO MEGA
    VALVE CONTROL: SHIFT REGISTER (like 74HC575 …. ) or I2C EXPANDER (like PCF8574)
    RTC DS1307 or DS3231 breadbords with I2C epproms (like AT24C32 )
    LCD LCD1602 or 2004 with parallel or I2C interface (or driven with a PCF8574)
    BUTTONS on ANALOG or DIGITAL Inputs Lines (or trough a PCF8574).

    So to start debugging it will be necessary to have at least one ESP8266 (better a NodeMCU v1.0 ) a RTC clock board (with EEPROM) and an LCD (better with I2c interface).
    It will be good to have or a SHIFT register chip (like 74HC575) or a PCF8574 : leds can be used for debugging ,
    later we can go with relay boards or with a simple Triac circuit.
    Remember that voltage level for ESP8266 is 3.3V and this apply to all pin (5V is no good) better to verify that I2C components are 3.3V level compatibles…..
    or to have a level shifter!

    I am preparing a Fritzing project for components connection that can be done easily on a standard breadboard.

    #41725

    fivos
    Participant

    That’s great! Can you upload the code?

    #41750

    Ray
    Keymaster

    @pbecchi: regarding storing wtopt.txt SPIFFS, it might have to do with the parameters you used when calling the SPIFFS.open function. There are a number of different options, like ‘w’, ‘r+’, ‘a’, ‘a+’. If you are reading from an existing file and modifying it, use ‘r+’; the ‘w’ parameter will cause the file to be overwritten.

    I just finished and posted my OpenGarage project:
    http://rayshobby.net/introducing-opengarage/
    if you go to the Github repository:
    https://github.com/opengarage
    you can find the code relevant to the configuration files (config.txt). The code is able to create a new file if it doesn’t exist, modify it or delete it upon factory reset.

    • This reply was modified 3 years, 3 months ago by  Ray.
    #41772

    pbecchi
    Participant

    Thanks Ray for your suggestions!

    I want to inform you and everybody interested that
    you can find first beta release of OPENSPRINKLER ported to ESP8266
    on: //GitHub.com/pbecchi/OpenESP8266_Sprinkler

    Look forward to your comments and suggestions!

    • This reply was modified 3 years, 3 months ago by  pbecchi.
    #41810

    Ray
    Keymaster

    Cool, very impressed with the level of details you have provided. I have bookmarked it and will check it out in a few days.

    #41825

    fivos
    Participant

    I didn’t have enough time to build the project but I was able to compile it. I had problems with (#include ../) statements. I fixed this by moving all files to the same folder and get rid of (../). Also the LiquidCrystal-I2C-library that you linked didn’t compile and I used this one https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip
    I will probably build the proto 2 circuit tomorrow but I couldn’t figure out where you declare the I2C addresses. It would be helpful if you can post a circuit schematic.
    Thank you for your effort, great job!

    #41828

    pbecchi
    Participant

    @fivos

    I am glad you could get already there! As I told you I need to complete documentation:

    yes , if you are using Arduino IDE you need to have all files in the same directory and to delete “../” from include statements.

    about lcd i2c library….. there is a large choise

    Declaration of all pins are in pins.h file for i2c use standard D2,D1 orchange it to your needs

    Anyhow…… today I will add documentation for compile and build and the sckematics

    #41837

    fivos
    Participant

    I’ve build the circuit lcd and opensprinkler work but it doesn’t recognize the PCF8574 so no output.This is the serial output `wire begin
    Scanning..I2C…..
    I2C device found at address 0x21 unknown
    I2C device found at address 0x27 unknown
    I2C device found at address 0x57 AT24Cxx

    @87
    I2C device found at address 0x68 DS3231

    @104
    done

    sb=0
    0D0a87<W>320D1a87<W>330D2a87<W>340D3a87<W>350D4a87<W>360D5a87<W>370D6a87<W>380D7a87<W>39<W>12//logs/10956.txt
    //logs/10957.txt
    //logs/16882.txt
    //logs/16883.txt
    /stns.dat
    b1=1
    b2=1
    b3=1
    OptSetup…
    weather.opensprinkler.com
    25
    216
    r
    0no butinit…
    clock…
    Time printed…
    Connecting…
    Setting software MAC
    Ethernet initialised
    Using http port 80
    scan start
    scan done
    Reading password file….
    [email protected]##@#@#@#@#@#@#@#@
    6 networks found
    0: home_No_internet (-46)* passw. available
    1: Pargas_Distillery_Amicos_f&bar (-75)
    2: home_No_internet (-77)* passw. available
    3: Pargas_Distillery_Amicos_f&bar (-45)
    4: 01.EpavliVeneti (-89)*
    5: Test (-66)*
    @#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@15Wait WIFI…

    Connecting to home_No_internet
    Server started IP=192.168.1.4
    Config: DHCP
    MAC: 0:69:69:2D:31:1
    Local IP: 192.168.1.4
    Gateway IP: 192.168.1.39
    DNS IP: 192.168.1.39
    Netmask: 255.255.255.0
    OptionsWrite OS:216
    216
    DHCP IP setup successful
    Ethernet setup complete
    sb=0
    0D0a87<W>320D1a87<W>330D2a87<W>340D3a87<W>350D4a87<W>360D5a87<W>370D6a87<W>380D7a87<W>39Setup complete
    -_1
    `

    #41838

    pbecchi
    Participant

    I am impressed ………………..you are really fast:

    -this is a bug in ScanI2C() already corrected : look at the new branch I have uploaded yesterday!
    -remember that as the code stand now the I2C LCD has his own library
    so his address should be given with #define LCD_ADDR 0xnn otherwise is will be considered an expander.

    Web Server works? No other bugs? Logging doesn’t work am working on it!

    Since your so fast… I will try to answer ASAP….but consider time zone (I am in Europe!)

    #41840

    fivos
    Participant

    The new branch works like a charm!
    I also had trouble logging into the web server(it didn’t accept the default password). Fixed it by deleting stored data on Mozilla.

    I’m using a relay board for the output which is active low, so I had to reverse the output logic. Posted some changes on github.

    Don’t worry about the time zone I’m also in Europe Greece.
    Thank you for your quick reply!

    #41850

    pbecchi
    Participant

    @fivos

    I am interested:

    -it your breadboard working OK?
    -have you tested most of the OS features?

    Most of the bugs I know have been corrected…. I am waiting for new issues… to try to complete debugging!

    Then I want to start putting new features in the code of OS.

    Paolo

    #41852

    fivos
    Participant

    My breadboard is working and I have tested most of the OS features. Today I also added buttons. I used buttons on ESP GPIOs pins(12,14,16 on a NODEMCU 0.9) they need pull-up resistors to properly work but everything works fine.Tried also the ADC buttons on a DFrobot(freetronics) shield but they didn’t work first try but I didn’t put much effort in it. Do you need me to check any future or specific hardware configuration?

    #41855

    fivos
    Participant

    I can also confirm the flow sensor is working. The only think that doesn’t work as you already mentioned is logging. Getting Error retrieving log data. Please refresh to try again.

    #41856

    pbecchi
    Participant

    AdC buttons worked on my first prototype but control of the unit require double pressing that is not possible with 3 ADC buttons.

    Yesterday I have fixed the logging that wasn’t working….all other OS features seams to work but I have just tested only 2 Hw configurations!

    So please do all the test you want I just let me know if everything is OK!

    Then we can go on and think about improvements :

    -I want to bring the weather routines inside the code so that it could be possible to change the algorithms and take into account local sensors.
    -It should be also feasible to change the display and buttons (Now the local control of the unit is really complex and “unfriendly”):may be a touch screen display…should do the work much better!

    I want also to write a code to run in a remote master unit for control and coordination of several OpenSprinklers!

    If you have time,and wish to participate……….there is a lot to do!

Viewing 15 posts - 16 through 30 (of 139 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266