Welcome to Cockpitbuilders.com. Please login or sign up.

May 18, 2022, 05:56:09 AM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
11 Guests, 0 Users
Members
Stats
  • Total Posts: 58862
  • Total Topics: 7786
  • Online Today: 22
  • Online Ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 11
Total: 11

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Landing gear indicators

Started by FSAddon_boss, January 11, 2022, 11:48:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FSAddon_boss

Before buying more (and bigger and more expensive) lights, I thought to try and use some of the LED anodes I have in my Ardiuno test kit.
The ' three greens'  and a red ' in trans' light.

Only have to decide to add a 220Ohm resistor to each, or use a 1K resist.... it should work...... no?
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

RayS

If driving directly from the Arduino, 220 ohm will work. 1K will work, but the LEDs will be very dim.

I noticed you only have 1 resistor in the circuit. Instead, you'll want to add a 220-ohm resistor for each LED. This ensure uniform brightness across all LEDs, especially when more than 1 are lit at any time.
Ray Sotkiewicz

FSAddon_boss

Quote from: RayS on January 11, 2022, 12:54:11 PMIf driving directly from the Arduino, 220 ohm will work. 1K will work, but the LEDs will be very dim.

I noticed you only have 1 resistor in the circuit. Instead, you'll want to add a 220-ohm resistor for each LED. This ensure uniform brightness across all LEDs, especially when more than 1 are lit at any time.

Yes, I tested it with one. Will add a resistor to each LED.
With 220 Ohm it is very bright, thought to dim it a little (and save a little on max Ampere), but maybe something between 220 and 1K ?
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

Trevor Hale

Quote from: FSAddon_boss on January 12, 2022, 02:42:59 AM
Quote from: RayS on January 11, 2022, 12:54:11 PMIf driving directly from the Arduino, 220 ohm will work. 1K will work, but the LEDs will be very dim.

I noticed you only have 1 resistor in the circuit. Instead, you'll want to add a 220-ohm resistor for each LED. This ensure uniform brightness across all LEDs, especially when more than 1 are lit at any time.

Yes, I tested it with one. Will add a resistor to each LED.
With 220 Ohm it is very bright, thought to dim it a little (and save a little on max Ampere), but maybe something between 220 and 1K ?
Morning, from my experience, 330 Ohm is a great start.


Trev
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

FSAddon_boss

Thanks Trevor ! Will need to buy a few more ' flavors'  then  :D

Probably won't make any more progress until after my operation next week...... will report back when I have things working !
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

_alioth_

Quote from: FSAddon_boss on January 11, 2022, 11:48:43 AMBefore buying more (and bigger and more expensive) lights, I thought to try and use some of the LED anodes I have in my Ardiuno test kit.
The ' three greens'  and a red ' in trans' light.

Only have to decide to add a 220Ohm resistor to each, or use a 1K resist.... it should work...... no?

If you are going to use Arduino, you can use PWM pin outs so you can dim the lights with the software.
You use 220ohm to get the max brightness posible, and then with software you can dim the light to your preference.
Or you can build a switch for "night-day" brightness level.
Or you can add a photorresistor to arduino so you can dim the leds with the ambient light.

Arduino is great.

FSAddon_boss

Hi Alioth, thanks for the ideas. I use Arduino with MobiFlight, but I suppose one can add additional code to that?
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

Jason L

Mobiflight doesnt have that capability yet unfortunately.  You could double your 220ohm resistors, (connect them in serial) and see if that is a better brightness for you.  If I remember correctly these arduinos have a limit of 40 LED's if you are running them with 220ohm resistors.

BushPilotSimmer

220 ohms is much too low for anything but alien invasion warning systems.I am using 5mm red/green LEDs inside 5mm chrome bezels. 5.6k ohms for red and 56k ohms for green. Check voltage on 5V pins, Consider powering anodes of LEDs (or any high current devices) with 5V auxillary supply when voltage drops below that seen on board with no connections. Less likely to happen on UNO and MEGA than smaller NANOs.

Hugh

FSAddon_boss

Guys, I'm a near 70 year old noob.... sorry.

I keep reading about powering the lights separate..... but no idea how and with what to do that?

I have the Arduino Mega powered by a 12 V adapter (but the lights also work with just the USB connection).
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

ame

Flying a plane is probably more complicated than figuring out dropper resistors for LEDs, or how to hook up a switch, so don't worry.

LEDs are lit up with current. Too much current and they pop and cease working. The purpose of the resistor is to limit the current through the LED at the expected supply voltage. There are other techniques, but this is the simplest.

You can get a data sheet for any component, which tells you a lot of technical information about the component. You need to know this when you are designing stuff, but for a lot of things there are ball-park figures you can use.

Let's look at a red LED. Typically it has a forward voltage of 2 V, and a maximum current of 20 mA. Most modern LEDs are actually quite bright at 10 mA or even less. If you have some on your bench you can experiment.

Your power supply is typically 5 V from an Arduino, but a lot of people have 12 V lying around too.

The formula for calculating the dropper resistor value (or current-limiting resistor) is

R = (Vs - Vf) / If

R is the resistance in ohms
Vs is the source voltage in volts
Vf is the LED forward voltage in volts
If is the desired LED current in amps

So, with a typical red LED at 2 V and 10 mA powered from an Arduino at 5 V we get:

R = (5 - 2) / 0.01

R = 3 / 0.01

R = 300

So, a 300 ohm resistor will give you 10 mA through the LED at 5 V.

Different LEDs have different forward voltages. It's different for different colours, so you should look it up. Similarly, different LEDs might look the same brightness with different currents, so it's worth experimenting.

The relationship is linear, so in this example, to get 20 mA (twice the current) you can halve the resistor to 150 ohms. That's probably safe for most LEDs (check the data sheet), and will be the brightest. But it might be too bright for what you want.

Similarly, given a resistor value and supply voltage you can calculate the current the LED and guess if it's safe, and how bright it might be.

Finally, you need to pay attention where the power is coming from. All those LEDs add up.

The maximum current you can draw from an Arduino pin is 40 mA, so that's fine for an LED at 10 mA. But the total limit for all pins is 200 mA, which is only 20 LEDs at 10 mA.

There are ways around these limitations, and there are ways to vary the LED brightness using software, but this is the simple and obvious scenario. If you understand it then you can move on.

FSAddon_boss

Many thanks again, Ame..... I have 14 less planned, so the Arduino should be able to cope with that.
Will try and find the value of the LEDs I have (they came in a Arduino tester kit)..... or buy new ones with known values if I can't.

Oh, and some different value resistors so I can experiment.

Thank you !
Best regards,
Francois
_____________________________________
Francois A. 'Navman' Dumas
former FSAddon Publishing - Italy
https://www.fsaddon.com/fsblog/
retired

ame

You can learn the resistor colour code and figure out the value of resistors by looking at them. Or hook them up to a multimeter in resistance mode.

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate