#Led and Switch

1 messages · Page 1 of 1 (latest)

neon tide
#

hello I have a strange problem, I connected the two master caution and fire warning buttons, I have two buttons and two LEDs for each one. I'm using pmdg's 737, and both the buttons and the LEDs are connected correctly, I checked several times, the LEDs are in series with a 68 ohm resistor (I needed 51 but I didn't have it) the configuration tabs I think are accurate on MF. and the problem is that when I open MF to try, only one of the two buttons and 2 leds work. for example, the fire warning leds and the relative button work. while the master caution leds don't work and neither does the relative button. and the curious thing is that if I reverse the pins, the master caution leds and its button work while the others don't!!!

unborn escarp
#

We need to know more: maybe photo of your wiring and also the configurations

neon tide
unborn escarp
#

if you run discord on the pc too, you can cut and paste screenshot wiht Win-Shift-S by the way

neon tide
#

I never remember the keys

unborn escarp
#

so how are those wired to the arduino, and to the switches end?

neon tide
#

they are fine, the connection is ok, I noticed that even with the tester and without the resistors, the red LEDs light up while the yellow ones do not light up, but it is really strange that by inverting the pins of both the buttons and the LEDs the situation is reversed, the yellow leds light up and the red ones do not

true falcon
#

that is very weird. Are you sure you have each button wired to one arduino pin alone? Each LED wired alone with resistor to one arduino pin?

#

buttons and leds are kept separate and wired to separate arduino pins. Only the ground connection is common to both.

neon tide
#

now i tried to remove the leds from the pwm pins and put them on the digital pins and they both work, the buttons don't work, i'll try to replace the buttons

#

yes, the buttons are separate and I also divided the gnd to try, the leds have the gnd together and the buttons their own

unborn escarp
#

If test function lights up red but not yellow leds, I would say the connection is not OK

#

it should be something like this

true falcon
unborn escarp
#

tinkercad lets you do these now

#

we could actually revise our docs with these

neon tide
#

i double checked everything is fine and now everything works, there was a discrepancy between the assigned pin number and the position where i had put the wires

#

...because I moved the cable position assignments several times on the mega 2560, that's why then I had no answer

true falcon
#

yep, it kind of works better when you define the correct pins 😃

neon tide
#

I'm here for another weird problem......this time the six pack block works abnormally

neon tide
#

here too I almost certainly did something wrong, and the problem is that if I test the 6 announcers one at a time: flt cont, irs, fuel etc. they light up correctly. when i put on "play" mf, despite i have 1 on sim value and output value, no light goes on on my panel

true falcon
#

Check if the pwm function is active.

unborn escarp
#

and the test function should still work

#

regardless of the sim value

neon tide
true falcon
#

Well, you see that is the issue. PWM activated with a PWM capable arduino pin, takes the output config value as the brightness level of the led in the range 0 to 255.

#

In this case, you mentioned the value you are getting is 1

#

So the brightness being set is 1 out of 255, that is very very faint

#

Try deactivating the PWM function and the led should light normally.

sudden relic
# unborn escarp

Educational question, if I change the resistor direction it becomes a pull down?

#

Resistor=10k

unborn escarp
#

resistors do not have polarity

#

it depends where it is connected

#

for leds you need current limit resistors

sudden relic
#

In the diagram, for the switch were do I put the pull down

unborn escarp
#

for switches, in mobiflight, the pulldown resistors are not needed

#

mobiflight enables the built in pulldown resistors so you can connect switches directly between GND and data pin

#

so just like on the image, GND -----> switch -----> datapin

#

but in general, wiring is just like you would wire for any other arduino project

sudden relic
#

Same applies for multiplex boards…

unborn escarp
#

just that pulldowns are not required for switches

#

I havent yet done that but I would guess the same built in pulldowns work as multiplexer just connects everything to the same data pin

#

the internal built in pulldown would work? I am not super knowledgeable of this but @desert marsh maybe knows

sudden relic
#

I just ordered a prototyping board from @summer shore and now i will be able to be more adventures, I come from ProSim737 were everything was more or less ‘plug and pray’

desert marsh
sudden relic
#

Many thanks for educating me

#

Same applies for output multiplexers

unborn escarp
#

that we do not currently support

#

output shift registers are supported

#

unless I am mistaken and support was added recently

sudden relic
#

Can someone confirm if the shift register 74HC595D is being supported? Answering my own question, yes it does! I have 4 being used for output

neon tide
#

I'm back to better describe the problem. plugged in the 6 pack panel and tried every single announcer, all 6 worked! but when I press the "play" button of MF I have this situation :

#

moreover I also have the problem on the keys of the 6 pack, ...when I press the panel I see in the lower band of MF that the key is pressed and released, but there is no animation in the cockpit, which normally happens when I press the fire buttons warn or master caution

true falcon
#

Using pmdg 737? Are you fsuipc7?

neon tide
#

Yes yes

true falcon
#

Enable data broadcast in 737options.ini?

neon tide
#

Yes

true falcon
#

Mobiflight detecting fsuipc7 OK?

neon tide
#

Ok

#

.....master caution and Fire waring are working, and more others

neon tide
#

i see now this :

true falcon
#

what you showed is the Simconnect event for the 6 pack which as indicated, does not work.

neon tide
#

yes, sorry Jaime, generally I always use simconnect, but on some panels I use fsuipc, for example for the electrical display

#

auto_awesome
....but if I try to use fsuipc, do you think it works?

true falcon
#

I know it works

#

this is one of the handful of events in the PMDG 737 that require Fsuipc, because Mobiflight does not communicate directly with the PMDG SDK. Fsuipc7 does since mid last year. Other events like this are the VS display and Land Alt and Flt Alt displays and the Electrical Display panel.