PDA

View Full Version : CNC solder paster dispenser - how do I approach this.



HankMcSpank
24-12-2011, 09:27 PM
Ok, so I'm always knocking out SMD surface mount circuit prototypes....most end up in the bin (!), but nevertheless a significant time overhead, having either etched or isolation milled the circuitboard is actually applying the solder paste!

I have a pneumatic dispenser (like this - http://www.ebay.com/itm/Solder-paste-glue-liquid-auto-HG-dispenser-SMD-PCB-/170342823350?pt=LH_DefaultDomain_0&hash=item27a93935b6) a compressor & can therefore do solder paste syringe dispensing by hand, but my hand/eye doesn't have the accuracy for smd SOT23 pads etc ....it's not worth making a stencil for a one off proto...so that has got me now looking at using the cnc machine itself to dispense the solder paste.

As ever, google was quite helpful....this guy in particular has a good pdf & video...http://ciciora.com/picknplace.html (which has a cool video of his cnc doing what I want mine to do too!)but he still leaves a bit of investigative work.

Ok, my questions mainly relate to one of procedure (vs hardware). Here's what I think I need (hw excluded, because like I say I have the hw to dispense)...

1. A way of locating the centre of every smd pad

2. A way off getting g-code to send a signal to my dispenser (it has a foot switch so any output signal could easily be converted to trigger this - the solder dispenser can be made to work manually....the amount of 'dispense' related to how long the switch is pressed, or it has a timed 'shot' feature)

Re issue 1 ..... the guy in that link above uses eagle (so do I) & a ulp called smd-coordinates.ulp ....it seems to output text info...he then used that info into a program called labview. I've never heard of/used labview...I'll check it out, but in the meantime if anyone can think of alternative (fast) way of getting the smd pad centre coords that would be cool.

Re issue 2 ....this is the bit that I have to hold my hands up & say right away...not a clue. I'm looking for a way using a CAM/CNC program to be able to map an 'action' to a coord. eg goto x1,y2 and output a signal (the signal I use to drive my dispenser)...so I need an output signal (coolant/mist? ....something like that which can be used to trigger my dispenser)

Any ideas or tips?

Jonathan
24-12-2011, 10:44 PM
Perhaps make the code for the paste just engraving and link the paste feed to the Z-axis direction pin? Have it so if the Z axis is moving down the pin will be high, so the paste switches on, and vice versa. Mach3 latches the direction pins, so it should stay on until the 'tool' is retracted. Might be awkward at the beginning and ends, but a bit of fiddling with the distances and feedrate should sort that? You could link it to coolant / mist or something, but then you've got to find a way to add those commands into the Gcode ... to be fair find and replace + notepad (find Z moves) should be sufficient.

To get a suitable line on each pad select them and contour inside half the width of the pad. Should be feasible as I doubt there's many different size pads.

I've often wondered if you could attach a soldering iron (just the heater+tip) to the router and get it to solder accurately...

JAZZCNC
25-12-2011, 11:20 AM
RE Issue 2. If using Mach then I would look to using a brain or macro pump.
If used in combination with G0/G1 and G4 (Dwell) (which you could easily make your CAM program insert G4 by altering/making the post processor special for this job type) and setting the dwell time needed to dispense the correct amount of paste. Then building a simple macro pump set to watch when the X & Y axis are NOT moving which then triggers your output connected to the switch.

Could go some thing like this. G1 X11,Y20 F900 G4 P2 (pause 2 seconds) the Brain will see this pause then turn the pump ON untill either X or Y axis start moving again or set amount of time which you can set in the brain.

There will probably be other simpler ways but I'm pritty sure you'll end up using either a bit of VB in a macro or a brain. Macros and brains are very powerfull and can really make your machine do pritty much anything you want.

RE Issue 1,

Dont the smd chips come on tape or strips that have pre-determined spacing.? If not then build a special holding jig that you know the coord's of the centre of each bay.?

Jonathan
25-12-2011, 12:57 PM
Dont the smd chips come on tape or strips that have pre-determined spacing.? If not then build a special holding jig that you know the coord's of the centre of each bay.?

The paste goes on the PCB not the ICs!

JAZZCNC
25-12-2011, 01:54 PM
The paste goes on the PCB not the ICs!

I was refering to finding the centre of the chip not paste.! With a jig to hold the chips he would know the exact centre coord.

HankMcSpank
25-12-2011, 03:33 PM
Thanks for the input.

Jonathan....re Z move triggering ....but I need those Z moves too?

Sequence will be like this...

1. Machine moves to first coord
2. Z lowers
3. Once Z is at +0.2MM abovez0 (or similar), the 'trigger' happens.
4. Z raises

rinse repeat.....so I don't see how I can link the solder paste dispense to a z move, else the paste would be dispensed as the z plane is descending.

Jazzcnc ...not sure I'll be using mach3 (I'm warming to the CNC software called USB CNC...and will likely jump over to that .that software allows scripts though, I've coded pics in PICBASIC, so it should be within my ability to lash something up). Not sure I'm understanding you point about the smd components and the reel...I'm not doing pick & place, I just want to get a dab of paste at the centre of each smd pad.

JAZZCNC
25-12-2011, 04:21 PM
rinse repeat.....so I don't see how I can link the solder paste dispense to a z move, else the paste would be dispensed as the z plane is descending.

This is easy with a brain just tell it to watch Z Axis DRO and while ever equal to 0.2 then turn on dispenser.! . . could easily be done with a VBscript as well using something like a While-wend loop.


Not sure I'm understanding you point about the smd components and the reel...I'm not doing pick & place, I just want to get a dab of paste at the centre of each smd pad.

Ok didn't realise that.! . . . If theres something to probe against then It's very easy to find the centre of a square or circle.

HankMcSpank
25-12-2011, 04:33 PM
Ok didn't realise that.! . . . If theres something to probe against then It's very easy to find the centre of a square or circle.

There's no need to auto probe to get the cnc machine to find the SMD pad centre , my pcb software can either give me those coordinates or I can export the smd pad as a gerber file & import into a cad program & get the cad software to mark the centres of each SMD pad. (which I can then use cam software to use this coords with)

Ok so using this brain melarkey....my z plane lowers & once at say 0.2mm, a trigger happens....but what is the output here? Mach 3 has control of the printer port, presumably once the 0.2mm threshold is breached a nominated pin will change state?

JAZZCNC
25-12-2011, 05:28 PM
Ok so using this brain melarkey....my z plane lowers & once at say 0.2mm, a trigger happens....but what is the output here? Mach 3 has control of the printer port, presumably once the 0.2mm threshold is breached a nominated pin will change state?

Yes the brain or script watch's the designated Axis DRO and while ever it's at the commanded position it will trigger the pin state of which ever pin you choose, So say output pin 11 will turn ON and activate the dispenser or relay that controls it. Then when axis starts to move the pin state changes back OFF untill it reaches the commanded height again so on and so forth.

The script or brain can be as simple or complex as you want and really for safety sake you would want it to do some simple error checking IE: only change the pin state if the X & Y axis are not moving etc but in it's simplist form it's a very simple thing to do. Go to the artsoft site and watch the vids on scripts and brains it will give you a quick run down and idea just how simple.

HankMcSpank
25-12-2011, 11:19 PM
Ok, thanks I'll go have a read.

The video I was referring to earlier was this one...

http://www.youtube.com/watch?v=HdqVt0jCBHk&feature=mfu_in_order&list=UL

JAZZCNC
26-12-2011, 10:15 AM
The brain approch would work perfect for this because you won't need to do anything inside the G-code, It will just monitor the Z axis and activate/deactivate the pin at the correct height.

While watching I could hear an air solenoid firing then read that he use's a pnuematic dispenser connected to a 555 timer and 3 way valve to control over dispense. The Brain and Mach could be made to act as the timer but how would you control over dispense.?

HankMcSpank
26-12-2011, 01:45 PM
The brain approch would work perfect for this because you won't need to do anything inside the G-code, It will just monitor the Z axis and activate/deactivate the pin at the correct height.

While watching I could hear an air solenoid firing then read that he use's a pnuematic dispenser connected to a 555 timer and 3 way valve to control over dispense. The Brain and Mach could be made to act as the timer but how would you control over dispense.?


My pneumatic dispenser can either be set to auto (in which case the length of 'dispense' time is controlled by a pot on the dispenser - triggered by a footswitch - or a relay under g-code control), or manual in which case it is controlled by how long the footswitch is held down. (or again a relay uinder g-code control). In other words the amount of dispense could be set by the dispenser itself or else by how long the g-code paused between on & offs.


Where it gets a little wearying is that for example, a SOT23-3 pad doesn't need anywhere near as much paste as a PLCC2 LED per pad. Therefore it'd need a bit of sorting pads into different 'dispense' runs.

If I had enough grasp of coding geometry then I could have an eagle ulp do this pad sizing decision for me....but I haven't so manual it is for now!

mocha
26-12-2011, 02:05 PM
Lateral thought... would it work to make all the pads on the PCB the same size?

JAZZCNC
26-12-2011, 02:42 PM
Have you used the dispenser before.? Like the guy in the Vid I would think you will need a pressure dump other wise the airline and cyclinder will still be under pressure so seepage could happen.

Regards the different pads amounts then this would be done using the G4 pause command. It could maybe done using the tool numbers.? So T1= Sot23-3 and T2=PLCC LED and so on. . . . . . . . . . . Then I don't think it would be to hard to write a script that reads the code and looks for the T number value then changes G4 P value to time required for that pad. Little like replace in note pad but more controlled.

Edit: Actually thinking about it.!! . . I bet If you altered or built a purpose post processor then it could insert the correct time into G4 P value.?

Jonathan
26-12-2011, 03:12 PM
Does USBCNC include the equivalent of 'brains' in mach3 as I can't see any mention of it on their website (www.planet-cnc.com)? (http://www.planet-cnc.com)?)
If not then it looks like you'll have to generate code which has a line, or point, for each pad and use dwell commands/adjust the feedrate. What I suggested originally with using the direction pin would work enable you to set the time the axis is down for. Can add a delay with a 555 or a pic or something...might be worth trying as it's quick to set up.

Doing it in the Gcode allows better control though.


Then I don't think it would be to hard to write a script that reads the code and looks for the T number value then changes G4 P value to time required for that pad. Little like replace in note pad but more controlled


I could write a quick program to do that, but find and replace will be fine. I use that all the time to edit the code when I accidentally put the wrong feedrates/retract height in.

HankMcSpank
26-12-2011, 04:20 PM
Lateral thought... would it work to make all the pads on the PCB the same size?

Alas, that can't work a SOT23 device is significantly smaller with much smaller pitch vs say an SMD LED(there's not be sufficient space)....often the pads need to beof a certain size for heat disappation etc.

