c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
82 stars 43 forks source link

Issue 1495 elec sys bugs #1496

Closed hbeni closed 8 months ago

hbeni commented 9 months ago

resolves #1495

hbeni commented 9 months ago

Ready for review

hbeni commented 8 months ago

For the Archives; regardind the GPU (ground power unit) I had a mail discussion with David Megginson to clarify, wether the GPU supplies power to the bus with the master-bat switch in the OFF position (like it is modelled now).

I believe that to be wrong, and found evidence.

So, I did dig into the matter more and found this discussion: https://aviation.stackexchange.com/questions/72425/how-does-the-battery-master-switch-activate-the-battery-contactor-in-cessna-152

It means that this is really depending on plane, like you said.

C182S For the C182s, I looked closer to the schematics (POH 7-30, attached). There, we have a dedicated "external power relay", that is linked to the master switch. It also is linked to the battery. The POH stats that the "master BAT switch controlls all electrical power to the plane", and also "The primary buses are on anytime the master switch is turned on, and are not affected by starter or external power usage. The avionics buses are on when the master switch and avionics master switch are in the ON position.". For the case that the battery is dead,and therefore can not provide current via the master switch to ground, so the contactor closes, the external power does close the battery contactor too. But since the external power relay is placed before the contactor, and only closes when the BAT switch is ON, this also is linked to that switch. The result is also, that loading a flat battery using the external power unit is also only done when the BAT switch is ON. It's not enough to just connect the GPU. So for the C182s I would really see our toughts as "confirmed by evidence" wouldn't you say?

For the C172 the schematics is not as clear. It looks like the GPU is powering directly bypassing the switch, but the POH also has the same wording as the C182S POH regarding "controlls all power to the plane". It does not have the "external power relay" but a "reverse polarity contactor" (assumingly doing the same, but the schematics do not show wiring to the master switch). Like with the 182, the POH says "The primary bus is on anytime the master switch is turned on, and is not affected by starter or external power usage". To me, that tells me its working like with the C182, namely, the BAT switch needs to be in the ON position to allow power from the GPU to reach the primary bus.

Thanks again for your help :)

See also https://github.com/HHS81/c182s/issues/565 Affected commit: 1ef6a2d12042c2174f667beee98cee63c8e73b53

wlbragg commented 8 months ago

@hbeni

Thank you for digging into this as much as you have already. I have seen schematics both ways. Below is a schematic I have used for some time and it shows the batt switch is not inline for the GPU port.

c172p

Thing is, I don't know where I got this schematic from at the time.

I know this isn't even close to anything definitive, just another data point, but Chat GPT stated the following which was an interesting thought.

No, the master battery switch on a Cessna 172P does not control the flow of current from a ground power unit (GPU) to the rest of the aircraft's electrical circuitry. The master battery switch is primarily used to connect or disconnect the aircraft's electrical system from the main battery. When the master battery switch is turned on, it connects the aircraft's electrical system to the battery, allowing it to power various systems and components. When turned off, it isolates the battery from the electrical system, preventing it from supplying power. The GPU current to the aircraft's electrical circuitry is typically controlled by a separate switch or mechanism. This allows the ground crew or pilot to connect or disconnect the external power source without affecting the aircraft's internal electrical system. The specific method for controlling GPU power may vary depending on the aircraft's configuration and equipment.

So I am concerned about this part.

The other piece, the avionics switch acting as a circuit breaker, is that from the 182 POH or both?

hbeni commented 8 months ago

I know this isn't even close to anything definitive, just another data point, but Chat GPT stated the following which was an interesting thought.

I would not trust ChatGPT further than I can throw the word AI. I also asked it alot of questions for fun when doing recherche for this - and it was not helpful at all, very vague etc. I also had a chat with David Megginson about the matter.

This is the POH I was referencing. Elec system is described from page 7-24 (PDF page 156). https://www.cpaviation.com/images/downloads/Cessna%20172P.pdf

It shows this schematic: grafik

I also had a chat with David Megginson about the matter.

We concluded, that it is sensible to assume the BAT switch also disconnects the GPU, because

grafik grafik

The GPU is described in supplement 6 (PDF page 253ff). grafik And from the Schematics and the master switch description we know, that the battery contactor is only on when master switch is on. So, in conclusion, there can be no power through the contactor. And the part with the GPU and master switch is the same as with the C182s POH. For me this is enough of evidence, but If this should not be changed, its easy. Just ignore (or revert) commit 1ef6a2d12042c2174f66 for the merge. I isolated the change for this reason.


The other piece, the avionics switch acting as a circuit breaker, is that from the 182 POH or both?

No, the 182 has dedicated breakers for the avionics busses. Its just the 172p; from the 172P (POH 7-26): grafik

wlbragg commented 8 months ago

The way I read the following...

Which will close the battery contactor when external power is applied with the master switch turned on.

Meaning only if the batt switch is turned on will the battery contactor be closed to the batt if GPU power is supplied, Meaning you have to isolate the batt circuit from the GPU circuit if the batt circuit is active when you apply GPU power. You don't want both. The contactors are there to isolate the various circuits from one another. If the master batt is off, then you don't need the battery contactor to close when you apply GPU power.

I am reading this totally different than your interpretation.

The battery contactor is taking power from either the batt or the GPU and allowing it on to the ammeter and primary buss, not both.

Look at the circuit and imagine the battery contactor as an OR switch to decide which circuit to allow the ammeter and primary bus to have access to.

Does this make any more sense? I think the schematic supports my conclusion. The one I provided supports it even more as it is clear that it is isolated from the bat and if you look at the top of the primary bus it says "from alternator bus". So the primary bus has one circuit from the GPU "OR" one from the alternator bus.

I agree with you about Chat GPT, definitely wouldn't bet the house on it. But the logic behind was reasonable.

wlbragg commented 8 months ago

It is still unclear to me exactly what the battery contactor is for and how it works in this instance?

wlbragg commented 8 months ago

Thanks for clearing up the avionics switch portion, that is crystal clear.

hbeni commented 8 months ago

I put the conclusion first, then the details.

Conclusion

Details

It is still unclear to me exactly what the battery contactor is for and how it works in this instance?

See: https://www.batterydesign.net/introduction-to-contactors/ The contactor is an elecrically operated switch. The BAT switch is connected to ground at one end. The other end is connected to the contactors switch line. Therefore, if you close that circuit by placing the BAT switch in the ON position, you make a path between the battery and ground via the BAT switch. That (low power) current activates the contactor, which will then engage and close the actual circuit; in this case between the battery and the rest of the electrical system. You do it this way, because otherwise all the power would need to go via the bat switch, which is clearly a dangerous thing and also rises the needed specs for the switch. With the contactor, the switch-circuit can be a very small power.

The way I read the following...

Which will close the battery contactor when external power is applied with the master switch turned on.

If you read further, you get the explaination for that sentence. The GPU has a special fused wiring, that will also (in additon to the design laid out in the first sentence of my comment here) close the contactor, but only, when BAT is ON - not when it's off. It is for the case when the battery is flat: when the BAT has not anymore enough power to close the contactor when you switch BAT=ON, the contactor would remain closed. The alternate GPU circuit therefore can provide power to close the contactor. At the very least, this is to connect the flat battery to the electrical system, so the GPU can load it.

Does this make any more sense? I think the schematic supports my conclusion. The one [schematics] I provided

Do you remember if its for an C172P? Because what I have found, that this behavior is really plane/model specific. So unless you can clearly say "this is a c172p we are looking at" I would not model something after it.

But anyway; I found a C172 servicing manual which has a detailed diagram for the battery's wiring: https://static-data2.manualslib.com//pdf6/125/12409/1240815-cessna/images/172_skyhawk_series_197_bg.jpg There you can also clearly see a "ground service receptable contactor (19)". Also that manual has a good description of the system regarding our question. grafik grafik

hbeni commented 8 months ago

Edit: Implemented that on a basic level

wlbragg commented 8 months ago

Excellent, thank you for taking even more time on this.

Do you remember if its for an C172P? Because what I have found, that this behavior is really plane/model specific. So unless you can clearly say "this is a c172p we are looking at" I would not model something after it.

I agree, I am not confident enough without finding the source where I got it originally. I'm going to make sure to save some of the new information provided here.

This all is really good information and I appreciate your educating me on it. This looks great, Are you all signed off on it then, ready to merge?

hbeni commented 8 months ago

Basicly it is probably ready, but I think we should also Look on the fg1000 variant. Didnt check her yet

wlbragg commented 8 months ago

Good luck, it is a different electrical system. I'm not sure it is even close to correct and may be somewhat messy. So if you look at it, look at it from the perspective of having to possibly redo it or parts of it. How different is the 182t from the 182s?

OK, so if you want, take a look at it and let me know if you plan to proceed with it. If I can help let me know.

I think much of the fg1000 work has been done under its own pr's and issues. So even if you want to look into the 1000, we can still merge this and close it.

hbeni commented 8 months ago

How different is the 182t from the 182s?

They share most of the main circuits. What's new is a standby battery and its wiring.

hbeni commented 8 months ago

Searching for a POH I did only find a 172S with G1000 POH. Are there any 172P's with G1000 where we can peek at its electrical system? But I would expect the wiring to be similar.

https://wayman.edu/files/C172S-G1000-POH.pdf (7-47 / PDF p. 249 ff) looks very familiar to the 182T.

So I would figure we can just use the 182Ts electrical system nasal file?

hbeni commented 8 months ago

OK; quickly looked at the fg1000 electrical system, and it looks not bad. Even the standby battery is modelled.

I'll add that and then we are good to merge imho.

Edit:

I'm not sure it is even close to correct and may be somewhat messy.

It looks good to me, from what i did see. Did not dive deep into it, but what I have seen, the wiring seems to resemble the POH for the most part. And the code doesn't look messy to me.

hbeni commented 8 months ago

done, you can test and merge :partying_face:

wlbragg commented 8 months ago

Outstanding, thanks for cleaning it up. I'm glad to have other eyes on the fg1000 electrical and that it passed muster. This is good, thank you.