MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
Fberuben
Posts: 13
Hi good morning .
I’ve been working with mobiflight for 1 year .
I’m building a b737 cockpit using b737 pmdg /pmdg ngxu on p3dv4 (newest version )
Yesterday I was working on the fuel panel , everything worked ok, then pI noticed that the blue leds (valve open, engine valve closed spar valve close ) start to fade out once the other leds ( low pressure ) on the same panel are on .
I was thinking of a lack of power but that effect only happens when the whole leds on any combination (blue /orange ) are on .....
For example :
If I turn on only the blue leds 5 annunciators(x2 led each) there is no light fade out .(looking great)

If I turn only all the orange leds 8 anunciador (x2) there is no fade at all . (Looking great )

If I turn on any combination of 1 blue led and 1 orange led .....immediately after I turn the orange led on , the blue led start to dim like if the orange led is using the blue Led power to turn on... but blue led stays on the same dimm state Until I turn another orange led , the same blue led dimms even more.... and that’s how it happens until the blue light or lights are totally “invisible”.... this happens with 1 or all the blue leds on . No Mather how many blue leds are on , as soon as I turn only 1 orange led all the blue(s) start to dimm.
Any solution on this ?
By the way I was just using 1 board Arduino mega alone on a test pc and the only panel connected on the board was the fuel panel .
So we can discard an overload .
And another thing , I thought that maybe it was a led issue so I remplace them to a brighter blue leds , and they look brighter but same issue .
So we can discard led failure .
Thanks .
Flavio Beruben
2020-04-19 17:58
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
Hi Flavio,

I don't suspect an error with MobiFlight itself. It looks like a wiring problem here.

Could you please describe how you connected the respective LEDs?
You write 5 blue and 8 orange LEDs. How many pins on the mega module do you use for each? How many LEDs are connected in series and how many in parallel?
Do you use a series resistor for each LED or are several LEDs operated via a series resistor?
Which offsets do you use?
Grüße,
Stephan
2020-04-19 22:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
With Stephan you already get in Contact with the "God of Electronics" . So your on the right place.

I just like to confirm..... This must be in 99% of cases a worng wire logic OR a broke Mega ( Whatever broke Mega is verry unlikely)

A Issue in Mobiflight Logic is normaly not possible cause MF not support Dimming.... Here the LED would be ON or OFF .
A issue in PMDG Offsets also is not possible.... Here also no Dimming is supported and Offset is simply ON or OFF.

In theory a verry strange config with Preconditions that are wrong and colliding same time can also occure in that symptoms..... But i not think you build it... do you ???

Solution:
Please send us a Shematic if possible.... If not send us a pictures we can see the wire logic.
If you like join DISCORD .... there share of Pictures is more comfortable.... Also a Video is possible to show us the situation !
Good Luck !
2020-04-20 00:25
Avatar
Fberuben
Posts: 13
https://discord.gg/mr5mUM
Flavio Beruben
2020-04-20 08:52
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
Never say God to me, God knows mercy ;-)
Grüße,
Stephan
2020-04-20 14:48
Avatar
Fberuben
Posts: 13
I uploaded a link with a video of what happens on the light test.


About the wiring.... is hard to explain in a picture ... I have a mess....... but basically leds and switches on this panel share same ground (-) And every led and switch (+) are independent And each one goes to a specific pin.
Talking about the leds wiring ... on each annunciator there are 2 leds wired together and as explain above then they share same ground .
That’s the logic that I’m using .
Works on other panels but not sure what’s the difference .
Thanks
Flavio Beruben
2020-04-20 15:44
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
Hi Flavio,

I saw the video but my opinion is the same.

What do you mean if you write " but basically leds and switches on this panel share same ground (-) And every led and switch (+)".

Do you connect them a) to the ground AND b) to +5V? Do you switch the LEDs with you switches or via offset?

Be so kind and upload a picture of your wiring. Thx
Grüße,
Stephan
2020-04-20 17:02
Avatar
Fberuben
Posts: 13
What I meant is that every led share same ground with switches ,coming along just with one GND cable at the end .
and the other switch pole lets say it (+) not connected to Arduino 5v . Or pin poles are connected independently on its corresponding Arduino pins .
They work with the offsets and they turn on as they should . As a Mather of fact The panel works great but for example on light test the blue switches go dimm as the video on the app shows .
You can make all the lights turn on blue and they illuminate without fading . But as soon I Turn on 1 low pressure orange led . The blue lights fade a little . If you turn another orange light , dimms a little more if you continue until all pumps are off and all orange leds on , the blue light are completely invisible .
But ON ....
by the moment I start turning off the orange leds the blue lights start to recover their brightness .
I just uploaded a new diagram of the wiring ,
A decided that the photo wasn’t the best choice due the wiring .
Flavio Beruben
2020-04-20 20:09
Avatar
Fberuben
Posts: 13
Hi again, sorry for the late response ,I was busy flying the real one .
I don’t know what happened with the discord chat . I was expecting to read your answers in detail later. I can’t find it anymore .
Anyway...
As I remember you claim this problem is due the lack of resistances .
Am I right?

Now I know that I can burn out my board if I don’t use resistors on my leds .

But .....what is the relationship for the dimming you saw on the video, and why that effect doesn’t happen with the orange leds if I start turning on the leds from orange to blue , and not from blue to orange ?
Orange leds keep same brightness !!

Just to remember a fact ...This only happens with the blue ones .

I’m really sorry my electronics acknowledge is nil I started my sim from trial an error with no guidance . not using resistors worked for me so far .( now I know l have to correct that)

Now that I know about them an which to use ....IF I’m not wrong I remember someone post 330 omhs.

Now !!!! I Just bought a few 330 omhs resistors , now the problem:

Each annunciator box have 2 leds on it .
This is how I wired them into the box [(-) (+)(-) (+)] so the left corner symbol is the left led going to a common GND ,the two on the middle are the 2 led interconnected and the right corner led goes to X Arduino pin . All the switches and leds are daisy chain to ground on this panel .

I made some super quick research and found out that the resistor has to be weld from one leg to the ground pole (-) on this case the left corner symbol . And then the other led leg to Arduino GND cable direct to the board (GND).

So the question Is.
Do I need to do this to every led annunciator
Separately or can I just weld a resistor direct to a common ground cable where all the blue leds are connected to .

Will this solve my problem??

OR which will be the best solution for this ?

I still have the doubt on why resistors could fix the blue led dimming problem .

Form my point of sight It looks like if current wasn’t steady or good enough to turn on the blue leds . simultaneously with the orange leds on this panel .

why All the orange leds turn on without signs of light fading at all having not resistances ?

Thanks
Flavio Beruben
2020-04-24 22:54
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
Hello Flavio,

it seems you lack the most important basics of electronics related to semiconductors like LEDs.
Therefore, the world will continue to turn because this ignorance can be removed. There are plenty of tutorials on the Internet that show you how to connect LEDs correctly.
So far, it was new to me that you obviously operated your LEDs WITHOUT a series resistor without causing any great damage. But your lines also tell me that you are in the process of eliminating these deficits.

You write that you have connected two LEDs one after the other (- + - +). This is called series connection.
The characteristics of the LEDs mean that a voltage drops across them in electrical operation. This voltage depends on the color of the LED, because the color of the LED depends on its composition.
With red LEDs this is approximately 2.2V, with orange LEDs approximately 2.0V and with blue LEDs approximately 3.2V.

If, as with you, these LEDs are connected in series, the voltage that drops across the LEDs is also added. With 2 red LEDs that would be approx.4.4V, with 2 orange 4V and with 2 blue LEDs 6.4V. Now the supply voltage of the Mega-Module is only 5V. This means that part of the operating voltage is missing when you switch on your blue LEDs. If you now operate it without a series resistor, these two blue LEDs draw so much current from the mega that the protective circuit responds there and the supply voltage is reduced in the direction of 0V to limit the current, otherwise the output of the pin would be from Mega to be destroyed.
With the orange LEDs, the current limit certainly also responds, but the voltage is not lowered so much that they become darker.

Now that you have learned that an LED cannot be operated without a series resistor, you have to convert your circuit.

Yes, each LED MUST be provided with a series resistor. This means that you have to open the connection (- + - +) between the two LEDs and then solder the series resistor on the minus side (-) of the LED. The two (+) sides can go together to the pin of the Mega. This is called parallel connection.

You can only connect the first two blue LEDs in this way and you will see that they will no longer dim.

When it comes to the brightness of the LEDs, it depends on their quality. Your LEDs may be darker at 330 ohms than they were before without a series resistor. Then you can also reduce the value of the series resistor. You can calculate this and you should create a small table for the respective LED color.

Ohm's law is decisive for the calculation of the series resistance.

Ohm's law states that the voltage is the product of resistance and current. The formula for this is: U (voltage) = R (resistance) * I (current)

The formula can also be changed according to the resistance, because the resistance (R) is voltage (U) divided by the current (I), i.e. R = U / I

Starting from an operating voltage of 5V, you have to subtract the operating voltage of the LED. For orange colored LEDs this would be 5V - 2V = 3V
This 3V should drop across the resistor and a current of 10mA should flow. The calculation of the resistance would then be R = 3V / 0.01A
The result is R = 300 ohms if 10mA current is to flow. 300Ohm is not a common value, so you take 330Ohm, then the current is slightly lower.
If the LED lights up too dark for you, you can reduce the resistance. Since the LED current should not exceed 25mA (0.025A), the smallest resistance value would be according to the above formula: R = 3V / 0.025. Result 120 ohms. For 20mA it would be 150 Ohm and for 15mA it would be 200 or 220 Ohm.

For the blue LEDs you calculate it in the same way. The operating voltage of the blue LED is 3.2V, that of the Mega 5V. Thus 1.8V must drop across the series resistor. So where you used the 3V above, you now take 1.8V.

You see, taking a flat rate of 330 Ohm for each LED would be possible, but it leads to different brightnesses. You have to experiment here. The brightness is just an individual matter of taste.

You can also search Google for an LED series resistor calculator that explains the relationships in your language.
I hope to have helped you a little. Try it out with the blue LEDs and report your experiences here.
Grüße,
Stephan
2020-04-25 00:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Nooby Question.... Can a paralell connection not be set with one resistor in case both LED will always be ON or OFF same time ?
ONLY if Power Curent is HIGHER as the drop of both LED added.

iconQuote:

If, as with you, these LEDs are connected in series, the voltage that drops across the LEDs is also added. With 2 red LEDs that would be approx.4.4V, with 2 orange 4V and with 2 blue LEDs 6.4V.



So in Case of Red LED is it possible to do the follow....

Pin Of Mega to +LED1 ..... -LED1 to +LED2 ..... -LED2 to Resistor ..... Resistor to GRD.

Here 2 Red LED is as you said 2*2,2 = 4,4 V
I´m not sure if we just add both voltage drops or also both "mA" values.
So calculation would be...
A ) 0,4 / 0,01 = 40ohm (10mA)
B ) 0,4 / 0,02 = 20ohm (20mA)

If my idea is correct then here no Resistor is needed maby cause this value is pretty small..... isn´t it ??

*********
Summary.... Funny fact is the problem just occure cause you use 2 LED for each Anounciator in a row.... With only one LED this would not happen whatever the LED are pretty to bright and maby burned or broke the Mega with time..... BUT The Dimming Effect would not happen normaly i think.
So it was not posible to help you at first without that important information !

Maby Stephan can confirm my theory.
Good Luck !
2020-04-25 01:41
Avatar
Fberuben
Posts: 13
:O :O :O thank you very much for your answer it was super complete!!
Better than expected .
I’ll give it a try . Maybe on Monday .
Thanks I keep you post .
Flavio Beruben
2020-04-25 01:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
OFF TOPIC

Just a personal question ....

iconFberuben:

Hi again, sorry for the late response ,I was busy flying the real one .



Are you a real Pilot ...
If YES.... Captain, FO ??? What Typ do you fly ?? What Company ?? Freighter or Pax ?
Good Luck !
2020-04-25 01:45
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1525
Supporter
I can not confirm the procedure and I expressly warn against it, because

a LED is a semiconductor, similar to a transistor, but with two poles only.
From your point of view, Flavio should only have cut the GND line and soldered in the series resistor. In terms of electricity, this is not important, since in a series connection the current is the same at every point in the circuit. I'll elaborate on that below.

Using no resistance here can have fatal consequences, no matter how small or large the series resistor turns out. This series resistor serves to limit the current and thereby protects the connected semiconductors. Operate your circuit idea without an upstream mega. But please do not be afraid, because if LEDs are operated without a series resistor, they pop when they burn.
In the case of the upstream Mega, it has internal current limiting circuits that drive the voltage to zero if the current should become too large. Such things strain the circuit and can cause the mega to be damaged. Then the LED survives for 18 cents, but the Mega for 8.90 euros is in the bucket.
Flavio described this current limiting circuit very nicely and made it possible for me to ask about the resistance values.

I didn't want to completely confuse Flavio, so I recommended a consistent approach. Each LED gets a series resistor, regardless of the color or the current.

What would also work would be a resistor for both LEDs, the LEDs being connected in parallel and then in series with a series resistor. The question must always be asked, with which LEDs the resistor was used in series with two LEDs connected in parallel. The current for both diodes then flows through the series resistor. For the calculation, the voltage across the LED remains the same, but twice the current flows through the resistor (each for 1 LED). This procedure assumes that the diodes are not subject to scattering and have the same operating voltage. A look at the data sheets then shows that e.g. With orange LEDs, the voltage spread is 1.5V (minimum), 2.0V (typical) and 2.4V (maximum). With such a large spectrum, you should spare a few cents and adapt the light intensity to the circumstances, otherwise it can happen with large scatter that the LED shine differently bright with a common series resistor.

In my consideration of conveying something to an ignorant person, I let myself be driven by the idea of ​​conveying a clear and technically clean procedure. What an experienced user makes of it is up to him. I point out a path that is in any case clean and also works and does not let it run anywhere into an open knife that does nothing for it.
Grüße,
Stephan
2020-04-25 19:30
Avatar
Fberuben
Posts: 13
iconpizman82:

OFF TOPIC

Just a personal question ....

iconFberuben:

Hi again, sorry for the late response ,I was busy flying the real one .



Are you a real Pilot ...
If YES.... Captain, FO ??? What Typ do you fly ?? What Company ?? Freighter or Pax ?



Affirmative , FO , B737NG , Aeromexico , Pax
Flavio Beruben
2020-04-27 19:25
Go to page 1Go to page 012Go to page 2Go to page 2