Arduino Forum

Topics => Home Automation and Networked Objects => Topic started by: AJB2K3 on Jun 05, 2011, 06:54 pm

Title: 12v PWM LED control
Post by: AJB2K3 on Jun 05, 2011, 06:54 pm
I've ordered my first Arduino with the intention of using it to control my 12V LED lighting,
However seeing that I haven't done anything remotely micro-controller related for over 10 years I have no idea how to convert the Arduino's pwm to the required 12V PWM.

What do I use?
Title: Re: 12v PWM LED control
Post by: Magician on Jun 05, 2011, 07:00 pm
Transistor.
Plus google and books.
You can start with this one:

http://tronixstuff.wordpress.com/
Title: Re: 12v PWM LED control
Post by: CrossRoads on Jun 05, 2011, 07:14 pm
Simple to do:
(http://www.crossroadsfencing.com/LED_connections.jpg)

example of 12V wallwarts here
http://www.mpja.com/prodinfo.asp?number=17563+PD
Title: Re: 12v PWM LED control
Post by: AJB2K3 on Jun 05, 2011, 08:57 pm
I thought you would say transisitor but I didn't think it could handle PWM!

Would the humble 2n2222 be of use?
Title: Re: 12v PWM LED control
Post by: CrossRoads on Jun 05, 2011, 09:12 pm
Sure. Default switching speed is only 490 Hz, 2n2222 can handle that just fine.
Just keep an eye on the total current thru the parts so you don't smoke anything.
From arduino thru NPN base, thru the NPN C-E, and thru the LED(s).