Howto:C172P Cockpit Project: Difference between revisions
(→SPI) |
|||
Line 140: | Line 140: | ||
* different speeds | * different speeds | ||
* Error Detection and re-transmission | * 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 === | === I2C === | ||
* different speeds | * different speeds |
Revision as of 01:36, 2 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. The project includes the following major activities:
Open Identified Tasks
Task Description | Blocking Factors/Action Items/Progress | Status |
---|---|---|
Bench Power Supply |
|
Scheduled for Late October 2016 |
Flightgear Rasberry Pi Client |
|
Ongoing |
Program an AtMega chip with SPI and I2C interfaces |
|
Unstarted - Scheduled for Late October 2016 |
Port Expander Demo |
|
Unstarted - Scheduled for Q4 2016 |
Rotary Encoder Demo |
|
Unstarted |
Air Coil Demo |
|
Unstarted |
Frequency Display Demo |
|
Unstarted |
Template |
|
Status |
Template |
|
Status |
Description
The work product will match an actual C172P cockpit instrument panel as closely as possible given constraints of tool availability, time and money.
Versions:
- A set of rotary encoders and switches in an overlay for a regular monitor
- Expand the project to include items in the radio stack
- Replace the monitor with individual instruments
Design Alternatives
- Instruments
- Monitor Overlay
- 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