Week 5: Electronics Design

Goal: Redraw an echo hello-world board, add atleast a button and an LED, check the design rules, make it, and test that it communicates.

Group Project

This week's group project was to use the test equipment in the lab to observe the operation of a microcontroller circuit board. To do this, our group used one of the oscilloscopes in the lab to measure between the 3.3V pin of the LED and GND. On the screen we were able to see alternating high and low volatages which lined up with our expectation. The program we were running consisted of turning the LED on, waiting 100ms, turning the LED off, waiting 100ms, ... over and over. We were able to look at the frequency of the alternating high and low voltages to see that they were alternating at a frequency of about 5Hz which was expected given the on-off cycle of 200ms we hardcoded. Below a photo of the oscilloscope reading out the different voltage featuring Ben's board which was used for the test.

Group Test

Designing in Eagle

This week I choose to re-design the ATSAMD11C hello.D11C.echo board using Eagle since it comes prepackaged within Fusion 360 which is the CAD tool I decided to learn in previous weeks. The process of designing started off pretty rough when I could not get the FAB library with our components loaded into the software for use in my design. However, Anthony helped a couple of us debug this issue and was able to figure out that for some reason Fusion 360 only loaded half the library the first time you uploaded it to the library manager. Thus we were able to try adding it twice with different names and it ended up adding different halfs each time so we were left with the whole library! Success! Once that was out of the way, the process consisted of:

  • Creating an Electronic Design Schematic in Eagle: To do this I created a new electronic design which opened up the schematic page. On this page I added each of the components necessary for the board (LED, microcontroller, button, etc.) and made a net of wires connecting them how they should be. After messing around with just using the net tool to connect components, I found that I liked the organization of naming the wires to connect components rather than physically connecting them. This helped me feel at least a little more organized.
  • Creating the Traces: To do this, in Fusion 360 (Eagle) atleast, I clicked the "Switch to pcb document" button which took me to another board where I was able to move around components geometrically to where I wanted them to lie on the final board. After this was done, I used the trace tool to draw out the traces to connect the components. At this step, I learned that drawing traces can be soothing when you have lots of time, but after a while of trying to route traces around eachother, I ended up just opting to use jumper 0 ohm resistors.
  • Exporting the Board: The final step in my design process was to export the board as PNGs. To do this I utilized this tutorial. This took me through making an outline of the board and displaying varying levels of detail so I was able to export one PNG that just showed the outline and one that showed the traces and footprints. Finally I was able to test these out to make sure they looked correct by opening them in GIMP.
  • Design Images

    These are the schematic and board designs I ended up with. In retrospect I probably could have spent some more time on the routing to use less jumpers, but overall it looks ok.

    Board



    Schematic

    Milling

    Milling this week was much more of a struggle than last time we were assigned to mill a board. On my first attempt, I discovered the weird bug on mac with eagle that halves the dpi (doubles the size) and unfortunately printed out a massive board. Luckily I had the time to go back into lab the next day and re-mill another board with the correct dimensions. On my second attempt, however, I ran into significant burring so before soldering I spent some time with a spackle knife making sure my traces were cleana and shiny.

    Milled

    Soldering

    After many messups in week 3 involving trips to the heat gun to remove components, I was determined this week to do better with my soldering. I figured out that in week 3 I was spending way too little time heating up the component and copper before trying to add the solder and that was causing the solder to just attach to the soldering iron and not the board and component. This week I took my time and made sure the component and copper were adequately heated and I had a much easier time getting better solder joints.

    Stuffed

    Programming and Testing

    In order to program and test my board I used the programming I made in week 3 and tried bootloading the board I made this week from my mac with EDBG. In this process I ran into two problems. First, my programming had a faulty solder joint where no current was passing through. Anthony showed me on the multimeter that communication between pin 2 on the microcontroller and the programming head was not happeneing and that I needed to go in and add more solder. It is hard to see in the photo, but the second pin starting from the right does not have much solder underneath the leg connecting to pin 2. The second problem I ran into was actually using EDBG from my mac. I was able to download it using "brew install edbg" however when trying to run the command "edbg -b -t samd11 -pv -f sam_ba_Generic_D11C14A_SAMD11C14A.bin" I received the error "Error: invalid response received". Due to time constraints I was not able to try using pyocd or openocd which I was told could serve the same function as EDBG, but in later weeks I hope to get this working on my own computer so I don't have to go into lab in order to bootload a microcontroller. Luckily, Anthony was there to save the day again and we were able to bootload the microcontroller from his computer using the same commands!

    Programmer

    Flashing the LED

    With more help from Anthony we loaded up a test programming using the Arduino IDE and were able to successfully flash the LED on and off!