A-4 Simulator Restoration Diary

DateNotes
8/10/2019Moved A-4 Simulator From Gary Allen's home in Lake Steven's to my carport in Renton
8/12/2019Don gave permission to disassemble unneeded electrical and hydraulic parts. None of the gauges were connected to anything. Hydraulic lines mostly connected only to internal couplings, and not to anything active (no pumps, etc.)
8/12/2019Spent 2 hours removing unneeded electrical and hydraulic parts. Removed side controls for trough access. None of the controls were connected to anything.
8/13/2019Spent 2 more hours removing more unneeded parts. Removed seat.
8/14/2019Spent 1 hours removing some bolts which connect sim to dolly, in preparation for moving the sim into my living room.
8/15/2019Met with Don to discuss how to proceed. I will be inventorying the gauges and Don will check to see if he has A-4 Simulator gauges. At this point, the A-4 Simulator seems to have only actual gauges.
8/16/2019Did research on force feedback. Appears that some people have attempted this. They connect a servo to an encoder-equipped steering wheel, then attempt to control the servo torque by using PWM. Not all driver chips support variable torque like this. They mention the Logitech G29 (a gamer steering wheel) has force feedback but costs $399
8/21/2019Experimented with the X27 168 steppers. Was able to connect directly from an Ardino Nano to the 4 coil pins. Didn't use diodes (yet). Running sweeping test code, occasionally the stepper will chatter, then move perhaps 30 degrees and continue running. Not sure if there is noise. Tried using another stepper motor, same result.
8/21/2019Tried using AccelStepper library. This seems to be more for propulsion type stepper motors. Mostly it keeps accelerating between stop points. Probably not suitable for gauge use.
8/21/2019Had more success with the X27 168 by not incrementing through steps, and instead jumping directly to values in an array. Also, I think I had the wiring wrong. I found a test which merely rotated clockwise, then Counterclockwise and my set up was backwards. When looking at the pins from the back, counter-clockwise from upper right, the pins are 1, 2, 4, 3. I have these connected to digital outputs 2, 4, 7, 6 on the Arduino respectively.

After rewiring, and adjusting the code, the pointer (heat-glued on for now) is doing much better.
9/7/2019Created bracketing by cutting dog food can lid into a rectangle, then by using the Drill Press Vice (which has a very sharp face), pounded an edge over, making a very strong result
9/7/2019Have been ordering sample quantities of stand off hardware, hookup wire. Tried using JST connectors 2.54mm but the crimper I have seems to crimp the portion which grips the male pins. As a workaround, purchased some 6-pin connectors, male and female.
9/7/2019Was able to get the little Japanese stepper motors to work. These have 4 pins and are the size of a large pencil eraser. Trying not to use AccelStepper because of its licensing. If these are to be usable, will need to do *microstepping* because they only have about 40 positions. The pins are quite fragile. Need to order very small wire to prevent ripping the pins off.
9/7/2019Worked several hours today and yesterday trying to get the RREF part of UDP communications to work between the Raspberry Pi and X-Plane 11.36r2. After looking at the log.txt, it appears that when I send a request for a Dataref to be sent, it starts sending the data on a random port. And I can't determine that port - only available in Log.txt. Sent a Bug report to X-Plane to see if they will take a look.
Right now, I'm coding on the Raspberry Pi via Geany, which is a GUI application. I am using VNC to remotely access the Raspberry Pi. At this point, the code is all “play” - trying to get the communications to work. Was successful in sending from the Raspberry Pi to run a X-Plan Command (Flaps Up), and it works perfectly.

Wrote a4SimData.json in the Projects A4Simulator directory. Considering letting one file be read by a like X-Plane plugin, as well as by the Raspberry Pi Connector code.
10/13/2019Did some thinking about how to implement the aileron/elevator/rudder flight controls. Disassembled one of the hydraulic units. Discovered that the green cylinder is a strain gauge. It appears that applying pressure on a a flight control causes the strain gauge to change resistance, causing the Moog hydraulic valve to change, causing fluid to push the flight control - with its attached rectilinear potentiometer to change. I was able to also look inside of the potentiometer to see how it worked. I think that the one I disassembled has a tendency to come disconnected from its track, going infinite ohms momentarily. I can program around this.
1/24/2020While testing with oscilloscope, shorted between 3V3 and Ground, killing the Raspberry Pi. Ordered another on Amazon for about $52. Considered ordering Raspberry Pi 4, but it probably would not work with the MicroSD - hoping to just resume where I was. If I go to Raspberry Pi 4, need to move code in an orderly way.
2/17/2020My brother says that the A4 can do 420 degrees per second rotation around its longitudinal axis. A small amount of rudder is needed, but only a tiny amount. I suggested 1/8 inch. He also says that the plane is quite stable holding straight and level flight. But it is quite sensitive on the controls.
2/17/2020As-of this writing, having problems where the Arduino Mega 2560 with LCD display keeps becoming disconnected from I2C bus. Realized that I had been feeding in only 5V (the output of the Raspberry Pi) into the Vin. It is expecting 6 - 20 volts there, and there is a diode and other components which reduce the voltage, probably causing the problem
2/17/2020Ran Mega on its on 12V supply. Still having I2C bus issues. Want to try turning off the LCD display and just blinking the LED with input, to see if the LCD display connections are causing the problem