Skip to content

Instantly share code, notes, and snippets.

@RZRZR
Last active January 9, 2016 22:55
Show Gist options
  • Save RZRZR/b708cecbc57ab73e7d59 to your computer and use it in GitHub Desktop.
Save RZRZR/b708cecbc57ab73e7d59 to your computer and use it in GitHub Desktop.

Set Up

Solar Panel (20W)
  controller
    12V battery (7.2ah)
      MoPi
        Raspberry Pi A+
          Camera Module 
          Wifi Adapter
          GPIO
            MoPi
            Relay
                Water Pump
                    12V batt
            Temp 1
            Temp 2 (maybe)
            Float switch

MoPi

MoPi return voltage put in spreadsheet

if low voltage reached tweet if critical voltage reached cancel all hourly turning on

Timings

Temp readings every hour.

Pump at noon.

Photo at noon.

Upload at noon from previous 24 hours.

Readings

Every hour on half hour.

Power up
Take sensor readings
  Temp1=Temp reading  - more than one? Soil, Outside, in tunnel, water?
Add temp data line to cvs file
Test wifi
  If yes
    Upload CVS to online service?
  If no
    Add warning line to CVS file
Power down

Pump & Photo

Power up at 12pm
While true: Bottom water tank switch still on? (i.e. water still in the tank?)
  Yes
    Turn relay on to pump water from bottom tank to top tank - 5 second loops maximum 4 times or until No
        No
            Turn relay off
  No (first time)
    Tweet/email watering alert - maybe schedule this for 7pm when km more likely to be home?

Take photo
Test Wifi
  if yes
    Upload photo to dropbox
  if no
    Add warning line to CVS file
Power down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment