Week the Last: A Reflection

When I accepted the DTSF project, I expected a fun and enlightening project, probably challenging, but nothing to crazy. I was wrong, VERY wrong. This project has been an interesting one, to say the least. I had two ideas that I had considered and I went with the one that I thought would take eight weeks instead of four, turns out the one I chose would have fit better into ten weeks, the other one probably would have taken the whole eight. Looking over all my blog posts it suddenly hits me how little time I actually had for this project, seven weeks not counting time lost to workshops, presentations, and other interruptions. It’s frankly insane simultaneously long/short these eight weeks have felt and I know I’m not alone in these feelings.

This summer has all around been crazy to be honest. Not just the project, but everything I did outside of it while on campus to what I did/will do between DTSF and the semesters. I’ve learned at least a comparable amount to what I would learned in an class during a semester. I’ve learned a lot about how 3d printing works, how to program an Arduino, about prototyping, and about finicky electronics can be.

When I first tarted the project, I wasn’t really sure about anything. I had what I was going to do but only a vague idea of how. I spent a lot of the first few days just figuring out what to do. I kind of wish we had had meetings of some kind between DTSF and the end of the last semester, BUT that would have cut into the little break time we had between both. That said I figured out enough that I was ordering the base components by the middle of the week and we had enough of the parts I would use around, that I could quickly start on Arduino Programming. It was great, I enjoyed programming the Arduino and made a lot of progress. The next few weeks were something like this, planning somethings out and making progress on other parts, mostly what could be 3d printed or had around us.

Then, around week five, I started to reach some of the big humps. I’d had some bumps in the road already with the project but they soon started getting bigger and bigger, some because of how far along I was, others just out of pure coincidence. Week six’s switch failure was enough to just leave a bad taste in my mouth for a day or two. I think it sums up the challenges in working with hardware. Debugging is slower and parts you can discount in programming can break everything by just existing, not to mention the lack of compilers telling me exactly what I did wrong.

So, things I could have done better and what I’ve learnt. I’d say chief among them would have been to not delay things as much as I could have, mostly on the hardware side of things. I’ve learned that it’s fine to through somethings whether some junk part or starting over on something. I’ve learned some of the things you can do to MacGuyver together a solution to some issue you have with a project. I am now convinced that tutorials are the greatest thing we as a species have created, as in I know prefer reading a tutorial then diving head first instead of just going in head first. For example, following a tutorial and then doing the same thing again but with a small new complication, really helped me get comfortable with Arduino programming. And most of all, if you have a problem feel free to try multiple solutions, maybe at the same time if you can keep them from mixing up with themselves.

Close to end, I started to come up with a lot of alternatives of where I could have taken the project. I realized that a Virtual Reality implementation would have been quite something and fairly doable compared to the physical idea I’d gone with. Just the sheer flexibility that would have given me would have been worth it. I could have changed the scale of everything on a dime, had the cubes be anything I could image, could’ve had millions of colors for the cubes. Just some thoughts for future work.

The only part of the project that was not enjoyable was the last week. I was rushing to get as much done as I could, mostly because it took me forever to realize that the goal for this summer was not necessarily to finish, due to how little time we had. I’m proud of what I managed to create this summer, the individual pieces all work quite well, even if they don’t necessarily work well together yet.

We’ll all keep working on these projects to some extent, though probably not until the semester ends for obvious reasons. I’m just need to figure what to work on next, but I’ve got time. Anyway, thank you for reading and see you later.

Week 7: The last mile

Hello and welcome to the last actual week of my project DTSF. This week was the most intense because between the presentation and just the fact that working on these projects over the semester is going to be impossible.

I learned this week that electromagnets can get hot enough to melt plastic, specifically hot enough to melt PLA, the plastic I’ve been printing all my parts out of. This has only happened now because the magnet has only been on for short bursts until this week with all the testing I’ve been doing. I reprinted the piece holding the magnet with a different plastic, PETG, which should be comfortable with the magnet’s temperatures. After that, it turned out that thanks to how they behave at different temperatures my PLA parts did not move with my PETG parts. After reprinting some more of the PLA parts and some sanding down and lubrication of a sliding part, everything was working again.

The plastic melted by the magnet

I spent most of the week calibrating the movement of the assembly. We took apart the base several times this week, in an attempt to add some balance to it. This whole part has been quite annoying because I keep running into lots of little bugs. A lot of the time, the code is just not behaving the same way from test to test. The magnet was also quite selfish, only working part of the time, mostly because of a grounding issue. The magnet also melted the PLA, but that was fixed by printing a part in PETG.

This part of the project has been exhausting. I barely have anytime left and I’m scrambling to get a lot less than I what had planned done. Everyday something breaks. Seriously, I am not exaggerating, something always breaks on a daily basis. Sometimes it’s just that the Arduino or my PC need to be restarted. Other times, I or someone else notice something that is breaking down or will soon enough and I have to take an hour or two to fix it. Other times, it’s something really bizarre that takes the whole day to sort out. A good example is when my relay for the electromagnet stopped working, it would give power to the magnet but the magnet stopped taking it. Or kept taking it as sometimes the magnet would just keep sticking long after having power directly cut off. After testing out different relays, breadboards, checking everything worked with a multimeter, we found that the magnet worked when touching something conductive. It turned out the wire completing the circuit had died.

I don’t have any major regrets about the project and I feel like I’ve done a lot and learned a lot, but it’s just tiring at this point. See you in the reflection post.

Week 6: A surprise failure

I’m not really sure were to start with this week. The clock is starting to quickly tick down, we’re down to about nine days left as I write this. This week has not been the most productive, but at the same I feel like all I need is one last big push and I’ll be done, hopefully. As the project goes on, the deadline feels more suffocating. Our projects would have gone from awesome to mind-blowing if we had a few more weeks.

Anyway, practice presentations also took up a good part of the week. Between practicing for them and making slides for them, I’d gather we all lost at least half a day if not more. They all went pretty well and we all got some great constructive criticism.

In some fun news, I got to use saws! I say saws because I needed to add some height to my frame, so with some guidance from Josh, I cut two pieces wood, with an electric and hand saw, glued and screwed them together, and zip tied them to the base. Apparently, I got unreasonably excited, judging by how everyone was talking about my excitement well into the afternoon. Anyway, the base adds height and gives my frame some strong support.

The last two days of the week were spent taking apart and putting my project back together, for multiple reasons. First, when I got in on Thursday, the switches I was essentially using as brakes for my rail system broke. I went through several troubleshooting steps. I checked that all the wires were hooked up. I checked that the switches were still working. I saw that they were interfering with each other after Eric had me write a simple program to just print what the signal that the arduino got. I checked that the arduino wasn’t dead or that its ports weren’t dead. After a day of troubleshooting, Eric, one of my supervisors for those who don’t remember did some research and found out that I had messed up the switch wiring. Apparently, you’re supposed to have switch go to the arduino ports and ground, which in electronic is basically a sink back to where the electricity came from to complete a circuit. Honestly, this was the most frustrating thing about this project, the thing that is too simple to fail, failed. It is all working again, at least.

I’ve found that my servo motor was misbehaving as well after some confusion, I realized it was yet again a power supply issue. We tried calibrating the servo several times, as it just kinda moved on its own and had theries that it was some memory issue. I’m not sure what it is right now but I suspect that either servo is shoddily made or the power supply is not up to the task, after some online research. I was actually to work around the issue for a bit and tried giving it it’s own power mostly because I was told it would be best give anything arduino related its own power source.

In better news, I added some code to make the steppers move together simultaneously with a separate program. Previously, I had to move one then the other in separate code, this was not an issue as I did not need them to stop all other codes until recently. The other program lets me stop all other code with no issue and works with the original, allowing me to move control both individually when needed and to have them halt other codes when necessary.

As the final presentation looms over us, I’m trying my best to get everything working in time and I know everyone else is doing the same. See you next week.

Week 5: Iteration, programming, and slow advancement

The theme of this week, in my case, seems to have been iteration. Over the course of the week, I kept adding and refining details of the assembly. I’ve been slowly improving an testing my code. I’ve added new pieces to the system and clarified some details that I hadn’t been able to properly plan without getting at least this far into the project.

I had some arduino shenanigans again, this time from two facts I was not aware of. The first fact is arduinos cannot receive a program (Arduinos need to get programs from other machines to operate) when something is connected to ports 0 and 1, which I wish I had known before I connected something to them and then spent a day tearing my hair out until I read that little fact that my supervisors, who use arduinos pretty often had not known about in the slightest. The second fact I learned is that if you connect a positive wire back into a positive circuit, it can fry an Arduino. Thankfully, we had a spare it gave me a pretty good scare.

I’m not sure if I found this week or at the end of last week, but we also discovered that there are at least two types of servo’s: standard and continuous rotation. Standard can only move around 180 degrees, while continuous rotation keeps going as long it has power. These two types are basically identical, arduinos even use the same commands for both. I was using a standard in my magnet raising system to grab the cubes, but then saw I needed a continuous rotation to get the most movement out of it.

One is standard and the other is continuous rotation. You can only tell if you get a clear through casing or preserve the stickers on the other side (they’re still there I just wanted to make it clear just how similar the tow types servos are in everything beside there movement).

The bulk of the week was spent programming and debugging, mostly just trying to get my assembly moving in a predictable way without destroying itself. I’m serious about the destroying itself, the motor’s are too simple for built in emergency stops, so they just keep spinning until something breaks, like in my case the hold on the belts they were pulling. I now have functions to move the assembly in all possible directions, trigger the magnet, read from the scale, and to do all of this at once. In other words, I have all the basic functions needed for the start moving and sorting the cubes.

I also spent some time making small additions to the assembly. I added emergency stop switches that have been really helpful, lubricated some sliding parts, and game some parts their own power line. The downside is I now have a rat’s nest of cables, back of the TV bad. Midway through the week, I discussed with my supervisors the best way to make sure my blocks stayed in the same place. We figured the best option was a base with cones sticking out so the blocks could slide I. Going off some by hand testing, the mechanism works pretty well.

The base with some new blocks that accommodate the cones.

I am happy to report that I finally have the assembly moving to pickup a block, putting it in one spot and having it return the block, or at least something very close to that. While I’m a bit disheartened from how slow the progress, I’m quite confident I will have everything ready by the time the presentation comes. Hopefully I will have at least a sort or two working by next week.

Week the 4th: A Balancing Act

Greetings. This week started out promising, but I quickly lost time to another with my frame, this time due to an issue with balancing everything. I ended up losing about two and a half days on this and combined with slow progress on other fronts led to a week that I would not call very productive.

On Monday, I was able to quickly get the mechanism to raise and lower the magnet functioning quite well, though I was slowed down by some issues with the screws (had to fight them to get into place), that I haven’t properly resolved yet. I then setup a prototype assembly, but ran into an issue with balance and the fact that I’d yet to place the contact switches, switches that send a signal when they touch something and a good stop signal for my mechanism. It honestly could have been so much worse if we hadn’t had multiple printers and I hadn’t printed several overnight.

On Tuesday, I tried to get the balance and assembly problems, but was slowed down when we realized that I need some new 3d prints, some modified plates to make sure the bearings moving along the rails stay in place. Also, had the frame kept titling over quite easily. This process took about two days and essentially froze everything else in the project as the bearings are essential for the movement. This process took so long because the 3d printers can only print so fast, it took about 2-3 hours per print in this case, and I need several to test with and four in total for the final job.

Some of my attempts that got so numerous, I had to start marking to stay at least kind of organized

