Week 07. Electronics Design¶
This week we started to learn the basics of Electronics Design. As I’ve been working at Seeed for 6+ years, I always find it fascinating to see the tiny components combined into a small module and they can execute great powers/capabilities. So it’s really exciting to learn how to design electronics by myself.
And yes, of course, I won’t be able to jump and start building an electronic product by myself yet. But I began to grasp some knowledge about electronics (some of them were taught at our high school physics course but they were long-gone since I did not use the knowledge fore more than 1 decade.)
This week, we also have a group assignment and an individual assignment.
- Group Assignment: use the test equipment in our lab to observe the operation of a microcontroller circuit board;
- Individual Project: redraw the echo hello-world board, add (at least) a button and LED (with current-limiting resistor), check the design rules, make it, and test it.
My wifi network was horrible last week, I couldn’t follow everything taught during the class last Wednesday. Luckily, the video was recorded, so I could learn afterwards by watching the videos on Vimeo.
I also followed the instructions on the Fab Academy Tutorials to start working on redrawing the echo hello-world board.
I participated in one KiCad PCB workshop in Shenzhen last year, we decided a cat-shape PCB badge with two LEDs on the cat’s face. But we did not fabricate the PCB after the workshop. And now I couldn’t remember how to use KiCad. Practice makes perfect, and no practice means lost memory. Luckily, KiCad is still installed on my laptop, so I can use it very conveniently.
Seeing from the class schedule that we will be learning electronics design, I downloaded Eagle in advance. And the I followed the Fab Academy instruction to download the hello echo board schematics and the Fab components library onto my laptop.
However, when I followed the instruction to install the library, it kept showing the following error:
Loading /Users/violet/Desktop/fab.lbr ...
line 8, column 16: This is not an EAGLE file.
Since he tutorial was last updated in 2017, I was thinking maybe the library is not up-to-date. So I went back to the class schedule, and download the this Fab Library. And it seemed to worked. However, when I started drawing the board, I noticed that the library was not there, it has a sign that shows a yellow triangle with an exclamation mark, meaning “not available”.
And when walked through the tutorials from Autodesk Eagle tutorial, I realized that I made mistakes in creating the library. I thought I can just drag the downloaded library into the folder of “libraries” and then I can use it by default. It is NOT working this way. So here is the right way to add a new library:
1. Open Autodesk EAGLE, at the Control Panel，File => New => Library
2. Click “Save” or use short-cuts “Cmd+S” on MacOs to save the new Library
3. Go to Control Panel right-click the new library, and select use, when the dot turns green, it means success!
Redraw an echo hello-world board¶
And now I need to sort out all the components needed for making the Echo Hello-World board!
Since I still have not figured out how the Echo Hello-World Board works. I have no idea about how and where to add the LED and button yet. So I decided to redraw the original board first. Hopefully through this process, I can grasp a feeling about PCB design, and have a clearer idea about adding these two extra parts.
According to the parts shown on the original board, the following parts are needed:
|2||20 MHz resonator||1|
|4||ATtiny 44 IC||1|
|5||2x03pin header (AVRISP)||1|
|6||1x06pin header (FTDI)||1|
With the component list ready, I began drawing the Echo Hello-World board on Eagle.
I created a new project:
At the Control Panel, right click “Project” => “New Project” => Right Click it to rename as “Echo Hello World”
Right click “Echo Hello World” => “New” => “schematics”
Click “Add Part” icon to add the parts in the above charts onto the schematics
Click “Net” icon to start wiring the parts
When finished wiring, I need to set the design rules
The design rules will be set in the Board Window. When click the icon of “SCH/BRD” to switch from schematics window to board window, it will ask to “create from schematics”, click “Yes”
Follow the “Read Me” file instruction to add Fab Design Rules.
Click “Load” and select the fabcity-designrule.dru file which I downloaded from the Fab Library and click “Open”
Check the design rules to make sure it’s correct
Check the design by clicking “Tools” => ERC (Electronic Rule Check). It showed 3 warnings, but I did not understand what that meant yet. Will figure out later.
And I saw the icon “Errors” under the DRC, so I clicked it out of curiosity. And it showed I had 16 errors, all of them “Airwire”, which I need to figure out as well.
Since the “Autoroute” function requires upgraded version of Eagle to perform. I decided to route the parts manually. And the the EAGLE crashed when before I managed to take any other actions.
After checking a few more tutorials, I realized I can make it more neatly. When clicking “net” to wire the parts, I can just add a name to each part, and they will be wired directly. I do not have to manually connect each pin of each components with each other. So I started all over.
After getting adding the components into the schematics, I use “net” & “name” icons to connect the pins with each other. And then I click the icon of “SCH/BRD” to crate a board from the schematics. Please see the image below.
(Create board from schematic)
And then in the board window, change the design rules according to the milling machine that we’ll use: Edit => Design Rules… => Change the values of Clearance, Distance and Sizes to 16mil, as shown in the images below:
Later I used “Autorouter” to route the wires. Since our board only has 1 layer, I only chose Top Layer, as shown in the image below.
And then in the next step, click “Start”
When it finished the Autorouter process, I noticed there is still one place left un-routed. So I use “Route” to manually route this part (as shown in the image below)
Later I deleted the texts in the board, and here I have the ready-for-milling PCB board of the Echo Hello World Board V1.
(Echo Hello World V1 - final)
And then I use “File => Export => Image => .PNG file”, remember to click “Monochrome”.
And here is the exported black-white .png file of the first PCB board.
(Echo Hello Board V1)
When I double checked the schematics, I realized I was too careless and made some typos while defining the names! Some of which were labled as “VCC”, while some as “ACC”. This was a silly and should-have-been-avoided mistake. So I started all over again.
(the updated schematics)
And this time I am ready to add an LED and a Button to make V2 of the board.
On the basis of the Echo Hello Board, I will need the following extra components:
I added the components to the schematics page. Please see in the image blow, the components in the blue rectangle are the newly-added components. Use “Net” & “Name” to wire up the components.
And then I generated board from the schematics, and use steps similar to teh previous to move the components, route them up.
(Echo Hello World Board V2)
I exported the traces and the outline respectively.
(Echo Hello World Board V2 - Traces)
(Echo Hello World Board V2 - Outline)
And then I used Fab Modules to create the .rml files to be milled on Roland - SRM20.
(Fab Modules settings for the traces)
(Fab Modules settings for the outline)
After milling it out from the Roland - SRM20, I have my board here! Although some traces are still rough after sendering, I am pleased to finally get it ready for soldering.
(Echo Hello World Board V2 bare PCB board)
And then I collected all the components needed to be soldered on to this board.
I encountered another difficulty while soldering. I guess it was because I put the hot soldering iron at the same location on the board for too long, the pad was peeled off when I was soldering. So I needed to remake a new board.
(On the left board, the part in the red circle was the place that has no pad. And the board on the right was the newly-made PCB board. )
Finally I soldered all the components onto the board.
Now it’s time for testing it! When I connected the board with the USBtinyISP, the board turned very hot. I assumed there must be short circuits, so I disconnected the USB cable and check the parts. But then the IC fell off… :( I guess the IC was not soldered very solid and when it was hot, it fell off easily.
I readjusted the design of the board a bit, to move some parts and the routes from each other, leaving more spaces for components and soldering.
(Echo Hello World V3)
(Finally finished soldering)
And now I will program to test whether the designed PCB board works or not.
I am using Arduino IDE. First of all, I need to make the right settings (as shown in the picture below)
Tools => Board: “ATtiny24/44/84”
Clock: “Internal 8MHz”
And then “Tools => Burn Bootloader”. And here I had a little accident. When I click “Burn Bootloader”, it showed the following error.
Arduino: 1.8.8 (Mac OS X), Board: "ATtiny24/44/84, ATtiny44, Internal 8 MHz" avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. Error while burning bootloader. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
And when I tried to unplugged the board, my thumb got burned with the heated ATtiny44 IC, which really hurt!!!(I got a tiny mark in the shape of ATtiny 44 on my left thumb for a few days T-T).
SUGGESTION: After finishing soldering, use a multimeter to check whether there are short circuits. Even if the the checking looks fine, be careful and monitor the temperature of the IC when connecting the board to the laptop or power. If the temperature goes up, unplug it immediately.
For my own understanding, if the IC temperature goes up, there might be two reasons:
- (1) the ISP cable is plugged in the right direction => solution: unplug and & plug in the right direction.
- (2) There are short circuits => check it, remove the IC and solder a new one.
I checked the IC there did exist some short circuits. So I removed the IC with a heat gun and then soldered a new IC to the board.
And here is the board with a new IC.
I actually plugged in the ISP cable in the right direction and the IC got hot very quickly. So I unplugged it and here is the right connection.
Now it’s time to burn bootloader!
Happy Face. :D
Hmm, here came a detour! In week 12, when I was trying to program this board, I couldn’t. And when I pressed the button, the LED will be on, even though I haven’t uploaded any code to it yet. (I did not know why I can burn bootloader successfully if the board is not correctly designed.)
And my local instructor Yufei helped check my board, and he noticed I made a design fault (see the circle in the image below).
So I optimized the design, and here is the updated board.
I used Roland CNC-SRM20 to mill it.
And soldered the components onto the board!
This time, I successfully burned bootloader and programed it! See updates in Week 09 Embedded Programming.