User Tools

Site Tools


Sidebar

Dan's Wiki

DokuWiki Instructions (local) DokuWiki Manual
Site Checker (Orphans Wanted)

Edit Sidebar

projects:a4sim:hardware:start

This is an old revision of the document!


Hardware, A4-Sim Related

Information for hardware components used on the A4 sim, both in use and trialed for proof of concept.

Arduino

DAC (Digital to Analog Converter)

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)

Quad DAC (Digital to Anlog Convert) MCP4728

Multiplexing TCA9548A

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.

TCA9548A

[2/22/2020]

HT16K33 LED Module

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.

ELEGOO 2.8 Inch TFT Touch Screen with SD Card Socket, for Uno R3

Includes plastic touch pen.

Purchased1/20/2020
Screen Size2.8 inches
Weight1.76 ounces
Model NumberEL-SM-004
Part NumberEL-SM-004
UNSPSC Code32000000
UPC746591610555
Resolution240×320
Based onILI9341_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]

Uctronics 0.96 Inch OLED Module 126x64 Yellow Blue I2C

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
GNDGround
SCLI2C Serial Clock (UNO: A5, MEGA: 21)
SDAI2C Serial Data (UNO: A4, MEGA: 20)
Driver IC: SSD1306
ModuleUCT-602602
Size: 0.96
Coloring: Top Line is Yellow, 3 bottom Lines are Blue
Resolution128×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

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.

u602602.pdf

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.

Rotary Encoder (Cylewet CYT1100)

Purchased from Amazon, package of 5.

pec11.pdf

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]

MakerFocus 2pcs I2C OLED

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 NumberMakerFocus X001L53UDD
Purchased from Amazon
I2C Channel0x3C (not changeable)

LED Module only

Part IDG-2832TLBFG02
Number of Pixels128×32
Panel Size30.0 x 11.5 x 1.2 (mm)
Active Area22.384 x 5.584 (mm)
Pixel Pitch0.175 x 0.175 (mm)
Pixel Size0.159 u 0.159 (mm)

Waveshare 3.2 inch RPi LCD with Touch Controller

Full DescriptionWaveshare 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
Resolution320×240 Pixel
TypeHigh-speed SPI
TouchTXPT2046 Touch Controller
English Sitehttp://www.waveshare.com
Specific Page3.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

Raspberry Pi Zero W

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

Basic setup

  • Turn on SSH
  • Set up area under /home/pi/projects/XPlaneGarminG5Pi
  • git clone ssh://git@stopstogo.com/home/git/XPlaneGarminG5Pi

GL/glutfree.h

Tried 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.

Cause X-Window (Raspberry Pi GUI) to repaint itself, clearing FrameBuffer writing

xrefresh -d :0

UCTronics B0106

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.

b0106.pdf

12/16/2020

projects/a4sim/hardware/start.1608147551.txt.gz · Last modified: 2020/12/16 19:39 by dwheele