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

#41 Post by Kaellis991 »

I have a couple of questions about the MOSFET.
Since the ULN is on the negative line of the PSU why is the MOSFET on the positive line?
What is the difference between P and N channel and also high and low side?

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

#42 Post by jph »

I would need to see a schematic of your wiring showing what lights are connected to what. - well, the whole schematic would be useful. I don't remember seeing anything about cockpit lighting / instrument lighting in previous discussions. It would be interesting to see what you have

As for mosfet differences P / N etc you are really going to be far far better reading information about mosfet devices in general on the net. I would recommend you start with a simpler BJT N and P channel transistor first.
Once you understand that then look at Mosfets. It is not a simple answer if you don't understand the basics. Getting into depth on substrate material doping and 'holes' 'moving' as opposed to electron conventional flow in a BJT (I bet that takes some back a few years to their electronics engineering courses :lol: ) is a little deep for a forum like this me thinks. We could talk about the devices in a very basic way if you like ?
Low and High is a term usually used in reference to the location of the power device (Mosfet for example) in the circuit in relationship to the load. A high side device is placed before the load and a low side is after the load.
The P Channel here is a high side device configuration as the load comes after the device. You cannot use an N Channel in this configuation without a specific gate driver circuits - a specialist device - usually a booststrap pump as you need the gate to be higher than the source by around 10 V + for a normal N Channel Mosfet, not possible here.

As for the ULN ? - I don't understand what you mean by the 'the ULN is on the negative line of the PSU' ?
If you mean it's ground pin is connected to ground of the Meanwell, well, yes it is, but so is the arduino. It has to be. :? :D (I am sure you mean something else I just don't know what it is..)
Joe
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#43 Post by Kaellis991 »

Thats what i meant. The ULN is connected to gnd rather than the positive side of the psu.
Last edited by Kaellis991 on Mon Sep 26, 2022 11:08 am, 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

#44 Post by jph »

Kaellis991 wrote: Mon Sep 26, 2022 10:01 am Thats what i meant. The ULN is connected to gnd rather then the positive side of the psu.
The ULN (the 2803A ) HAS to have it's gnd pin connected to gnd - I still don't understand what you mean ?

pin 9 on the uln is GND - it has to be connected
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#45 Post by Kaellis991 »

jph wrote: Mon Sep 26, 2022 10:06 am
Kaellis991 wrote: Mon Sep 26, 2022 10:01 am Thats what i meant. The ULN is connected to gnd rather then the positive side of the psu.
The ULN (the 2803A ) HAS to have it's gnd pin connected to gnd - I still don't understand what you mean ?

pin 9 on the uln is GND - it has to be connected
It is....here is my simplified schematic of the connections for my magnets and the gear lights.

Also the other diagram is my simpleton understanding of the ULN as a switch on the GND (negative) wire/line/ versus the MOSFET as a switch on the positive wire/line.
image.png
image.png

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

#46 Post by jph »

Ok,
The N R L lights (and the transit) could be easily dimmed in code as it is so you always have that option. You would only need to make changes to the code, not to the wiring or circuit.
Do you have the potentiometer for the dimmer wired up to the arduino yet ?

As for the lower diagram, what you have drawn there is a mosfet as a high-side driver and a BJT Darlington pair (one of the output stages of the ULN - each made up of 2 BJT NPN Transistors, 1 low power and 1 high power in a darlington arrangement, 1 flyback diode and 3 or four resistors - per stage!) acting a s a low-side driver with it's base of Darlington pair T1 driven by the arduino pin.
The ULN stage - each one of the 8, is reasonably complex.

here is what your lower 'switch' - the output stage of the ULN actually looks like - this is a 'low side' darlington driver with dual NPN BJTs
kirk 1.jpg
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#47 Post by Kaellis991 »

Oh yes, the (2) dimmers / rheostats are connected to an UNO that all of my toggle switches (battery, altenator, fuel pump, ext. lights, pitot heat) are connected to.
The gear lights, the autopilot switches and the magnets are controlled by a separate Leonardo using the ULN.

I read up on P and N MOSFETS. Holes versus electons is what I took away from that.

EDIT: The MOSFET I will be using is a depletion-type correct?

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

#48 Post by jph »

lol so you now have a hole where your electron should be - as the hole appears to move... x files music :)

This isn't a depletion mode device it is an enhancement mode . Think of normally closed v normally open .

This is normally OPEN - no current will flow from source to drain until you bring the gate voltage (referenced to source) to a level below the quoted gate threshold (about 4V if iirc from the datasheet), but then it starts to conduct but is in the linear region and the internal resistance is quite high leading to very high power dissipation and heating. We need the device to be in the NON linear region when fully on which is quoted in the datasheet (those things you dislike :D ) at around minus 13V for this device (again iirc)

It is only at that level of Vgs (voltage difference between gate and source) - so here the gate around 13V below the source voltage, that we enter the non linear region where the quoted Rds ON resistance occurs. This is the 'resistance' between source and drain ((R)esistance(d)rain(source) (Rds) .
If you remember I asked you to look for a lower value of Rds on than the first one which you quoted which was about 70 milliohms ?
Reason is that if you were running 100W from your PSU (about 7 amps at 14V) through the mosfet, then the power dissipation would be I squared x R so 7 squared x 70 milliohms = 3.4W !
With an Rds ON of around 10 milliohms then the power dissipation at full load on your PSU is 7 squared x 10 milli ohms = 0.5W ! a major difference and no heatsink will usually be required .. you can test with the 'spit on the finger' test equipment method.

It's all in the datasheet well actually - all the important data is in the product selector on the digikey site as well.

so the 2 dimmers are connected to analog inputs of the arduino ?
Joe. CISSP, MSc.

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

Re: Real battery switch turning off Real gear lights

#49 Post by Kaellis991 »

jph wrote: Mon Sep 26, 2022 1:27 pm lol so you now have a hole where your electron should be - as the hole appears to move... x files music :)

This isn't a depletion mode device it is an enhancement mode . Think of normally closed v normally open .

This is normally OPEN - no current will flow from source to drain until you bring the gate voltage (referenced to source) to a level below the quoted gate threshold (about 4V if iirc from the datasheet), but then it starts to conduct but is in the linear region and the internal resistance is quite high leading to very high power dissipation and heating. We need the device to be in the NON linear region when fully on which is quoted in the datasheet (those things you dislike :D ) at around minus 13V for this device (again iirc)

It is only at that level of Vgs (voltage difference between gate and source) - so here the gate around 13V below the source voltage, that we enter the non linear region where the quoted Rds ON resistance occurs. This is the 'resistance' between source and drain ((R)esistance(d)rain(source) (Rds) .
If you remember I asked you to look for a lower value of Rds on than the first one which you quoted which was about 70 milliohms ?
Reason is that if you were running 100W from your PSU (about 7 amps at 14V) through the mosfet, then the power dissipation would be I squared x R so 7 squared x 70 milliohms = 3.4W !
With an Rds ON of around 10 milliohms then the power dissipation at full load on your PSU is 7 squared x 10 milli ohms = 0.5W ! a major difference and no heatsink will usually be required .. you can test with the 'spit on the finger' test equipment method.

It's all in the datasheet well actually - all the important data is in the product selector on the digikey site as well.

so the 2 dimmers are connected to analog inputs of the arduino ?
Two things...
1. Does the enhancement type mean that my PSU will NOT be providing power to the lights and then the activation of the MOSFET causes the power to flow to the lights?
2. Yes, the 2 dimmers are connected to analog inputs on that UNO.

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

#50 Post by jph »

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 ?
Joe. CISSP, MSc.

Post Reply