Directional Gyro Indicator...
The Directionl Gyro Indicator or DGI provides a compass indication of aircraft heading. The instrument must be manually aligned by the pilot during startup checks.
The Directionl Gyro Indicator or DGI provides a compass indication of aircraft heading. The instrument must be manually aligned by the pilot during startup checks.
My DGI is an ex-simulator instrument, very well made and originally employing a dual-speed synchro drive for precise operation.
I'm using a feature of the multispeed synchro system to make my instrument more realistic in operation. Since the fine synchro rotates many times per revolution of the compass card, a known fine synchro position is actually unknown in regard to the overall compass heading and can be one of several, depending on the gearing (for example 0 degrees on the fine synchro might be 0 degrees on the compass card, but in a 6 speed system it might also be 60, 120, 180, 240 or 300 degrees - that is why a coarse synchro is also required). I step to all required headings - using the fine synchro input only – relative to the starting position. If the card was correctly manually aligned at startup the displayed heading will be correct, if manual alignment was not undertaken then it will be likely the DGI will be working but offset, as in real life. (I've since discovered that FSX simulates failing to align the DGI - but I didn't know that when I started!)
I learned a lot more than I ever wanted to know about stepper motors in converting this instrument, but at last it's finally working. My advice would be to get a decent stepper motor and driver board that can handle microstepping. Don't bother with cheap geared stepper motors if you are also using a geared drive as you'll never get enough speed for a realistic turn rate. Geared stepper motors have a surprisingly low maximum rpm.
The inputs to the stepper motor control board are taken from Arduino digital pins. Connections will be dependent upon which controller you use - I finally settled on a Pololu A4988 Driver, popular in 3D printer construction.
The Arduino sketch I used to test the DGI is provided in the listing below. Once I have it working as a complete system I'll commit the final code to GitHub.
//dgi driver
Although my DGI is finally working, I want to make a few tweaks to the code before posting it. I went through many iterations of motor control with various drivers that handled stepping quite differently. The code needs tidying up!
The stepper motor I'm using is a Philips 12V unipolar motor, bought for a few pounds on eBay. I have ignored the centre taps and wired the coils in a bipolar configuration. I'm also driving them at 28V. (Lots of people will tell you that you can use a unipolar motor as a bipolar motor, but they overlook the fact that you need to double the voltage. It makes sense really. I've also found increasing it a bit more helps significantly with microstepping reliability.