Page 1 of 1
part pickup detection
Posted: Mon Jun 08, 2015 10:43 pm
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.
Re: part pickup detection
Posted: Tue Jun 09, 2015 4:48 pm
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?
Re: part pickup detection
Posted: Sun Jun 14, 2015 10:11 am
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
Re: part pickup detection
Posted: Sun Jun 14, 2015 2:11 pm
by JuKu
> v8 of the hardware, not sure which one we have
v8.
Re: part pickup detection
Posted: Sun Jun 14, 2015 7:40 pm
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.
Re: part pickup detection
Posted: Wed Jul 29, 2015 10:41 am
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
Re: part pickup detection
Posted: Fri Jul 31, 2015 2:16 am
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.
Re: part pickup detection
Posted: Fri Jul 31, 2015 7:59 am
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?
Re: part pickup detection
Posted: Tue Aug 04, 2015 10:36 pm
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.
Re: part pickup detection
Posted: Tue Aug 25, 2015 5:53 pm
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.