Automatic Toilet Flusher using Servo Trigger (for my cat)

i’m trying to build an automatic toilet flusher for my cat (and lazy self). am intrigued by the Servo Trigger (WIG-13872) being used to signal a servo motor that would be suspended inside (and above) the toilet flapper. when trigger by a motion detector switch, the system would:

  1. wait 1 or 2 min for the cat to finish and vacate the area

  2. signal the Servo Trigger to have the servo motor lift the toilet flap and flush

first, does this sound like a project that can be accomplished by the Servo Trigger or will i have to use single board computer?

second, what specific components would you recommend for this project?

thanks in advance!

I’d recommend using a https://www.sparkfun.com/products/15123 with this https://www.sparkfun.com/products/16773 with this https://www.sparkfun.com/products/17374 for a sensor and a waterproof servo https://www.sparkfun.com/products/11886

Hot glue everything metal in the tank (wires for servo) so water doesn’t get sneaky

thanks!! gonna get right on it!

okay, got everything purchased/connected and it works–but only while connected to the USB port for programming. when i disconnect the USB and use only barrel jack, the servo motor won’t power. I’m guessing somehow the barrel jack 5vdc, 2A power supply is less than what is supplied by the USB connection? i’m using a digital servo motor DS3218.

again, the issue is that it totally works when connected to USB and not when connected to 5VDC, 2A barrel jack.

thoughts?

thanks in advance!

If you are using the barrel jack to supply power, you need to use a supply of 7-15V in order for the voltage regulator to work. When you connect via USB, the PC you are connected to supplies 5V directly and bypasses the regulator.

Any serial in your code?

monitoring a PIR motion sensor, waiting 2min then activating a servo motor–basic stuff. implemented darrelg’s recommendation, with USB direct to the board and bypassing the regulator. seems to do the trick.

or did, for 3 sample runs, but now the board is throwing a error when trying to link to the I2C. i’ve ordered another board, easier for me as a newbie. thanks for all the help!

Got my 2nd Redboard Qwiic, thinking i had damaged the first–same error message when trying to run Example1_PrintRawPIRStatus from the Sparkfun Qwiic PIR Library. but am getting the same error on both boards (and am using the serial cable sold by Sparkfun for connection, so that’s not the issue).

Example program loads, but is giving me the error “Device did not acknowledge! Freezing”, suggesting to me that the PIR is not able to connect to the I2C bus. Cannot figure out why?!! BTW, the Blink program loads and runs fine.

Any help would be greatly appreciated!!

so fiddled with this most of the afternoon, then finally changed the COM port and changed it back again–and the board started working. don’t know the “expert” rationale for it, just that it works now and it didn’t before!