Posts

A-10C Standby Compass - Sun Shade

Image
 One of the final items to add to this instrument build (besides the text covers for the lower LEDs) was the sun shade for the AR LED box.  I made this out of thin aluminum sheets , cutting it from a template using some metal sheers .    My template was created by tracing some of the actual artwork from the DCS sim, and then scaling it to the proper size. It turned out ok, not perfect but pretty good.  Primed and painted it and then installed it using 2 of the 4 holes that were already on the LED box 3D print.  I used some heat inserts in those holes to give the screws something to bite, but the holes are really too big for my inserts so had to use some glue to help out.  

A10-C Standby Compass: Final Setup

Image
Got everything soldered together (after likely damaging one EasyDriver and moving to a backup) and squeezed it into the case.  At first I thought the compass wheel was much too high but then I realized the front bezel was installed upside down. Used an Exacto knife to cut a piece of acrylic for the front glass and put a small vertical sticker on it to act as the reference line.  Not super pretty but works ok until I can cut with a laser instead (maybe an xTool). Getting everything to fit was trickier than I expected, but it all worked out without too much rework required.  I used some 5.5mm x 2.1mm plugs for the 12v power plugs (tip/center was positive).   For the aerial refueling LEDs I used some more LEDs that have resistors built-in.  They are made for 12v so will likely bit a little dim since I am powering them off the digital out 5v pins from the Nano.  Don't have a way to make the lens for those yet so will wait to see if that is the case.  So far so good though! Since I had

A-10C Standby Compass - Hardware Wiring

 Components: Arduino Nano , no headers attached EasyDriver board to run stepper motor 2x 12V power circuits (for LEDs and motor power) - used computer power supply with ATX breakout board IR sensor X27 168 Stepper Motor 3 green LEDs with built-in resistor 3 LEDs for the Ready/Latch/Disconnect box (and resistors if not built in) 3D printed parts from The Warthog Project Wiring 3 green LEDs , in parallel -> power and ground to one 12V circuit Arduino Nano (10 connections, plus USB) D11 to IR Sensor "OUT" D3 to EasyDriver DIR D2 to EasyDriver STEP GND to IR sensor GND GND to EasyDriver control GND (by STEP) 5V PWR to IR Sensor VCC D6 , D7 , D8 and ICSP GND (from the 6-pin cluster) routed out of box to later power the 3 LEDs below this compass unit ("ready", "latch", "disconnect") IR Sensor (3 connections) VCC to Nano 5V GND to Nano GND OUT to Nano D9 Stepper Motor (open it to remove tiny plastic stop tab, for 360 motion - 4 connections) Coil 1/A

A-10C Standby Compass: Basic Functions Working

Image
After getting the stepper motor to move yesterday I worked on the LEDs and getting the IR sensor into the mix today.  My LEDs are green ones that have the resistor built-in, and therefore are expected to be wired to my 12v power supply in parallel.  That generally went ok even with my sub-par soldering skills but there was very little room for things.  If I had made my own 3D print for the LED holder (or had the original 3D design files) I might have improved that a bit, but I made it work. Here's the code I used for this today . Things I learned while copying this awesome work : Be careful with how wires need to route before putting heat-shrink on them, that stuff doesn't bend well.  Also consider the type of wire in use: I switched to easy bending wire for the things I had to route around tight spots. If the motor spins the wrong way, swap the pins on ONE of the coils, A or B - or use the AccelStepper's setPinsInverted() function in the Arduino code to invert the DIR pin

Standby Compass: StepperTest

Image
Yesterday I finally received the EasyDriver stepper driver and the X27-168 steppers(no more AliExpress orders if I can help it - took weeks to arrive).   I opened up the motor and removed the tiny plastic tab that was keeping it from spinning 360.  I soldered headers on one of the EasyDrivers for prototyping and soldered some solid core wire to the little leads on the motor.   After wiring it all up on the breadboard I used this code to see it run. For the connections: you need to put one coil's wire pair on the A pins for the EasyDriver and the other coil's on the B pins.  There is no polarity so the A coil wires can go on plus or minus.  I put the 12v power on the M+ and GND pin pair.  Then these as well: // EasyDriver -> Nano stp -> 2 dir -> 3 MS1 -> 4 MS2 -> 5 EN   -> 6 GND (by step pin) -> GND Do not connect/disconnect the motor when power is applied . Power is constantly flowing to keep motor still and changing connection when powered will kill

More Standby Compass work

Image
 Did the filling, sanding and painting of the box today.   Got the computer power supply breakout board working and tested it by powering 50 green LEDs with 12v.  These LEDs have a resistor built-in so I ran them all in parallel.  They pulled about 13 mA at steady state, which is well under the typical 20 mA limit.  They were super bright. Played with an Arduino sim here - using wrong driver board - to try to think though the wiring.

Servo responding the fuel gauge changes in DCS

Got a servo SG90 working, just powered off arduino since only running one - just needs one digital pin.  Seems to do just fine! //============ #include <Servo.h> #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" DcsBios::ServoOutput fuelQtyL(0x10ca, 8, 544, 2400); void setup() {   DcsBios::setup(); } void loop() {   DcsBios::loop(); }