Hacker News new | past | comments | ask | show | jobs | submit login
Converting a WW2-Era Engine Cowl Flaps Indicator into a USB Peripheral (bikerglen.com)
156 points by _Microft on Nov 26, 2022 | hide | past | favorite | 32 comments



I think those analog indicators could be driven through PWM without the need of a potentiometer equivalent. Their moving coil and needle inertia would work as integrator or low pass filter wrt the pulses, so just applying a square wave that goes from 0% to 100% duty cycle would move the needle from min to max, with 50% that should go to half scale after some calibration. The signal should be high enough in frequency so that the needle doesn't dance around, 100Hz would be more than enough, and current should be limited by placing appropriate resistors on both + and - pins of the indicators, then the central pin would go to a push-pull capable gpio (that is, capable of both sinking and sourcing current), or adding a power opamp to normal gpio ports, in that case any ucontroller could be used, including small ATTiny ones capable of software USB implementation.


PWM for old analog gauges is pretty neat to do. Just a basic Arduino can do it and it's a fun experiment.


Anyone following this as a guide: The calculations about potentiometer current are incomplete, although the selected part appears to be fine for this application.

The current in all three potentiometer terminals is limited to 25 mA. The terminal with the maximum current is not the wiper, but the end terminal which carries both the wiper current and the end-to-end current. So the part needs to handle 15 mA, not 10 mA.

It is also good to calculate the power dissipated by the potentiometer. By inspection, the Thévenin equivalent circuit of the indicator is a 12 v supply in series with (1800/2+300) = 1200 ohms. The maximum power transfer with occur when the potentiometer is also presenting 1200 ohms. This is not at either end of travel!

Going through the algebra it looks like 1200 ohms (greatest dissipation) happens at 40% of the potentiometer's travel. It's still only 124 mW, so this part is well within its 1 W absmax.


More thoughts:

- The indicator is ratiometric and the exact supply voltage doesn't matter. If it works acceptably well down at the +5 V USB bus voltage, the circuit would get a lot simpler.

- I suspect that driving the circuit with a variable voltage is sufficient, and the potentiometer is unnecessarily. Then a DAC or PWM with a plain old opamp would do the job.


Thanks for pointing out my error in reading the data sheet on how the max terminal currents are defined. I've corrected this in my post.

On the power, I get a maximum power dissipation through R(AW) and R(WB) of 130 mW at R(AW) = 432 Ohms and R(WB) = 5000 - R(AB) = 4586 Ohms. Work is on my post.

The meters don't work well below about 18 Volts. The needle just doesn't quite make it all the way to open. My theory is the current is too small at lower voltages to completely overcome the force of the spring that pulls the needle to the out-of-range position when powered off. If the internal 300 Ohm resistance of the meter could be changed easily, then a lower voltage could work.

And yep, a DAC or PWM with an op amp with some gain would certainly work. For a lot of my past meter projects where the voltages required were 5 Volts or less, I've gone the PWM route with great success.


Welcome here! I'm always amazed by your work and have a sweet spot for custom USB devices like the DIP Switch USB stick or the knob box.

One question: is there any way to match such a device to an UI element in Windows, so that a physical knob can change the value of a slider element or a physical gauge showing a value for a software gauge/progress bar?

There used to be tools that allowed to click UI elements in a different program and change properties of these, e.g. setting a disabled UI element to enabled or reading out a value from a password field. That was 20 years ago though, so it might be possible that Windows is separating different programs more strictly these days.


Thanks! I'm working on a three-wire DC Selsyn landing gear and flaps indicator next. Just did a bunch of rework to convert it from a self-powered device to a USB bus-powered device. Hoping to get a blog post up about it in a week or two.

I need to work on a C# app to demonstrate the landing gear and flaps indicator next though. It's working in Linux using a CLI but the Windows GUI makes the demo videos easier.

I'm not aware of any way to access dialog box elements using an API but I'm also not really a Windows developer either. I thought back in the day COM was supposed to enable sharing app elements and data using OLE and ActiveX. But all that Windows tech is beyond me.

Closest thing I can think of would be a bar code reader always having focus of one particular box on a form but I don't know how that works.


That's straightforward. That 3-wire differential approach makes the gauge reading mostly independent of the power supply voltage. Aviation instruments often do that. Some automotive gas gauges in the past worked that way. Those are the ones that don't go to Empty with power off, but just stay at the last value.

From the article: "In this meter, there’s also a small spring on each rotor that pulls the needles out of the minimum and maximum scale region when the meter has no DC power." Which makes sense in an application where "retain the last value" is a bad idea.


Not only that, it's a safety feature and a diagnostic feature. If the gauge loses power and doesn't return to "home" position, the gauge is faulty. If you know the gauge has power but it returns to "home" position or steadfastly stays at "home" position when you adjust the flap, due to the differential, you know the link between sensor and gauge is faulty. Those gauges were built really robustly and rarely failed. The sensors also got pulled to home position in the event of mechanical failure of the flap, but not severange of the connection between gauge and sensor, so you knew the sensor was working because the gauge would go to an extreme position, even though the mechanical contrivance the sensor was monitoring had failed.


In this case, though, in the powered-off state, it does not go to an out-of-range position, so I suspect there is something more to this arrangement.

The question is, I think, "what setting would be least likely to cause a dangerous situation, if the indicator failed and the crew did not realize it had?" My guess is that the least desirable "home" position is fully-open, if it would usually be important to have the cowl flaps fully open during takeoff and initial climb-out to avoid engine overheating. Fully-closed may also be undesirable, if there are cases when having them closed is important (maybe with an engine fire, to minimize airflow and keep the fire-extinguishing agents in place, or after an engine failure, to reduce drag?) Intermediate positions would be chosen with reference to the cylinder head temperature, so the specific reading of the cowl-flap indicator might be less important.

Or maybe its just that, for a differential instrument, the middle is an unbiased home?


I believe for this style of instrument, for powered off state, or severance of connection with the sensor, that middle was the unbiased home position, because rarely would you place the settings right in the middle for an extended period of time. There are several RPM indicators out there like this as well. I've got two very old 1950's era indicators for RPM that work just like that.

There are of course other instruments that do different things to indicate failure of gauge, failure of sensor, failure of connection, and so forth.

I have several of these older aircraft gauges, and other mechanical and analogue gauges from various devices in my workshop in a drawer, and taking them apart over the years, I can honestly say I have not found one from a particular manufacturer that is quite the same as another in mechanical operation from another manufacturer, and also mechanical differences between different instruments for different functionality. I've also found that when used in regular operation, i.e. wired up precisely how they are supposed to work, some instrument gauges would make a sort of wobble motion until they settled, like the amperage when applied would drop, come back up, go over, and then return to nominal. Old analogue circuits and capacitors hold charge, and take a while to settle, so it is always fascinating to watch these devices "do their thing" in their natural habitat.

My knowledge of aircraft systems, beyond tinkering with old gauges, is limited and I readily admit ignorance in most of this stuff.


I love these kinds of projects. My initial thought was that it would be a cool CPU load indicator for a quad-core CPU.


This document can be rented for $6/month or purchased for $37.82

IANAL but if it's a publication of the US government, I believe it should be in the public domain.


I’m sure that’s just to cover printing/binding cost? You run into this a lot.. the information is free, but the govt is able (perhaps in some cases required) to charge reasonable fees for actual costs.


Surely costs can be reduced to nearly zero by scanning everything and distributing via torrents and internet archive.


It's not like this is some document that's going to be downloaded a billion times, so whether it's distributed via bittorrent or some government document site isn't going to matter.

That is, the cost comes from somebody having to dig up the original document in paper or microfilm, scan it, and then put it up on the document site. And then all the kinds of overhead costs associated with having an physical and electronic archive like that (facilities, salaries etc.).

If everybody on the planet suddenly develops an acute interest in WWII era cowl flap indicators, sure, the above costs amortized over billions of downloads would be very close to zero. But presumably the government guesses that this document might be downloaded maybe a hundred times over the following decades and prices accordingly.


Torrents? Do you know how many billions of documents the US Governent makes per year?

Plus, many documents won’t actually exist until someone asks (FOIA, things like that).


It was just a note to the author should he feel afraid to share it due to copyright reasons.


If I wanted to start understanding electronics on this level - where should I start? I love microcontrollers and analog components, and always see so many cool projects with them, but I don't know where to begin to acquire this knowledge.


Buy one of those big arduino starter kits (aliexpress is not a bad source actually), fuck around and find out.

My preferred method is picking a project and starting to acquire knowledge to realize it. There is plenty of stuff on YT to learn from.

"The Art of Electronics" is brilliantly written bible on everything analog and some things digital, and it starts from pretty basic stuff. It is a bit pricy tho.

It follows a format on starting with something basic like "how amplifier" works, then going into details, all of them with real, useful examples and the whole road to figure out how to make those example from scratch.

It's not "guide to electronics" per se (although it does teach stuff well), as much as reference guide on "how to do X", except that the whole way to get X is explained so on top of recipe you're getting all the reasoning behind it.

EEVBlog forums are also nice place to ask: https://www.eevblog.com/forum/beginners/


I fully agree with the sibling comment to just buy a starter kit and start screwing around. I would add that the cost of failure is very low, so do not be afraid to experiment. At least for me this is the best way to learn. Worst case you fry the Arduino and need to order another one (or just order two or three spares so you don't need to wait, once you get going you might/will find uses for them). I have mostly fried LEDs, because I forgot to limit their current (fancy way of saying: put a resistor in series, ballpark 300-1000 Ohm should be fine). Every time you break a component, try to figure out what went wrong so you slowly learn what not to do, but you also understand why you should not do that. And the reward of seeing something change in the real world, not just on a screen, is great, even if it is just blinking an LED for the first time.

You will not get to this level of understanding with your first project, but you also do not build a high performance distributed system as your Hello World! project in a new framework/language. Start with simple things like the usual blinky. Then start blinking two LEDs. Then you can figure out how to blink 4 LEDs independently with only three pins. Use a button to toggle LEDs, use transistors to switch LEDs, use optocoupler to switch LEDs, read the position of a potentiometer via an ADC, shift the ADC value with a resistor in series/parallel, read multiple buttons via a single pin/ADC, control the brightness of an LED via PWM, control a servo via PWM, read the position of a feedback servo via ADC, return a feedback servo to a recorded position on button press. Essentially every little project adds another thing to your toolbox. The fun is both in learning these things and combining them to achieve something else, like that returning servo.

Another aspect is, if you are doing this for fun, just follow the rabbit holes as you come across them. So you start wondering how that feedback servo works? Then you find there is a potentiometer in there, so you learn how that works. That will teach you about the relation between resistance and voltage drop. Or you treat it as a black box, because you just want to 3D print a robot arm, that is also fine. You will also start understanding simple circuit diagrams and try to draw your own. This helps later, because you can look at other people's projects and learn from them easier. Every time you get stuck or are wondering about something, you can just throw it into your favorite search engine and get blogs, questions, videos or anything else about it.

I want to throw in a recommendation for BigClive [1], because he does circuit reverse engineering, explanations, tips for modifying existing products and overall is just entertaining to watch if nothing else. If you want a video to start with, I can absolutely recommend [2], he goes over common components (resistors, transistors etc.) and explains how they work and what you do with them.

As a last point, I can recommend learning to solder, but it is not required at all to get started. A breadboard will serve you a long time, but once you want to make some more permanent circuits or want to modify existing things, it is a very handy and simple skill. On the other hand, my most permanent circuit is still on its original breadboard...

[1] https://www.youtube.com/@bigclivedotcom [2] https://www.youtube.com/watch?v=6Maq5IyHSuc


Very cool. I have a similar project I’ve been meaning to build to use a Playstation controller as a wireless analog joystick for an Apple ][, also using digipots like this project did. I have the components but am procrastinating soldering the tiny SMD digipot to the breakout board just like shown in this article.


If the board has soldermask (was made at a board house and has green [or other color] coating), soldering SMD components is a lot easier than most people would first assume. The surface tension of the solder and rejection of it by the mask makes it go much better than you'd think.


...and good flux carries you the rest of the way.


> soldering the tiny SMD digipot to the breakout board just like shown in this article.

For surface mount soldering, you need good tweezers, a good soldering station, and magnification. Cheap USB microscopes are helpful.


Are you writing about that on a blog, on Twitter or somewhere else?


Would be cool to build an analog gauge cockpit for a flight simulator program. You would really appreciate the workload required by the pilots of old; before software ate the world.


It's a doable and fun project. I did it a few years ago, designing a small set of instruments in Fusion 360, 3d printing them, using stepper motors and an arduino to handle movement, and using Mobiflight[1] and FSUIPC[2] to handle the firmware and communication with MS Flight Simulator.

DCS-BIOS[3] is a similar project for interacting with DCS.

There's something really, really neat about seeing real physical instruments spinning around in response to a computer game. And they're actually often a lot easier to use than the instruments in-game, too.

[1] https://www.mobiflight.com/en/index.html

[2] http://www.fsuipc.com/

[3] https://dcs-bios.readthedocs.io/en/latest/index.html


There are several of those projects on youtube that people build scale accurate cockpits (mostly from scratch) as hobbyists for a variety of flight simulators.


What is an Engine Cowl Flaps Indicator?

* Frantic Googling *

Oohhhh! So that's what it is! How useful!


The original author also answered this in the post.


Why didn't you tell me before I started googling?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: