Jump to content
Sign in to follow this  
Guest MikePowell

Making Simulated Instruments

Recommended Posts

Guest MikePowell

I have posted a major update on making simulated aircraft instruments based on air-core movements, stepping motors and servos.It can be found at www.mikesflightdeck.com/Iinstrument_panel_3.htmCritical comments on clarity of writing, technical approach, etc. are welcomed.Mikewww.mikesflightdeck.comInfo for simpit builders

Share this post


Link to post
Share on other sites
Guest

I liked the servo approch becaus I fly RC aircraft and I was a sales man at the Local Hobby Shop. I have hacked the Pot out in a servo befor for a robots weel motor and it was suprisingly easy. Plus a servo is very compact and for a sim with little space this is a big plus. DV to AC conversion should not be to dificult. Good work, Mike :-rotor~Brian

Share this post


Link to post
Share on other sites
Guest MikePowell

Thank you for your comments, Brian.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest

Mike, Looks like you're going to put TRC out of business (if they didn't do it themselves already) ;) Nice write-up. Not sure if you're planning to put in a step by step "how-to" . Not to put pressure on you, but personally I would love to see a full detailed description on how to get data from the sim (S/W), how to interface to the external electronics, how to drive the coils. Right now I'm stuggling with the data from sim software and interfacing stuff, for a hardware guy like me it's the most difficult part in my motion platform project. Thanks for your great work!Roland

Share this post


Link to post
Share on other sites
Guest MikePowell

Hi Roland,Thanks for the nice comments.I'm kind of a hardware guy myself. I spent a fair amount of my engineering career developing micro-codable hardware, and writing the firmware for it. As a result, developing PIC code in assembler for these projects feels pretty natural to me. Windows programming is something else. I can hack together basic applications, but I suspect there is no beauty in my code. I have as yet only written the most basic host test code: build a packet and fire it out (blocking calls and just the single thread). I plan on taking an indepth look at FSUIPC and the current MS SDKs. At this point I have only the most basic ideas of how to get the data out of FS, but I'll figure it out eventually.Overall the plan is to take a thorough look at several different approaches to building simulated instruments, basically developing a complete panel along the way. It's been a lot more time consuming than I expected. The air-core stuff took far too long. I have a box full of it-ought-to-work-but-doesn't prototype air-cores. Fortunately the stepping motor and servo approaches are moving a lot faster. However, the really challenging stuff is still ahead. The instruments so far have had simple mechanisms. I have sketches for turn coordinators and artifical horizons... of course I had sketches for the air-core too.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest

Mike I can imagine that the electro-mechanics of aircoils are tricky. Magnetics is one of the most difficult subjects IMHO. BTW, RC servo's turn angle can be easily increased by using multi-turn potmeters. You can also drive them with a DC voltage iso the 1 - 2msec pulses by adding a fixed pulse via a 555 and injecting a DC at the potmeter feedback input. If you need a schematic let me know.Roland

Share this post


Link to post
Share on other sites
Guest

