Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature - an abstract socket to semi automatic pick-and-place tool and translation of pnp to borad coordinate system. #230

Open
kb-01 opened this issue Dec 7, 2023 · 0 comments

Comments

@kb-01
Copy link

kb-01 commented Dec 7, 2023

Hello everyone,

I was thinking that posting an information about my work to the community may be good idea.
Recently I added magnetic stripes to my in-house built PnP tool so it is able to measure position with abt 50um accuracy
in working area of A4 size. I found gerbv to be great base for building a tool which can make assembling pcb easier especially bottom layer. So far I have completed interface to the machine which is unix abstract socket. This gives a choice of using e.g. bluetooth, wifi or anything else in the future. By now I use usb and the "driver" to gerbv with my patch looks like this:

socat /dev/ttyACM0 abstract-sendto:/gerbv-pnp-sock

and the gerbv needs to run with following args (for example) -s /gerbv-pnp-sock -p test-pp2/if2qs.proj

The abstract socket allows also for basic testing of UI, checking if board is centered at coordinates sent in board coord. system

I have done so far:

  1. communication with my in-house built tool, the protocol is simple ascii and the tool advertises vacuum nozzle tip location every second with keyword "PNPLOC(x,y,hex-flags)\n"
  2. translation of coordinate systems and calibration, there are required two reference points arbitrary chosen, good are e.g. 0805 pads for 503 nozzle tip. One needs to locate the tip on the physical pcb and right-click corresponding (e.g. center) pad in gerbv, select "cal reference point" 1 or 2 and when both are picked up the calibration is done and these two coordinate systems are in sync with regard to offsets and tilt (relative rotation)
  3. UI part - cross hair in the center of window
  4. pick-and-place files support - added 2nd format, a partlist from Eagle by Cadsoft
  5. various refactoring, e.g. I resolved false positive trigger for pick-and-place files which contain parts with values containing strings like M00, M02 and so on.

I am going to add a tab "partlist" next to messages with list of parts per side and purpose is to focus a list item with part value under the nozzle tip

The patch is 57k long by now. Some stats:
src/callbacks.c | 78 ++++-
src/callbacks.h | 4 +
src/draw.c | 28 ++
src/gerbv.c | 18 +-
src/gerbv.h | 20 ++
src/icons.h | 2 +-
src/interface.c | 215 +++++++++-----
src/main.c | 10 +-
src/main.h | 6 +
src/pick-and-place.c | 663 +++++++++++++++++++++++++++++++++++++------
src/pick-and-place.h | 78 ++++-
src/render.c | 13 +
12 files changed, 966 insertions(+), 169 deletions(-)

Are you interested in my work ?
If so let me know. you may use my email: kb@sysmikro.com.pl

Krzysztof Błaszkowski
Poland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant