8. Electronics Design - DONE (to be marked)¶
This week’s individual assignment was to design our own evaluation board around a microcontroller using EDA software. Our group assignment was to observe the operation of a microcontroller circuit board.
Group Work¶
Our group assignment was to use our lab’s various electronic test equipment to observe the operation of a microcontroller board.
We documented our work here” Electronics design group assignment
Individual assignment¶
The individual assignment this week was to design my own evaluation baord around a microcontroller.
Software¶
I decided to use KiCad as my EDA software suit. In our lab group we had students using different EDA software:
My choice came down to a couple of factors:
-
Fusion 360’s accessibility. Fusion 360 is a very powerful software suite. That power also comes with heavier computer requirements. I have found that my computer in the lab often runs a little slugish when using Fusion 360; This is either due to slower internet, older computer hardware, or a combination of both.
-
Difficult to run classes for Fusion 360. As I said before, me and my coworkers run our Fablab in Trinidad. We run workshops for a few of the labs equipment, and our intention is to greatly expand these offerings. Right now Fusion 360 has a free personal/hubbyist license, and we are able to get student accounts through fab academy. However, there’s no guarantee that personal/hobbyist accounts will be available in the future, or they may remove the circuit design feature from the free accounts. Because of this, Fusion 360 is not a great choice for us to relly on for our workshops in the future. Therefore, I would rather familiarize myself with a solution that we are likely to use for our internal programs.
-
KiCAD’s documentation within FAB Academy. The very first EDA project I looked at in fab academy was Quentores baord we made for the electronic production assignment. I think I understood everything that was shown in the schematics so , and since it’s a free program it would work well for our internal.
-
EasyEDA regrets. The one student in our group who used EasyEDA said it worked well for his initial smaller baord, but he eventually abandoned it in favour of Fusion 360 later on. I didn’t go into detail on why exactly, but I used that as a signal that better choices were available.
Input/Output components¶
-
I wanted the board I built in this week to be the same one I intended to use for my final project. There were a couple features I wanted for my project that I had to include:
-
Output ports for an LED screen. We had a variety of 0.91 inch I2C OLED screens on hand, so I opted to use these. They had the advantage of needing less data wires than some other screen types. I wanted the screen to be seperate from the main board so that I could move it around, so my board would have pins to connect as a breakout board. These screens require SoCs that have I2C (SDA/SCL) ports so that would affect my SoC choice.
-
Input ports for Ultrasonic Sensor. I wanted my project to be able to use a variety of inputs that I could change if I wanted, but the main want I wanted to use was an Ultrasonic sensor to measure the distance to the nearest object in front of it. This too would be on a breakout board so that I could reposition it in various places across my final project. The Ultrasonic sensors we had on hand were Arduino Ultrasonic sensors. These require a connection to the main board via SPI (MISO/MOSI) ports, so that would affect my SoC choice.
-
Buttons. I wanted to have a few surface mounted push buttons (3 in total) on my main board to use as inputs.
-
LEDs. I wanted to have a few surface mounted LEDs as on my board as future outputs in case I wanted them later.
Parts choice¶
-
Microcontroller, SEEED rp2040. I wanted to use a Microcontroller that would make my board as versatile as possible to allow for any future changes I might want to make without requiring a complete redesign. It also needed to have I2C and SPI ports for my I/O as described above. Onother factor that influenced my choice was the lack of confidence I had in my soldering skills (they are getting better, but I still didn’t feel very adept), so I chose to use an SoC that I already had experience with in last years Electronics Production Assignment the SEEED rp2040. Using this as my Microcontroller also gave me the benefit of being able to connect directly to it without the need for an FTDI cable. There are a few more benfits of this choice, but I’ll cover these in detail on my final project page.
- I initially indicated in embedded programming assignment that I intended to design my board around the ATtiny412 microprocessor. However I changed my mind to the RP2040 for the reasons above.
-
LEDs, LED RED CLEAR 1206 SMD. These are just the ones we had on hand. I actually used 3 different coloured LEDs(Red, Blue, and Green), but they were all in the same 1206 family.
-
Buttons B3SN-3112P. These were just what we had in stock in our lab and they were well suited.
-
Resistors. I needed a few resistors for the LEDs and buttons to ensure their proper operation. I chose 1 KiloOhm (RES SMD 1K OHM 1% 1/4W 1206) for the LEDs, and 470 Ohm (RES 470 OHM 1% 1/4W 1206) for the buttons.
-
Connectors. I needed 3 sets of connectors, (two of 4 PIN, and one of 6 PIN). I wanted to use all 2.54mm connectors since those would fit the cable we had on hand. I used:
- female CONN HDR 4POS 0.1 TIN SMD for the I2C and SPI connectors. Besides the 2 data line connections, I needed voltage and ground connections as well to attach my I/O devices.
- male CONN HEADER SMD 6POS 2.54MM for addiotional ground connectors. If I decided later on that I wanted to put my buttons and/or LEDs on a breakout baords for easier access, I would need extra ground wires to connect them to. The benefit of using the SEEED rp2040 meant that I could bypass the surface mounted buttons and LEDs that I designed onto my main baord by soldering their I/O pins directly to it. However I would still need an additional ground connections for each component.
Making my design¶
Final files¶
My KiCAD design files can all be downloaded here :
Designing process - schematic¶
-
I began by opening KiCAD in the Schematic Editor.
-
in the blank schematic I clicked the 3rd icon from the right hand menu to “add symbol”
-
I then used the window that popped up to select the component I wanted to add (in this case my microcontroller) and clicked “OK”
-
I repeated this step for each component I wanted to add. (this one has every component escept the 6-pin connector that I added later)
-
Then I used the “add global label” icon on the right panel to add labels for every trace I inteded to connect. I also used the “add power” for the ground and power labels. As I added them I used the “add wire” icon to draw connections between each label and the component it was suposed to be connected to.
-
I then ran the “electrical rules checker” from the “inspect” tab on the top of the screen. This generated a number of errors. I reviewed each error that was reported. I missed some connections that I should have made, and corrected them. However most of my “errors” were just not connecting anything to tabs on the microcontroller that I didn’t intend to use.
-
After everything was added, by schematic looked like this.
Designing process - PCB layout¶
-
I went back to the main KiCAD window and clicked on “PCB editor”.
-
This opened the PCB editor window.
-
I clicked on “tools” from the top menu and then “update PCB from schematic”
-
This was the PCB layout generated (again this was before I added my 6pin ground later on)
-
I dragged all the component around the board to where I vaguely thought I would like them in the completed design. I then moved them around to try to minimize the amount of crossed lines (traces) on the design.
-
I then went to “file” from the top menu and selected “board rules”. I changed some of the constraints to the settings below.
-
Then I clicked on “route tracks” (4th icon on right hand symbols menu). And then began connecting all the traces to the points that were connected by the thin lines indicating what should be connected to one another. I spent a lot of time moving components around and rotating them to get a layout were everything was connected but no traces were crossing one another.
-
I then ran the “design rules checker to see what I missed. There were a few traces that I missed, so I made the necessary changes to fix them.
-
I went back and added my 6pin connector in the schematic, and then updated my PCB. After that I moved allot of my components closer together and added some text to my PCB layout.
-
The last thing to do was to export the traces as an SVG file.
-
That was the end of this week’s assignment. Next will be exporting my design for milling
Lessons learned¶
-
I assumed trace routing was automatic within KiCAD without any plug-ins, but it isn’t. I realised that doing the traces manually allowed me to better understand my layout, and to add features that made it more to my liking. Although I can see how doing manual traces can get difficult with complicated schematics.
-
KiCAD seems to be incredibly powerful, and I will probably never be able to understand many of it’s more advanced features. It can feel intimidating at first, with how many options are available at every turn, but it is not too difficult to get started with a basic design.