Howto:C172P Cockpit Project: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
This Howto will develop into a detailed project plan for building a C172P Instrument Panel.  While not a step by step guide, it will include details on the prototyping, design and building of a panel. The project includes the following major activities:
This Howto will develop into a detailed project plan for building a C172P Instrument Panel.  While not a step by step guide, it will include details on the prototyping, design and building of a panel.  
= Open Identified Tasks =
{| class="wikitable"
! Task Description !! Blocking Factors/Action Items/Progress !! Status
|-
| Bench Power Supply
|
* Finalize Design
* Purchase Aluminum
* Order 24 Pin Socket
* Figure out how to make square holes in aluminum without a laser.
* Make a Bending Brake
* Bend Some Tin (ok aluminum, but the traditional phrase says "tin".)
* Test what load Resistor on which voltage will turn on the power supply
** I suspect that 5 volts, 5 ohms, 1 amp will turn on the supply.
** That's 5 watts.  Have 50 watt resistor.
* Drill Mounting Holes for Load Resistor
* Cut holes for Meters and Binding Posts (Banana Jacks)
* Mount the ATX power supply in the hand built case


| Scheduled for Late October 2016
I am planning to build a complete simulated C172P Instrument Panel with working instruments, gauges, controls and radios, built from scratch, starting in 2017. 
|-
| Flightgear Rasberry Pi Client
|
* Using Node.js and possibly Rx.js
* Demonstrated Node server sending and receiving data to Flightgear properties telnet server
* Created Single Data Structure for all Flightgear properties
* Working with a list of these structures
* Investigate Exporting/Importing the data from XML files
| Ongoing


|-
I hope to contact others interested in participating directly in the project in any capacity.  I'm specifically looking for anyone who is building new simulator or panel, or who is improving an existing simulator during 2017.
| Program an AtMega chip with SPI and I2C interfaces
Other participants in the project might be working on other aircraft, but the underlying technology, techniques and electronics will be similar.  There is no requirement that participants take the same approach to the project. For example, while I hope to design and build all the major parts, others might choose to buy part or all the project as ready made, commercial products. Participants will benefit by sharing expertise, learning experiences, coaching, and discussions about the issues faced by novices and experts in various aspects of the project regardless of their approach.
|
*  Install AtMega Programming tools
*  Initial demo without crystal
*  Send and receive data from Raspberry Pi
| Unstarted - Scheduled for Late October 2016


|-
Tom Galvin gave a presentation on cockpit building at Flight Sim Con 2016 at Bradley Field near Hartford Ct. USA.  In his presentation, he pointed out that there is no mouse in the cockpit.  As a user of a flight simulator, visual and tactile realism is a major factor in the quality of the experience.  Having a realistic control panel in front of you or even a whole cockpit surrounding you will bring the experience up a to a whole new level over operating simulated instruments on a display screen with a mouse and keyboard.
| Port Expander Demo
|
* 3 to 8 or 4 to 8 demultiplexer
* SPI port Expander driven from Raspberry Pi
* Serial to Parallel from AtMega
* Light some LEDs
* Detect some switch transitions,
** on-off (Taxi Lights)
** on-off-on (KMA20 switches)
** momentary contact (frequency swap)
* Deal with debouncing
| Unstarted - Scheduled for Q4 2016
|-
| Rotary Encoder Demo
|
*
| Unstarted
|-
| Air Coil Demo
|
*
| Unstarted
|-
| Frequency Display Demo
|
*


| Unstarted
Here's where my personal efforts stand:
|-
| Template
|
* Task List
| Status
|-
| Template
|
* Task List
| Status
|}


= Description =
* I have acquired a raspberry pi, a breadboard and several SPI and I2c chips and a bunch of resistors and capacitors. 
The work product will match an actual C172P cockpit instrument panel as closely as possible given constraints of tool availability, time and money.
* I've constructed an initial prototype of a switch bank using the MCP23S17 chip. 
* I'm planning a prototype of the circuit needed to drive 7 and 14 segment displays for various parts of the radio stack. 
* I'm considering the use of magnetic rather than rotary encoders in some parts of the application. 
* I've started work on building an air coil that can be used in many of the instruments with rotary dials 
* I've ordered a few panel meters to take apart to see if the movements can be used for gauges used to monitor fuel, oil and electric voltage and current. 
* I've gained access to a lathe, a 3d Printer and 3d router at the Framingham Ma Makerspace.  Work is progressing on building a bench power supply from a spare PC power supply.


Versions:
* I've identified and counted the following types of elements needed in the simulator and have a plan for their implementation in hardware
# A set of rotary encoders and switches in an overlay for a regular monitor
** spst on-off, spdt on-off-on switches, rotary switches
# Expand the project to include items in the radio stack
** incremental or magnetic encoders or potentiometers for adjustments to instruments, instrument lighting, volume and frequency on radios, throttle, mixture and carb heat
# Replace the monitor with individual instruments
** special construction to handle pull switches and dual concentric controls on radios.
 
