It's been a long time since I've produced new content, and I'm back with a freshly redesigned blog and a fun new robotics project. I've been itching to make some things happen with my EV3, so I buckled down and built the Gunslinger. As far as introductions go, I'll let the video do the talking.
This bot was built mainly from the EV3 set 31313, with borrowed parts from my NXT 2.0 and Technic Excavator (42006-1). The goal was to create a color sorter that did something different; most of the ones you see stem from the model created for NXT 2.0, where the balls are simply loaded into a trough depending on the color. But what if we did something stupid, like shoot them at colored targets instead? It sounded a lot more fun to me, so I got to work. Here's some behind-the-scenes challenges I faced in the R&D process, which the video won't tell you:
A problem I immediately knew I would face was the programming. In the past I've always favored designs where the mechanism does the heavy lifting, leaving the program as simple as possible, and this was a serious step up in complexity. I had to get comfortable with using a Numeric Array variable in the program to store the color values of the balls, since it loads six at a time, and then read the Array one value at a time and do math based on the turret's current position to figure out where to turn for each shot.
Another issue was that I wasn't sure how to have the color sensor read the balls in quick succession, as I originally planned to have them all go down the belt quickly, with no interruption. The risk was that if two balls of the same color went by one after another, the sensor wouldn't read them as two separate balls, and that would skew the whole thing. To remedy this I added a little regulator gate, just a simple parallel linkage with some appendages on top, which catches the balls one at a time and tells the color sensor when to do its thing.
Perhaps the most annoying mechanical problem was designing the track so that the balls would roll easily down into the clip, while still allowing the turret to rotate freely. The turret actually moves the end of the track when it rotates to the furthest end of its range, and it was really tricky to hook it up so that the loading track would slide back into place when the turret reset.
The loading hopper was annoying as well, because a common problem was the balls getting stuck in it before they even reached the conveyor, or jamming in the end and falling out of the machine when the conveyor tries to lift two at once. It was surprisingly difficult to build a hopper that minimizes clogs, but after about three unsuccessful attempts I got one that works pretty well.
Think we're done, right? No, you still have to calibrate it!
The Gunslinger uses preprogrammed trajectories, meaning you have to set the targets in the right place in order for it to hit them. Basically every time I set it up or move it for whatever reason, I have to run it several times using multiple of the same color ball in a row, so I can move the target and get into just the right spot.
Filming the video brought with it its own struggles, the main one being that I wanted to have a clean background, but I don't exactly have the materials to do so. I ended up using two pieces of white foam board (yes, I only had two) and meticulously moved them around with every shot to create the illusion of a closed set.
After all that, you've got a mean, color-sorting, ball-shooting machine!
This one was a lot of fun to build. I hope you enjoyed it, and I likewise hope it inspires you to go create something awesome!
Happy Building!