• This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #22904

    dpc
    Member

    Hello All,
    OpensSprinkler is working great. Being able to water my lawn from long distances gives me more satisfaction that it should 🙂

    One of my main goals with OpenSprinkler was to track how often I watered my lawn (I know the scheduling should be a pretty good estimate, but…). I’ve done some research, but I wanted to run it by the experts here.

    1. Is there a way for the OpenSprinkler (not pi) to broadcast out when it sends and open or close command? From what I’ve seen there is no easy way with the room available on the arduino, but hopefully I’m wrong.
    2. If that isn’t possible I’d need to have a different webserver polling the opensprinkler with the xxx.xxx.x.x/sn0 command every minute or so and have that log the activity. Ideally I’d like to get the log data into Google Sheets so I can track weather etc.. along side.

    So is #1 possible? If not has anyone build a script that polls opensprinkler and writes the changes to Google Docs? Any help advice guidance would be appreciated. I’m sure there many ways to skin this cat, so if anyone has anything for me I’d appreciate it.

    #26861

    Samer
    Keymaster

    Number 2 is something that is already built. Please check out my mobile web app (written in PHP).

    Now, the logging is something will hopefully he introduced via firmware for the OpenSprinkler and allow logging to the SD card. This will then allow the native mobile app to access this data for viewing.

    #26862

    dpc
    Member

    Thanks Salbahra!
    I’ve been using your app on my phone and the web version. It’s very well done, congrats. I didn’t realize that it could also be run on a webserver until now. Thanks for the heads up and thank you for putting together such a useful project!

    #26863

    Tonyhome
    Member

    Adding logging is possible on 2.x hardware – it AtMega644 has enough resources to add it and the board has SD card slot.

    I’m running my own modified version of OpenSprinkler software on a regular Arduino Mega hardware, and I added SD card-based logging. When I added it in, SD card support consumed additional 1.2K of RAM, but Mega has enough resources for it. OpenSprinkler 2.x hardware has sufficient RAM as well.

    Unfortunately my modified software version will not work directly on the original OpenSprinkler hardware due to different Ethernet controller – I’m using standard WizNet5100 while OS uses a different one. But the same mod (adding logging) can be done on a regular OS version as well.

    #26864

    Ray
    Keymaster

    Note that firmware 2.0.6 for OpenSprinkler (not OSPi) has added support for logging onto microSD card. Please check the relevant post here:
    viewtopic.php?f=2&t=692

    #26865

    Tonyhome
    Member

    @ray wrote:

    Note that firmware 2.0.6 for OpenSprinkler (not OSPi) has added support for logging onto microSD card. Please check the relevant post here:
    viewtopic.php?f=2&t=692

    Thanks Ray, this is helpful. I’m using OpenSprinkler fork based on 2.0.

    I have a quick question for you – why there is a limit of 2GB on microSD card and FAT16? Standard Arduino SD library seems to handle well big cards (I’m using 32GB card) and FAT32 with no problems. Is it a hardware or software restriction?

    #26866

    Ray
    Keymaster

    why there is a limit of 2GB on microSD card and FAT16? Standard Arduino SD library seems to handle well big cards (I’m using 32GB card) and FAT32 with no problems. Is it a hardware or software restriction?

    Update: the statement below is outdated. See later discussions in this thread.

    This is a limitation imposed by the tinyFAT library:
    http://www.henningkarlsen.com/electronics/library.php?id=37
    tinyFAT is a very compact SD card library, produces code that’s considerably smaller and consumes less RAM than the standard Arduino SD library. I’ve tried the Arduino SD library (you may have noticed that the earlier versions of the source code had a macro define to switch between tinyFAT and Arduino SD), but it consumes too much resources that I fear would eat into the other planned features.

    #26867

    Tonyhome
    Member

    @ray wrote:

    This is a limitation imposed by the tinyFAT library:
    http://www.henningkarlsen.com/electronics/library.php?id=37
    tinyFAT is a very compact SD card library, produces code that’s considerably smaller and consumes less RAM than the standard Arduino SD library. I’ve tried the Arduino SD library (you may have noticed that the earlier versions of the source code had a macro define to switch between tinyFAT and Arduino SD), but it consumes too much resources that I fear would eat into the other planned features.

    Thanks Ray. What do you think about installing 1284p instead of 644 to have enough RAM (and more flash) for OpenSprinkler?

    1284p has 16K RAM – 4 times more than what you have right now, and it is also pin-compatible.

    BTW, I posted my mod on Github: https://github.com/tony-osp/OpenSprinkler-experiments/
    Also I started small blog to capture my OpenSprinkler experiments: http://tony-osp.dreamwidth.org/

    #26868

    Ray
    Keymaster

    Nice blog, and thanks for sharing your mod. I will check it out later.

    A quick update: I should take back what I said earlier about the Arduino SD library: I discovered just yesterday that the Arduino SD library works perfectly fine for OpenSprinkler, no RAM overuse etc. What happened previously was that I copied the tinyFAT library files to the OpenSprinkler folder, and when I was experimenting with Arduino SD, I didn’t remove those tinyFAT files. Well, I thought a file shouldn’t get compiled if I am not using it (or specifically, any class defined in the file). But this is not how Arduino IDE works — it compiles everything in the folder. As a result, the code consumes almost twice as much RAM as necessary. So I mistakenly concluded that the Arduino SD library is too loated.

    Anyways, once I discovered this, I immediately switched to use Arduino SD, because it provides much better support, including large SD cards, sub-directories, and support for both FAT16/FAT32. Lately I’ve started using the SdFat library, which is what Arduino SD is based on but offers more flexiblity and leads to smaller code size. So that’s what gets wrapped into firmware 2.0.7, which I just announced in this thread:
    viewtopic.php?f=2&t=758

    With this, the SD card limitations are gone: you can now use SD card of any capacity, formatted to either FAT16 or FAT32.

    Regarding ATmega1284p: yup, it’s a drop-in replacement for ATmega644p, and that’s one of the main reasons I picked 644: it still has through-hole packaging (DIY friendly), and when needed you can easily upgrade to 1284 that doubles the flash memory space, and quadruples the RAM size! For now, I think 644 is still fine for a lot of the upcoming planned features. Beyond that, I will probably have to upgrade to 1284 🙂

    #26869

    Tonyhome
    Member

    @ray wrote:

    Anyways, once I discovered this, I immediately switched to use Arduino SD, because it provides much better support, including large SD cards, sub-directories, and support for both FAT16/FAT32. Lately I’ve started using the SdFat library, which is what Arduino SD is based on but offers more flexiblity and leads to smaller code size. So that’s what gets wrapped into firmware 2.0.7, which I just announced in this thread:
    viewtopic.php?f=2&t=758

    This is great!
    I was expecting OpenSprinkler hardware to be able to support fully-featured SD library.
    This also allows serving scripts and WEB pages directly from SD card.

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