Posts

Showing posts from March, 2018

Button Multiplexing, Redesign, and World-Travelling Packages

Image
R2R Button implementation In an effort to get as much out of as few pins as possible, we decided to try to make our 5 input buttons multiplex into one analog pin using an R-2R ladder Digital to Analog Converter circuit. Our initial implementation failed due to our momentary pushbuttons being single pull single throw switches (R-2R ladders need single pull double throw), however, we implemented a logic NOT gate chip that allows our pushbuttons to output 5V or GND to each input of the ladder. It works pretty nicely! By reading in the analog values for every possible combination of buttons, we saw that each voltage level was distinct and consistent, but not predictable with a formula. So, we put all those analog values in an array where the index of the array containing any particular value corresponds with the sequence of buttons pressed to obtain that value. It works well! Chassis V3 In order to keep iterating on our physical chassis design, we redesigned such that we don’t...

LCDs and New Batteries

Image
We’ve made some significant progress in the past few weeks! The IR protocol came together nicely. We encode each shot with a team number (1-4), damage level, and status effects (currently including slow movement, cannon disable, and stun). For the IR receive we just put the phototransistors in parallel. As we discussed in our design review, this could potentially lead to errors if two phototransistors receive a message simultaneously, but we’re going to ignore that possibility for now. In addition to having the shots encoded, we modified the controller code so that it will display which weapon is selected and how much ammo is remaining. We adjusted it so that the ammo will only decrement if the tank actually fires a shot. The code can be accessed at https://github.com/TylerQuacken/Laser_Battle_Bots. In looking at the different weapons, we realized a few things. For one, we’ll have to allow some time toward the end to adjust parameters to make sure the game is well bal...