Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Eithman1 on February 28, 2013, 07:22:55 AM

Title: Issue controlling cars brake light with arduino.
Post by: Eithman1 on February 28, 2013, 07:22:55 AM
Hello everyone. I am working on a project where I control my cars interior brake light with a transistor hooked up to an Arduino. I hooked up the transistor to an LED first to make sure the circuit worked properly and it does. Every time I push a button, the LED turns on and when I release it, it turns of. I switched out the 9V battery I was using to power the LED and swapped it with the power and ground that were powering the cars interior brake light. I then swapped the led out with the cars brake light and tried it, but nothing happened. I thought maybe I was not making a proper connection somewhere so I swapped the brake light with a multimeter, and sure enough there was 12V going through it. Does anyone have any idea why the light might not be turning on? Could the transistor not be allowing enough AMPS through? Any help would be really appreciated!
Title: Re: Issue controlling cars brake light with arduino.
Post by: newInRobotics on February 28, 2013, 07:37:49 AM
What transistor are You using?
Title: Re: Issue controlling cars brake light with arduino.
Post by: Eithman on February 28, 2013, 10:59:44 AM
It is an MJE3055T. Heres a link to the data sheet if that helps. http://hep.fi.infn.it/PAMELA/pdf/MJE3055.pdf (http://hep.fi.infn.it/PAMELA/pdf/MJE3055.pdf)
Title: Re: Issue controlling cars brake light with arduino.
Post by: Azraels on February 28, 2013, 11:13:04 AM
Are you still using the 9v to power the arduino? If so do you have it's ground going to the car? Make sure it is.

If you dont figure out the problem you can always use a relay driven by arduino.
Title: Re: Issue controlling cars brake light with arduino.
Post by: Billy on February 28, 2013, 02:30:01 PM
Assuming the light uses 4 amps, you 'll need to provide minimum of 50mA, and possibly as much as 250mA to the base. Your arduino cannot supply that kind of current. You'll have to buffer the arduino output with a transistor that can supply the current.

Also, how is it connected? Is the transistor emitter connected to GND or to the light?

Do it like this:
http://jeelabs.org/wp-content/uploads/2011/01/screen_shot_2011_01_22_at_231337.png (http://jeelabs.org/wp-content/uploads/2011/01/screen_shot_2011_01_22_at_231337.png)

Or, use the transistor you have now to drive a relay that switches the light. You don't want to tie the arduino to the car electronics anyway. Car electronics are really noisy and arduino might now even work connected to it. Better to isolate with a relay. The arduino can probably supply enough current to operate a relay if you use the transistor as a buffer.

Do it like this:
http://wilsonminesco.com/6502primer/2N4401drivingRelay.jpg (http://wilsonminesco.com/6502primer/2N4401drivingRelay.jpg)

And try google next time before you try to build a circuit. You will learn much much faster using google than using trial and error. Those two links took me 20 seconds each to find.
Title: Re: Issue controlling cars brake light with arduino.
Post by: jwatte on March 01, 2013, 02:56:26 PM
Or use a MOSFET, which can drive high currents without itself needing a high current.