Jonathan, thanks for the input....food for thought there. I'm trialing cambam which is very good for cam, so there may be some mileage there. (I asked on their forum....http://www.cambam.co.uk/forum/index.php?topic=2205.msg13159#new )

Re USB CNC & brains...no not yet, he mentions that there's a scripting ability that has just need introduced. (I think if I went the way of USB CNC, I'd make sure I have the ability to fallback to mach3 quickly! I really like his product & it looks like by & large it'll fit my needs well - for example I asked about Z transformation & he's onto it already, he calls it warp - http://www.youtube.com/watch?v=r-l7IDxiMnE&list=UUpPWVfJ15_3YbTiDunMH25g&index=1&feature=plcp , but there's clearly not the depth of support & features if you want to go off piste. )

JAZZCNC
26-12-2011, 05:30 PM
I could write a quick program to do that, but find and replace will be fine. I use that all the time to edit the code when I accidentally put the wrong feedrates/retract height in.

Yes I do that as well if I have too. Now i'm now expert on find-replace but dont think the standard find-replace would work because it would only repalce A with B.

This would need to find the T# then replace the P# of the G4 command. The code should really only put one T# for each tool (or pad in this case) so there will be lots of proceding lines with no T# untill next pad change or T#. So just finding the T# and replacing the whole line won't work Unless everyline starts with a T# which hisn't very effficient.

