OpenSprinkler Forums OpenSprinkler Unified Firmware OpenSprinkler on Standard Arduino Hardware

Viewing 18 posts - 26 through 43 (of 43 total)
  • Author
    Posts
  • #25380

    dpackham
    Participant

    ok so here is how i got it to work with the Net+LCD shield…

    D4 is used on my ethernet card for the MicroSDcard slot so I had to bend the D4 pin on the LCD shield so it did NOT insert into the ethernet shield. then I jumpered the D4 LCD pin to the D2 on the ethernet shield that is a pass thru from the Mega board.

    D10 also gets in the way…

    i changed this code in defines.h

    #define PIN_LCD_D4 2 // LCD d4 pin – default = 20 or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard

    to be a “2” instead of a “4′

    ALSO I disabled this

    //#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12

    and commented OUT = // every line that tried to use it. backlight works fine

    now NTP and everything works πŸ™‚

    Dave P

    #25381

    dpackham
    Participant

    and I got the web interface to pull from it. all is good πŸ™‚

    #25382

    dpackham
    Participant

    noticed that you had some dupes in defines.h here is my working ones

    // ===== Added for Freetronics LCD Shield =====
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    #define PIN_LCD_EN 9 // LCD enable pin – default = 18
    #define PIN_LCD_D4 2 // LCD d4 pin – default = 20 -DKP- or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard
    #define PIN_LCD_D5 5 // LCD d5 pin – default = 21
    #define PIN_LCD_D6 6 // LCD d6 pin – default = 22
    #define PIN_LCD_D7 7 // LCD d7 pin – default = 23
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    //#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12 -DKP- net shield uses D10 as well. so I have backlight always on
    #define PIN_LCD_CONTRAST 36 // LCD contrast pin – default = 13
    #define PIN_ETHER_CS 37 // Ethernet controller chip select pin – default = 4
    #define PIN_SD_CS 38 // SD card chip select pin – default = 0
    #define PIN_RAINSENSOR 39 // rain sensor is connected to pin D3 – default = 11
    #define BUTTON_ADC_PIN A0 // A0 is the button ADC input

    #25383

    vladimird
    Member

    @dpackham wrote:

    noticed that you had some dupes in defines.h here is my working ones

    // ===== Added for Freetronics LCD Shield =====
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    #define PIN_LCD_EN 9 // LCD enable pin – default = 18
    #define PIN_LCD_D4 2 // LCD d4 pin – default = 20 -DKP- or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard
    #define PIN_LCD_D5 5 // LCD d5 pin – default = 21
    #define PIN_LCD_D6 6 // LCD d6 pin – default = 22
    #define PIN_LCD_D7 7 // LCD d7 pin – default = 23
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    //#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12 -DKP- net shield uses D10 as well. so I have backlight always on
    #define PIN_LCD_CONTRAST 36 // LCD contrast pin – default = 13
    #define PIN_ETHER_CS 37 // Ethernet controller chip select pin – default = 4
    #define PIN_SD_CS 38 // SD card chip select pin – default = 0
    #define PIN_RAINSENSOR 39 // rain sensor is connected to pin D3 – default = 11
    #define BUTTON_ADC_PIN A0 // A0 is the button ADC input

    You are my hero, I will try to apply this to my setup.
    Would be good to use if statements in order to remain compatible with the main code maintained by ray.

    If NTP works than I can continue to modyfy code for my purposes of heating controler.

    #25384

    rszimm
    Participant

    @dpackham wrote:

    can you enable logging with the microsd card?

    It’s not the storage of the data that’s the problem. It’s the retrieval. In the raspberrypi version I log the data to a sqlite3 database, which makes quick retrieval based on time/zone/schedule very simple. To do the same thing on the AVR version I’d have to write some code to read the log file and do something similar. Once you get enough events in the file, this might take a while as you’re having to scan in the whole file for every request. Certainly there are some techniques for making this quicker (e.g. break up the file by date), but it’s just time/effort that I have not had the time to put forth…

    #25385

    dpackham
    Participant

    ahh… I follow. one option is to use that web based interface and that will do the logging right?

    #25386

    rszimm
    Participant

    @dpackham wrote:

    ahh… I follow. one option is to use that web based interface and that will do the logging right?

    It’s funny that you mention that. The original version of my code actually logged to cosm.com (which I think is now xively). I got the data to log properly, but I was pretty frustrated with their UI so I abandoned that line of development. that said, it would be pretty trivial for someone to implement something similar. Just implement the Logging class and define LOGGING in your build script.

    #25387

    dpackham
    Participant

    yeah maybe a web based push of the log info via a simple url and PHP catch script that would store it in the sql db

    #25388

    vladimird
    Member

    @vladimird wrote:

    @dpackham wrote:

    noticed that you had some dupes in defines.h here is my working ones

    // ===== Added for Freetronics LCD Shield =====
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    #define PIN_LCD_EN 9 // LCD enable pin – default = 18
    #define PIN_LCD_D4 2 // LCD d4 pin – default = 20 -DKP- or D2 for the LCD shield stacked on a net card that uses D4 for the SDcard
    #define PIN_LCD_D5 5 // LCD d5 pin – default = 21
    #define PIN_LCD_D6 6 // LCD d6 pin – default = 22
    #define PIN_LCD_D7 7 // LCD d7 pin – default = 23
    #define PIN_LCD_RS 8 // LCD rs pin – default = 19
    //#define PIN_LCD_BACKLIGHT 10 // LCD backlight pin – default = 12 -DKP- net shield uses D10 as well. so I have backlight always on
    #define PIN_LCD_CONTRAST 36 // LCD contrast pin – default = 13
    #define PIN_ETHER_CS 37 // Ethernet controller chip select pin – default = 4
    #define PIN_SD_CS 38 // SD card chip select pin – default = 0
    #define PIN_RAINSENSOR 39 // rain sensor is connected to pin D3 – default = 11
    #define BUTTON_ADC_PIN A0 // A0 is the button ADC input

    You are my hero, I will try to apply this to my setup.
    Would be good to use if statements in order to remain compatible with the main code maintained by ray.

    If NTP works than I can continue to modify code for my purposes of heating controller.

    I managed to get it working following your suggestions.
    Only isue is that is still freezes once in day or 2.
    I couldn’t figure out why and I made a workaround. A watchdog on Openwrt router.
    As my Arduino is powered from TPlink 824nd with Openwrt on it I used it to powercycle arduino if it doesn’t reply to ping in 3 minutes in cron in openwrt

    I have my setup switching on and off my heating and some lights.

    Do anybody know how hard would it be to port 2.0.2 code to standard Arduono shield in this thread knowing that 2.0 is the base?

    #25389

    dpackham
    Participant

    Cool on getting it working and the watchdog stuff.

    #25390

    dpackham
    Participant

    Yeah. The 2x code would be cool as well.

    Sent from my SM-G900F using Tapatalk

    #25391

    Tonyhome
    Member

    Hi Dave,

    thank you for your work. And also big thanks to Ray for all his effort with OpenSprinkler!

    I was able to put together my own OpenSprinkler setup in no time using your code and recommendations. Works great on MegaR3 + Ethernet shield + Freetronics LCD shield. I’m not using RTC but as long as the system is online it does not really matter.

    I’m planning to make some code changes, to add monitoring of environmentals (temperature, humidity) with datalogger and maybe add water flow meter. Also I’m planning to make the controller serve static HTML content from its SD card instead of the Ray’s hosted version, to enable HTML editing and UI extensions. Since Mega has a lot more resources it is feasible and should be fairly straightforward.

    Do you know by any chance if somebody was doing similar mods?

    Also I’m using this sprinkler controller with a mix of the regular 24VAC valves and Orbit DC (garden hose-type) valves, using pretty simple circuit on the top of the standard relay shield. If anybody is interested I can post details.

    #25392

    Tonyhome
    Member

    @rszimm wrote:

    I just uploaded the latest build. You can get it here : http://stuff.intelligent-isi.com/sprinklers_pi/sprinklers_avr-1.0.0.tar.gz

    It’s built with either the Visual Micro plugin for Visual Studio, or else the version 2012-05-23 Arduino.mk makefile on a linux platform (what a pain in the ass that thing is..)

    Hi Richard, thank you for posting the code.

    I tried to compile the code using VS2012 + Visual Micro, but I’m getting compile errors related to SdFat. Which version of the library are you using for this project?

    ***Update***

    I got it compiled. One of the files had (unnecessary and problematic) reference to SD.h, and since I had this library in my standard Arduino installation it was picked up, messing up SdFat32 files.

    One question I have – it seems that this version of the code does not have any support for the local LCD. Is it the case? And what is used instead?

    Thanks!

    ***Update 2***

    I got it all working, it appears that this firmware version does not have local LCD/buttons support and the UI is strictly via the WEB browser.
    I’m thinking to experiment with it a bit and maybe add local LCD/buttons support, or maybe I will just stick with the original OpenSprinkler for now.

    #25355

    plainolddave
    Participant

    Hi everyone

    About a year ago I modded OpenSprinklerGen2 to run on hardware I had laying around – an Arduino Mega 2560, Wiznet 5100 Ethernet and SD Shield, Freetronics LCD, DS1307RTC

    The original version of this code was extremely stable and has been working flawlessly for almost a year now – this update to 2.0.7 adds the SD card logging functionality as of the github release from Ray on July 5th 2014.

    The code, libraries and release notes are all now up on Github as a fork here -> https://github.com/Dave1001/OpenSprinkler-Arduino

    If you’re comfortable tinkering in C/C++ then I hope this is helpful – otherwise I’d suggest just buy an Opensprinkler from Ray πŸ˜€

    Cheers

    Dave

    #41614

    plainolddave
    Participant

    Hi everyone

    Dusting off an old post about modifying OpenSprinkler to run on hardware I had laying around – an Arduino Mega 2560, Wiznet 5100 Ethernet and SD Shield, Freetronics LCD, DS1307RTC etc. After 2 years of stable operation on the old code, I’ve decided to upgrade to the latest unified firmware V2.1.6.

    The code, libraries and release notes are all now up on Github here -> https://github.com/Dave1001/OpenSprinkler-Arduino

    You can use the regular Arduino IDE to build it, or even better it works with Visual Micro for Visual Studio 2015 (all the project files are included on GitHub)

    This version adds a couple of additional functions:
    – one version for WizNet5100 ethernet, and another version for ENC28J60 ethernet
    – ability to reboot daily to ensure stable operation
    – ability to display free memory on the LCD for debugging
    – heartbeat function to say ‘alls well’ – flashes an LED and the ‘:’ on the LCD time at 1Hz
    – ability to turn the watchdog timer on or off (refer to your reference documentation as to whether WDT is supported by the bootloader on your Arduino)

    If you’re comfortable tinkering in C/C++ then I hope this is helpful for you – otherwise I’d just go buy an Opensprinkler from Ray ?

    Cheers

    Dave

    #41675

    Ray
    Keymaster

    Cool. Thank you for sharing!

    #45290

    masbass
    Participant

    Hi all, will there be an update to firmware 2.1.7?
    Thanks

    #47813

    wifi75
    Participant

    Hello, I would likr to try opensprinkler on arduino uno and ethernet.
    But from arduino software I don’t see opensprinkler device.
    I copy on Documents\Arduino\libraries the folder OpenSprinkler_Arduino_V_2_1_6.
    WHy?

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

OpenSprinkler Forums OpenSprinkler Unified Firmware OpenSprinkler on Standard Arduino Hardware