1 Home
rschaten edited this page 2024-10-16 19:42:36 +00:00

Solar Angel

What's this?

A controller for a solar heated swimming pool.

The plan

  • temperature sensors
    • air
    • pool water
    • solar module
  • relays
    • filter pump
    • solar pump
  • displays
    • 4x7segment: air temperature
    • 4x7segment: water temperature
    • graphic 128x64 LCD: temperature graphs
    • two LED to indicate relay states
  • interface
    • serial, to log data with a PC: ("airtemp:watertemp:solartemp:filterstate:solarstate")
  • usage
    • 2 buttons for LCD mode
    • 1 button for "filtertime += 1 hour", hold pressed to reset filter time
    • hold displaymode-button pressed to manually switch the solar pump on or off
    • thermometer addresses, hystersis values, maximum temperature etc. hard coded in source
    • jumper for usage with 1 or 2 pumps, so the filter pump can do the solar job as long as we don''t have a dedicated pump

LCD modes

Button 1 steps through modes, button 2 steps through sub-modes.

  • air temperature
    • 1px / 10 seconds
    • 1px / 1 minute
    • 1px / 10 minutes
    • 1px / 1 hour
  • water temperature
    • 1px / 10 seconds
    • 1px / 1 minute
    • 1px / 10 minutes
    • 1px / 1 hour
  • solar temperature
    • 1px / 10 seconds
    • 1px / 1 minute
    • 1px / 10 minutes
    • 1px / 1 hour
  • combined temperatures
    • 1px / 10 seconds
    • 1px / 1 minute
    • 1px / 10 minutes
    • 1px / 1 hour
  • statistics (max-, min-, average values)
    • 1 hour
    • 1 day
    • buffer
    • total
  • current values
    • all (displayed in four sections)
    • air temperature
    • water temperature
    • solar temperature
    • remaining filter time

Keeping history

  • 1 measured value takes 16 bit (two bytes)
  • 100 measurements -> 200 bytes
  • for three sensors -> 600 bytes
  • for four solutions -> 2400 bytes

Format for historic values: uint16_t, temperature is stored in "decigrades". The leftmost 3 bits of each word have a special meaning:

|15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0| |valid value?|relay1|relay2|x|x|x|x|x|x|x|x|x|x|x|x|x|