Welcome to Cockpitbuilders.com. Please login or sign up.

September 23, 2021, 03:39:01 PM

Login with username, password and session length


Fly Elise-ng
30 Guests, 0 Users
  • Total Members: 4049
  • Latest: Hopobcn
  • Total Posts: 57640
  • Total Topics: 7662
  • Online Today: 26
  • Online Ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 30
Total: 30



Will Depart in...



Segment displays

Started by Mach7, November 02, 2020, 04:55:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



Hello Andrew,

I have a question regarding the BCD thumb wheel switches.

I am finding that a couple of the digits on the Tref are a bit fussy as when I cycle through say +20 to +30...the value will sometimes change...and sometimes stay the same. I attribute this to nothing more than old or dirty internal contacts.

The TGT wheels work perfectly most likely due to the fact that they are never used in actual flight operations, (or at least we didn't use them when we had this Aircraft in our fleet).

I am looking at brand new replacement thumb wheel, and have found some, but have a question. These APEM switches are the exact dimensions, so they will fit perfectly in the hole, but I notice that there are more outputs/inputs on the PCB board then the ones that I have installed now.

The 1 - 2 - 4 - 8 - and C seem to be duplicated on the datasheet, so my assumption is that the switch is allowing a surplus connection at each output (?)...as they are still identified as BCD switches.

Also I could be reading this wrong....

Here is the datasheet, I am looking at page 2 at the bottom for the 141 and 400 models. (DPS8-141-AK2 is the 0 o 9 digits, and DPS8-400-AK2 is the plus and minus unit).


I am assuming as long as I have the 1 - 2 - 4 - 8 - C connections, they should work fine (?)

I have attached a pic of the switch itself.



Hello Jim,

When you say "the value will sometimes change...and sometimes stay the same" do you mean it changes a lot during the click, and then settles on the new value? Or doesn't actually change when the thumbwheel number changes?

Again, if you hook up the Arduino serial monitor you might get some hints from the diagnostic messages.

There are two possible explanations. If the number changes while the thumbwheel is changing it's because of 'contact bounce' or dirty contacts. Basically the thumbwheel has a pattern of contacts inside, and a rotating wheel that connects the common (C) line so that the 1-2-4-8 contact pattern matches the digit shown. During a change the output is indeterminate, and each contact will make or break almost randomly due to dirty contacts or contact bounce as the connecting points rattle past each other.

If the number does not change then it means that the connection at that point is dirty or worn so the new position can not be detected.

You could try some contact cleaner solvent. Or carefully disassemble, clean, and reassemble the switches.

New switches might help. To answer your question, the extra connections are for the complement of each bit. You can see a tiny bar over the top of the number. This means that the signal is inverted. You can see this in the truth table for Code 141. However, why not order Code 131?

Also, you could order PCB code AL, which will let you solder diodes in place.

Two more points for you to ponder.

First, you can 'hide' the random intermediate changes to the display when the wheels are clicked by the software technique of 'debouncing'. Basically, before you update the display you make sure that the input has stopped changing rapidly (or has remained stable for a while). Simple to do, but I didn't do it.

Secondly, if you swap the 'C' connections for each group of thumbwheels on the Arduino then Tref will act as TGT, and vice versa. You can determine if the newer TGT switches make the Tref display behave better, and if the problem with the older Tref switches is visible on the TGT display.


Hello Andrew,

I am 100 percent sure it is nothing more than a dirty contact at the second thumbwheel "3" position...so when you go from +20 to +30...the value will sometimes stay at 86.2 when you select +30 (the value should change to   but it stays at 86.2 then when you cycle through to +40 the value will then change to reflect the value at +40, (not sure of the exact numbers as I don't have a table in front of me).

As you stated; If the number does not change then it means that the connection at that point is dirty or worn so the new position can not be detected.

And I am positive this is the case...

If you play with the middle "3" digit..(cycle it up and down from 2 to 3 and 3 to 4, I can usually get the value to display the correct reading at +30...(almost like there is a bit of dirt inside the switch.

With these switches being over 30 years old, and the amount of action the tref switches have seen... I would think that these particular switches have reached or exceeded there cycle life.

I will try some contact cleaner...

With respect to the new switches, I contacted a number of distributers and the only ones that are available for immediate release are the 141's.

Having said that, if I was to order the 141's. then I should be OK if I only use the values without the tiny bar at the top...correct?

Also I am assuming that these switches have no diodes, so will have to solder an inline diode to each connection as well.



Ok. No worries.

Yes, the 141 will work. Use the connection without the bar (incidentally, if you needed to use the inverted output it could be fixed in software :) ).

And yes, if there are no diodes then you must add them, as shown in the schematic.



Hello Andrew, hope you had a great Holiday and the best in the New Year...

Finally got my 3 digit 7 segment display!....but...i have run into a bit of a problem.

I taken one of the TM1647 drivers and removed the 4 digit display...then soldered wire for wire to the 3 digit display...with one output left open (from the driver). When i connected it all up, the 3 digit display illuminated very very dim....as if there was a short or something...but when I made my takeoff, mct...tgt.etc etc selection, the digits illuminated and worked perfectly.

When no selections are made...then it glows very dim as if there is a short somewhere.

I should point out that only the top and right side digits are glowing dim...its hard to tell..but i think the rest are extinguished.

So...I rechecked all the leads...and every output wire form the driver is going to the corresponding pin on the segment display...

any thoughtsÉ



Hello Jim,

Glad the display finally arrived. I'm not sure quite what to suggest. Assuming the display is not damaged in any way then, as you know, it's just a bunch of LEDs in a housing. You could test each segment with a battery and resistor, but that would be tedious.

My suspicion would be solder bridges between some of the segment pins, or some other path from a power or ground to the segments.

Does the dimming pot work? You say that the operational settings are working. Do they dim and brighten properly?

When the display is 'blank' and erroneous segments are dimly lit does the dimming pot affect them?

When you display an operational value which does not contain the erroneous segments, do they remain lit, albeit dimly?

The first thing I'd look is for shorts (or almost shorts), bad joints, copper whiskers and other obvious problems.

Do you have other display boards? If you swap in an original 4-digit board (only four wires to move) does it work as it did before?

Do you have someone nearby (they can be non-technical) to whom you can explain what you have done? Usually after a few minutes of "and then this bit is for..." you will suddenly realise what the problem is. In fact, if there is no-one nearby you can explain it to the cat, or a rubber duck.

Good luck.


LOL...yes...have to find a cat to talk to or something.

Checked all the connections...and everything works fine when a selection is made...its just when nothing is selected there is a dim glow from some of the led segments....once a selection is made, that glow goes away and it works perfectly.

Ill try another TM1637 driver...maybe I damaged it removing the 4 digit led.


Fixed!...looks like a couple of bad connections at the driver output. All works well now...will send some pics and video`s shortly!!!



Hello Andrew,

One additional problem, just running some tests with the thrust setting chart, and I found that the 'plus' and 'minus' values are inverted...for example the -50 N1 value is actually what the value should be at +50 etc etc.

If you run all the "+" temperatures from 5 to 50 they corresponds exactly to the "-" values, and if you run all the "-" values from 5 to 50, they correspond exactly to the "+" values.

No doubt I wired something up wrong....but I am assuming a programming change can solve this(?).

Thanks Andrew



No problem. The simplest way is probably to edit around line 464:


  if (!digitalRead(SW_D0)) {


  if (digitalRead(SW_D0)) {

Basically, remove the logical NOT operator (the exclamation mark).

I didn't know the relationship between the printed +/- symbol on the switch and the physical switch state. I guessed, which had a 50/50 chance of being right.

You can confirm that the sign of Tref is incorrect by using the serial monitor. When Tref is being used its value is printed. You can also therefore confirm that the software change above fixes it.

However, if after observing Tref you determine that Tref is actually being derived from the switches correctly you can look for the problem elsewhere.

So, in summary, use the serial monitor to observe Tref. If Tref is incorrectly negated, apply the simple change above. If Tref is correct then fix the calculation of N1.


Thanks Andrew...Ill try that later tonight...

so....found something out tonight that you most likely already know...

I had everything working perfectly last night, then this morning decided to tidy up the electronics as the Arduino and LED driver are just kindof hanging loose ontop of the CDU body.

I decided to make some soft pads out of some flexible material and proceeded to glue the NANO in place...followed by the TM1637 driver.

Once all put back together, the system did not work...the takeoff mode activated all by itself and I had dashes across the LED display....

I checked all the wires...everything was fine.

I decided to undue my last modification...and that was removing all the glue from the bottom of the NANO terminal holder...and voila...everything works perfectly again..

I was using WELD Bond glue...its a white glue that dries clear and is very strong....

My assumption is that there must have been some electrical conductivity whilst it was still wet (??)



Ok, soooo, let me get this straight. It was working, then you did something and it stopped working. Then you undid what you did and it started working again?




Yes....i suppose the moral of the story is...I never imagined glue could act as a conductor...


Removing the exclamation mark on line 464 worked perfectly!!! Now the N1 values correspond to the correct temperature!

thanks Andrew!



No worries.

I can't remember what changes you wanted. Maybe there aren't any, now that you've got everything together. Or maybe you'll think of some once you start using it.

Anyway, I'm pleased it's working.


Hello Andrew, once I get it installed, I will probably be looking to fill in the 5 degree increment blanks.

Right now we have a change at every 5 degree mark...15..25..35..etc.

Most likely have the N1 show a change at every degree of temp change...maintaining the accuracy at the 10 degree temperature marks.



Ok. No problem.

Just make sure you can access the USB socket on the Nano in situ, then you can hook up to a PC for diagnostics or reprogramming.

You can also pull the Nano off the carrier board and reprogram and reinstall it.

Either way, think ahead before you seal it up in an inaccessible location.


Yes for sure Andrew!

I actually installed a cannon plug at the back, so it is easy to remove from the panel.

I have finally made that video, (albeit forgot to demonstrate the MCT mode), and will be placing it on the other TMS thread shortly.


Hello Andrew, in the interest of sharing information I thought I would ask my question here rather than a PM.

So, with respect to the TMS CDU I have decided to do a duplicate build as I wanted to added a slightly bigger LED display, and I actually ordered additional (new) pushwheel switches under the MOM number you suggested...(DPS8-131-AK2'S for the 0 to 9 digits..and DPS8-400-AK2'S for the + and - input matrix.

It took a week for the 0 to 9 switches to come in, but just received the plus minus wheels months later, (apparently they are not a hot item for sale so nobody keeps them in stock).

I have included some pics of the -400 models, and I am  fine with the "C" common connection, but this particular switch has a A+ and A- connection right in the middle.

My question is which one of these is the "1" connection  which connects with the other "1s" o the other push wheel switches...as per your diagram?

Thanks Andrew



Hi Jim,

The data sheet is your friend. I Googled the part number and hoped desperately that my previous advice was sound...

The model you have has true and "complementary" outputs, which means that the signals you want are available as true signals and inverted signals. The one you use depends on the rest of the system, and it gives you a lot more versatility.

The answer is- try it and see. In one position you will get the correct behaviour, in the other, it will be inverted. I'd start with A+.

You can solder the 'C' pin and just twist or bend the wire in place on the A+ connector. It should work well enough to evaluate, and if it's wrong you can move it easily.

Armed with the data sheet and my source code I could tell you precisely which connection to make, but I can't at this precise moment.


And something reminded me that we had changed the source code because of an incorrect interpretation of the +/- wheel previously, so I just re-read a few messages back.

Be careful with your construction going forward. If you use my code from GitHub then the change has not been made. If you use your modified code then it differs (by one line). You have to remember which version you installed in each Arduino because it affects the wiring (and interpretation) of the switch signals. No big deal really, but you might scratch your head if the behaviour of the switch does not match the code if you don't remember that there are two versions now.


Thanks Andrew.

I will do by trial and error...i also noticed by looking carefully at the A+ it almost looks like there is a "-"  below it...not sure if that is intentional or just extra copper to solder on.

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate