Exercise 6 - Electronic Design 4/3/2020 to 12/3/2020


There are 2 tasks for this week:


Group Assignment:

Use the test equipment in the FabLab to observe the operation of a microcontroller circuit board


This group assignment is done with Noel Kristian and Yeo Gau Siong.

Our collective work is documented on the SP Fablab Website and hence only my learning and reflections are documented here


What I have learned:

References

www.electronics-tutorials.ws
www.rapidtables.com/convert/number/decimal-to-hex.html


Websites I referred to

www.instructables.com/id/Basic-Electronics
whttps://www.build-electronic-circuits.com/how-to-learn-electronics/


Individual Assignment Part 1: Use an EDA software to modify an echo hello-world board by adding at least a button and LED

In Week 4, we have made an ISP programmer, the assignment this week is to make a target board that can be programmed using the ISP programmer that I have built. For Week 4's assignment, the board layout in PNG format can be downloaded. I simply have to load the file in MODS to generate the GCode files for the milling machine.

For this assignment, only image of the board layout and photo of the completed board are available, so in order to make modification, a new board must be created from the beginning, starting with schematic.

Available_from_FabAcad.jpg
Information Available from FabAcademy.org


I downloaded EAGLE (Easily Applicable Graphical Layout Editor) from Autodesk. After downloading, the next step is to download the library file fab.lbr from FabAcademy Github and add it into EAGLE so that doing the assignment would be easier.


To add the library, there are several steps:

  1. Save the fab.lbr folder into the EAGLE library subfolder
  2. Adding_library1.jpg
  3. Open EAGLE and Select the libraries to use
  4. Adding_library2.jpg

To start drawing the Hello_Board, a new project must first be created in EAGLE. The steps are captured in the image below:

Start_Schematic_drawing.jpg

The next step is to populate the schematic workspace with all the required components for the Hello_board. At this juncture, I still have no concept on electronic design. Hence I decided to reverse engineered a Hello_board made by my coach, Mr Steven Chew. From the photo of his board, I obtained the following part list.


Steven_board.jpg

Add_parts.jpg
Adding the required components on the workspace


After populating the workspace, the next step is make all the necessary connections. The completed Schematic diagram is as follows:

Schematic_on_EAGLE.jpg
Completed Schematic; quite messy
Click Here to download Eagle Schematic file.


Instead of routing every component to every terminal, there is a better and neater way to do it. By using the Name command, two terminals are electrically connected when the same name is given.

Neater_way.jpg

A neater layout
NO_physical_connection.jpg


Upon completing the schematic, Electrical Rules Check (ERC) check must first be carried out to ensure that the connections are correct, and also to manually ignore unconnected points.

run_erc.jpg

After clearing ERC, the next step is to design the board. From the file menu, clicking on "Switch to board" will open up a board layout workspace. The footprint of all the components as well as their electrical connections are all displayed in a "mess" at the bottom left corner.

Board_layout_workspace.jpg

To start the board layout, the components are first dragged to the workspace. While it is entirely based on the liking of the design, in laying out the board, it is good that best practices in placing components are referred to an followed. I used Altium.com as reference. Some of the points are listed below:

moving_component_to_the _board.jpg


After arranging the components on board, the next step is to route all the airwires.

routing_airwire1.jpg

routing_airwire2.jpg


Upon completing the airwire routing, DRC (Design Rule Check) must be run to ensure that the board can be fabricated. The DRC can be found under the "Tools" menu. Before running the DRC, the parameters must first be setup. From the characterisation test, the minimum spacing that can be milled using the 0.4mm flat-end mill is 16 mils, hence for the DRC check, I used 16 mils.

Run_DRC.jpg

Click Here to download Eagle Board Layout file.


After clearing all the routing errors, the generation of the Gcode file for board milling can commence. To do this, I followed the tutorial on FabAcademy Tutorial

The steps are summarised in the image below:

  • Export Image from EAGLE in PNG format. Image export is done twice, once for the trace (check top layer) and one for the outline (Milling layer)
  • exporting_PNG.jpg

    The exported images
    Exported_PNG_files.jpg
    Click Here to download board layout file in PNG format
    Click Here to download board outline file in PNG format.


  • Create the gcode files with Mods for milling. The PNG files are loaded onto MODS to generate the gcode files (*.nc). The procedures are the same as the group assignment the team did in Week 4, Electronics Production and hence these gcode files were generated without any difficulty.
  • using_mods1.jpg

    The preview of the gcode file
    using_mods2.jpg
    Click Here to download trace gcode file
    Click Here to download outline gcode file.


    Milling and Cutting is done using the StepCraft 420 Milling machine. For the traces, 4 passes each with an offset of 0.5 times the tool diameter is used to remove as much dead copper as possible as I was going for isolation-milling. A 0.1mm 10 degree V-shaped drill bit was used instead of the 0.4mm flat-end mill that was used for characteristion due to non-availability of the latter in SP Fablab at the moment.

    Successfully milled board
    (the outline is not cut as the milling process was interrupted by unforeseen circumstances and the alignments were all off. Machine schedule does not allow re-calbration and testing)>

    milled_board.jpg


    With the practice from Assignment 4, soldering this time is much more smoother, although the quality still requires much improvment.

    Completed board
    Stuffed Board.jpg

    Testing the Board

    To test if the board is successfully built, programing must first be done. The ISPtiny programmer that I made in Week 4 is used to program this board. For the software, our coach suggested Ardunio IDE as the learning curve is not as steep. For ATtiny45 to work with Ardunio IDE, additional board manager must be added.

    adding_ATtiny45_to_Ardunio.jpg

    The URL (http://drazzy.com/package_drazzy.com_index.json) points to the cores that Spence Konde wrote to enable Ardunio IDE to work with ATtiny chips. Select the required Core and click install

    After installation, the correct board manager needs to be specified.

    Install_ATtiny45Core_to_Ardunio.jpg


    Next is to select the correct chip (ATtiny45)

    load chip.jpg

    Following that, the next step is to program the chip. The test program written by our coach, Mr Steven Chew, is used. The program file is first loaded in Arduino.

    Arduino_Test_file.jpg

    This program allows the button as well as the LED to be tested. When powered, the LED will light up indefinitely when the button is pressed once. On pressing the button a second time, the LED will blink slowly, at an interval of 500 milliseconds. When the button is pressed the third time, the LED will brink rapidly at an interval of 150 milliseconds.

    Before verify,compile and load the program to the board, it is important that the correct programmer is selected.

    Set_programmer.jpg

    The program can now be uploaded into the board as per the steps shown in the image below

    load_program.jpg


    When uploading is completed, the board can be tested by pressing the button (once, twice and three times)

    It Works!logo

    Click Here to download the Arduino Sketch file that is written by my coach Steven.

            Home