Using an atmel microprocessor (attiny2313) to make a "simon says" game for my dog (yep, for a treat). I have all the game play programmed and starting to look at the hardware required to accomplish this. The game play is through 4 large buttons which I have successfully torn down and interfaced with my microprocessor (if you're curious, it's these: https://www.amazon.com/gp/product/B00B2FNHB6/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1)

The only thing left is to open and close the treat "hatch". What I'm thinking of is probably a 4"x4" sliding door type hatch. The open/close is controlled by the microprocessor.

I haven't done any stepper motor or servo motor controls yet, so I'm looking for ideas on how to accomplish this. I think I could use a servo with a longer arm which pulls and pushes this sliding hatch, but I'm wondering if a stepper would be a better way to go?

  • 3
    \$\begingroup\$ Probably a motor with built-in reduction gear. A gear head motor. Also, you have to think of safety here. There could be either a crush or entrapment hazard (or both) for your dog if all or part of the dog is in the opening while the door closes. Somehow you will have to detect this condition if it happens during the close operation. And after detecting it you have to reverse the door to the open position. Maybe an automated dispenser of treats with no entrapment hazard would be better. \$\endgroup\$
    – user57037
    Feb 24, 2022 at 1:08
  • 1
    \$\begingroup\$ Stepper motors are useful if you want precise positioning. If you simply want the door to be open or closed, a ‘normal’ motor would probably be a better choice as it would most likely be smaller, have better torque . consume less power and be cheaper. For a hobby project the decision comes down to what you have hand usually. \$\endgroup\$
    – Kartman
    Feb 24, 2022 at 1:23
  • \$\begingroup\$ A simple brushed DC motor with adequate gearing seems the straightforward solution to me. Either a couple of relays or an H-bridge since it needs to go both ways \$\endgroup\$ Feb 24, 2022 at 9:05
  • 1
    \$\begingroup\$ Thanks for the ideas! Also, the hatch is going to only be closed with a mechanical switch (opened automatically). \$\endgroup\$
    – LarryBud
    Feb 24, 2022 at 12:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.