C-172 Elevator Trim with servo position indicator

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

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

Re: C-172 Elevator Trim with servo position indicator

#21 Post by jph »

polarair wrote: Sat Oct 10, 2020 7:44 am
Sling wrote: Fri Oct 09, 2020 10:47 pm
polarair wrote: Fri Oct 09, 2020 3:30 pm the base code is posted under #5 from this thread
It’s not #5 for everyone so for future reference, using the post numbers is not the best way of referring to an older post.the post numbers are dependent on how you have your forum display settings.
Sorry will do next time
Hi Polarair, dont worry about it and no need to apologise, when trying to reference a post it is near enough. ;)
Joe
Joe. CISSP, MSc.

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

Re: C-172 Elevator Trim with servo position indicator

#22 Post by jph »

polarair wrote: Fri Oct 09, 2020 5:48 pm
The unit made looks like this:
image.png
image.png (231.51 KiB) Viewed 2465 times
Lovely work on the 3d printing ! - bloody nice job sir !
Joe
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: C-172 Elevator Trim with servo position indicator

#23 Post by Keith Baxter »

Hi Joe,

Yes It is an interesting discussion indeed. Hence why I wanted to know what Mike was driving with his sg90.

Was it the trim wheel, gauge (most probable) or something else.

The throttle quadrant that I 3D printed for the B738 uses the 28BYJ_48 stepper to spin the trim wheel. This is driven by the AP (sim dataref). However, I want to know the position I set the trim to when not in AP mode. That is a duel gauge that uses two torquepro 9g sg90,s. Similar to the flaps gauge. The one sg90 is indicating my setting and the other is indicating the trim position as the sim servo's drive the trim. To achieve that one has to be driven from the encoder and the other from the dataref.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: C-172 Elevator Trim with servo position indicator

#24 Post by jph »

Keith Baxter wrote: Sat Oct 10, 2020 9:56 am Hi Joe,

Yes It is an interesting discussion indeed. Hence why I wanted to know what Mike was driving with his sg90.

Was it the trim wheel, gauge (most probable) or something else.

The throttle quadrant that I 3D printed for the B738 uses the 28BYJ_48 stepper to spin the trim wheel. This is driven by the AP (sim dataref). However, I want to know the position I set the trim to when not in AP mode. That is a duel gauge that uses two torquepro 9g sg90,s. Similar to the flaps gauge. The one sg90 is indicating my setting and the other is indicating the trim position as the sim servo's drive the trim. To achieve that one has to be driven from the encoder and the other from the dataref.

Keith
Hi Keith,
I love this kind of stuff as it is really interesting and informative to get a take on someone else's approach - which is 75% of the hobby for me ..
I always presumed that Mike was referring to the servo driven trim pitch indicator but I can see it is a bit of a minefield.
I think I understand what you are saying but am totally unfamiliar with the 738. the last 737 I flew was the 200 series American Airlines mode D Sim in Denver 20 years ago :shock: -
On your quadrant, is the dual gauge normal for that kind of aircraft ?
Joe.
Joe. CISSP, MSc.

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

Re: C-172 Elevator Trim with servo position indicator

#25 Post by jph »

Hi Keith and good morning,
I believe I misunderstood what you said in the previous post - apologies . :oops: . I believe that you have created a gauge for your own use.. not one modelled on the real aircraft which slightly confused me - (not difficult at my age)...
Can I please ask how you are actually accounting for any difference in trim levels from AP to manual as far as the actual pitch is concerned ? (and response when flying)
I believe you are using a pitch indicator comparing the two (auto and manual trim). Are you actually integrating the two to the actual trim without any manual intervention between AP and manual ? - meaning are you getting a smooth transition.
I agree that whilst on AP the dataref needs to be read for the pitch to control the trim wheel drive, and also that the manual trim wheel drive needs to write the dataref. This is separate from the pitch trim 'indicator' though ?
I would presume that when you are driving the trim wheel in AP trim or electrical button trim mode then that will move the stepper - and presuming that is directly linked to the incremental encoder ?
So also i would presume that you have full data all the time as to the position of the trim wheel and actual trim in the sim ?. - ie, when starting the sim, the dataref is read as to the position of the trim (which gives you an incremental encoder reference starting point), OR you write the position on start-up from a pre-set level TO the dataref to set it to a know position on start-up which is the same on every sim start-up.
When the AP mode is engaged, then the dataref read is the controlling factor ? - and when in manual mode the dataref write is the controlling factor ?. This would be as I expect. to allow for any variation - (if needed) then the encoder count can be reset to a matched level on AP disconnect. This would always keep the two in sync hence needing no manual intervention.
How do you find the 28BYJ_48 steppers for driving the trim wheel as I have always found that they have low torque (although they are slightly better with 12 - 15V drive) - I was looking back though some of my arduino code and I think I was using 2074 as the e pulses needed allowing for 360 degrees allowing for the on board gearing in the unit.
I always found it was really easy to skip a step or two with the slightest load with the 28BYJ_48. I am actually surprised you got it to turn a trim wheel. Nice one.
Note to self - I need to stop thinking about 'gauge' as a copy of an actual real word aircraft unit and more as a possible AM produced unit :) - I am too used to sketches and modules....
Would love to see an image of the quadrant assembly.
Joe
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: C-172 Elevator Trim with servo position indicator

#26 Post by Keith Baxter »

Hi Joe,

Yes your are correct on how it works.

There are many cockpit upgrade and configurations. I first started AM wanting to replicate the IS&S instrument upgrades. First it was the C130 Then the Eclips500. IS&S also have a 737 upgrade.

My version of the C130 EIDS2 which is also on it's way to the store.
ice_screenshot_20201011-115232.png
Here you can get an idea of some of the upgrades from IS&S. You will find Quite a few different configurations to various aircraft. Note, A google search will highlight quite a few different companies do similar. So technically not "MY Customization" but one based on one of these.

https://innovative-ss.com/platforms-and ... k-upgrade/


Here you will notice the IS$S Eclips Style I was adapting for the C130. So I have played around with maps and nav data for quite some time with AM.
Yes that is a 15" 4x3 res cheep TV that I added buttons and encoders to. I wanted to run that off a RPI but it was too big for the RPi.



Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: C-172 Elevator Trim with servo position indicator

#27 Post by jph »

Hi Keith, wow, I am blown away, that is simply beautiful work !..far beyond my current ability. As we say in the north of the UK, I am ' totally gob smacked' :D
I get a buzz about at least understanding what you are doing with the trim. The rest you are doing - jeeeeeeeeeeeez ! that is way over my pay grade :mrgreen:

Lovely work.
Joe
Joe. CISSP, MSc.

Post Reply