Welcome, %1$s. Please login or register. - Did you miss your activation email?

Login with username, password and session length
 

Author Topic: Need help with arduino sketch (flickering engine lights)  (Read 901 times)

Offline Grumpy Popeye

  • Commander
  • ***
  • Posts: 173
Re: Need help with arduino sketch (flickering engine lights)
« Reply #15 on: February 28, 2017, 08:55:46 pm »
So I plugged in a transistor into my cct and the results were less than stellar. Even while being fed by 12V the LEDs were way dimmer than those being driven off the Arduino. While I can't account for the dimness, I think the transistor is only switching on once its voltage threshold is reached, so we're not getting the full effect of the PWM signal.

Here's a fun bit of video, Arduino feed at the top, 12V transistor on the bottom;

http://vid111.photobucket.com/albums/n154/Darph_Bobo_photos/8A34EDC4-86E2-48B8-B21A-3DC39CD3532F_zpsxcx9epvo.mp4

Offline AussieTrekkie

  • Admiral
  • *****
  • Posts: 675
Re: Need help with arduino sketch (flickering engine lights)
« Reply #16 on: February 28, 2017, 09:35:15 pm »
Probably a little late. When I did a course in electronics 15 years ago my understanding of the transistor, the base leg is what turns the transistor on and off. The base leg only needs a very small amount of current to turn on the transistor. In saying this a transistor cannot be used in a circuit that the Arduino will be used for flickering the lights, you need to connect the led directly to the PWM output on the Arduino to get the effect. In my Refit build using multiple Arduinos to control my lighting system I am using the before mentioned transistors 2N222A to turn on multiple leds on a circuit from one output on the Arduino. I have the base leg connected to the Arduino and the Collector and Emitter legs are connected to the led and the main power supply. So the Arduino is turning on the transistor but the transistor is turning on the led using the 9/12 volt power.

Don't know if this helps you in anyway.
Scott.

Offline madmonk

  • Commander
  • ***
  • Posts: 228
Re: Need help with arduino sketch (flickering engine lights)
« Reply #17 on: March 01, 2017, 02:51:41 am »
I regularly run 2 LEDs of one output and usually attach the resistor to one leg of the LED then take 2 wires back to the output, the Arduino outputs run at 5V so I use a 180Ohm resistor in line with each LED, basically running the LEDs in parallel.

Offline texastony1946

  • Ensign
  • *
  • Posts: 24
Re: Need help with arduino sketch (flickering engine lights)
« Reply #18 on: August 15, 2017, 08:15:14 am »
I'm trying with no success to ramp and flicker an LED at the same time. The code gets tangled up in timing between the 2 functions. I think I can do this with 2
JFET in seires (one to flicker ,one to ramp). Any ideas would be appreciated.

 




Enterprise © Bloc