Coder Social home page Coder Social logo

eds2code / arduino-irrigation-timer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yaacov/arduino-irrigation-timer

0.0 1.0 0.0 0 B

Arduino irrigation timer (24 hour) with Modbus serial communication.

License: GNU General Public License v3.0

C++ 100.00%

arduino-irrigation-timer's Introduction

Irrigation Timer sketch for Arduino

Arduino irrigation timer (24 hour) with Modbus serial communication. (based on modbus-master-slave library example)

Requires

Modbus Master-Slave library for Arduino

https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino

Time library for Arduino

http://www.pjrc.com/teensy/td_libs_Time.html

S1307RTC Library for Arduino

http://www.pjrc.com/teensy/td_libs_DS1307RTC.html

Register Table

Time registers
  0 - msb of time (uint32_t)
  1 - lsb of time (uint32_t)
  2 - unit is connected to a DS1307 Real Time Clock module
Unit comunication status registers
  3 - number of out coming messages
  4 - error counter
Digital I/O's registers

One register (16bit) control 16 digital I/O's, each bit controls one digital I/O pin. bit 3 - control D3 pin, bit 4 control D4 pin ... and bit 12 control D12 pin

  (*) pins 0 and 1 are RX,TX pins
  (**) pin D13 is reserved for led indicator
  (***) pin CTRL_PIN is reserved for RS485 control
example:

to override timer and set pin 10 to HIGH - set registers 5 and 6 to 0x0400

  5 - state of digital I/O's: 0 - LOW, 1 - HIGH
  6 - override digital I/O's timer: 0 - use timer, 1 - manual (override timer),
Timer program registers

Each day is divided to 96 parts of 15min. Each 15min part has a register that control the I/O's state for that part of the day.

  register 7 control pins state from 00:00 to 00:15
  register 8 control pins state from 00:15 to 00:30
  ...
  register 103 (last) control pins state from 23:45 to 24:00
example:

to set pin 11 to high from 06:00 to 06:30 - set registers 31 and 32 to 0x0800

  7..102 - timer array for digital i/o's
User data registers
  103..109 - registers for storing general information (on the eeprom)
Analog input registers

Analog value is provided without conversions - registers hold the input voltage range, 0 to 5 volts is converted to value between 0 and 1023

  (*) A4 and A5 are reserved for i2c RTC
  110 - A0 ADC converted value (0..1023)
  111 - A1 ADC converted value (0..1023)
  ...
  117 - A7 ADC converted value (0..1023)

arduino-irrigation-timer's People

Contributors

yaacov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.