The Script would need to look for the T# then replace any proceding G4 P### time values with a stored value matching that T# then repeat untill it find another different T# so on n so forth.
I don't know how to do this with the standard find-replace without using some kind of script which defeats the purpose so may as well just use the script straight off.
Jonathan If you know how then I'd be interested because like you I do use it to change code on the fly and being able to target one value and change another select value would be good info.!

HankMcSpank
27-12-2011, 03:27 PM
Bit of a result here.

I started wading through the threacle that is Eagle user ulps....and found one written in 2001, with the obtuse name of dose-pro.ulp!

Anyway, when I run it within eagle on my pcb layout, it creates two files

1. A list of SMD pad surface areas and the pretend tool that it has married for that size of pad...

Tool Pad-X Pad-Y Square mm^2
T01 X000055 Y000120 | 000.66
T02 X000060 Y000060 | 000.36
T03 X000060 Y000220 | 001.32
T04 X000079 Y000089 | 000.70
T05 X000100 Y000140 | 001.40
T06 X000114 Y000185 | 002.12
T07 X000120 Y000120 | 001.44
T08 X000140 Y000140 | 001.96
T09 X000160 Y000160 | 002.56
T10 X000160 Y000180 | 002.88
T11 X000160 Y000180 | 002.88

and just as importantly...

