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

Re: Real battery switch turning off Real gear lights

#51 Post by Kaellis991 »

jph wrote: Mon Sep 26, 2022 1:55 pm 1, yes, sort of ... it means that if you just connected the source and drain and left the gate floating the device would be OFF and no current would flow. In this circuit, we need to make the 'gate' negative in respect of the 'source' (14V) so we need to have a PD (Potential difference) of > 13V BELOW the source so in this circuit we already have a spare open collector transistor in a spare gate of the ULN, by connecting the gate to this we can, when there is a logic one on the ULN channel input, turn on the ULN darlington transistor (a low-side driver) which then pulls the gate down to gnd (or near enough) so we now have a PD of around 13V between source and gate - where gate is minus 13v LOWER. The device - the MOSFET - will now conduct and is in it's NON linear region so we get advantage of the extremely low Rds ON resistance. We do not want to be anywhere near the linear region - power mosfets are simply not designed to be run in the linear region. !!

2. Excellent on the dimmers. They dont have to be on the same device even. Just providing AM can see them.
What do they do at the moment ? - what do they operate ?
My main goals right now are to...
1. Finish up the autopilot switch / magnet coding.
2. Then develop a way to turn off the gear lights when I toggle my hardware battery switch to off. (MOSFET)

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

#52 Post by jph »

Where does your battery switch connect to ?
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#53 Post by Kaellis991 »

jph wrote: Mon Sep 26, 2022 2:34 pm Where does your battery switch connect to ?
My battery switch is connected to the same UNO that the dimmers are connected to.
The lights and magnets, driven by the 14v PSU, are running off a separae Leonardo.

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

#54 Post by jph »

It doesn't matter if they are on different devices. That's no issue.
I presume you fire a command or dataref with the switch ?.
All you have to do is make the lights for the landing gear and anything else dependent on their being power.
There will be a dataref for this.
You just add a condition for the light activation being dependent on the dataref for power on the system being present.
you can make a quick look at the dataref for power / voltage being present before ever turning on a bulb.
That way any system failure that causes voltage / BUS loss / drop out etc will still be a cause for failure to illuminate even with ignition ON .
You dont even need the Mosfet that way.

That's no issue to a man of your means. :D

Always build it with the future in mind.
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#55 Post by Kaellis991 »

There is a premade Generic LUA script I added to my piper panel which interacts with the battery ON and OFF datarefs.
Very simple. Adding to that something abiut the bus voltage complicates things a bit.
And there is a premade generic LUA script for the 4 lights. That was also plug and play.
The future is always clouded over by inexperience.

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

Re: Real battery switch turning off Real gear lights

#56 Post by Kaellis991 »

Turning off the gear lights is low on my totem pole.
Maybe when I get a better handle on this coding stuff after working out the scripts for the autopilot switches, I can then tackle the battery switch to lights connection.

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

#57 Post by jph »

No worries, when you have finished it as it is with what you have and what you can manage then PM me with the code and I will sort it if you want.
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#58 Post by Kaellis991 »

jph wrote: Mon Sep 26, 2022 4:00 pm No worries, when you have finished it as it is with what you have and what you can manage then PM me with the code and I will sort it if you want.
Thanks again

Post Reply