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. :)

Saturday, October 20, 2012

New PCB printer: ExpressPCB

If I need to prototype a circuit, I'll do it with wire wrap. I've found this is much more reliable than perf boards (where you just press the parts in at the right places). For some reason those always break on me and then I get inconsistent results from the circuits I build there. I think a major problem on my end is using components that are too big and then I have to really jam them in.

When the time comes that I need to make many of the same circuit (which is idea, design once and use again and again) then I need to get PCBs printed. I used to use in which you could draw the picture in paint or draw and they'd automatically print and drill it. Recently I placed an order and found they were out of business. When the owner told me this, I asked for a recommendation and he noted this place: ExpressPCB

ExpressPCB has their own board design software, but it's free and actually quite good. Much easier than doing this work in draw. And they're clearly encouraging you to do the circuit layout and then the routing. I haven't tried that yet since I knew many of my components wouldn't be in their library and I needed to have certain ports facing the outside, etc.

I just placed my first order and we'll see how it turns out. Hopefully I didn't fuck it up.

Tuesday, October 9, 2012

Target stand V2

I've made a new target stand. And a lot of errors... that I've since corrected.

The main error I've made is that I tried to violate one of the core rules of engineering: Don't build it if you can buy it. I tried to build a DC motor controller.

I was building a DC motor controller because this new target stand is powered by a DC motor. It has to turn both clockwise and counter clockwise. I already needed such a motor controller for my big moving table, so I figured I'd just finish making it.

So I built an H-Bridge. Initially it was able to show me +/- 5V when I asked it to. Perfect, works the first time! And it burnt out once I put it on a 12V power supply. Some internet searching and logic informed me that it turns out is suffered from something called 'shoot through'. This can be solved with the use of special H-bridge motor controllers.

I build a new motor controller on the perf board of the old one, and it didn't work at all. I build it on a proto-board and it didn't work. I tried two different kinds of H-bridge motor contollers and they didn't work. Maybe the old perf-board mosfets were more fried than I thought. Maybe the proto-board was broken from pushing parts that were too big into it. I don't have another day to waste on that. Fuck it.

Since this is a low power motor controller, I just bought one. I don't need a high power controller like the table will. They're like $6. What was I thinking?

Slap that shit together and now the table works, again powered by an arduino. At the end of the video you can see it fall apart, turns out I only put a single spot weld on the axle holder. The next day I painted that steel on thick and it works like a charm again.

Sunday, October 7, 2012

Target stand V1

This first target stand is clearly very basic. It's actually powered by a car door lock, which will pull the stand into position and then it's returned by a spring.

I went with a car door lock as the actuator because it is strong (10lb pull) and car door locks are common enough to be very cheap (~$15).

The problem is that in order to show the target, the actuator has to be pulling constantly. After about 1/2hr of turning the actuator on and off I noticed it was getting sluggish. On closer inspection that actuator is very hot. On measurement, the actuator was pulling 2 amps while it was on. This is not acceptable, far too much heat. After significant work, the machine is going to overheat. I need a different system.