2. a file containing all the SMD pad coords and auto-grouped by tool size, for example....

T01
X000790Y-00460
X000790Y-00270
X001050Y-00460
X001050Y-00365
X001050Y-00270
T02
X-00146Y000683
T03
X-00262Y-00238
X-00262Y-00111
X-00262Y000016
X-00262Y000143
X-00262Y000270
X-00262Y000397
X-00262Y000524
X000258Y-00238


This latter file actually opens up just fine as a drill NC file in USB CNC (so I now have all the points the solder dispenser needs to go to)....so all I need now is for the USB CNC software to raise a output pin signal of somekind at say Z +.0.2mm (start the dispense), then dwell (pause) depending on tool number, then release the pin signal (stop the dispense).....and then I'm done!

Jonathan
27-12-2011, 04:39 PM
Brilliant ... that thing you've found is in C, so we can edit it to output exactly what you want!


It's here:

http://dale.chatham.org/Interests/Electronics/Eagle/ulp/dose-pro.ulp

It looks like you've outputted the pad co-ordinates not in mm, however there's a selection thing at the beginning of the code so that shouldn't be a problem. I think you'll want the format something like this, but with the right units:

T01
G0 Z5
G0 X000790Y-00460
G0 Z0.2
M8
Px
M9

(so instead of the program outputting just X000790Y-00460, it outputs that with all the above appended)

...for each line. Where M8 macro (looking at mach3, use whatever it is for diycnc) is the coolant pin which you can connect to the dispenser, M9 switches it off. Px, x is the time for the delay using the pad area from the other file multiplied by some constant which you need to work out to get the right time.

I think that should do it?

HankMcSpank
27-12-2011, 06:28 PM
Hi Jonathan,

Yes....it is brilliant (thank heavens for other people's code!)

Straight away you've established an issue that I'm trying to work around. I've never coded in C, but yes, it is outputing like thus....

T01
X000790Y-00460
X000790Y-00270

whereas what I need it like this....


T01
X0007.90Y-004.60
X0007.90Y-002.70

or even better..

T01
X7.90Y-4.60
X7.90Y-2.70

I tried dicking about with the ulp code ...I got it to divide by 100, but then lost a whole lot of resolution (what it really needs is for the decimal points to be inserted at the correct points as those coords are in 10ths of a millimetre) If anyone who's an expert in C can cast their eye over the ulp I'd be *very* grateful.


Re your code....

T01
G0 Z5
G0 X000790Y-00460
G0 Z0.2
M8
Px - but how do I get this pause to relate to the tool number - for example if tool=1 then pause 0.3s, if tool = 2 then pause 0.5s (the longer the pause the more the solder paste is dispensed)
M9

HankMcSpank
05-01-2012, 01:57 AM
ok still mulling this one (I'm presently abroad with too much beer addled brain time on my hands)

So I've got a way of ID'ing all the pad centres and differenting on size. As it transpires, bringing one of the output files from doe-pro.ulp into say cambam as an excellon file is probably going to be the easiest...becuase once in cambam I can easily visually ID all the different pads...delete the ones I don't want solder dispensed on....group very similar ones together (dose-pro.ulp seems to treat even slighly differeing pad sizes as totally different pad types - which is likely going to be a chore).

So then, I now have all the points in my cam app....I just need a way of getting the cnc machine to move to each point, lower, at a certain point trigger an output signal, wait a bit & then move on.....it looks like Mach3 has enough features to go that way (thanks jazz), but I really want to use USB CNC sw if I can ....which doesn't have the equivalent to Mach3's brain.

So I'm wondering what I can press into play by way of a CNC control/output.....mist & flood are the obvious ones, but at this point I need to declare my hand & never used them.

So...basic question (& apologies to Jonathan who has already touched upon this aspect) just where is control of for example mist brought into play? For example with drilling....is the mist typically switched on at the beginning of *all* the drilling operations (like a top & tail action)....or can it be switched on/offon per drill hole....eg drill lowers, just above the top of the stock, the mist is turned on, drill then lowers into the stock - mist stays on.....gets to the correct depth & raises....mists turns off?

Becuase if I can bring something like mist into play per Z 'descent', then this is an obvious avenue of exploration for dispensing solder paste.

Which brings me to my other question....where do you program the mist on off - in cam software? (or is it as kludgey as turning it on in the CNC software?)...any help enlightenment warmly received.