Thursday came along and the prints from last night had come out well enough, but there were still some issues. I spent most of the morning sorting out the good rails and bearings and examining how good the prints came out. As I found out, linear bearings and rails come in varying quality levels and that can affect how easily the system moves. The better the rod and bearing, the smoother the motion. In retrospect, I probably should have talked with my supervisors about the prints a bit earlier or tried to focus in on the task a bit more.

Presenting the graveyard of the misfit 3d prints, most of which are from just this week.

As I write this and I wait for the latest print to come out, I realize that this week seems to have been dominated by waiting for 3d prints, so the frame is more balanced, so I can start actually moving the magnet in a meaningful way. Side Note: writing this a bit early gave some ideas on what to do, the frame and attempting to work on the up and down mechanism.

By Friday, I was ready to try and get everything reassembled. Thankfully this entire detour actually worked out quite well as the mechanism worked beautifully once I got everything fitted back in. The improvement is night and day, the front and back section in particular glides when it use to only slide, as in front skateboard to hoverboard in terms of smoothness. I also managed to connect the up and down mechanism with some workarounds (tape and wires make for shockingly good screw replacements). I also solved an issue with the lower parts wobbling by re-tightening the nuts and some tape. I can finally say that I can start to work on getting the robot to pickup and weigh blocks.

My sorter at the time of writing

Week 3: A Troublesome Confusing Mechanism

Hello and welcome back to my blog for my sorting demonstrator. Getting the frame turned out to be an exercise in figuring out the right settings for a 3d printer. I ended spending most of this week 3d printing something. Honestly, I’m starting to feel like I’m hogging some of them. Most of the prints from having to redo existing ones from different issues. By the end, I had a pile of failed and/or useless prints.

The frame construction itself was not too difficult. Most issues came from poorly printed parts, as in instead of solid plastic parts getting what amounts to plastic spaghetti, in a few cases quite literally. Ended having several issues with keeping the belts tense as loose belts result in no movement and, if they do have movement, slide out of place immediately. We had to add bolts to hold in the belts and redesign some of the parts to add more back support to the rails.

Looping the belts into was also quite hard, the plotter’s part’s page had no explanation on how to loop the belts, but thankfully someone managed to get a clarification in the comments. We needed the clarification because no one in DTSF including our supervisors had any idea of how the design was supposed to work as it featured to motor’s on the same axis to move the center piece across two different axis, completely different from anything the 3d printer’s this design started on used.


This diagram is meant to explain the motion, the idea is that two motors turning in opposite or identical directions can respectively control the x and y axis movement of the center block. Also, here is the link to the original.

My power supply woes continued as I discovered that multiple stepper motors, my tests from last week had only been with one, would make my arduino motor controller draw too much power, resulting in it literrally burning up judging from the smell and smoke it gave off. After trying several different power supplies and ports, it turned out that the best way to power the arduino and the motor controller was to give the arduino usb power and the controller wall power with some annoying wiring. As an aside, turns out my motors were a bit faulty too as Eric, one of my supervisors, mentioned they were supposed to be far quieter. We replaced them and it turned out they were close to silent.

Eventually, I managed to get the frame properly assembled and moving, and it moved quite well. The center piece moved just as expected by the end. Besides all the frame issues, the magnet and scale I plan to use arrived this week and worked quite well out of the box.

The frame in its first fully working state for movement across the width and length of the area I need it to move.

Overall, a cumbersome week but one with some great results. With the exception of the Z axis, I have a frame for moving the magnet anywhere it needs to. I found mechanism that should work well for the Z axis, left the parts I need printing over the weekend. I’m hoping to have good control of the frame and have it picking up placing blocks by the end of next week. See you then.

Week 2: A Delay Caused by a Frame

Hello again. As a reminder, my goals for this week are to determine the vertical mechanism for my sorter and to get a stepper motor moving a belt back and forth. I started with the latter: firstly attempting to solder (think welding but WAY smaller scale, in both heat and size, and adding some material) a different motor control board for the main controller (an Arduino). This attempt turned out far better than last week’s. I decide to delay fixing last week’s attempt for now as I do not need two boards at the moment and fixing would have taken far longer than just starting from scratch with the other one.

