Information for hardware components used on the A4 sim, both in use and trialed for proof of concept.
Need to be able to output analog voltages to drive steam gauges. So will convert from a value like 3200 feet from the X-Plane simulator, to a voltage like 2.92 V, which will drive the gauge.
Additionally, for higher-current, in addition to the DAC output, some connections will need a higher output. This will likely require higher current Op-Amps.
https://www.adafruit.com/product/935 (DAC Chip breakout board)
The Raspberry Pi has two outputs which are I2C, sort of like USB. In order to drive the high quantity of analog outputs, a multiplexing scheme will need to be developed, both in hardware and in software. This is because each device must have a unique address.
Going to implement this multiplexer, because getting too much electrical interference with even 3 I2C devices with 3 foot cables. DroneBotWorkshop says that using a multiplexer cuts down the interference by isolating devices on a separate I2C bus.
See https://learn.adafruit.com/adafruit-tca9548a-1-to-8-i2c-multiplexer-breakout which uses PCA9548A.
Note that PCA9548A and TCA9548A are equivalent, but TCA has extended power tolerances and improved power-on reset function.
[2/22/2020]
Purchased 3-pack of 8×8 LED modules (all red) with embedded HT16K33 multiplexer. Problem is, the code for this is from an Arduino, and the Arduino must be a Master, which won't work when the Raspberry Pi is the Master.
Changed code that runs on Raspberry Pi to drive the HT16K33. Arduino not required for this. It does work, but could use some improvement, where it draws lines more than just a dot for the aileron/elevator intersection. Implemented by adding horizontal and vertical lines, with dimmed LEDs, but they flicker terribly at the slow testing speed.
Includes plastic touch pen.
| Purchased | 1/20/2020 |
|---|---|
| Screen Size | 2.8 inches |
| Weight | 1.76 ounces |
| Model Number | EL-SM-004 |
| Part Number | EL-SM-004 |
| UNSPSC Code | 32000000 |
| UPC | 746591610555 |
| Resolution | 240×320 |
| Based on | ILI9341_V3.2 |
Because this display uses pin A4, and so does I2C, I'm concerned that this won't work with my I2C bus system. Ordering Arduino Mega 2560 clone, which uses different pins for I2C. [2/8/2020]
| Part Number: | U602602 |
|---|---|
| I2C: | 8 bit 0x78, 7 bit 0x3C, changeable to 0x7A/0x3D |
| Software Library: | https://github.com/supprot/ArducamSSD1306 (not very useful) See https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples and https://github.com/adafruit/Adafruit_SSD1306 |
| VCC: | 3.3V - 5V |
| GND | Ground |
| SCL | I2C Serial Clock (UNO: A5, MEGA: 21) |
| SDA | I2C Serial Data (UNO: A4, MEGA: 20) |
| Driver IC: | SSD1306 |
| Module | UCT-602602 |
| Size: | 0.96 |
| Coloring: | Top Line is Yellow, 3 bottom Lines are Blue |
| Resolution | 128×64 |
| Viewing Angle | > 160 degrees |
No fonts internally, create fonts with software.
Had to use “SSD1306_SWITCHCAPVCC” and 0x3C with Adafruit drivers to get it to work.
Pixel values are either 1 or 0. The screen is made up of 8 rows of “pages” that are each 8 pixels high, giving a total of 64 rows of pixels. There are 2 seconds of pages on the screen. The top section contains 2 pages of yellow (value 1) or black (value 0). The bottom section contains 6 pages that are blue (value 1) or black (value 0). There is a black horizontal line that separates the top 2 pages from the 6 bottom pages.
Data Sheet: https://www.uctronics.com/download/Amazon/U602602.pdf
I use my special version of Adafruit's driver, modified to use SoftI2C (not Wire) so that I can have an alternate I2C bus.
Purchased from Amazon, package of 5.
The middle pin of the 3 pins is common, and the 2 pins are a Normally Open push button.
Had to use Arduino RotaryEncoder 1.3 which uses interrupts, so connects to A2 and A3.
[4/21/2020]
Uses SSD1306 driver.
I use my special version of Adafruit's driver, modified to use SoftI2C (not Wire) so that I can have an alternate I2C bus.
| Part Number | MakerFocus X001L53UDD |
|---|---|
| Purchased from | Amazon |
| I2C Channel | 0x3C (not changeable) |
| Pixels/Resolution | 128×32 Like a single line |
Amazon Title: MakerFocus 2pcs I2C OLED Display Module 0.91 Inch I2C SSD1306 OLED Display Module Blue I2C OLED Screen Driver DC 3.3V~5V for Arduino
| Part ID | G-2832TLBFG02 |
|---|---|
| Number of Pixels | 128×32 |
| Panel Size | 30.0 x 11.5 x 1.2 (mm) |
| Active Area | 22.384 x 5.584 (mm) |
| Pixel Pitch | 0.175 x 0.175 (mm) |
| Pixel Size | 0.159 u 0.159 (mm) |
| Full Description | Waveshare 3.2inch RPi LCD (C) 320×240 Resolution Touch Screen TFT Display Designed for Any Revision of Raspberry Pi 4 125MHz High-Speed SPI Directly-pluggable |
|---|
| Resolution | 320×240 Pixel |
|---|---|
| Type | High-speed SPI |
| Touch | TXPT2046 Touch Controller |
| English Site | http://www.waveshare.com |
| Specific Page | 3.2 RPi LCD (C) |
Purchased from Amazon, 5/2020, noticing that purchasing directly from Waveshare directly may have saved about $5.
After getting this working on the Raspberry Pi 4B, I figured out I can't use it, because it uses the GPIO pins I need to use for the Rotary Encoder. Instead, was able to use a LCD HDMI display.
7/4/2020
Trying to use Raspberry Pi Zero W as the back computer for the Garmin G5. Was successful porting the code from the X-Plane A4 cockpit to run instead on the Raspberry Pi 4. When it is running, it shows up to about 280% CPU utilization, with a minimum of 100% (probably from UDP Listener threads).
Although the Raspberry Pi Zero W was working fine out of the box (in a kit), I lost the ability to SSH to it. So I'm reinstalling a Raspberry Pi OS on it, and starting over. Then I need to copy the code that was running on the 4B and compile. Let's see how far I get. 7/4/2020
git clone ssh://git@stopstogo.com/home/git/XPlaneGarminG5PiTried doing a Make from within Geany. Getting this error:
IconContainer.cpp:1:10: fatal error: GL/freeglut.h: No such file or directory #include <GL/freeglut.h>
Installing freeglut:
sudo apt-get install freeglut3-dev
Compiled.
Was able to actually run the Garmin G5 on the Raspberry Pi Zero W. But it was running at about 1 frame per second. Investigating whether writing to FrameBuffer, bypassing OpenGL is feasible.
xrefresh -d :0
Bought a small HDMI screen to use with the Raspberry Pi 4. It comes with short HDMI-to-HDMI cables, but it is also not very useful, because it uses some of the GPIO pins as well. I need the GPIO pins for the Rotary Encoder.
12/16/2020
HiLetgo 10pcs KW12-3 Roller Lever Arm Micro Limit Switch Normally Open Close Limit Switch Black
I haven't been working with Arduinos for a while. Recently set up MSFS 2020 with PMDG 737 and decided that controlling thrust and thrust reversers better than the default, or using my X52 was worth pursuing.
I know that there are 3 kinds of Arduinos which appear to Windows as a Joystick:
It appears I purchased an Arduino Leonardo (which easier-to use pins), and a 3-pack of Arduino Micro Pro compatibles, both in 6/2021.
| Requirement | Comment |
|---|---|
| Power Required | 5V, but an upstream regulator may need 6.2V |
Rasperry Pi's require 3.3 V. To convert between 5V components, there is an IC which allows interfacing either up or down.