I have a project where the requirement is that if a light switch is turned on, one load will be turned on, but if the switch is toggled first before being switched on, a second load will be powered as well. It would need to resets if left off for a bit. Basically a way for a user to control two loads with one switch. This on US mains power, 120VAC.
I'm comfortable doing this if I include a microcontroller, but that feels like overkill and then I need to have a power supply for it, and that's going to cost space I don't really have (I'll probably use a capacitive divider and MCU if there is no other way. The device will be double insulated.)
I feel like there is some clever circuit for this. I feel like there are (older?) products that may already have this behaviour, but I can't think of any specifically.
Are you guys aware of anything? Discrete or integrated? Or should I just go the MCU route?
To forestall concerns: I am an EE and am aware of and able to handle the relevant safety issues. (I'm just not as strong at this kind of circuit design)
ThankEDIT:
This device is a light and fan combo that will screw into an existing socket (that's why it needs to be kinda small) and use existing wiring (so I can't change the switch), if you! just want light, you turn on the switch normally, if you also want the fan, you toggle it once first (the light would blink, that's okay) and then switch it on, and now both will run until turned off (for say 2 seconds).