added some 2019 posts
20
_posts/2019-01-31-auvs-2019-power-distribution-board.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: AUVs 2019 Power Distribution Board
|
||||||
|
date: 2019-01-31
|
||||||
|
categories: school
|
||||||
|
excerpt: A brief overview of the power distribution board I designed for our sub.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/auvs-2019-pdb-soldered.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
One of things we needed for our sub was a power distribution board. It would serve as the central hub for any and all things power. Working off of our power consumption spreadsheet, Mark and I developed specifications for the board including size and current capacity. We also specified what voltages needed to be supplied and how many components were to be connected to those power rails. With all the requirements listed, I headed straight to KiCad. This was my first time designing a power distribution board, so I learned quite a bit about copper plane placement and trace current capacity. I based the design off of a FIRST robotics board I found online.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/auvs-2019-pdb-kicad.jpg" %}
|
||||||
|
|
||||||
|
We were really grateful that Bay Area Circuits sponsored the manufacture of our board. Our main concern was current capacity and they helped out wonderfully with helping us make sure our board could handle everything. After sourcing the parts, we got started assembling the board.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/auvs-2019-pdb-soldered.jpg" %}
|
||||||
|
|
||||||
|
After the RoboSub competition in early August, we definitely had a lot of things we wanted to change, including the power distribution board. It performed admirably, but we now need to specify newer requirements. Time for next year!
|
18
_posts/2019-03-22-mppt-can-converter.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: CalSol MPPT CAN Converter
|
||||||
|
date: 2019-03-22
|
||||||
|
categories: school
|
||||||
|
excerpt: A little board I designed for CalSol.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/mppt-can-v1.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
In CalSol, this is a little board I designed to convert the higher frequency CAN signals coming off the MPPT to the lower frequency CAN signals the rest of the car uses. I think this was for Tachyon. It was really nice working with other people to develop specifications for a board that would fit into a larger whole. I had to head home for the summer so I didn’t have time to program it or do most of the soldering.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/mppt-can-v0.5.jpg" %}
|
||||||
|
|
||||||
|
After some revising I ended up with this.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/mppt-can-v1.jpg" %}
|
34
_posts/2019-04-20-adventures-in-lock-picking.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: Adventures in Lock Picking
|
||||||
|
date: 2019-04-20
|
||||||
|
categories: other
|
||||||
|
excerpt: A retelling of my adventures in lock picking during the school year. Of course, I made sure I didn't do anything illegal.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/lockpicking.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
Note: I make no guarantee that any of this actually happened in real life. Any resemblance to reality is a coincidence. I have a very vivid imagination. Additionally, pictures may be staged.
|
||||||
|
|
||||||
|
One of the skills I picked up during the school year because everyone kept locking themselves out was lock picking. It all started when I locked myself out of my room one day and couldn’t get my roommate to come soon enough. I got the pick set from my friend and immediately got started. Within 10 minutes, I was in. Not a bad first try.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/lockpicking.jpg" %}
|
||||||
|
|
||||||
|
During spring break I attempted to pick my friend’s door, with his permission of course. Unfortunately for me, I was caught by the RA and got written up. I had to meet with the residential director of Foothill for a hearing. At first I was prepared to be really rebellious and argue back with solid facts, but upon finding out that the director was acting as judge, jury, and executioner, I made sure to play nice. What the director did not need to know was that I’ve successfully lock picked like 10 times before. Funnily enough, most people get sent to the residential director for alcohol, not lock picking. After the hearing, I was emailed my conviction of tampering along with my punishment. They like to call it a “sanction” because it sounds less mean.
|
||||||
|
|
||||||
|
My “sanction” was to write a 500+ word essay about university policy on tampering, how it applied to my case, and what would happen if it didn’t exist, all without justifying my actions. Here’s what I sent in [Tampering Policy.pdf](/assets/pdf/Tampering-Policy.pdf)
|
||||||
|
|
||||||
|
I had way too much fun writing this essay. Ever since my SciOly days, I’ve loved picking rules apart. It took me two hours but it was well worth the laugh. I even made sure to employ the slippery slope fallacy at the end to really nail my point home. Surprisingly, my essay actually got accepted. I never lock picked ever again.
|
||||||
|
|
||||||
|
One line I didn’t have room to put in was about B5. Keys. It states, “Possession, duplication, misuse of University issued keys and key cards, including loaning keys to any other person, or leaving a key unattended in the lock, is prohibited.” Weird grammar aside, according to the policy, possession of university issued keys and key cards is prohibited. Thus we can’t have the keys to our own rooms. Even reading the policy differently, where possession, duplication, misuse are considered one act to solve the issue of possession individually being prohibited, issues still arise. Now I can duplicate a key without issue as long as I don’t misuse it.
|
||||||
|
|
||||||
|
Funnily enough, keys stamped with “Do Not Duplicate,” are not legally binding and are a very poor security measure. According to [this](https://blog.key.me/do-not-duplicate-keys/), these keys tend to be the least secure, which explains my ease with picking dorm locks. So much for excellent dorm security.
|
||||||
|
|
||||||
|
Later in the year I found out that Blackwell, our newest dorm, used RFID keycards for their doors. This was particularly intriguing. I found out that they used MIFARE Classic cards, whose security has been broken for over a decade. Trying to crack one using MFOC, it turned out that the card was actually a MIFARE Plus, which solved the security vulnerability of the past. After hours of research and emailing a dude on the internet for files, I was able to perform the newer hardnested attack on the card. 15 hours later, I was in. I copied the info over to a MIFARE Classic card.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/lockpicking-rfid.jpg" %}
|
||||||
|
|
||||||
|
The copy only ended up working on the ground floor stairs and elevator, but that was still pretty cool. The rooms and lounges I believe use a reader that rejects MIFARE Classic, which is awesome. If the university wants to further improve security, they should upgrade the ground floor readers. However, I do believe the better readers can be circumvented if I got access to blank MIFARE Plus cards.
|
||||||
|
|
||||||
|
Of course, I should reiterate what I said above about making no guarantee that any of this actually happened. I just love security and I have a very vivid imagination. Perfect combination to tell a story.
|
20
_posts/2019-05-07-micromouse-decal.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: Micromouse DeCal
|
||||||
|
date: 2019-05-07
|
||||||
|
categories: school
|
||||||
|
excerpt: A class on the Micromouse competition. Map out a maze, solve it, then speed through it.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/micromouse-sp19.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
I had quite a bit of fun in this decal. Our goal was to make a robot that would go through a maze and map it out. Then it would go through again as fast as possible. Fastest robot wins.
|
||||||
|
|
||||||
|
Working in groups of three, we put together a predesigned robot and proceeded through several labs from motor control to wall following. It was pretty cool working on the control systems for the motors. We used these really awesome time of flight sensors to do wall detection. Honestly, with my experience in Arduino most of the code was pretty trivial, but I still did learn a thing or two. Unfortunately, there wasn’t enough time to implement the maze solving, but we did get to wall following and turn detection.
|
||||||
|
|
||||||
|
{% include video id="4tAVbP4a6mA" provider="youtube" %}
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/micromouse-sp19.jpg" %}
|
||||||
|
|
||||||
|
There are quite a few things I would change with the robot’s design, but overall it proved a great learning platform.
|
22
_posts/2019-05-12-auvs-2019-main-electronics-assembly.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
title: AUVs 2019 Main Electronics Assembly
|
||||||
|
date: 2019-05-12
|
||||||
|
categories: school
|
||||||
|
excerpt: A brief overview of the work I did on the main electronics assembly in our sub for the RoboSub 2019 competition.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/auv-2019-tube-assembly.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
For the electronics that would fit into the main tube, I worked with Mark to take specifications from other subteams to create a list of parts needed as well as other considerations to be taken into account. Our basic plan for the mechanical side was to use a tiered shelf system to place parts. We also planned out the wiring diagram for the penetrators at the ends of the tubes. Afterwards, I threw everything into Fusion 360 to organize everything as best as I could to balance ease of manufacture, repairability, thermals, and extra space for future improvements.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/auv-2019-electronics-cad.jpg" %}
|
||||||
|
|
||||||
|
After designing it, I trekked over to the Invention Lab to print out some of the parts. Originally I wanted to 3D print everything, but we ended up cutting sheets of ABS to make the shelves.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/auv-2019-tube-assembly.jpg" %}
|
||||||
|
|
||||||
|
At competition, the sub performed admirably considering it was our first year there. Based off of observations of all the other teams there, we definitely have a laundry list of things we want to change for next year. To improvement!
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/auv-2019-water.jpg" %}
|
26
_posts/2019-05-18-ee16b.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: EE16B
|
||||||
|
date: 2019-05-18
|
||||||
|
categories: school
|
||||||
|
excerpt: A brief overview of the voice controlled robot that took up most of the semester's lab time.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/ee16b.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
I had a lot of fun during EE16B, especially the labs. One of the refreshing parts of the labs was that everything was done on breadboards. I usually go straight to perfboards or PCBs whenever a messy prototype works, so this was an intriguing change. We did a bunch of smaller labs in the beginning, but the main part of the semester was building a voice controlled robot. It combined basically every part of what we learned during the semester into one neat package. I’ll just give a brief overview of the different parts of the robot.
|
||||||
|
|
||||||
|
We started off with system identification of the motors. First we collected a bunch of data on the velocity of the wheels based on different PWM signals. We then selected a small range that was roughly linear so that we could perform least squares and develop a linear model. From this linear model we were able to select an operating point, a velocity that both wheels could reasonably achieve. This would offer us the best chance at keeping the car straight and correcting for errors.
|
||||||
|
|
||||||
|
After system identification, we implemented open loop control (i.e. not using encoders) to move the car. As expected, error accumulated over time and the car did not go straight at all. One thing to note is that motors tend to need a “jolt” to start up because of friction. Jolt application tends to be uneven, but we would account for this by considering it as part of the error in our closed loop testing.
|
||||||
|
|
||||||
|
Since open loop didn’t work so well, we implemented closed loop control, taking into account the encoders to measure error. It was really interesting solving equations to determine parameters for k values and tuning the loop.
|
||||||
|
|
||||||
|
{% include video id="cqi623zFri8" provider="youtube" %}
|
||||||
|
|
||||||
|
The next part would be implementing voice control. We chose 4 different words that we thought would have very different waveforms: EECS, Berkeley, Stanford (pronounced “Stanfuuurd”), and lockpicking. After recording about 30 samples of each word, we threw it into the iPython notebook to run PCA (Principal Component Analysis) to pick out the two main components that would help us distinguish words. After that we used centroid finding (which we actually learned in CS61A!) to complete our classifier. The likeliest word said in a recording is that which is closest to the corresponding centroid.
|
||||||
|
|
||||||
|
{% include video id="JbHR8M3882I" provider="youtube" %}
|
||||||
|
|
||||||
|
Finally, we integrated all the systems together. Our robot actually worked pretty well like half the time. Surprisingly, I don’t actually have any videos of the whole system integrated together.
|
48
_posts/2019-05-19-cs61b.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: CS61B - Data Structures
|
||||||
|
date: 2019-05-19
|
||||||
|
categories: school
|
||||||
|
excerpt: An excellent class all about data structures.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/cs61b-proj3.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-23-19</sub>
|
||||||
|
|
||||||
|
A class all about data structures. I learned so many things in this class that I didn’t know before. We covered so many different data structures, their applications, and run times among other things. All of our homeworks, labs, and projects served to apply what we learned and they really were particularly fun challenges to solve. I can’t really post any code, but I’ll just write a little about the more interesting homeworks and projects we did. Mostly the stuff with graphics because then I can post pictures.
|
||||||
|
|
||||||
|
## Project 0: NBody
|
||||||
|
|
||||||
|
Simulating bodies in space to provide a crash course Java. Pretty much just followed the instructions, but it was still pretty cool.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/cs61b-proj0.jpg" %}
|
||||||
|
|
||||||
|
## HW2: Percolation
|
||||||
|
|
||||||
|
This was a particularly fun and challenging homework to get all the points for. The premise of the homework is to find when a system percolates, which you can imagine as water flowing from the top to bottom through openings. It was a pretty cool application of Disjoint Sets. The gist of the solution is to connect the top and bottom rows to virtual points and whenever these virtual points are connected the system percolates. One issue that I ran into was preventing backflow, which is when the liquid flows through the virtual bottom point and back up. My solution was to use another Disjoint Set to keep track of backflow, which was actually a pretty popular solution. It used more memory, but worked perfectly.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/cs61b-hw2.jpg" %}
|
||||||
|
|
||||||
|
## HW3: Hashing
|
||||||
|
|
||||||
|
One of the more conceptually interesting data structures, well they’re all interesting actually, are those that involves hash codes. It’s pretty crazy to have a data structure that has an O(1) average search and insert and delete. We also learned more about hash functions and how there must be an overlap so hash functions should be chosen to have an even spread.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/cs61b-hw3.jpg" %}
|
||||||
|
|
||||||
|
## HW4: AStarSolver
|
||||||
|
|
||||||
|
Using MinPQs to help implement the A\* algorithm, we were able to solve a bunch of cool puzzles that from a certain point of view could be viewed as trying to get from one place to another with the minimum cost. We also made it memory efficient by only ever adding neighbors as they came along. We were using A\*, but a lot of times we had a constant heuristic function so it reduced to good old Dijkstra’s algorithm. There’s no fancy graphics this one, but solving puzzles was pretty dang cool.
|
||||||
|
|
||||||
|
## Proj2C: Bear Maps
|
||||||
|
|
||||||
|
Combining a lot of what we learned before from MinPQs to A\* to Tries, we implemented a basic maps system. The biggest challenge of this part of the project was to pick all the images to display based on the zoom level. It was a bit tricky working out all the bugs, but I got it eventually.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/cs61b-proj2c.jpg" %}
|
||||||
|
|
||||||
|
## Proj3: BYOW
|
||||||
|
|
||||||
|
Last but not least and perhaps the most fun project of the semester, we got to make our own game, complete with randomized world generation, a save system, and enemies that chase you around. We were given a lot of flexibility with this project, including many different challenges we could complete for various amounts of points. Since this was quite a big project, my partner and I spent a lot of time thinking about the implementation. Some of the included methods pointed us into the right direction of well organized code that was easily modifiable to do a lot of the ambition points.
|
||||||
|
|
||||||
|
The world generation was probably the most complicated part of the project. We started by making rooms of various sizes and then connecting them with hallways. We were inspired by a friend of our’s idea to do something like raytracing to do hallway generation. Taking this idea and adding a couple of our own randomizations, we ended up with a nice world generator.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/cs61b-proj3.jpg" %}
|
196
_posts/2019-06-05-pcb-laminator.md
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
---
|
||||||
|
title: PCB Laminator
|
||||||
|
date: 2019-06-05
|
||||||
|
categories: projects
|
||||||
|
excerpt: After trying basically every other method in the book, I finally made a tool that allowed me to make PCBs at home easily, reliably, and precisely.
|
||||||
|
header:
|
||||||
|
teaser: /assets/img/2019/pcb-lam-v1.5.jpg
|
||||||
|
|
||||||
|
gallery:
|
||||||
|
- image_path: /assets/img/2019/pcb-hybrid-mill.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-hybrid-cutout.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-hybrid-etched.jpg
|
||||||
|
|
||||||
|
gallery2:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-amazon.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-amazon-teardown.jpg
|
||||||
|
|
||||||
|
gallery3:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-electronics.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-oled.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-thermistor.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-overall.jpg
|
||||||
|
|
||||||
|
gallery4:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-test-1.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1-test-2.jpg
|
||||||
|
|
||||||
|
gallery5:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-cad-template.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-motorcad.jpg
|
||||||
|
|
||||||
|
gallery6:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-kicad-schem.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-kicad-model.jpg
|
||||||
|
|
||||||
|
gallery7:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-transfer.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-etch.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-after-etch.jpg
|
||||||
|
|
||||||
|
gallery8:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-pcb-assembled.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-assembled-bottom.jpg
|
||||||
|
|
||||||
|
gallery9:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-cad.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-half-assembled.jpg
|
||||||
|
|
||||||
|
gallery10:
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-simulink.jpg
|
||||||
|
- image_path: /assets/img/2019/pcb-lam-v1.5-simulink-final.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>Written 8-22-19</sub>
|
||||||
|
|
||||||
|
One of the things that I have never been able to get working reliably has always been homemade PCBs. Over the years I’ve tried basically every method in the book. For projects that need multiple copies of a board or are quite complicated and compact, sending it off to a manufacturer is both time and cost effective. However, generally speaking a single sided board with 7 mil trace and space is good enough for most prototyping needs. The fast turnaround time for a DIY PCB is also unbeatable. With my furthered exploration into all things surface mount, it became even more imperative to come up with a reliable method of PCB manufacture at home.
|
||||||
|
|
||||||
|
## Other Methods of PCB Making I’ve Tried
|
||||||
|
|
||||||
|
### Toner Transfer Method (Clothing Iron)
|
||||||
|
|
||||||
|
I started trying to make PCBs back in sophomore year of high school. Initially, I tried the ever so popular method of using a clothing iron to transfer toner to a copper clad board. I had far more failures than I had successes. It’s really difficult to get the perfect combination of temperature and even pressure. The issue was really the human component. Still, it was enough to get by until I had something better.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-tonertransfer.jpg" %}
|
||||||
|
|
||||||
|
### CNC Milling
|
||||||
|
|
||||||
|
Coming into senior year I was working more with SMD components so I definitely needed a reliable way of making PCBs. Using the CNC router I recently built, I tried milling my own boards. It was actually pretty reliable for a time, but I kept on breaking end mills and every time I messed up a board it’d waste a lot of material. Even more, while FR2 boards were reliably millable, the traces don’t adhere very well and the board’s heat resistance is poor. FR4 is a much better choice for my purposes, but it’s much harder to reliably mill.
|
||||||
|
|
||||||
|
{% include video id="SZC9APz4AzE" provider="youtube" %}
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-cncmill.jpg" %}
|
||||||
|
|
||||||
|
### Hybrid Mill and Etch
|
||||||
|
|
||||||
|
I ended up developing my own hybrid mill and etch method to reliably make FR4 PCBs. It also allowed me to go from a 12 mil trace and space to 8 mil. The method involved covering the board in Sharpie and then milling away the Sharpie and some copper if I could. Afterwards I’d throw the board into the etchant to get rid of the rest of the copper. This method was really nice because I didn’t have to drill any holes myself or cut the board to size. It also solved the issue of breaking end mills because I would never go too deep. And if I was too shallow, the etchant would just remove the rest of the copper.
|
||||||
|
|
||||||
|
{% include gallery %}
|
||||||
|
|
||||||
|
Overall, it was tedious, but very reliable.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
I also tried the no heat transfer method which involves pouring a mixture of acetone and isopropyl alcohol on top of the toner to dissolve it and transfer it to the copper. Safe to say it did not work. One method that I heard about that supposedly works really well is using a photoresist, but I didn’t want to try it because it could get expensive.
|
||||||
|
|
||||||
|
After all my attempts, I was still in search of a better method. I refined my requirements quite a bit. Most of all it had to be reliable and precise enough to make 8 mil trace and space FR4 PCBs. It also had to remove the human component in any areas that needed consistency. Another thing is cost and turnaround time. Getting the raw materials had to be widely available (e.g. Amazon) and cheap. The last thing that would be really nice is to be portable. Lugging a giant CNC router around is not portable.
|
||||||
|
|
||||||
|
## PCB Laminator v1
|
||||||
|
|
||||||
|
A couple weeks into winter break, I decided to give PCB making another go. I really liked the concept of the toner transfer method because of how simple it was. I just needed a machine to do the actual transferring. Doing more online research, I found out about people using off the shelf laminators to make PCBs. Having both high consistent pressure and even temperature application, it was the perfect method.
|
||||||
|
|
||||||
|
There’s pretty much no good how-to on making a PCB laminator, but the concept is pretty simple and widely applicable. The gist is to take a laminator and modify it to control its temperature and feed rate. Technically, people have gotten the method working without any modifications, but I liked having the fine adjustments. First, I had to choose a laminator and since I wanted one that was cheap and easy to find, I went with the [AmazonBasics laminator](https://www.amazon.com/AmazonBasics-PL9-US-Thermal-Laminator/dp/B00BUI5QWS/).
|
||||||
|
|
||||||
|
{% include gallery id="gallery2" %}
|
||||||
|
|
||||||
|
Taking it apart, I noted the relatively simple construction. Since I would be working with small boards, I’d have to either heavily modify the case or completely ditch it altogether to have closer access to the rollers. The heater would be pretty simple to turn on and off and the thermistor would be placed where the temperature controlled switches originally were. The one part that proved a challenge was getting fine control of the rollers using the existing AC motor.
|
||||||
|
|
||||||
|
I immediately got to stripping the electronics to just the heater and motor. I tried to learn how to reverse and slow down the motor but got nowhere. As a workaround, I ended up just turning the motor on and off at set intervals to get the speed I wanted. With the control systems worked out, I immediately got to soldering the electronics together. Since I couldn’t yet make PCBs easily, I used all THT components.
|
||||||
|
|
||||||
|
{% include gallery id="gallery3" %}
|
||||||
|
|
||||||
|
For controlling the AC components, I used [BTA16-600B](http://pdf.datasheetcatalog.com/datasheet/stmicroelectronics/7471.pdf) TRIACs with [MOC3021](http://www.farnell.com/datasheets/97984.pdf) optoisolators. There’s also a zero crossing detector so that I could turn things on at a zero crossing, reducing strain on the TRIACs. I used a little snubber circuit on the motor TRIAC to correct for the inductive load. To power the microcontroller, I used an off the shelf USB charger. Some potentiometers and an OLED display would serve as the user interface. The main safety concern was the loose wiring and exposed AC power lines, but considering this was just a prototype, it was fine for the time being. Also, I was pushing the JST-PH connectors to slightly above their limits. Funnily enough, I didn’t have any heat resistant tape at the time, so I jerry-rigged the thermistor mount.
|
||||||
|
|
||||||
|
{% include gallery id="gallery4" %}
|
||||||
|
|
||||||
|
Overall, this prototype did not work very well if at all. The main issue was motor control. It didn’t respond well to being turned on and off all the time and would often get stuck. Also, it appeared that having a constant rolling pressure worked better, but since I couldn’t reverse the motor I had to stand there constantly watching the machine. Even more, the user interface I designed ended up being really clunky. Well, it was nearing the end of winter break so I had to set the project aside for the summer.
|
||||||
|
|
||||||
|
## PCB Laminator v1.5
|
||||||
|
|
||||||
|
Coming back in the summer I immediately got to work on revising my prototype. I started with attempting another transfer using the v1 hardware and I actually got a pretty decent result.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1-test-3.jpg" %}
|
||||||
|
|
||||||
|
Seeing that the method was viable, I continued on with the project.
|
||||||
|
|
||||||
|
### Motor Control
|
||||||
|
|
||||||
|
First, I had to solve the issue of motor control. I knew I had to ditch the AC motor that came with the laminator. I needed something that was easy to control, reversible, and in my parts bin. Initially, I considered using stepper motors, but none of the controllers I had used 5v and I didn’t have a small 12v brick so that wasn’t an option. The next choice was a servo or Vex motor. I had a bunch of Vex motors lying around and didn’t want to mess around with servo horns so I ended up picking the Vex motor. What’s really nice is that Vex motor controller 29 provides a cheap and easy way to control any DC brushed motor. I just had to make a slight modification to bypass the 4.5v linear regulator.
|
||||||
|
|
||||||
|
#### Mount and Gearing
|
||||||
|
|
||||||
|
The first thing to do was mount the motor. In order to prevent the heat from the rollers from melting any of my 3D printed parts, I made sure that anything that interfaced with the rollers was heat resistant. The main point of concern was the gear that meshed with the gears that drove the rollers. Luckily, one of the included gears had an 8mm ID, which meant I could connect it to a ubiquitous 8mm steel shaft. I cut a keyway into both the gear and shaft to fit a metal key and maintain a tight fit.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5-gear.jpg" %}
|
||||||
|
|
||||||
|
With that done I had to bring everything into Fusion 360 to design a mount. A lot of the spacing and dimensions were hard to measure well so I took a picture with my caliper for a reference dimension and imported it. Cross referencing it with actual measurements, I was able to create an accurate model of the laminator.
|
||||||
|
|
||||||
|
{% include gallery id="gallery5" %}
|
||||||
|
|
||||||
|
I made an early decision to use a rail system to mount everything because I had some 1/4″ shafts lying around.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5-structure.jpg" %}
|
||||||
|
|
||||||
|
Surprisingly, even though I used PLA for all my parts, they were all far enough away from any heat source that I didn’t have to use a more heat resistant filament.
|
||||||
|
|
||||||
|
#### Magnetic Encoder
|
||||||
|
|
||||||
|
In order to complete a closed loop system, I needed some way of getting feedback for the motor position. I had a bunch of magnets and a two Hall effect sensors left, so I decided to try my hand at making a magnetic quadrature encoder. The concept is pretty simple. Just have two sensors whose square wave outputs (or sine wave if you want to do some fancy interpolation) are offset by 90°. To do this I fit a ring of magnets around the bigger gear with alternating polarities to ensure a clean, perfectly spaced square wave at the output. To create the 90° offset, I made spaces to glue two Hall effect sensors in such a way so that when one sensor was completely in the middle of a magnet, the other was in between two others.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5-magnetic-assemble.jpg" %}
|
||||||
|
|
||||||
|
Although the resolution of the encoder would end up pretty low, it was very reliable, easy to assemble, and precise enough for the task at hand.
|
||||||
|
|
||||||
|
#### Closed Loop Control
|
||||||
|
|
||||||
|
In order to instruct the motor to go to a certain position as quickly as possible, I decided to take a page out of what I learned in MicroMouse and implement a PI loop. Considering the pretty ideal operating conditions where stopping the motor would completely stop the rollers, I didn’t implement the integral completely accurately and just reset the integral when the error became 0. For tiny errors though, the integral component proved useful. Since the system was not very complex, I ended up tuning the PI loop by hand.
|
||||||
|
|
||||||
|
### Making the Electronics
|
||||||
|
|
||||||
|
With motor control done and knowledge of heater control from v1, I threw all the electronics into KiCad. I picked the Atmega328P-AU as the microcontroller because it had all the features I needed while being easy to program. Funnily enough, I actually ended up using almost all of its pins.
|
||||||
|
|
||||||
|
{% include gallery id="gallery6" %}
|
||||||
|
|
||||||
|
Most of the electronics are pretty much the same as v1, but in a nicer package.
|
||||||
|
|
||||||
|
#### Making the PCB
|
||||||
|
|
||||||
|
Using the v1 hardware to control the temperature and a separate Arduino for the motor, I was able to get a functioning prototype of the final laminator. It was also the perfect opportunity to test the whole process.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5-proto.jpg" %}
|
||||||
|
|
||||||
|
To my pleasant surprise, the transfer worked perfectly on the first go.
|
||||||
|
|
||||||
|
{% include gallery id="gallery7" %}
|
||||||
|
|
||||||
|
The rest of the assembly process for the electronics was relatively straightforward.
|
||||||
|
|
||||||
|
{% include gallery id="gallery8" %}
|
||||||
|
|
||||||
|
### Finishing Up the Hardware
|
||||||
|
|
||||||
|
With the electronics done and the motor control ready, it was time to put everything together into one compact package.
|
||||||
|
|
||||||
|
{% include gallery id="gallery9" %}
|
||||||
|
|
||||||
|
The main safety issue is still some exposed high voltage lines, but for the most part they’re tucked away. For maximum safety, in the future I can make a shroud for the electronics and ground any exposed metal.
|
||||||
|
|
||||||
|
### Completing the Code
|
||||||
|
|
||||||
|
To finish everything up, all I needed to do was combine my motor control code with my temperature control code and add a user interface. The first little thing I had to solve was voltage drops caused by the high current draw of the motor and insufficient power supply. Current spikes occurred whenever the motor experienced a sudden change in velocity. I ended up solving it by limiting the rate of change of the motor velocity.
|
||||||
|
|
||||||
|
The rest of the code was pretty straightforward. Part of it was getting pin change interrupts to work. Most of it was little user interface tweaks to make everything easy to use. My code can be found [here](https://gist.github.com/dragonlock2/61dbff048998acb8fdb6069bdab6dd0f).
|
||||||
|
|
||||||
|
#### Tuning the PID Loop
|
||||||
|
|
||||||
|
The last thing to do was tune the PID loop for the heater. One thing I heard about and always wanted to try was using a computer to build a model of a system and then solving for the PID constants. I found out that I could use MATLAB and Simulink to do just this.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5-systemid.jpg" %}
|
||||||
|
|
||||||
|
The gist of system identification is to collect a bunch of input and output data and throw it into PID Tuner to identify the system and then specify some parameters for the PID loop to get a desired response time and overshoot. After that, throw the constants into Simulink to see how the model behaves. One thing to keep in mind is that there is a maximum value for the input. You can’t turn the heater higher than a 100%.
|
||||||
|
|
||||||
|
{% include gallery id="gallery10" %}
|
||||||
|
|
||||||
|
I’m not completely sure why, but the values the PID loop puts out in real life tend to swing between the minimum and maximum. Still, the temperature graph matched the model pretty well, so it all works out. Low overshoot and fast response time, exactly what I wanted.
|
||||||
|
|
||||||
|
{% include figure image_path="/assets/img/2019/pcb-lam-v1.5.jpg" %}
|
@ -7,4 +7,4 @@ header:
|
|||||||
teaser: /assets/img/2023/jekyll-logo.png
|
teaser: /assets/img/2023/jekyll-logo.png
|
||||||
---
|
---
|
||||||
|
|
||||||
Nothing much to see here. The process was pretty smooth, only had to do a little custom HTML and CSS to get things more right.
|
Nothing much to see here. The process was pretty smooth, only had to do a little custom HTML and CSS to get things more right. I used an exporter to get my Wordpress posts into a close enough format for Jekyll, then manually cleaned up each file.
|
||||||
|
BIN
assets/img/2019/auv-2019-electronics-cad.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
assets/img/2019/auv-2019-tube-assembly.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
assets/img/2019/auv-2019-water.jpg
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
assets/img/2019/auvs-2019-pdb-kicad.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
assets/img/2019/auvs-2019-pdb-soldered.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
assets/img/2019/cs61b-hw2.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
assets/img/2019/cs61b-hw3.jpg
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
assets/img/2019/cs61b-proj0.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
assets/img/2019/cs61b-proj2c.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
assets/img/2019/cs61b-proj3.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
assets/img/2019/ee16b.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
assets/img/2019/lockpicking-rfid.jpg
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
assets/img/2019/lockpicking.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
assets/img/2019/micromouse-sp19.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
assets/img/2019/mppt-can-v0.5.jpg
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
assets/img/2019/mppt-can-v1.jpg
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
assets/img/2019/pcb-cncmill.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
assets/img/2019/pcb-hybrid-cutout.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
assets/img/2019/pcb-hybrid-etched.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
assets/img/2019/pcb-hybrid-mill.jpg
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
assets/img/2019/pcb-lam-amazon-teardown.jpg
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
assets/img/2019/pcb-lam-amazon.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
assets/img/2019/pcb-lam-v1-electronics.jpg
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
assets/img/2019/pcb-lam-v1-oled.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
assets/img/2019/pcb-lam-v1-overall.jpg
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
assets/img/2019/pcb-lam-v1-test-1.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
assets/img/2019/pcb-lam-v1-test-2.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
assets/img/2019/pcb-lam-v1-test-3.jpg
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
assets/img/2019/pcb-lam-v1-thermistor.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-after-etch.jpg
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-assembled-bottom.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-cad-template.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-cad.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-etch.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-gear.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-half-assembled.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-kicad-model.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-kicad-schem.jpg
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-magnetic-assemble.jpg
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-motorcad.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-pcb-assembled.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-proto.jpg
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-simulink-final.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-simulink.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-structure.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-systemid.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
assets/img/2019/pcb-lam-v1.5-transfer.jpg
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
assets/img/2019/pcb-lam-v1.5.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
assets/img/2019/pcb-tonertransfer.jpg
Normal file
After Width: | Height: | Size: 72 KiB |