Gallery, Projects and General > Project Logs
Small coil winder
<< < (2/3) > >>
Bernd:
Q,

I take it that 16F88 is a uM processor. Gonning to do a how to program on that. If you do put that thread down in the Electronics and IC Programing of the forum. I've always wanted to know how you write a progam for such a small processor.

Bernd
Anzaniste:
Will the system include a drive for the feed spool of wire to overcome a) friction and b) inertia?

50swg = .001" at 70,000psi tensile = break strength of 0.19 ounces, no wonder you've got to be careful!!!
quantumeer:
You're right, there's no way you can pull the reel around by the wire.  However, if you take care of the end cheeks, wire will just slip off the end of the reel with almost no force; it imparts a negligible twist to the wire.  Here is a video of a nice little machine that does this with tension control:



but I'm not planning on making one of these.

Mark
quantumeer:
Decided to do the wiring using solderable enamelled wire (the verowire or roadrunner system), because it's quick for one-offs, and more serviceable than you might think.  Can't say the same for the wiring pens though - overpriced and poorly made.


The repaired wire friction device works better than the original and only cost small change.


Wiring close up. I'll clean up the flux residue after verifying it works.

Next job, firmware. I'll be using it to verify the wires went to the right places at the same time as writing it.

Mark
quantumeer:
I do software incrementally, to limit the number of things that can go wrong at each stage.  I'll try to show what I mean, without going into any actual code. Maybe as Bernd sugests, I could do that elsewhere.

I'll be running the growing code on the actual circuit, so that is one of the things that could be wrong.  First thing to do is get some output going.  Actually, driving that big display is too big a chunk to start with, but I can re-use code I wrote before so it is no trouble to try, and I'm feeling lucky.  If it fails, I'll drop back to making an LED flash.


I wish I could say that's the first time my firmware has greeted me like that, but I have a track record in this area:



Still, that's more success than failure.  A quick reversal of the character order in the code, and step 1 is done:


So the microcontroller is running, the in-circuit programming works, and the display is connected right. Good.

Step 2.  Plug in the pot that will be the speed control, add some code to read the voltage it produces, and send the reading to the working display to see if it looks sane.



Lucky again.  Twiddle the pot to see if the reading goes up and down, and it looks good.

Step 3.  Plug in the switch that will be used to zero the displayed count, and add some code to set the display to zero if the switch is closed.  Waahhh!  Display stuck at zero for both settings of the switch, and all settings of the pot.  Since I know everything else is working, it can only be the switch wiring or the code I just added.  Use a voltmeter to check the microcontroller pin that reads the switch.  Hum. 35 mV with switch open; should be 5V.  Solution after the break...



Something's pulling it down, but 35 mV is not low enough to be a short to ground. I did configure that pin as an input, didn't I?  Back to the code.  It turns out that I made a typo in the line that was supposed to do that.  The switch signal is connnected to an output that happens to be trying to be a logic zero.  Fix the typo, and now the switch works.

Step 4, the stepper motor.  Plug in the motor, and add a bit of code to do step/delay/step/delay... The motor twitches, but doesn't rotate.  I was sort of expecting that, since I didn't know the order of the windings.  A quick experiment with two wires from the power supply gives me the sequence of pulses that makes it go.  Reorder the wires in the motor plug and off it goes!

Step 5, unnecessary but can't resist.  Add code to use the value from the pot to set the stepper delay, and we have speed control.  Cute, but the real code comes later.  Time for bed, says Zebedee.

Mark
Navigation
Message Index
Next page
Previous page

Go to full version