Skip to content

Electronics Design

The assignment this week was to take one of Neil’s boards and redraw + edit it. We were tasked to add a button to his circuit and prove that it would work.

Using Eagle

I had used Eagle a little bit before this week when in my electrical engineering class but because of the setup, I wasn’t able to take a deep dive into it. The first thing that I did was make sure that had all the prerequisites installed. The first thing I needed to install was the Fab Library. I did this by taking the zip folder that is provided when clicked on and extracting it. Once I got the library extracted, I then moved it into the folder called libraries in Eagle Cad. I found the location of this by typing in “library” in the windows search bar and then clicking “show file location.” I moved the extracted library to the library folder. The next step was to launch Eagle and do all the other setups from there. When in Eagle I navigated to the top and selected the library tab. After that, I was able to click on update all of which allowed my new library to be recognized and used. I then spent some time refreshing myself with Eagle by checking out some of my past projects. As I went through, I made small edits with components and routing new buses. After I had familiarized myself with the software again, I worked on my board.

Creating my Board

Since I had never spent a significant amount of time in eagle until this week, it was quite the learning experience. The first thing that I needed to do was download and install the Fab Eagle library. I talked about the process to install but This tutorial could be helpful. I then moved on to designing the actual board. To create it I needed these parts which I have listed below. I imported each of these parts into my workplace.

Parts

Part Name on Schematic Value Library
Switch S1 x Fab_New
Capacitor C1 1uf Fab_New
LED U$3 x Fab_New
Resistor R2 4.7k Ohm Fab_New
Resistor R1 330 Ohm Fab_New
Headers U$1 6 pin FTDI Fab_New
Chip U$2 ATTINY 412 Fab_New

I then reference Neil’s board to assemble the components. I used the green bus tool to connect each component to the other. Since this was my first schematic, I didn’t organize it as well as I should have. On my first attempt, I forgot to connect the critical 4.7k ohm resistor properly. This prevented me from programming my board properly the first time using my UPDI programmer that I had made for week 4. Once I had fixed this, I moved onto creating the actual board.

My first and only schematic that I created based on Neils board

The blue circle shows the area that I messed up on the board when designing. Instead of routing the button to the ground as I should have, I routed it to a VCC. While this did not mess up the functionality of my board, it messed up the code. When coding it, I had to treat the button as an output device and had to change the values from on to off or vice versa. Full credit to Teddy Warner to find a way to get around this.

At first, I used the auto-router tool to route the traces of my board but since I didn’t like the way it turned out, I manually routed it. The main qualm that I had with the auto-router was that I knew it would struggle or create a terrible layout for a more complex board. The first thing I didn’t when manually routing it, was to move all the components into the correct place. Once I had oriented everything and rotated it to my liking, I worked on routing the traces. I started by doing the traces that I thought would be more complicated. I also wanted to make sure that there were no traces that routed under the chip. This would allow me to identify any shorts because I would know that they wouldn’t be under the chip. I then moved the other parts around to the side that I thought would allow me to route the traces in the easiest way possible. Once I had routed the traces and checked it three times, I downloaded the BRD file and prepared to cut it.

The final board file that I created after making my schematic.

Cutting my Board

This week I had one major issue when milling my board. I imported my file into Bantam tools and set everything up correctly by following my lab guide. Setting it up was really easy thanks to the interface that has been set up by other mill. The first thing to do was place the sheet of copper with Nitto tape inside the machine. After that, I identified the tool position for the first bit and the determined the material thickness by probing it. After these two essential steps were set up, I checked over everything according to my lab’s workflow. Since everything looked good, I cut it out. For the traces, I used a .005 engraving bit and then a 1/32nd bit to cut everything else out. In the first cut, I was able to mill out my traces but then when I switched to the outline the software crashed. I relaunched the software and thankfully remembered the coordination of my cut. I then re-imported my file and cut it out again. It ended up working this time and I was able to move onto soldering. I then messed up my first and second board while soldering so I had to mill a third. After I had completed my board, my teacher set up these new bits that can cut 5x faster. From what I have overheard, they cut very similarly to the .005 engraving bit. In the future, I will be able to use these to speed up the milling process.

My first board that I milled

Soldering my Board

Since I have been surface mount soldering for the last few weeks, this board took a matter of minutes to solder. For the chip, I used solder paste and the sweep method and for the other components, I decided to put some paste on one side and then solder the other afterward. I, unfortunately, messed up the chip on the first one, and then on the second one, it is believed that I had a hidden bridge. When I was working on soldering the other components, I had no issues other than flinging 3 LEDs across the room. The easiest part was the button and was a good change from the small chips. I also managed to mess up on my headers but was able to rectify it. On my third board, everything went smooth and I was able to program my board which I will talk about in the future. The blue area below shows where I messed up (Bottom) soldering compared to the final board that I made (Top).

Testing my Board

Programming my board was probably the easiest part of this week. Since it is very similar to the previous blink board that I had made, I already knew where everything needed to be. I uploaded the same blinky sketch that I had used from my previous blink board. I set the chip to the ATTINY 412 and then made sure that my programmer still has the Jtag.updi sketch on it. Unfortunately, I didn’t have the sketch on my board. Instead of spending time redownloading my sketch, I used my friend’s teddys board to test it. I reset everything to the right board, clock speed, and port before testing again. Luckily it worked first try since I had already ruled out the other two boards because I saw unfixable shorts. Since I had only been testing using the simple blink sketch, I needed to test my button. This is where I encountered my first major issue. I discovered that because of the way my button was wired, I would have to radically change my code from what I thought I needed. I consulted Drew Griggs to help me out. Drew has a lot of experience coding and so together we were able to adjust my code to work. What we discovered is that I had my button wired to the ground instead of the VCC. This caused the chip to interpret it backward. So instead of being input on my board, I had to make it an output and adjust each value from high to low and vice versa.

The Code I used

void setup() {

  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT); // I had to set my button as an output since I had done by button wrong
  digitalWrite(1, LOW);

  }

void loop() {
if(digitalRead(1)==0){
  digitalWrite(0, HIGH);   
  }
else{
  digitalWrite(0,LOW);
  }
 }

I started by referencing the original blink sketch from Arduino to test the original functionality of my board. Once I had done that, I moved onto incorporating the button. With the help of some of my friends, I was able to get the buttons working.

Creating my Final Project Board

Before I designing my final project board, I thought through each input and output device that I would need. I made this drawing that I attached below that shows everything I need. I then used the Satshakit as a reference when designing my board. I also decided to include a few extra pins on for both analog and digital in case I needed to add stuff in the future. I also spent a lot of time learning how I could use an app to control my nano leaf but for now, I am going to use capacitive touch buttons. I didn’t like the way that this board (pictured below) turned out so I have been working on a new design that allows for a more modular system. I am looking forwards to working on this final board.

UPDATE March 14th, I have finalized the parts that I am going to use for my final project. I am first going to use an hc05 Bluetooth chip with will allow me to have remote access. On the sides, I will continue to use the capacitive buttons but will also be integrating a system that allows me to clap to turn it on and off. I will also use audio jacks which will allow me to connect my panels no matter how they are oriented.

This is the final project board that I created after I completed this week's assignments. This version is a direct copy of the current Satshakit but I have plans to change it in many ways

Group Work

This week we were tasked with learning how to see the electrical signals in our board through the use of multimeters and oscilloscopes. Before this week, I had never used an oscilloscope and am still relatively unfamiliar with their purpose vs a multimeter. I do however think that it will be useful when troubleshooting my electronics in the following week.

Group Site

Downloads

Fab Eagle Library

My Blink Board


Last update: April 8, 2021