Assignment 8 objective


The eighth week assignment consists of the following:

  1. Group Assignment:
    Compare the performance and development workflows for different microcontroller families.

  2. Individual Assignments:
    Read the datasheet for the microcontroller you are programming. and Program the board you have made to do something, with as many different programming languages and programming environments as possible.

Learning outcomes:

  • Identify relevant information in a microcontroller datasheet.
  • Implement programming protocols.

    1. GROUP assignment

      For the Group assignment, We Compared the performance and development workflows for different microcontroller families. this was conducted with my fabAacademy collegues Ahmed and Katya .
      Linking to the The Group page

    1. Individual assignment

      Introduction

        The assignment of this week was to design, make and test my AchBoard. This board will be used for my final project. So I used Atmel ATxMega microcontroller.
        I chose this board because it was available in the lab and provided the needed outputs to connect LCD Diplay, Rotary encoder, ESP Wifi modul and RFID Reader.

        I made my board have an internal voltage regulator since the ATxMega runs at 3.3V. external reset button, PDI herders, FTDI headers and many pins exposed.
        below shown the controller pinout




      Microcontroller specification:
        ATxMEGA16A4 Data sheet

    Board Design

      The board was designed based on my final project needs. To design the board I used Autodesk EAGLE software. below shown the schematic




    - Board

    Achboard Eagle Design files:
    - Board Schematic
    - Board Board

    Board Milling & Soldering
      Once the design was ready I used the roland machine to mill the board and start the soldering. I prepared all the componants I needed, as shown below



      The milling process started by creating the G.code and uploading the file to the milling machine
      G.code Milling File
      below shown the result of milling.



      Milling challenges
      During milling I faced multiple challenges that I have never faced during PCB milling before. The traces in the eagle design were too narrow, so every time my milling result gets a short circuit. so after the 3rd time of trying I had to change the design and make the traces thicker to obtain a better result of milling. Second challenge faced was setting the holes in the exat position. I had to use GIMP software to create the holes with excat dimensions.

    Soldering
      Soldering process was so much fun and challenging. My soldering techniques are getting improved more and more, however I had to repeat my board multiple times, since I get short circuits alot. The 44 pin microcontroller was very challenging to solder and my colleagues in the lab helped my alot by showing me new techniques of soldering.

      I used the electronic magnifier to spot the small short circuits location as shown blow



      below shown the final result of soldering process



      To check the output I connected an external 12v power supply to the board power input pins and with the voltmeter I checked the output.



    Board Programming
      Once the board was ready I started the board programming. This process was challenging since it requires multiple programmimg steps.

      1- First step was to download the ATMEL Studio. ATMEL Studio is a free IDE (integrated development environment) software for development work on ATMEL microcontroller. You can write your firmware using C Programming or Assembly Language here, compile your source code into a *.hex code and download the *.hex code into your microcontroller through this integrated software platform.

      2- Programmer tool: A programmer tools helps to connect the computer to the microcontroller chip. It is used for uploading the *.hex code into your microcontroller. There are a number of programmer tools which allows your to upload your firmware.


      3- Device Programming: Open up the Atmel Studio IDE (Integrated Development Environment) software. Under the AtmelStudio’s menu, select the menu “Tools”->”Device Programming”. Under the “Tool” section, select the programming tools that you got for your ATMEL microcontroller. Next. Under the “Device” drop down box, select the device “ATxmega16A4” which is the microcontroller which you will be uploading the firmware to. Keep the options “ISP” under the “Interface” menu. Once this is done, click on the button “Apply”.
      - Under the Flash section, click on the button “…” to select the firmware file (*.hex) ATxmega16A4.hex from the computer and check all boxes. These settings are typical, though not very important if you forgot to select. Click on the button “Program”. You should start to see a series of messages near the bottom of the dialog box’s screen. The following is probably what you will see, Erasing device… OK Programming Flash… OK Verifying Flash… OK

      4- Once the device is flashed, the final step is to run the bootloader in the ArduinoIDE software to be able to program the device using Arduino. the Arduino bootloader can be upload using an same programmer tool with the Arduino IDE Software. Select “Arduino Mega” from the Tools > Board menu. Select “Atmel-ICE” from Tools > Programmer. Run Tools > Burn Bootloader Now the microcontroller is loaded with the Arduino bootloader firmware.

      Arduino Code Download
    Assembly and Testing
      The final step was to connect all electronics together and test the device. shown below all connected items.