Beta proto for standard DataAq - what and why

Stuff you made and how to make cool stuff

Beta proto for standard DataAq - what and why

Postby Doug Coulter » Sun Apr 08, 2012 5:25 pm

I originally intended this subforum to be used to share our projects and show a few shop tricks to help beginners along. I was hoping for more than we've gotten, but then I realized I've done a few myself and not had the camera out...duh. This time I did, though parts of this should have been a movie to show a little detailed tool use and how easy some of this actually is.

Project du jour is the standard data aq device. This uses the same uP board as the standard counter, but instead of having a sensor and HV supply, this use of it gives 2 counter inputs (5v CMOS levels, pulled up to 5v), and 3 external A/D inputs. A fourth A/D input is connected to a 2.5v reference diode so even if the input 5v drifts, the device can self calibrate. The external A/D inputs get a 1 stage RC lowpass to kill as much noise as easily possible - 47k/10uf - but are otherwise infinite input impedance (or, really really high) for DC. The counter inputs are pulled to +5 with 47k, diode protected, and otherwise DC coupled to the BNC's.

The board has rs232 as well as the rest, and at least for debug versions, it's nice to have another independent comm channel. Also, a scheme to allow this port to reprogram the chip is under consideration, so customers can upgrade software. At any rate, I decided I wanted the connector, and one for 5v output (still from the computer's USB port).

This post isn't intended to show production engineering in the usual sense, where you are going to optimize a thing for series production. It's a beta prototype. The Alpha worked fine, but was a pile of uninsulated wiring in a ball around the board. I don't feel like trying to hook that to the fusor to give it the acid test (and get cool data to help get the 4d plotting going) - I know EMI will kill it, or I will.

So, I needed a more rugged, shielded version to get to the next level. Normally I stop here - I only need one or two of most of what I design. In this case, I think I DO have a product here, but of course it needs that "production engineering" layer put on it, like JoeJ did with the standard counter.

It just turned into a reasonable thing for demoing how I get from a pile o' parts to something I can work with in a little more production environment.

First, I checked junk and scraps for a box about the right size. I was originally fixated on a crummy bud box, but they're just...too crummy. I found a nice plastic one, but it's plastic. No shielding there. But I figure I can get around that one. I happen to have a ton of very thin double sided PCB material - about 10 mils thick. For things like this, it's a lot easier to work with, and cheaper, than copper flashing or tape, so that's what I chose. The very first cool shop tool that makes this trivial is a shear - I got this metal working thing from Grizzly tools, and it was really worth it. Also does brake and roller jobs, very handy for de-wrinkling things like lead shielding and copper flashing. Or rolling out indium and so on. If you work with thin sheet stuff of almost any kind, you want one of these guys. I've used it for box making too, but here the goal is to get to one working unit in minimal hours.
Shear.jpg
Shear/brake/roller

