@claraallison you could just drive relay to power IR illuminator when needed, you could do some logic inside M5stack based on light sensor or/and movement sensor to drive relay possibly. by that ir illuminator can be supplied by what kind of voltage it needs and M5stack only closes relay contact to power it up when needed.