JANET LIUHow to Make (almost) Anything

For the input week, I decided to make a board with a small potentiometer. I designed a new board and fabricated it (running into some small issues along the way). Then, I wanted to make a program that would make the LED brighter or dimmer based on the amount that the potentiator was turned. ## Designing and Making the PCB Board My board design was fairly similar to Week 5's, with the addition of the potentiometer and the change of the 2x2 connector to a 2x5 connector. I modelled the 2x5 connector off of [Neil's board](http://academy.cba.mit.edu/classes/embedded_programming/D11C/hello.D11C.blink.png), and just hooked up the potentiator to any of the free analog pins on my microchip. I ended up choosing A4. schematic | traces | :---------------:|:---------------: ![](../images/full/09/schema.png) | ![](../images/full/09/traces.png) However, actually constructing it gave me a lot of difficulty. Three different times, my board slipped while it was getting cut. Then, I decided to use the smaller stock with liberal amounts of tape in hopes that it wouldn't stick. This worked for the traces, but it popped off on the outline. At this point, I was a little tired of this so I just recentered the board (very unscientifically putting it on the corner) and hoped that the bit would not be too misaligned. It turned out fine, and I was able to solder on almost all of my components. Turned out though, the traces that I used for the potentiometer were definitely incorrect for the trigger potentiometers we had in the shop: <figure><img src="../images/full/09/too_small.png" width="500"/> </figure> To fix this, I just used a larger potentiometer with wired legs. I snipped off the ends of the legs + bent them so they could rest on top of the traces. With this, my board was completely soldered! final board | side view of potentiator | :---------------:|:---------------: ![](../images/full/09/full_pot.png) | ![](../images/full/09/pot_side.png) ## Bootloading the Board Bootloading my board turned out to be a huge pain, and wasn't actually successful in the end. At first, edbg was not working on my board. After some testing with a multimeter, I realized that my SAMD11 chip was not connected to power. Turns out that my 3.3 label was not on the correct wire, which is why my ratsnest didn't have the trace signified. I just soldered on a wire to the board, connecting power to the chip. <figure><img src="../images/full/09/added_power.png" width="500"/> </figure> After connecting power, edbg said that the program was loaded on successfully. However, neither my laptop nor Rob's laptop was recognizing my board. We then tried to used the shop desktop with opencd, but that also didn't work. It said that everything was sucessfully loaded on, but no computer recognized my chip. :( ## [Using my Old Board](../code/input.ino) Finally, I decided to just use my old board and solder on a potentiometer. My old board was already programmed and worked with Arduino. However, in soldering on the potentiometer, we lost a part of the connector (it got melted). But, the potentiometer still worked! It was being properly read in by the Serial Monitor on Arduino, and I was ecstatic to see that the input was being read! Unfortunately, my LED did not work with the potentiometer. I think the melting of the connectors/ripping of some of the traces probably messed up the rest of my board, and may have disconnected the LED from power. However, given that the potentiometer input was still being read in, I took that as a W for the week. <figure><img src="../images/full/09/old_board_pot.png" width="500"/> </figure> ## Back to using my new board Nathan was able to use Anthony's posted topic about [bootloading via arduino](https://gitlab.cba.mit.edu/classes/863.21/site/-/issues/54) to successfully bootload my new board! Then, I was able to look at the serial output and see the potentiometer output: <video width="500" controls> <source src="../images/full/09/pot_output.mp4" type="video/mp4"> </video>