Only the beginning

A project log for Laser Tag Robots

Why not combine two of the best things in one?

DylanDylan 11/27/2016 at 18:190 Comments

To give a little background about this project, in one of the classes at my university we study microcontrollers and basic signal conditioning circuits for the semester (!!). Of course having enough background with AVRs, I didn't have much issue with the transition to PIC assembly code (except having to deal with the blasted w register too often...). Jokes aside, it is definitely a cool class to be able to go from stuff I do for fun, to actually having tests and homework on the topic. Anyway, after 6 or so labs we have a final project to do where it is entirely open ended to design whatever we feel like, as long as there is a microcontroller involved. My head was bursting with ideas, but couldn't settle on one in particular. As we work in groups of two, I kept on rattling off ideas to my lab partner and none of them seemed to stick particularly well. Then we got on the idea of robotics, as we are both interested in the subject. At first we wanted to do something rather simple, with just making a basic object avoidance robot that can roam the room. Nothing too fancy, and definitely more than feasible for a 2-3 week project. Eventually we thought to do something more, and add some fun to it. I've been wanting to make my own laser tag system, and after mentioning that as one of the potential ideas, we thought to incorporate that into the robot design. And thus this project was born!

So in essence, our project is to have some robots roam the lab and shoot each other. No human involvement, because that's too easy. So the obstacle avoidance is our main focus, and then if we have more time in the semester to finish the laser tag part (which hopefully shouldn't be much more to add), will be added after. We will be implementing a small algorithm to detect if an obstacle is too close to just turn to avoid it, or just move around the obstacle if possible. Now you may be asking, "how will the robot know if there is another robot ahead in order to shoot at it?" Which we had the same question for a while. Our solution is to use the LDR for detection, and a bright LED on the enemy robot. So when the robot detects an obstacle, it simultaneously checks the 741, which is being used as a comparator and then would fire. This may be changed in future updates, but that is the idea at the moment for how to implement this system.

Over the thanksgiving break I had ample time waiting for my plane in the airport, so I decided to start writing some of the basic functions for controlling the robot (and commenting the shit out of it, because reasons) to make our lives easier later on. Most of the controls are fairly simple like "move forward", "turn left/right", "check if there is an obstacle", etc. I'm tempted to rewrite it in assembly however, for two reasons. 1. for the hell of it, and 2. I'm obsessed with speed. (Or the hidden 3rd reason, to submit for the 1KB challenge because it would be pretty cool to do, and also fun to screw with my professor on making such a tiny program for a microcontroller with 32KB of flash). I'm just hoping that the code won't need too much tweaking once everything is all soldered together, though I don't have high hopes. Such is life with these things, though I've had better luck recently so who knows. On a side note, I found this remote controlled tank-like RC toy (don't badger me for forgetting the specific name, though I'm sure there will be comments on it) that would be perfect for the project so we don't have to make a chassis for it. Plus the turret control uses a DC motor, so we wouldn't need to use a servo motor which is nice. Just drill a small hole for the LED and bam, perfect IR output. More info on that will be included in subsequent updates. Hope all goes well with this as I'm pretty excited to see the outcome. *fingers crossed*