Public projects 2

Watering pump

by mbraccagni

  • 11,885 views
  • 5 comments
  • 16 respects

Mains Failure Detector

Project tutorial by mbraccagni

  • 8,014 views
  • 7 comments
  • 11 respects

Toolbox 1


Respected projects 0

 mbraccagni hasn't respected any projects yet.
  • Mains Failure Detector 7 months ago

    The input voltage must be from 7V to 12V and the diode reduces the voltage of about 0,7V, so we are above the power voltage limit.
    Ciao

  • Watering pump over 1 year ago

    I'm happy to be of service!

  • Watering pump about 2 years ago

    I used the subroutine readDS3231time(byte second,byte minute,byte *hour,byte *dayOfWeek,byte *dayOfMonth,byte *month,byte *year) to read seconds, minutes, hours, the day of the week.
    The easiest solution, I think, is to use pin 8 or pin 9 or both as multipliers to set more then 8 days.
    If you modify line 98 as follow
    giorni = (4
    digitalRead(5) + 2*digitalRead(6) + digitalRead(7) +1) * (digitalRead(8)*10 +1);
    you will count from 1 to 8 days (giorni) setting pin 8 = LOW, or 10, 20, 30, ... 80 days setting pin 8 = HIGH.
    6 months are 180 days, so if you modify line 98 as follow
    giorni = (4
    digitalRead(5) + 2*digitalRead(6) + digitalRead(7) +1) * (digitalRead(8)*10 + 1) * (digitalRead(9)*3 + 1);
    and set pins 5 = HIGH, 6 = LOW, 7 = HIGH, 8 = HIGH, 9 = HIGH, you will obtain 6 x 10 x 3 = 180.
    But if you don't need any regulation, you can also write:
    giorni = 180;
    and that's it!
    ATTENTION: the variable minutiMancanti is defined as integer! maybe you must redefine it as long integer, because 6 months are many more the 32000 minutes!!!!!!

Add projectSign up / Login