Here's an idea: Let's all go to the HVAC forum for our electrical advice!
I think the appropriate answer sometimes is "I don't know, and this is the wrong place to ask."
"Fart fans" do have code requirements and proper installation rules - details that are often ignored in practice. In remodeling my house, it's amazing the number of folks who have eagerly shared their clever tricks - without realizing that their practices are against the mechanical or plumbing codes.
In practical terms, the simple truth is that unless your fan cost at least $70, and has a rigid metal duct going straight up through the roof, you're probably breaking the rules somewhere.
EVERYONE at this forum should own at least one copy - even an old one- of "Code Check Complete,' from the Tauton Press. Period.
BTW, chances are you're required to use a delay-off switch and tie it to your lighting controls.
My personal point: Don't forget make-up air.