Wednesday, October 24, 2012

Target Stand: IC is here

New printed boards to run the targets have arrived. For once in my life, I may not have made a significant mistake on these boards. I found exactly two sets of holes that were off and not by enough to matter.

I've done verification of the connections with the motor and the encoder on the target stand. I've also double checked the connections on the DC-motor-controller. Therefore, it's time to solder. And talk about what exactly I have here...

For starters, the goal of this device is to run 4 target stands from a single controller. It can then run an algorithm of targets to shoot on those 4 stands.

First things first: The connection with each target is an ethernet port. This was a tough call. I worked hard to reduce the number of connections needed but just couldn't. I need 2 to run the motor and 3 for the encoder, which tells me it's position. I could buy a special connector and use wire that's shielded (since some of the info is low-power analog). Or I could just use one of the most common connector ever: Ethernet. The wires have 8 connectors, can handle plenty of current for what I need (less than 200mA for the motors), and I'm pretty sure they're shielded. The only problem is that I'll risk some dumb shit plugging the target controller into an actual computer and frying it. Just this once, I'm going to trust humanity remember simple instructions like that.

Next up, the microcontroller itself: The arduino Uno is a very convenient device. I've used PIC chips which are cheaper but they often have special interfaces that most people won't have and therefore couldn't easily configure. Also, if you've ever used other less-user-friendly microcontrollers you'll find there's an endless mess of configuration you have to sort though. Sometimes it's easy and it just works. Sometimes you can't get entire sets of pins to work because they're configured for some other function and it's impossible to figure out how to turn that off. So I'm using a more friendly and user-modifiable microcontroller.

Now, how do we attach the arduino? Set a bunch of pins out of our board that are in exactly the same position as the plugs of the arduino. Then we can just plug our board into the arduino board.

Otherwise, I've got my simple DC motor controller in there and a rotary switch that'll be use to select and tell the microcontroller which algorithm to use.

This weekend, I expect to have a chance to actually run the targets and see what yet undiscovered errors I've made that prevent this from working. :)

No comments:

Post a Comment