Real battery switch turning off Real gear lights

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Real battery switch turning off Real gear lights

#1 Post by Kaellis991 »

I posted a question in the Instrument Help section about trying to find the code that is running my Battery Switch hardware installed in my panel.
That has been answered although I still can't figure it all out yet.

But here is my questions concerning my battery switch.
The battery switch is using a generic battery switch script that I think I downloaded a long time ago. It's working with my real aircraft switch...no problem there.
Also I am using a generic landing gear indicator light script...I think....that turns on my real aircraft landing gear indicator lights. The lights indicate the gear up or down when the real gear handle I have is raised or lowered.
All of that is working well....

The indicator lights are driven by a 14v supply for the +V side of the lights while the -V side is switched with a dalington array connected to my Leonardo and I assume is directed by the light indicator script. I just dont know what's what.

What I am trying to find out is how to get the real lights I have to turn off when the real battery switch is flipped to off. Currently when I turn off the battery switch, the gear lights in the aircraft turn off, but the real lights stay lit.
Is it even possible to get the script for the battery switch to actually power off my real lights? Somehow there has to be a way for the battery switch code to disconnect the (4) darlington outputs and reconnect them when the battery is switched on.
This seems very complicated.

Perhaps a simple way would be to use a relay on my -V line before it goes to the shield board on my Leonardo. The relay can then be controlled by the battery switch script with some rewriting of the code....however that would be done.

The power for the lights and the magnets on the autopilot is provided to the blue screw terminals in the photo.
gear.jpg

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Real battery switch turning off Real gear lights

#2 Post by jph »

It's a code problem, not a hardware problem.
The code for the gear lights etc needs to be made aware of the position of the power switch in code or the appropriate dataref to tell it if there is 'virtual' power supplied.
@Keith Baxter is your man. ;)
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Real battery switch turning off Real gear lights

#3 Post by Kaellis991 »

Joe,

Sorting out my autopilot switches and the gear indicator lights are the last two pieces. After those two things are completed I am done with this project.
Keith is the one that can help me get this cockpit build across the finish line.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Real battery switch turning off Real gear lights

#4 Post by jph »

Oh, I LOVE the JST connectors ! :D

Really neat job mate.
Doesn't it make one hell of a difference ?

Joe
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Real battery switch turning off Real gear lights

#5 Post by Kaellis991 »

The JSTs are perfect. Thanks for the heads up on those.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Real battery switch turning off Real gear lights

#6 Post by Kaellis991 »

jph wrote: Mon Sep 19, 2022 6:55 am It's a code problem, not a hardware problem.
The code for the gear lights etc needs to be made aware of the position of the power switch in code or the appropriate dataref to tell it if there is 'virtual' power supplied.
@Keith Baxter is your man. ;)
Joe,

My 15v meanwell power supply has no switch. If I wanted to power down the 15v output side with an arduino, what would be a good way to do that?

Kirk
Last edited by Kaellis991 on Sun Sep 25, 2022 1:40 pm, edited 1 time in total.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Real battery switch turning off Real gear lights

#7 Post by jph »

Do you want to power down the 15V or the AC input to the meanwell ??
Joe. CISSP, MSc.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Real battery switch turning off Real gear lights

#8 Post by jph »

Oh, yes, also, what power supplies do you have in the cockpit ?
Do you have an external 5V or 12V as well as the 15V ? - just so I know what we can use :)
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Real battery switch turning off Real gear lights

#9 Post by Kaellis991 »

jph wrote: Sun Sep 25, 2022 1:27 pm Do you want to power down the 15V or the AC input to the meanwell ??
The 15v DC side...

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: Real battery switch turning off Real gear lights

#10 Post by Kaellis991 »

jph wrote: Sun Sep 25, 2022 1:32 pm Oh, yes, also, what power supplies do you have in the cockpit ?
Do you have an external 5V or 12V as well as the 15V ? - just so I know what we can use :)
The only power supply I am using is the 15v meanwell.....or do you mean what arduino 5v power supplies?

Post Reply