I am looking to build a home security camera with a LED light attachment. Many people mention they use a IR Illuminator for the light source which often seem to be DC 12V. I am not sure how one would turn this on and off with a raspberry pi.

  • 1
    Use a ULN2003A or similar. Probably the cheapest solution unless you have your own transistors/diodes spare.
    – joan
    Oct 21, 2014 at 7:31

2 Answers 2


Driving Relays directly from RPi GPIO might be a little dangerous. Additional circuit is required. Take a look at link below, it might answer all your questions in that topic.



For connecting high power devices (like an electric kettle - don't ask why) to RPi, i use relays. Be sure the voltage needed to turn the relay on is ~5V - the standard voltage of GPIO output.

  • 1
    GPIO is driven by 3.3volts? Possibly your relay works on a range from 2V-5V which you are lucky I suppose.
    – Piotr Kula
    Nov 20, 2014 at 20:41
  • @ppumkin i used a doubleelay. the small one was 2~5vdc and using pi's 5v it turned on the big relay. Nov 21, 2014 at 22:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.