>It's been a lot more time consuming than I expected. The >air-core stuff took far too long. I have a box full of >it-ought-to-work-but-doesn't prototype air-cores. >Fortunately the stepping motor and servo approaches are >moving a lot faster. However, the really challenging stuff >is still ahead. The instruments so far have had simple >mechanisms. I have sketches for turn coordinators and >artifical horizons... of course I had sketches for the >air-core too. >>>Mike >www.mikesflightdeck.com You know you need to put your head together with Matt Wietlpach (http://members.aol.com/wietlpachm/howto/index.htm) as he has already done considerable amount of work in using stepper motors (and other things) in order to adapt complex avionics to his fighter sim. I do not know the man other than by weblinks and comments from other cockpit builders but you can try droppig him an email at WietlpachM@aol.comMichael

Share this post


Link to post
Share on other sites
Guest MikePowell

Roland,Thanks for the comments about the RC servos. I had vague ideas about using multi-turn pots but haven't as yet carried through. My rotary encoders finally showed up. Holiday preparations allowing, I will the next few days developing the PIC software to get my sim directional gyro operating.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest MikePowell

No question about it, Michael, Matt W. has one truly impressive project.Thanks for your comments.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest

Hi,>>>>>>>>>>as he has already done considerable amount of work in using stepper motors (and other things) in order to adapt complex avionics to his fighter sim<<<<<<<<<<<<<<<

Share this post


Link to post
Share on other sites

Thanks for the update announcement, Mike. I've been following your work with much interest for some time now.As for getting info out of FS, FSUIPC exposes most of the sim's data. Each value appears as a byte, word, or dword at a particular memory address so I'm pretty sure you'll be able to interface with it rather easily since you've done low-level coding.Peter http://bfu.avsim.net/sigpics/PeterR.gifBFU Forums Moderator[table border=2 cellpadding=0 cellspacing=1][tr][td][table border=0 cellpadding=8 cellspacing=0][tr][td bgcolor=#540000]http://bfu.avsim.net/sigpics/logo75t.gif[/td][td align="center" bgcolor=#FFFFF6]Bush Flying Unlimited"At home in the wild"Looking for adventure? Come join us! * [link:bfu.avsim.net|Web Site] * [link:www.cafepress.com/bfu,bfu2,bfu3,bfu4|BFU Store] * [link:bfu.avsim.net/join.htm]Join!][/td][/tr][/table][/td][/tr][/table

Share this post


Link to post
Share on other sites
Guest MikePowell

Thanks, Peter.Mikewww.mikesflightdeck.comInfo for simpit builders

Share this post


Link to post
Share on other sites
Guest

>My rotary encoders finally showed up. Holiday preparations >allowing, I will the next few days developing the PIC >software to get my sim directional gyro operating. >>I'm fighting to have a working encoder board...Interpreting more than 1 encoder a time is pretty difficult to me...Trying to optimize the code for a 16f877...Why don't you use simple stepper for the gyro?Those should include the encoder as you already know...Don't those encoder have enough resolution?How many bits are those usually?CiaoClaudio

Share this post


Link to post
Share on other sites
Guest MikePowell

Hi, Claudio,I'm using the rotary encoder as the adjustment knob on the sim directional gyro. The compass plate itself is mounted on a stepper with 400 steps per rotation, which I half step to give 800 steps. The encoder is connected to a PIC16F628. The PIC times the interval between state transitions and interprets the transitions. The PIC also generates the waveforms to control the stepping motor. If the encoder knob is turned slowly, the compass disk is shifted 1 step per encoder state transition. If the knob is turned rapidly, the compass disk is turned in 8 step increments. I'm using a small, low resolution encoder with only 6 positions per turn (which is really 24 state transitions per turn). Having a high speed adjustment mode allows the compass disk to be adjusted without having to turn the knob 33 times due to the encoder's low resolution. I chose the encoder because of its small physical size and low cost. The low resolution came as a consequence. The project is slowly coming together. There are some serious flaws as yet, but it is parially functional. I am just now learning to program the PIC architecture, and my code shows it. I plan on completely rewriting it.I am only using a single encoder, so don't face the challenges you do with multiple encoders. On the chance that the approach I'm using may be of use, here is the basic idea used to interface to the encoderThe encoder is polled at roughly a 2 millisecond interval. Nothing magic about this number. It's simply a basic interval used in driving the stepping motor.If the encoder inputs have changed, a flag is set and a counter initialized for a contact debounce interval ( about 5 milliseconds for my encoder)When the debounce interval has counted down, the encoder inputs are read again.A four bit number is built using the old encoder input values as the high two bits, and the new encoder inputs as the low two bits. This encodes all sixteen possible state transistions for the encoder including the nominally illegal ones. This number is added to the program counter in this construct: movf state, w ; where state is the four bit number addwf PCL, f ; adds state transition number to program counter goto DONOTHING goto ENCODERDN ; there are 16 goto's, the order depends on goto ENCODERUP ; your particular model encoder . . . . goto ENCODERUPDONOTHING code for illegal and no movement encoder state transitions goto DONEENCODERUP code for encoder signalled a clock-wise movement goto DONEENCODERDN code for encoder signalled a counterclock-wise movement goto DONEMikewww.mikesflightdeck.comInfo for simpit builders

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...