User Tools

Site Tools


Sidebar

Dan's Wiki

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

Edit Sidebar

projects:a4sim:altimeter

Altimeter Replacement

Don says the altimeter that the A-4 training came with was not the right one. For learning purposes, I'm creating a new altimeter to resemble it, with digital components.

Having recently started designing with 3D printing, I plan to replace the altitude digit windows with a single OLED display, the barometer with a 128×32 OLED display, the pointer hand with a stepper motor, and the barometer adjust with a rotary encoder.

I'm trying to see if a single Arduino Nano can handle all of this. The concern is that the Rotary Encoder and the Stepper Motor might both need interrupts.


This is an implementation which works with the 2 OLED displays, and a Rotary Encoder. I had to add software to establish a second I2C system to communicate with the OLED displays, because the first I2C system connects with the driver Raspberry Pi.

Nano Pinouts

PinKnown AsWhat is connected to it
6D3Rotary Encoder red (input)
9D6I2C Out, SDA OLED 1, SDA OLED 2
10D7I2C Out, SDC OLED 1, SDC OLED 2
21A2Rotary Encoder green (input)
22A3Rotary Encoder blue (input)
23A4I2C In, SDA, pulled high with 1K resistor
24A5I2C In, SCL, pulled high with 1K resistor
29GroundGround
30Vin7 - 10 volts DC

ULN2003 (Stepper Motor Driver Board) Pinouts

PinKnown As What is connected to it
12D8ULN2003 In1
13D9ULN2003 In2
14D10ULN2003 In3
15D11ULN2003 In4

Rotary Encoder Pinouts

PinKnown AsWhat it is connected to
6Arduino D3Rotary Encoder N.O. Switch Pin 1 (Red)
4Arduino GndRotary Encoder N.O. Switch Pin 2 (Black)
21Arduino A2Rotary Encoder Channel A (Green)
4Arduino GndRotary Encoder Common Gnd (Yellow)
22Arduino A3Rotary Encoder Channel B (Blue)

Using 28BYJ-48 Stepper Motor to drive the hand

Trying to add the Stepper Motor - 28BYJ-48 to the Arduino Nano V3 (on top of the 2 OLED displays and the Rotary Encoder). Initially, it wasn't working because the Arduino Stepper library blocks. But the AccelStepper library apparently doesn't block. Unfortunately, when trying to use this, getting out of memory errors from the Arduino IDE. Can potentially free up some memory by removing unneeded characters from the MS fonts, used for the OLED displays.

2/12/2021

projects/a4sim/altimeter.txt · Last modified: 2021/03/11 01:58 by dwheele