** single rotating needles, dual rotating needles, outer rim pointers for heading bugs and altimiters
= Design Alternatives =
** rotating compass rings and attitude indications in the turn and bank indicator and attitude indicator.
* Instruments
** the need for a cross
** Monitor Overlay
** the ball
** Individual Instruments
* Multi-value inputs
** using potentiometers and ADC ports
** Using magnetic encoders with:
*** AtMega driven pins
*** SPI
*** I2C
* Display of Numeric and Alphabetic data
** driven by Maxim Max7221 on an SPI interface
** driven directly by an AtMega processor
* Banks of switches and rotary encoders with a multiplexed parallel interface
* Raspberry Pi connected to one or more AtMega Processors via SPI or I2C
* Raspberry Pi connected to a 4 to 16 bit multiplexer to select SPI data
* Raspberry Pi responsible for interfacing raw data to flightgear property values
* Display of numeric and alphabetic data using 7 and 16 segment displays
** drive with AtMega chip and Transistors
** drive with Maxim Max7221CNG Integrated Circuit
* AtMega Processors with port expanders responsible for raw data
* AtMega Processors communicate with Raspberry Pi
** Using SPI
** Using I2C
* Telnet interface to Flightgear runs on Raspberry Pi
** C programming language
 
 
== Code Development Activities
=== Client to Flightgear protocol ===
=== Client to AtMega protocol
=== Pi Client ===
=== AtMega Client ===
=== Magnetic Encoders ===
* For Heading Adjusters on Instruments
* Replacement for Rotary Encoders
* Replacement for Potentiometers
 
 
= Proof of Concept and Prototyping Activities =
 
== Client on PI ==
=== Communication with Flightgear using Telnet ===
* Change the value of a cockpit switch
* Read the value of a Com or Nav Radio's frequency
* Change a standby frequency
* Make a standby frequency the in use frequency
* Dim and brighten the instruments
* Move the throttle
* Move one of the control surfaces
=== SPI ===
* different speeds
* Error Detection and re-transmission
* Server to ATMega
* Server to Max7221
* Server to Port Expande.
 
Server to MCP23S17 16 bit port expander is working.
Server can configure two MCP23S17 expanders one as 16 inputs, the other as 16 outputs.  The outputs are used to select banks of switches by holding one of the 16 outputs low.  Each switch bank will have as many as 16 switches, each wired to one of the 16 inputs.  This allows for 256 switches with just two port expanders.
 
Initial Prototype:  Two output lines with two switches wired to a single input port.  The outputs have a 220 ohm resistor between the output and the switch bank.  This may or may not be sufficient.  There may need to be multiple resistors and other circuitry isolating the switches in the bank.
 
=== I2C ===
* different speeds
* Error Detection and re-transmission
* Client to ATMega
* Client to Port Expander
== Client on AtMega ==
=== Communication ===
* I2c
* SPI
* Raw Data Protocol
== Data Acquisition ==
* Switch
* Rotary Encoder
* Magnetic Encoder
* Potentiometer
== Control Data ==
* Air Core
* Stepper Motor
* Lighting Level
*
 
 
= Building =
 
== Hardware Choices ==
* AtMega Models
* Raspberry Pi III
* for 7 and 16 segment displays
** Max7221
** or 7 Segment Driver Transistors
* 4 to 16 Multiplexer
* Magnetic Encoder
* Rotary Encoder
* Slider Potentiometer:
* Power Supply: Bench Supply based on an ATX PC power supply
* Knobs
** Heading Adjusters
** Radio Stack Volume
** Radio Stack Frequency Select
** Radio Stack Buttons
** Rotary Switches
** Rocker Switches
** Toggle Switches
** Main Switches
** Magneto Switch
** Flaps Lever: Design the Mechanism to attach to a rotary switch
 
[[Category:Cockpit building]]

Revision as of 04:48, 7 December 2016

This Howto will develop into a detailed project plan for building a C172P Instrument Panel. While not a step by step guide, it will include details on the prototyping, design and building of a panel.

I am planning to build a complete simulated C172P Instrument Panel with working instruments, gauges, controls and radios, built from scratch, starting in 2017.

I hope to contact others interested in participating directly in the project in any capacity. I'm specifically looking for anyone who is building new simulator or panel, or who is improving an existing simulator during 2017. Other participants in the project might be working on other aircraft, but the underlying technology, techniques and electronics will be similar. There is no requirement that participants take the same approach to the project. For example, while I hope to design and build all the major parts, others might choose to buy part or all the project as ready made, commercial products. Participants will benefit by sharing expertise, learning experiences, coaching, and discussions about the issues faced by novices and experts in various aspects of the project regardless of their approach.

Tom Galvin gave a presentation on cockpit building at Flight Sim Con 2016 at Bradley Field near Hartford Ct. USA. In his presentation, he pointed out that there is no mouse in the cockpit. As a user of a flight simulator, visual and tactile realism is a major factor in the quality of the experience. Having a realistic control panel in front of you or even a whole cockpit surrounding you will bring the experience up a to a whole new level over operating simulated instruments on a display screen with a mouse and keyboard.

Here's where my personal efforts stand:

  • I have acquired a raspberry pi, a breadboard and several SPI and I2c chips and a bunch of resistors and capacitors.
  • I've constructed an initial prototype of a switch bank using the MCP23S17 chip.
  • I'm planning a prototype of the circuit needed to drive 7 and 14 segment displays for various parts of the radio stack.
  • I'm considering the use of magnetic rather than rotary encoders in some parts of the application.
  • I've started work on building an air coil that can be used in many of the instruments with rotary dials
  • I've ordered a few panel meters to take apart to see if the movements can be used for gauges used to monitor fuel, oil and electric voltage and current.
  • I've gained access to a lathe, a 3d Printer and 3d router at the Framingham Ma Makerspace. Work is progressing on building a bench power supply from a spare PC power supply.
  • I've identified and counted the following types of elements needed in the simulator and have a plan for their implementation in hardware
    • spst on-off, spdt on-off-on switches, rotary switches
    • incremental or magnetic encoders or potentiometers for adjustments to instruments, instrument lighting, volume and frequency on radios, throttle, mixture and carb heat
    • special construction to handle pull switches and dual concentric controls on radios.
    • single rotating needles, dual rotating needles, outer rim pointers for heading bugs and altimiters
    • rotating compass rings and attitude indications in the turn and bank indicator and attitude indicator.
    • the need for a cross
    • the ball