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

May 09, 2021, 12:39:46 PM

Login with username, password and session length


Fly Elise-ng
17 Guests, 0 Users
  • Total Members: 4032
  • Latest: vasekg
  • Total Posts: 57014
  • Total Topics: 7593
  • Online Today: 28
  • Online Ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 17
Total: 17



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.


Haha! We crossed posts.

Great news. Progress is made.


Hello Andrew,

It's been a big night for me!

So I connected everything up, I actually and bench tested the lot...here is what I found.

When Takeoff button is pressed, I get an N1 of 91.3, regardless of Tref selection. I tried cycling the switch off...changing the temperature up and down...then reselecting the TO button, but still get 91.3 at all selections of temperature.

The MCT function works very well!...press the button and I get 857...then 96.7...however the values remain even when the switch is selected off.

I cannot get the TGT function or the Test function to work at all.

Anyway, very excited so far.

I will double check the connections tomorrow morning when I get up, I am pretty confident that the thumbwheel switches were wired correctly...I even tested them with a multimeter to make sure the tref 1's were connected to the tgt 1's and the tref 2's were connected to the  tgt 2's etc etc.

The other consideration would be that the thumbwheel switches are suspect...they are over 30 years old....



Hi Jim,

That's great news. I expected things to mostly work, and they mostly do! Thanks for trusting me enough to put in the effort to construct this.

I didn't modify the code for a latching MCT button. If you press it in and out again the display will clear.

The thumbwheels could be a problem, but I'd expect them to have dirty contacts and give you some changes in some positions, but apparently not. It could be the diodes. Or unicorns.

We can spend a little time troubleshooting, and I could hack together something that tests the thumbwheels only, so you have more direct feedback and diagnostics. There are actually some diagnostics in the code right now. If you start the Arduino serial monitor (button top right in Arduino IDE) and set the speed to 115200 you should get little messages about what is going on inside the box. There may be sufficient to help you figure it out, especially as you have the source code so you can see what is supposed to be happening.


I think maybe we should have done what you suggested initially....and that was to get the tref working only, then include the tgt once we worked the bugs out.

If I disconnect the TGT thumbwheels will we have to modify the existing program?



Nope. The switches are in a matrix. If they are physically not there it's the equivalent of just not being pressed. The diodes prevent the switches that are present from interfering with the others.

You can leave them connected and we'll figure out if they are broken or if I have misinterpreted how they work.


It could be that I have simply wired them incorrectly....

I attached a very simple diagram of how I wired tref and tgt thumbwheels using the TO mode example.

I only show how I wired the TO button to make the diagram less cluttered. The rest of the connections are exactly the same.


Yes, that looks right.

Can you show a photo of the wiring to the solder pads on the switches, including a view of the diodes?

This was all visible in an earlier photo, but it might be different when installed.

If you disconnect the thumbwheels we can focus on the four pushbuttons? They should all do something.



I have included some pics...not sure how much help they will be as it sort of looks like a dogs breakfast.

For test purposes, I am actually using only one AML on/off switch (with diode)...moving it around from port to port when I want to test that specific function.

During takeoff mode testing I have noticed some action on the arduino unit...the green light is always on with power, and when you select the TO switch, the red LED begins to flash rapidly...(I am assuming this is data transfer of some sort (?)), but again, moving the thumbwheels to any setting will still only give a constant N1 value as previously outlined, and does not change.

The MCT function works as advertised...and like you said, if the button is cycled the display goes blank.

Selecting TGT does nothing at all...in fact the red flashing led lamp does not illuminate at all.

The test function does not operate as well, (no flashing red light on arduino), which is strange because of all the functions you would think this would be the operational one as it does not rely on the thumbwheel switches.

Also take note of the tref +/- wheel...I basically used the existing wires on this one, so I am confident the "C"ommon wire is correct, and the only other options would be a "+" or a "-" connection as this wheel has no "1"s, "2"s, "4"s or "8"s.

As you can see the "+" connection is used in lieu of the "1" to join the rest of the thumbwheels together for takeoff mode operation.

Here are some other points that may influence the operation;

The dimming pot is not yet connected for test bed purposes.

The segment display 5 volt and ground connections are teamed up with the arduino supply input, i have not gave this TN1637 a separate supply source as outlined in your schematic.

I am using a 5 volt dry cell battery while running this test.


Dog's breakfast to some, but it looks awesome to me!

The flashing red light you see is diagnostic data going to the PC. You will see this if you open the Arduino serial monitor I mentioned earlier.

It is not necessary to supply the LED driver with its own 5V supply, it just looks that way on the schematic, so no worries. Basically everything marked as 5V is the same, and everything marked GND is the same.

If the dimming pot is not connected it means the display will stay at minimum brightness. No worries.

Everything else is fine. I suspect a rest and a good dose of 'peering at' is needed. Definitely hook up the Arduino to a PC and turn on the serial monitor. My debug information might help.

Don't give up. This is (I think) all new to you, but partially working is actually good enough to tell me that it's all going to work. (Not working at all is a lot trickier).


Hello Andrew,

I ran the serial monitor and have attached the information for the takeoff mode, test mode, and MCT mode.

The TGT mode does not even register when the button is pressed for some reason...all connections re-confirmed.

Does this get us any closer to the problem?



Hello Andrew,

I made another test bed for the bits and bytes...just to make sure everything was where it was supposed to be for troubleshooting..(see attachments).

I checked and double checked all the wires to ensure I did not solder a 1 to a 2 or a 4 to an 8 etc etc.

Wire continuity also tested fine.

I am thinking that the thumbwheel switches are serviceable, because if the internal contacts were a bit dirty, then the values would vary as well.

It almost seems as though the wheels are not being recognized by the program...except the 91.3 and the MCT function.



Hello Jim,

Well, you have made progress. Yesterday you said TEST wasn't working. Today it is! I have one working here (but only Tref, no TGT), so I am confident that it works in general.

TGT should also emit a message when it is pressed. If you are not seeing it then there is a problem with the wiring.

Tref is reporting 0 all the time, which is what you'd get if the switch was not present. Hmm.

There are a lot of interconnections, so it is going to be a bit fiddly, but we'll get there.

You could start with only the four pushbuttons. They connect to four I/Os through four diodes and a common connection to another I/O. Each button should cause a message to be emitted when pressed. May need another press to return to the 'idle' state before you test the next button.

If you are really stuck I will write some test code that tests only one thing, but I think there are enough diagnostics in the main code to figure out what is going on.

I'm in and out all day today, but I will send messages when I can.


Sorry Andrew,

Might have mislead you...

The test function (button) although shows in the serial montior as being pressed, does not display anything on the led display, and when I press the TGT button it does nothing...it does not even show up on the serial monitor as being pressed...as if the switch is not recognised.


Actually just ran another serial monitor on the test button....it is not even recognised now...before it was...so maybe the wiring is array...(?)

The only solution right now is to remove all the old wires and replace with new ones...unless you have another option?

Like I said...the wires themselves are sound...i checked them all out earlier today so I don't know why the test button would not show on the monitor now....

Can you modify the program to include only the tref function?, excluding the tgt wheels so I can disconnect them.... I think you said you had it working on your side of the pond...if so we could start there and work our way up.



My friend I am making progress!!!!

I disconnected both thumbwheels and tested the buttons only....Still nothing on the TGT, but the test function now displays F14 like your previous diagram!!!

I am going to connect all the thumbwheels back up and see what happens....


Andrew...I cannot thank you enough...the program is now a complete success!!!!

the TO mode works...the MCT works...the Test function works...and the TGT...all works!

I am almost too embarrassed to tell you what the problem was...but I will anyway....

So...I disconnected all the thumbwheels, and tested the switches, which all worked except TGT..as I was running the TEST mode...I reached for for my mini screwdriver to change the leads and inadvertently pressed down on the board itself and noticed the "F14" flicker on and off.

As I am not familiar with these boards, it never occurred to me to solder the through pins into place once it was placed in the wire connection cradle...realising this I soldered all pins on the top of the board, connected all thumbwheel switches and wires....and the rest is history!!!!!

Everything is up and running perfectly!!

I cannot thank you enough Andrew...

Once I clean things up a bit I will run some additional tests...but from what I can see so far, the programming is all there and complete!


Great! That is excellent news, and I'm happy it's all working.

Don't be too hard on yourself that you didn't spot the problem at first. Experience is what you get just after you need it. :)

Now the core functionality is present and working you can modify it to get it more like what you want, but first get used to what it does and plan what changes you would like. You can hack on the code yourself, or I'll help you out.


Hello Andrew,

Yes, will definitely still need your help, but for what I can see so far the N1 values look spot on...will have a better idea once I run a complete temperature range.

I spent the remainder of last night and this morning re-checking the wires to make sure none of them came loose at the solder joint, (thumbwheel), boards due to movement during the test bed phase...found a couple and re-soldered them.

Now in the process of gluing the units to the CDU platform.

Still waiting for my 3 digit LED segment displays...if I knew they were going to be this long I would have modified the print to accommodate the 4 digit, then blank out the last digit as you suggested...too late now.

I do have a question regarding the TM1637...when I de-solder and remove the 4 digit display, the 3 digit will have less pins...so am I correct to assume I would run my pin wires from the TM1637 to the segment display corresponding to the current digital readout, except the pin outputs left over would only be used in the fourth digit anyway?

Thanks Andrew



Hi Jim,

The N1 values are calculated from a lookup table based on the chart you posted, but only at 5-degree intervals. I think I was going to replace the lookup table with a linear equation, which would produce a result for every degree.

I'm happy to help with the software later, but the whole point of giving you the schematic and source code is that you don't have to rely on me.

The 3-digit display will only have one less pin, so one solder pad on the display PCB will be unused. Otherwise it's just a one-to-one pin mapping from the old display to the new one.

I'm sure your 3-digit display will arrive soon. Unfortunately there's no way around Hofstadter's Law.

I'm actually really happy that it all works. Thank you for involving me.



Sounds good Andrew, I am sure I will have more questions.


Quote from: ame on December 04, 2020, 10:22:46 AMI'm happy to help with the software later, but the whole point of giving you the schematic and source code is that you don't have to rely on me.
Upon re-reading, this came out wrong, and I didn't mean to imply that I didn't want any further involvement. Which, maybe I hadn't, but now that I mentioned it maybe you are now considering that I might.

Curse this emotionless communications medium.



Not at all my friend...I didn't get that from your previous post.



Hello Andrew,

Should be posting some pics of the TMS build in the next couple of weeks or so...(in between work etc). I have been wiring the entire project up over the last couple of days, of course still waiting on the 3 digit displays.



Very good. I hope the remaining parts will arrive soon, but shipping from China is not an exact science.

Looking forward to the rest of the build, and I hope you inspire other people to build more stuff.




Going to post a short video of the TMS on my youtube channel. I will post the link here without described content. I would like to mention your name (first only) in the description for credit purposes only if that is OK with you.

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