Posts

Showing posts from January, 2018

Main Board v0.4

Image
I received Main Board v0.3 back from OSHPark and the TB6612FNG IC did not seem to line-up with the contacts on the board. It was, in fact, about a millimeter too wide. I had anticipated a challenge, as this was to be my first attempt at soldering surface-mount. But this footprint problem was not an issue that I had not expected to encounter. I had taken a SSOP-24 footprint from KiCad's library and modified it only in that I joined adjacent pads for the motor connections. Looking at the TB6612FNG datasheet, I confirmed from the drawings that the footprint I used was not wide enough. Yet another reminder to check and double-check datasheets. So I did attempt to bend the IC pins to see if I couldn't work the chip on somehow, so that I could test the board functionality. But, with the pins bent back, even a bit, they became impossible to solder. I did briefly consider attempting to bodge wires onto the chip and in that way connect it to the board. But it looked like an exercise...

Infrared reception

Image
So, while waiting on a new main board, I decided to work on the software a bit. I wanted to get IR reception/transmission working reliably and also modify the code to support the new motor controllers (PWM on all motors + control signals supported with a shift register). I began with the IR reception. Most importantly, this will record the hit from the other tank's shot. Secondarily, it will be used to receive commands from an IR remote. I sourced some  cheap IR remotes  from Sparkfun. I think that these will be useful for debugging (in debug mode, you will be able to control basic tank functions with the remote). Also, they can be used to give a start signal for the tanks to begin fighting. I had messed with the IR stuff a little, before, using the  IRemote library . The library makes it stupid-simple but when I tried using it with the rest of my tank code, I began having problems. The main issue seemed to be that, even though I had my IR receiver diode on a har...

IR Distance Test

Image
A month ago, I had the rather belated realization that merely sticking a bog-standard infrared LED on a short mast on top of my tank was not going to work very well. Most LEDs are intended to be directional. I needed an LED that would point not up but in 360 degrees, so that the opposing tank could detect it, no matter where the tanks were in relation to each other. So I ordered a few different lenses and infrared LEDs from Digikey. Though the number of choices on that site seem overwhelming at first, once I narrowed-down the options based upon my needs, there were only a few options left for each. Also, since I finally had a working camera PCB, I used one of the boards plus an OLED display to build a "detector box", a gadget that displays detected IR blobs on the screen. This made testing much easier, since I didn't have to sit next to a computer reading serial debugging information. [Before I even received the LEDs in the mail I experimented with using sandpaper t...

More About Motor Controllers

Image
In my last post , I talked about my problems with motor controllers not delivering enough current to the tank motors. After some more experimentation, I decided to abandon the L293X h-bridges and similar. Versions that supported more current featured bigger heatsinks: they all have some significant amount of voltage drop (Somewhere around 1 - 2 volts. Maybe not a big deal when you are north of 10 volts, but if your starting voltage is 5.5 then it matters a lot.) There was a break in tank work, as the holidays took over and I spent what spare time I did have building a Nixie-tube clock from a kit. I found a  Pololu Qik motor driver that I had nearly forgotten about, sitting in a drawer. I installed that on my tank and, what do you know, the driver worked pretty well. This particular controller features a serial communication chip and translates that to signals that the actual motor controlller, a  TB6612FNG , understands. This driver costs $25 from Pololu and, since I need...