transcript

Mark Rober - Automatic Bullseye, MOVING Dartboard

Thumbnail of the video “Mark Rober - Automatic Bullseye, MOVING Dartboard”
Download Markdown
Community upload. AI output has not been independently verified.

I suck at darts, but I'm good at engineering, which means I'm actually really good at darts. Most of the projects and builds for my YouTube channel take a month or two to pull off, but I have been working on this beast with my former NASA co-worker John for over three freaking years. And here she finally is.

It's fairly self-explanatory, but you throw a dart, and as long as your initial throw is somewhere within this diameter or so, the dartboard helps out a little bit. What's cool is that if you use this dart, it will make you the world's best dart player because you get a bullseye nearly every time. And even if you don't, it's really close. But if you use this dart, it makes you the world's worst dart player because it calculates the initial trajectory and then moves the board in the exact opposite direction. So eventually we took this thing to a bar to see if it would work in the wild. But before we get to that, let's talk about how it actually works.

Fundamentally, there are two main parts of the system. First, you need to somehow predict where a dart is going to land with a typical throw from regulation distance, and you have about 200 milliseconds to do that. Second, you need to somehow move the board to that predicted location, and you have about another 200 milliseconds to do that.

Let's start with the first part, about how we predict where the dart's going to land. The real secret here is that our dart has these tiny retroreflectors on it, and then we have a Vicon motion capture system. As humans, we can see in 3D because we have two eyes, and our brain calculates the difference between the two images and then tells us how far or close things are. This is why if you close one eye, you instantly lose that depth perception. So that's basically what we're doing here, except we have six eyes all around the room. Each of these eyes, or cameras, can take a 4K resolution picture 260 times per second. But since it's hard to visually separate something so small, moving so fast in front of a busy background, they actually use IR. They blast out IR from all these IR LEDs, which hits the retroreflectors and then bounces back to the lens. So when I wave the dart around like this, this is what you and I see, but the motion capture system just sees a solitary dart floating around.

One of the reasons this board took us so long to build was that for the first two years, we were trying to make our own motion capture system. We had our own cameras and one of these awesome Nvidia TX1 boards, which is basically like a Raspberry Pi on Russian steroids. But it turns out that's a super complex problem to solve, and the Vicon system was just turnkey.

Now that we have the XYZ position of the dart as it travels through the air, we use some MATLAB code to predict where it will land. The trick here is that anything you throw into the air, neglecting air resistance, will travel in a perfect parabola. Even something you wouldn't think of, like a high jumper: if you track their center of mass, it actually follows a perfect parabola shape. So we used our understanding of parabolas, and from a side view, we use that to predict the final up and down position of the board. Then, to predict the final left-right position of the board, we know from a bottom view that a dart will follow a linear path. So we use good old y = mx + b. The y-intercept, or b in this case, tells you how far to move it left and right for the final position.

Nice throw. Now that we know exactly where to move, let's talk about how we actually do it. The board itself is on two linear sliders, which allows it to translate to any specific location. That provides the track on where to move, but the engine is these six stepper motors. You can see from the front that each motor has a spool and some fishing line, and they all attach to the center of the back of the board right here. Once we have the predicted bullseye spot, the computer does the trigonometry and then sends the commands over to the motors. So to move to the left, it would say something like you need to spin up, but you need to unspin at the same rate.

On the back, you can see the computer signal comes into this Arduino-compatible board. Then there are some preamps that bump up the voltage signal to the six individual stepper motor controllers. These stepper motor drivers take the moving instructions and combine them with the power from the plug in the wall, after it goes through this AC/DC power converter. Finally, a bunch of voltage pulses from the motor controller cause the motor to take small steps and either wind up or wind down. Keep in mind, all of this happens in less than half a second and allows us to hit our sub-millimeter precision in board positioning. And we don't just make one guess on the final position of the board. We update and refine that guess anywhere from 10 to 100 times, which is why sometimes you sort of see the board jitter into the final position.

So we took it to a bar to see what people thought. In general, we found that if you're really drunk, you get so pumped about your new abilities, if not slightly confused. I used to suck at darts.