It dices this stuff like a paper cutter. You can actually use (and ruin) scissors on this stuff - but you'll make it not-flat doing that and have to fix the jagged edges. And it'll take longer.
One you've got your pieces, chances are, you need holes. Yeah, you can drill them. Maybe with this stuff it might almost work if you drilled while clamped between two wood blocks - almost. But, I have a punch, and I can't believe I lived without this thing so long. They're not expensive at Harbor Freight...
Punch.jpg
Super cool punch, from the Slavs (HF isn't pure Chinese)

While you can use this in a press, I used "Mr Tappy", a special very short handled but conventional headed hammer that will probably show up in some other picture. All it takes with this is a firm tap, then some light ones to make the punch pin fall through into a hand held under the vise. Perfect holes if you line things up before the hit..far faster than drilling. The instant I found out how cool this tool was, I bought a spare to not be used on anything that will mess one up (Punching thick SS screen wire would be one of those).

The uP board has some LEDs on it that stick up above the board. In this box, standard .5" spacers for the PCB get them almost right. Good enough for a proto. But - how to get the led holes lined up with the LEDs?
Always something you can spend way too much time on measuring one part to lay another out. To basically get the board in there, I mounted the spacers on it, and held it against the inside of the box, and marked around where the connector access holes wanted to be. Popped a hole somewhere in the outline with whatever bit was in the bench drill, then carved the rest out with an xacto knife. Butchered it up some - but this one isn't for sale and I don't care.

Ah, those leds. Now that the board is screwed in, I needed a way to locate the LED holes in the lid. I settled on a trick I learned from racing engines - put something that things will leave a mark on on one surface, assemble, and look for the marks. I forgot the part about making sure the LEDs were straight first, though. I used a piece of foam DS tape stuck in the lid, placed it on there carefully and pressed, and then punched through the resulting dimples in the tape...
LEDHoles.jpg
Bad drilling plastic, rats

Thereby perfectly replicating my error in original led placement, but they do fit. Now for mounting the other stuff. There's going to be a passel of BNC's on the top, and that RS 232 connector and binding posts on the back.
Coppers.jpg
Copper pieces for top and bottom

BNCs.jpg
BNCs


Boy, does the punch ever make this sort of thing a breeze. Now that I've laid out (with caliper scratches) the BNCs and punched them in the PCB stuff, I can use that for marking the plastic for drilling. Turns out, this plastic doesn't drill very well at all - slow, fast, hard, soft - it flakes out. But this is a beta.

So, I go looking for some nice thing to be the back of box connector for 5v output, and I have to mount a db9 for the "debug" serial port (which might become a lasting feature if I get uP downloading going). Futzhing around, it looked like the IDC style DB9 would be the easiest (and I have a ton) so...cut that out with a knife. Got such a tight fit I didn't use the screws. Now for power. ARrrgh, all my junkbox terminal strips are from the previous century, and even a 2 place is bigger than my room here. I have these nice terminals for PCB mount but...well, necessity is the mother...so here's what I did.
BindSerial.jpg
Back of box


Cut out a piece of padded perfboard on the shear, get out the epoxy...ream out the holes a little with a carbide drill so they fit the terminal strip, and bingo - have to wait for the glue to dry, but it seems solid enough for a beta. Got epoxy on both sides - the terminal strip bottom, and the perfboard on the inside of the box. Even if it comes loose, it can't come too loose - there are only two small holes in the box for the terminals.

Now all I have to do is wire it up.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: Beta proto for standard DataAq - finishing up

Postby Doug Coulter » Sun Apr 08, 2012 7:34 pm

There were a few parts I wanted to add that don't really have places on the original PCB layout. One is diode protection (to the rails) for the second counter input. I also wanted to low pass the A/D inputs and have some series impedance there to protect the box from ligthning, and I wanted a reference voltage on an a/d channel (just as well, another bnc might not have fit). Further, I wanted our Tm serial connector wiring, which cross wires the hardware handshake lines such that "if you're ready, we're ready" to make the PC side of things less critical in setup. Being a beta and all...well, I just kludged this stuff into existance, though I admit to a little malice aforethought around how the grounding was done to avoid ground loops.
WiredUp.jpg
All wired up.

I used an LM336 for a 2.5v reference (this particular one is at the low end - 2.42v) with a 2k resistor to a nearby =5v pad for analog input 3. I put a row of stakes in the board for the other a/d channels to make soldering and desoldering easier (it IS a beta) for those. I added the protection diodes for the other counter input as SMD diodes, one between two board traces, one right on top of the 47k pullup for that input, you'd have to look close to see anything out of place there. Since counter 0 isn't an internal pancake, I left its pullup in place, but used a wire instead of the 1 meg resistor the standard counter has to attenuate the 100v pulses the pancake puts out - that sort of thing will now be external. The digital, output power, and serial port are grounded to the lower shield PCB and the power input. The upper PCB is grounded to a pad that goes straight back to the PIC so it's an analog reference ground. I hope this will be good enough. I used a couple of ferrite beads in both the + and ground 5v output lines, to allow some common mode there, and the terminals are bypassed right there where they leave the box - noise, we try. I built my lowpass filters right on the BNC connectors and PCB. While these have 47k series R, and a big 10 uf cap to ground (probably should have used better quality cap there), they are more or less infinite input impedance for DC - whatever the leakages are. This is to try to get a better estimate of the value over a full second than I'd normally get. The a/d gets that sample set very quickly, not over a full second. Sooo....we'll try this. These inputs are intended for slow-moving signals, like main HV voltage, current, and perhaps tank pressure off a gage.

Well, it's not done till you put in the screws and test it. Yay, it works!
ButtonedUp.jpg
All done, ready for thrashing, testing, new software revs...and to kick around and be useful.


I wired the red led, which was used to indicate high voltage on the standard counter, to PWM-1 instead, under software control. For the moment, I have it light if any of the a/d channels is clipping against a rail, brighter the more channels are clipping. It's there, so dumb not to use it. The middle led will do the same thing it used to do, only a little fancier. It blinks once a second to indicate comm - but the length of the blink is proportional to the counts for the standard counter. For this, it'll have to be proportional to both input counts I guess. So we can get a lot of info out to the user with just a glance at the box, no matter what else is or isn't working.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA


Return to Machining and Fabrication

Who is online

Users browsing this forum: No registered users and 5 guests

cron