Go Down

### Topic: Blinking IR LEDs in the car (Read 1 time)previous topic - next topic

#### lRaHl

##### Oct 03, 2011, 02:10 am
I have 6 IR LEDs that I want to run off a cigarette lighter outlet in a car. (High output infrared LED 5mm 1.2VDC 100mA 940nm)

I'm going to be using the Arduino Uno with the blink program.

How do I use the Arduino for timing? and how should the schematic look?

#### johnwasser

#1
##### Oct 03, 2011, 02:40 pm
Parallel LED's: 12 V - 1.2 V = 10.8 V, 10.8 V / 0.100 A = 108 Ohms in series with EACH LED.

Series LED's:  12 V - (6 * 1.2 V) = 4.8 V, 4.8 V / 0.100 A = 48 Ohms in series the string of 6 LED's.

You'll need a transistor to switch the 100 mA power because the Arduino can only source 40 mA.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### lRaHl

#2
##### Oct 03, 2011, 10:38 pm
What kind of transistor would I need? I'm going to be using pin 2.

Code: [Select]
`int led = 2;void setup() {  pinMode(led, OUTPUT);     }void loop() {  digitalWrite(led, HIGH);  delay(35);  delayMicroseconds(544);  digitalWrite(led, LOW);  delay(35);  delayMicroseconds(552);}`

#### dc42

#3
##### Oct 04, 2011, 02:26 am
A BC337 with a 1K resistor from the Arduino pin to the base will do the job nicely, but there are many other suitable types.

If you will be running the LEDs with the car engine running, then I suggest you design for maximum current at 13.5v instead of 12v, to avoid driving the LEDs above their rated current. If you want close to 100mA whether or not the engine is running, use a constant current source such as I have shown in the image. If necessary, put a larger value resistor in parallel with the 6.8 ohm resistor to bring the current up to 100mA.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#### macegr

#4
##### Oct 04, 2011, 02:46 am
14 Hz, eh? MIRTs are illegal, prepare for some jail time and hefty fines.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Go Up