part pickup detection

Post Reply
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

part pickup detection

Post by thereza »

I'm not sure which needles people are using for different parts, but I"m finding that I'm not always picking up parts which makes a mess when the needle goes down on the solder paste with the vacuum on.

I did some preliminary tests using pressure sensors that I have in the lab and found this one did a good job of detecting the pressure difference between nothing on the needle and something on the needle - http://cache.freescale.com/files/sensor ... X4250A.pdf

I'm added a T to the tube going from the solenoid to the needle that goes to this sensor. Only problem is that the tinyG has no analog inputs (as far as I can tell). I've got a spare teensy 3.1 that I'll just as an ADC (overkill) but I suspect it'll be the fastest way to get it operational. I'll make the code changes to support detection and add retry logic.
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: part pickup detection

Post by mrandt »

I have also experiencied problems with *some* components not being picked up at first attempt. A pressure sensor would probably help to detect that state.

I have built an enhanced pneumatic system for my LitePlacer which already uses two pressure sensors connected to a Atmel MCU to control a pump and valves to keep the vacuum + pressure storage tanks at defined levels.

Unfortunately I was not smart enough to include a third sensor to monitor pressure in the tube going to the needle :-(

TinyG does not have any analog inputs nor do we have digital inputs available.

I think using an external MCU featuring at least one ADC is the easiest approach. This could be connected to PC via RS232-USB but this would require another port to be configured and opened by the LitePlacer software.

Alternatively, we could use the SPI interface exposed on the TinyG. TinyG is intended to act as master, providing two independent Slave Select GPIO ports. So we could make an external controller the SPI slave and hook it up to TinyG. Downside is, that IIRC there is no SPI support in TinyG firmware. So we would need to fork and extend that beast including some custom commands / status values.

What do you think?
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: part pickup detection

Post by thereza »

i have a usb hub attached to the device so it'll be easy to add the teensy (built-in usb), but it complicates the setup in that you need the extra hardware and overhead maintaining the separate communications.

revisiting the tinyg schematic, j16-2 and j13-2 (v8 of the hardware, not sure which one we have) exposes adc pins. shouldn't be too painful to add adc support to the firmware and it would be a cleaner implementation.

i'll look at the firmware to see how hard it would be.

-r
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: part pickup detection

Post by JuKu »

> v8 of the hardware, not sure which one we have

v8.
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: part pickup detection

Post by thereza »

took forever to install the latest avr studio but it's based off of visual studio which is nice. the tinyg code is super modular with many layers of references making it a bit hard to follow. i've found 2 versions of the adc sample code (AVR1300) that i'll try to stick in there in a horribly ugly way, see if either compile.
User avatar
dampfboot
Posts: 48
Joined: Tue Jul 28, 2015 5:51 pm
Location: Hannover, Germany
Contact:

Re: part pickup detection

Post by dampfboot »

All this efforts here let me believe in this system already - great work. Nice to have people who are able to go that deep into the software!

Maybe some-days the change to the TinyG2 could be a solution to get more free inputs for something like that?

In the moment I would like to have the machine stopped if some part was not graped to prevent the nozzle from sucking up the solder paste anyway. A kind of manual support will be necessary after such an event of cause. Wouldn't it be possible to signal this "no part alarm" to one of the already available switches like the end stops or the Reset button? With this you could prevent any kind of mess, correct the defect and re-start the machine manually?

The experts might identify the switch to use which will generate the smallest chaos.

Rainer
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: part pickup detection

Post by thereza »

my system works flawlessly as implemented. just checks the pressure and retries a couple times then skips that part so it doesn't delay the system. if it can't pick up 3 different parts, it maks it as an error and continues to the next component for placement. i have a post somewhere with more details on the implementation as well as the updated tinyg firmare. i don't think anyone else is using it.
mawa
Posts: 139
Joined: Wed Jun 10, 2015 1:23 pm
Location: Near Hamburg, Germany

Re: part pickup detection

Post by mawa »

Using a vacuum feedback is certainly the best approach.

But I hesitate to alter the TinyG hard- and firmware as Reza did.

Using arduinos of all sizes I tend to add an arduino micro/nano to fullfill this and some more tasks, like switching the LEDs and also the pump and solenoid.
The pump workaround (moving the motors a tiny bit back and forth) because of the M command misbehaviour of the TinyG is IMO a bit annoying to me.
Then you can connect some digital pressure sensors via i2c or even think of regulating the vacuum motor by PWM.

I think Malte (mrandt) is using that approach already?
best regards
Manfred
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: part pickup detection

Post by thereza »

mawa wrote:Using a vacuum feedback is certainly the best approach.

But I hesitate to alter the TinyG hard- and firmware as Reza did.

Using arduinos of all sizes I tend to add an arduino micro/nano to fullfill this and some more tasks, like switching the LEDs and also the pump and solenoid.
The pump workaround (moving the motors a tiny bit back and forth) because of the M command misbehaviour of the TinyG is IMO a bit annoying to me.
Then you can connect some digital pressure sensors via i2c or even think of regulating the vacuum motor by PWM.

I think Malte (mrandt) is using that approach already?
It's not hard to upgrade the firmware - I have the binary posted somplace and you can revert if you have an issue for some reason. Otherwise, you then need to connect to two devices via two serial connections which increases the chances of complications.
WayOutWest
Posts: 198
Joined: Thu Jul 16, 2015 12:18 am
Location: Washington State, USA

Re: part pickup detection

Post by WayOutWest »

thereza wrote:
mawa wrote: Using a vacuum feedback is certainly the best approach.
But I hesitate to alter the TinyG hard- and firmware as Reza did.
It's not hard. I just flashed his firmware and it works fine. Here are the instructions. I used "avrdude" on linux and it worked on the first try.

Suggestion: execute the "$$" command before flashing and copy-paste the output to a file somewhere. The $$ command basically dumps the TinyG's internal nonvolatile state in human-readable format. Reflashing will erase all of this, although the liteplacer software should know how to restore all the settings; still it can't hurt. The big gotcha is that the reflash will put the TinyG back in British-Imperial-Units mode (yuck) instead of metric.

Thereza, you might want to make a thread titled "pressure sensor" or something like that... the post containing the hexfile is buried deep in a thread dealing with other stuff and very hard to find.
- Adam
Post Reply