I attempted to have the Arduino move the motor with some test code from the motor control board manufacturer. After having issues with the power supply and the motor’s wires, the motor started to move in the way the test code described. In the mean time, I printed a small cube to act as a model for the larger ones I’ll be making later on.

I then realized that I would need something to connect both ends of the belt together. Thankfully, I found this model online and, after some issues with the 3d printer, I got a pretty solid piece that did not break apart. This success allowed me to get a working belt example up and running.

I then attempted to get everything mounted on a rail system, which led to realization that I would have to attempt to design and print a few more mounts, as we did not have many usable ones in the lab. So far, they’ve turned out alright had to go through a few iterations for each to get the alignments right and just trying to get used to the program (Tinkercad) that I used to make the models. While searching for alternate mounting for the motors I came a across some linear bearing mounts that would make for a very interesting approach, so I worked on 3d printing the appropriate mounts.

Overall, this week went ok. I got the motor moving the belt, but the rest maybe delayed as I try to build a new frame. I could not figure out the vertical mechanism but with the frame delay that is isn’t as important right now. A bit setback by the frame, but I did expect to be setback at this point just not by the frame of all things. The new frame should be done by next week using a cylinder system rather than a rail one.

Week 1: An Introduction

Hi. My name is Angel Vergara. My project for these eight weeks is a simple sorter meant to show all the minutia involved for doing basic things on the computer’s side, by having it sort blocks that we expect kindergartners to sort like it was second nature.

At the beginning of the week, I was not entirely sure of several aspects of my project, mainly how the sorter would move, but I know have a much clearer plan of what I am building.

On Monday, we started with an exercise to practice designing, my group had to construct a mousetrap powered vehicle. We ended up making more of a wind powered vehicle which turned out what the other team had to make. We then moved on to brainstorming what we would need.

I decided to focus on moving differently sized blocks with a magnet to simplify the demonstration for the audience. The magnet came about to avoid having the claw worry about the different sizes of the blocks. The blocks themselves should be trivial to make, between the simplicity of the model and my colleagues experience with 3d-printing. Another early concern was how the crane would position itself, but between the contact, magnetic, and ultrasonic sensors we have on hand, that should not be much of an issue.

The block we had that is acting as a stand in for the soon to be printed blocks

In terms of moving the blocks, I considered a few different mechanisms: a robotic arm, shifting plates under the blocks, a gantry crane, and a standard crane. The shifting plates lost out quickly due to its complexity and the standard crane felt much to unstable. The arm ended being either too expensive or would take too long too arrive. So, the gantry system won by being the only one that would be feasible for an eight week project.

Tuesday and Wednesday were mostly spent on the above mechanism issue, securing/ordering the parts, and determining a schedule for the next two weeks.

Thursday was spent on learning how to work with the Arduino in basic ways, this was made easier thanks to the Arduino community having a gigantic amount of tutorials and test code for most of the devices I was practicing with. I ended up making a few semi-original things: a rotary dial that controlled four lights, a button that swapped the text of a 16×2 display, and a button that turns on a light then fades it and makes another stay on. I say semi-original because while I did these on my own, someone else has certainly done something identical to these.

Finally, Friday was spent working on this very post and learning about copyright, fair use and creative commons licenses. I also spent some more time working with the Arduino and getting some of the parts we ordered ready. I got to use a soldering Iron, which was pretty cool, though I may have damaged what I was soldering and I misaligned some pins, but otherwise it was really fun.

Also, some parts I ordered arrived on Friday, so with that and some spares we have in the lab, I should be equipped for the at least the next week or two.

Next week, the plan is to make a very simple version of the sorter, my goal is to just have it pickup and move a block across a single axis, not necessarily to an exact spot, though I guess that would be a stretch goal for that week.