PCB Design & EasyEDA Part 1: Schemas - MobiFlight/mobiflight-templates GitHub Wiki

So, this tutorial is not affiliated with JLCPCB (that also develops the EasyEDA online pcb design tool) - EasyEDA just happened to be something that was easy to learn, and you can basically just add the designed board to your shopping cart from the app. So, very convenient, and also pretty affordable - especially if you order 10 boards and share with others in the community.

Sharing your pcb and associated panel designs in mobiflight-panels is encouraged, it would be a pretty sweet goal to have a fully open source / open hardware design for a full simulator for each aircraft type. We can make it happen when we work together - and how many different designs does the world need for a home cockpit Airbus Flight Control Unit? 😸

Design workflow

Panel layout

It all starts from the idea - or actual aircraft panel. A great way to design your sim panel is by using the mobiflight panel template and Inkscape. This is your first draft, lets put it aside, we'll need this later.

For this tutorial, we'll do the Citation CJ4 Engine "Run/stop" panel:

image

It is very simple - it uses two buttons, with two leds each, and some lettering in the panel itself. This should be doable with an Arduino Pro Micro (link goes to Sparkfun that designed the original, which might be a good choice to support the creation of open source hardware, though cheap clones on aliexpress also work. It has 16 I/O pins of which 5 can do PWM, so it should be just right for this, and the smaller footprint of the module makes things much easier - because we are doing things a bit differently - we'll be piggypacking the Arduino on the reverse side of the circuit board, essentially making a fully standalone USB panel.

We sketch a pcb in green just for a visual reference at this point, and make it slightly inset from the outer panel to avoid interference with other panels next to it, and making it also possible to make a laser cut box casing from 2mm acrylic for the back if desired. Lets take a note that the pcb rectangle is 120.45mm tall and 34.60mm wide as drawn.

image

Logical arrangement (schema)

Logically our panel has:

  • Two push buttons
  • Four leds (each button has two, wired individually)
  • Backlighting for the panel lettering, but we'll try to cover that part in an upcoming sequel to this tutorial, so let's not worry about that now.

So, fairly simple wiring: Each of the two buttons are wired between ground (GND) and a data pin. Leds are connected similarly, but in series with a current limiting resistor to avoid burning them (Google for "led resistor calculator", or just use 330 ohm). This example has an Arduino Uno instead of Pro Micro, because Tinkercad only has Arduino Uno in the component library, but you should get the idea.

image

Next we need to jump into EasyEDA to recreate the schematic there. Log in, and start the editor by clicking the "EasyEDA Designer" button on the top. Select File > New Project and name it something descriptive. You should see an empty schematic like this:

image

Adding components

The Arduino Pro Micro

We will be receating the above Arduino wiring diagram in this schema. But first we need to find the correct components to use. For this, we click the "Library" button on the left side, which opens a big search dialog. Let's first add the Arduino Pro Micro. Luckily Sparkfun, who designed it, seems to also have added a schematic symbol for it into EasyEDA. Search for "sparkfun pro micro" on the top search field and you should find this:

image

Select the "Pro Micro 5V" from the list, and just click somewhere in the schematic page to place it (and right click to stop placing ten of them!).

The buttons - the Multimec 3FTH9

Now search for "3fth9" and you should find a few on the "User Contributed" category, pick the one that looks like this:

image

It's sometimes a bit tricky to find the correct ones, but fortunately there are a lot of user contributed footprints / symbols - just review the component datasheet and compare it to the displayed schematic and footprint symbols and try to see what matches. You can also create your own symbols, but it's a bit outside of this tutorial. So once you find the correct switch as pictured above, place two of them in the schematic.

3mm LEDs

The next component to search for is a generic 3mm led light, and you will find thousands of them. It does not really matter which one you pick. I usually pick these generic components from the "LCSC" or "LJCPCB Assembled" categories, the latter you can optionally order along with your PCB if you want, and even have them assembled (though in this case you want to solder them yourself, as we need to place them in a special way over the switch.

image

Anyway, search for "3mm led tht" (through-the-hole) and you should find one on the LSC catalog.

image

Place those four leds in the schema.

Resistors

Last, we need to find the 330 ohm resistors. Naturally there are thousands of footprints for such common component, but search for "330R tht" and you should find this one on the LCSC catalog - pay close attention to the photo and footprints. LCSC components usually contain a reference photo, which is very helpful (click it to open a detailed page on a new tab).

image

Place four of those on the schema and close the Library window. We are ready to do the wiring on EasyEDA.

Try to arrange the components somehow nicely. You can also doubleclick on the very tiny top label of each to name them - the names need to be unique, and not contain spaces. So I named them like "ENG1_RUN" etc. Then select the wire tool, place the "Ground" symbol near the GND pin of the arduino and draw a wire from that to the symbol's attachment spot (the wire shows a solid circle on the attachment point when you hover your mouse over it. You should have something like this. Pay close attention to the red dots - generally wires can cross without touching, but when they connect to each other, there will and should be a red dot. Note the button wires on pins 5 and 7 do not have the dot, so they do not interfere with the led wires.

Pins 4,6,8 and 9 support PWM dimming of leds on the Pro Micro, so we are using those to these, so we can adjust the indicator light brightness to match the light dimmer on the simulator.

Our schema looks like this, hopefully it is correct 😅

image

Next, let's create the actual circuit board.