On Inputs and LEDs

One of the the challenges I face is to find the proper way of wireing all the components, so that the cockpits remains “maintainable”. When I started building the pedestal my central component, so to speak – was a bread board. The Arduino, the Multiplexer boards, the 7 Segment PCB, everything is connected to it. While this works, it’s not a robust and long term solution.

Especially now, that I want to start adding more inputs and also LEDs into the Pedestal (the Cargo Fire Panel will be the next instrument) i have to find a solution for that messy setup.

Speaking of LEDs. SimVim recommends a couple of LED drivers to use, which is nice. My personal problem is, that I like to order IC and other components via Digikey and they don’t offer any of the ICs listed to be used a LED drivers.

So I was looking for an alternative to the often mentioned DM13 LED driver and found the STP16CPC26MTR. The specifications are almost identical and they work like a charm with SimVim aswell.

For inputs I used the SimVim recommended CD74HC4067 multiplexer cards. Currently I am working on another PCB which will use the IC directly (CD74HC4067M96) to combine In- and Output functionality and hopefully the days of the breadboard and “messy” setup are over.

Getting started

Ok, here we go. 2 weeks ago I ordered a Arduino Mega which arrived within 2 days. After unpacking I installed the software following the installation guide and that was it!

The first problem I want to get out of the way is how to drive 7 Segment Displays! For that I ordered a couple of Max7219 display drivers. Initially I planned on using SN74HC595 and multiplex the 7 segment LEDs. I even had a working setup, which I implemented with an Arduino UNO + some NPN transistors (even though it took me a while to understand how Transistors even work :D). Well in the end I managed to get 4 7 Segment LEDs running with just 1 IC! Great!

One on of the very first tests looked like that (with 2 Segments connected)

BUT; there was a problem. The 74HC + NPN transistor solution worked as follows:

  • Set LatchPin LOW
  • shiftout Data via Output to ClockPin
  • Set LatchPink HIGH
  • Turn on first LED (by setting the Output pin connected to the first transistor to high)
  • Wait 2 ms turn LED off and continue with second Number + LED

As you may notice the information about every number I wanted to have displayed was sent via 1 Output pin (the one connected to the CLK pin). Which 7 segment LED was actually used to display [meaning which LED was to be turned on] this specific number was controlled via another OUT pin.

SimVim uses a different logic:

The configured Output pin is the connection to the CLK pin of the IC / driver, there would be no way to multiplex 7 Segment LEDs with just 1 IC. Since I used the 74HC ICs I’d need to use 1 IC per LED.

This is how I ended up buying a couple of Max7219 drivers. These drivers are pretty expensive, compared to the shift register I used before (around 8€, compared to around 0,50 €), but you can control up to 8 Digits with just one driver. They arrived at the end of last week, soldered one onto a protoyping board and it worked! (Pictures follow)

So for the moment I’m trying to figure out a nice way of soldering and wireing the LEDs: