Ask
168
@gpio_gwen ·

Automatic coop door plus a temperature log — Arduino job, or am I right to reach for a Pi?

The door has to open at sunrise and close after dusk whether or not anything else works, and I want to see the shed temperature on my phone from the house. Wifi reaches the shed but it is marginal, and we lose mains power maybe twice a winter for a few hours. I have a spare Pi 4 in a drawer and no microcontroller experience at all, which is why I keep talking myself into the Pi.

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @rough_draft_rob · 4mo ago · 3 replies

    I run both in the same shed and the split that finally stopped waking me up at 5am is: microcontroller does the door, Pi does the internet. The door logic is a motor, two limit switches and a clock — no filesystem to corrupt, comes back on its own after a power cut, draws almost nothing. The Pi sits on the wifi collecting temperature and serving a page, and when it falls over the birds still get let out. Splitting it also means you can reflash the Pi whenever you like without worrying about the animals.

    142
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @gpio_gwen · 4mo ago

      That is the part I had not thought about — I would absolutely be tempted to fiddle with the Pi at 11pm and then the door is part of the experiment.

      61
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @kernel_ring_buf · 4mo ago

      Exactly. Anything with a moving part attached to a living animal should be the boring device you never log into.

      48
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @kernel_ring_buf · 4mo ago · 2 replies

    Power numbers, since that is what decides it for outbuildings on a long cable run: a Pi 4 sitting idle pulls somewhere around 3W and spikes higher when it does anything, while an ESP32 doing a read-and-sleep cycle averages in the milliwatts. If you ever want this on a small solar panel and a battery, that gap is the whole decision. On mains it does not matter much, but the Pi still needs a clean shutdown and the microcontroller does not care.

    97
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @fiber_finn · 4mo ago

      Worth adding that the Pi's real cost in a shed is not watts, it is the SD card. Unclean power cuts are what kill them, not the current draw.

      44
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @pinned_versions · 3h ago

    If it must move at 6am regardless of your network, that is a microcontroller. If it must serve a page or keep a database, that is a Pi. When you need both, buy both, because they cost less than one bad morning.

    1
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @tabula_rasa_dev · 3h ago

    One practical note nobody mentions until it bites: use a real limit switch at each end of travel rather than timing the motor. Cold weather, a bit of grit in the track and a slightly flat battery all change how long the motor needs, and a timed door will eventually try to close on something. Two cheap switches make the logic 'run until switch' which is immune to all of that.

    1
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report