Shapeoko and Pick and Place – Part 2

This is part 2 in the development of a pick-and-place machine for electronics assembly.  Part 1 is available here.

The new head

head2The new head is much more simplistic than the old version.  This version uses a stepper motor with a hollow shaft instead of a tube with a GT2 pulley on it.

In the CAD model to the left you can see the Shapeoko spindle mount plate in black.  The main mount for the head is shown in a semi-transparent grey with the stepper motor and mounts for two cameras.

At the bottom you can see an adapter that converts the stepper motor shaft into a tapered fitting for the pick and place tip.  The blue disk in the center is a magnet that holds the taper and head assembly.  This allows the machine to be able to adjust the tip depending on the part being placed.

head2photoHere you can see what everything looks like on the machine today:

We also mounted an upward going Z-axis limit switch that’s screwed in to the spindle mounting plate.  This will kill the power to the motor drivers if we accidentally command the machine to kill itself.

The brass fitting in the vacuum line allows the motor to turn the nozzle continuously without turning the plastic tubing going to the vacuum.

The new feeder

The new feeder swaps out the solenoid and pawl for a thin, pancake stepper motor.  The stepper motor advances the paper tape of parts with precision control.  This model also includes a small reel in front to collect the clear film that keeps the parts in there little holes.  This is driven by a small DC hobby motor, but we’ve also made it to where a second stepper motor could replace this DC motor if it doesn’t work in this design.

new_feeder2

I just got the circuit boards for the control board in earlier this week, so I’ll make those up tomorrow.  But for now you can see a video about the construction and initial testing on the new feeder:

 

Shapeoko and Pick and Place – Part 1

The Project

This is the first in a series of posts about our journey adapting a Shapeoko 2 into a pick-and-place machine for surface mount electronic parts.

The skeleton

We started with the “mechanical kit” from inventables.com.  We also got their NEMA 17 stepper motors, stepper motor cable, GT2 belting, and GT2 pulleys.  With shipping this comes to about $440.

When the box arrived it was obvious that it was not treated well on its journey:

shapeoko_delivery

That hole there, that was the escape hatch that all of the stepper motors used.  After filing a lost articles claim with the shipper, I notified the folks at inventables.com and they put replacement steppers in the mail that same day.  Hats off to the instructables.com gang!
flocculant
During assembly I broke a tap in the makerslide.  I was going to EDM it out, but the machine was being used to make money.  Also, I was a little concerned about damaging the threads that were already there, so I ended up dissolving the tap with some alum.  I got the idea from here.  The called it flocculant at the pool supply store.  I used the Baquacil product shown here.

I put the makerslide in a stand and then suspended it on a hot plate with an automatic magnetic stirrer.  You want to get the tap to where it has bubbles coming off of it.  Add alum until you can’t get any more to dissolve in the water.  It took several hours to dissolve to where the tap fell out.

makerslide

At the end the slide was a little discolored where it was exposed to the alum, but the threads were undamaged.

I have a video on YouTube showing the bubbles and the steel turning into black dust particles:

The head

First PnP Head DesignThe first head on the Shapeoko worked pretty well.  It’s shown here to the left.  The vacuum tube comes in and connects to a tubing adapter, twist adapter, then another adapter that connects to a hollow aluminum tube.  This tube had a GT2 pulley on it.  The stepper motor connected to the left of the base had a GT2 belt that would turn the pulley on the vacuum tube and orient the picked up part along the A-axis.

The aluminum rod goes between two switches.  A wide washer on the aluminum rod can trigger the switches.  The height of the buttons on the switches is different, but close.  When the part gets placed the first button triggers.  The second button is just slightly higher and is used as a limit switch killing power to the Z-axis stepper driver if something bad happens.

There is also a webcam shown, a Logitech C920.

To the right you can see several, rather large countersunk holes.  These were sized to fit dispensing tubes for solder paste.

The CAD model probably makes it easier to see what’s going on.  In the center there’s a teal colored washer with a thick diameter.  This presses up on the switch buttons as the tip of the vacuum needle touches the circuit board.  The three plungers shown wouldn’t be used together.  The idea was just to have a hole to accommodate the various sizes of dispensers from multiple manufacturers.

head1

Below is a wider angle shot of the setup.  At the bottom you can see the four stepper drivers that control each of the axes.  We did get this setup working with LinuxCNC and OpenPnP.  The stepper controllers were driven by the parallel port on the PC shown at the back-right of the table behind the Shapeoko.

pnp_1

Unfortunately we were not able to get the proprietary nvidia driver working with the real time kernel in our LinuxCNC distro and this was slowing down our vision processing.  So we started looking for a way to move away from LinuxCNC.  We also were using a solder-less breadboard for the electronics that are controlling our vacuum, blower, and the solenoids that direct the air and wanted to get away from needing the breadboard or building a circuit board to replace it.

We considered getting a GRBL controller since a lot of folks are using this with OpenPnP but decided to get a Smoothieboard instead.  The big points that made us go the smoothie route were:

  1. One board that can control all of our stepper motors
  2. The same board can control our vacuum, blower, and fans (onboard mosfets with screw terminals)

So, we tore apart the PnP that we spent so much time wiring together to come up with iteration 2.

What about part feeders?

The last bit of parts we need for our next version of our feeder are scheduled to arrive with FedEx on Thursday, so we’re really excited about that.  However, for this first version of the PnP we tried to use a solenoid based solution for our feeders:

feeder1

The control board at the top-left drives a hobby, DC motor that was used to pull up the tape on the reel.  It also controlled the voltage to the solenoid.  The solenoid was connected to a pawl that grabbed the teeth on the ratchet behind the sprocket that fed the tape.  A second ratchet is shown here in this picture on top of the sprocket.

This feeder was functional, but the solenoid was not strong enough to consistently advance the reel.  Adding in gearing would have made this solution too slow for production use.  Larger solenoids would not have fit in the narrow spacing that we wanted to keep for the feeder.  It was cool to watch though with the pawl acting as a hand grabbing and pulling the ratchet.  Another downside was that the solenoid doesn’t allow for precision control of how far the tape gets advanced each time.

The CAD rendering below shows the assembly a little better.  The pawl (purple in the CAD) is basically a hook that gets stuck in the angled teeth of the ratchet shown in green.  When the solenoid fires it pulls the ratchet and the sprocket that moves the tape forward.feeder

Stay tuned and I’ll bring you up to date on our second version of the head and feeders.

Part 2 of this series is available here.

RTD Sensors and Thermal Mass

Our RTD shield for Arduino is super precise.  Almost too much so.

Some of our customers have asked questions and had concerns when the RTD shield they purchased from us shows +/- 2 degree fluctuations when exposed to ambient air.  It seems that people have been conditioned with slow moving temperature sensors that take ages to update.

If you think about it though, it should really not come as a surprise that there actually are large temperature gradients everywhere.  For example, when you exhale the temperature of your breath is (often) at a much different temperature than the ambient temperature.  This heat doesn’t instantly disappear into the environment.  Breath is just one example though: body heat, air conditioning, fans, clouds, and so on all affect the temperature.  They all radiate out and make the temperature change over large distances. These temperature differentials are actually physically present all around us.

However, folks usually see these swings as errors or noise.  They call in to question the performance of the shield and ask if other settings could make the results more “accurate”.  The first thing to do is to prove that the electronics on the shield are über-stable.  We don’t want our customers to just take our word for it.  Luckily, the shield can be easily validated by using a fixed resistor in place of an RTD sensor.  Wire one end of the resistor to the + terminal(s) and the other end of the resistor to the terminal(s) and then take readings with the shield.  The RTD is just a temperature controlled resistor.  Using a fixed resistor eliminates almost all of the temperature dependance (sure, most resistors have a little thermal dependance: like 200ppm, but this is good enough to validate the shield).  A Pt-100 RTD sensor measures 100-ohms at 0 degrees Celsius.  So using a fixed resistor around this value or a little more is a good choice as this is the most popular type of RTD sensor.  Using this setup our customers are able to validate the precision of the shield as reported here.  In fact, this approach is how we test the shields after production.

Some applications require the ability to quickly measure temperature changes.  However, many don’t, and I typically give the following list of suggestions:

  • Average the data coming from the RTD shield
  • Increase the thermal mass of the RTD sensor
  • Add a small capacitor to the screw terminals of the RTD shield

Averaging the RTD readings is pretty self-explanatory.  Collect a bunch of data and compute the mean of the data, or even better do something like what’s in the smoothing example to quickly find the average of a circular buffer of data.

Another approach is to increase the system’s thermal mass.  The idea here is analogous to inertia.  Something with a lot of thermal mass doesn’t change temperature easily.  Something with little thermal mass changes temperature very easily.  Ambient air has very little thermal mass: you can blow on the RTD sensor and see the change.  If you take an RTD sensor and immerse it in a liquid, then the liquid will add thermal mass and make it harder to change the temperature readings: if you blow at the liquid it probably won’t affect the RTD readings.  You could also shield the sensor from stray breezes by using a box or use thermal insulation around your sensor.

Adding a little capacitance is effectively the hardware approach to taking an average.  The capacitor makes it a little more difficult for the RTD sensor to change the signals on the inputs of the RTD shield’s analog-to-digital converter.  I would suppose that the capacitor to use could be calculated by determining the desired RC time constant, but I’ve never actually used this approach.  It’s pretty easy to just average values.

So maybe it’s time to trash all of those slow moving thermometers you have and buy one of our awesome RTD shields?

First project with the BeagleBone Black

The Old Milling Machine

cam_chuck_bbb

The next product we’re going to launch is a stepper motor controller.  We are going to use a few of them on a 3-axis table-top gantry mill that I built as part of the machine shop class at Washington University in St Louis way back in, gosh 2003 was it?  All of the other kids were making stainless-steel shot glasses, and I was making parts for a CNC mill…

The mill is pretty much done mechanically, but I never added the electronics to the system: the stepper motors yes, but nothing beyond the motors.  I’m going to try to run Machinekit as a way to get LinuxCNC running on the BeagleBone Black.  I also got a Logitech C920 and hope to play with OpenCV to add machine vision to the LinuxCNC system: a big task, but what fun!

First Steps

The BeagleBone Black (BBB) looks really cool in terms of specs, but I needed a bunch of accessories to really get started.  Here’s what I ended up getting:

I tried to connect the 10 port hub to the BBB and then the Logitech

mouse and keyboard receiver to the 10 port hub, but the BBB didn’t see the mouse or keyboard when I did this.  And yes, I did plug them in before turning the power on.  The mouse and keyboard did work when plugged in directly to the BBB.  So I tried another USB hub that I got from DigiKey and voilà, it worked.

I went with the 10 port hub because it said it could supply 3 amps, wow!  The DigiKey USB hub has no power supplied to the peripherals, so I’m hoping that the power from the BBB’s 5V barrel jack is enough to keep the camera going without issue.  I suppose I could cut the red wire on the 10 port hub as described here, but I’m only going to go that route if the C920 has issues.

It was cool to see the BBB boot up as I haven’t had time or a project to use it on since I bought it almost a year ago.

side

If you have an interest in this project, you might want to check out the following video demonstrating the BBB and OpenCV with the C920:

GPS Tracking

We wanted to track some semi trailers that we work with and never seem to know the location of.  We looked at existing asset tracking systems, but they were all rather expensive, usually around $30 per tracked asset per month.  Not terrible, but we thought we might be able to do better. If you’re not familiar with these systems, essentially the unit gets GPS data and sends it to a central server using the cellular network.

To cut to the chase, our setup allows us to track assets for just the cost of the cellular provider’s data plan, which is about $10/month/asset if you use AT&T’s pay as you go plan or $10 every two months per asset if you use a discount provider like ptel.  The cost of the equipment is very similar to what we found from other providers: about $200 for the tracking equipment.

We found an existing open source hardware project called the GeogramONE, which was perfect.  A tiny board that has everything built in to do the tracking while conserving battery life.  The only thing that was missing was a website that would plot the data on a map so we could visualize the data.  So we built gps.protovoltaics.com, which allows you to see where your assets are and where they have been.  To be honest you could use other websites for visualizing where your assets are, but ours allows you to get some information that isn’t available in other systems: like the GeogramONE’s battery gauge level.  It also allows you to group your assets in a hierarchy so you can filter them into various categories.

To go along with this we made a case for the GeogramONE, which is available in our store now.  It’s waterproof and can be connected directly to a semi trailer’s wiring for the turn signals.  So, when the trailer is connected to a tractor the battery will start charging automatically.

If you want to set up a GeogramONE to use our system check out the details at the GeogramONE forum.

Projects Update

We’ve been silent for a while.  We’ve been working on a number of projects and had no time left over to update the blog.  I know, no excuses, we should keep up with the blog.

Since our last update we’ve installed one of our power meters in a power plant in Baha California Sur, Mexico.  The plant delivers electrical power to locations in the southern tip of the Baha peninsula.  The plant delivers about 38MW to the national grid.

We’ve also been developing an asset tracking system.  We found existing systems that would work, but all of them were rather expensive: charging around $30 per asset per month.  We used open source hardware and developed a platform that you can use and only pay the data fees from your cellular service provider.  See the separate GPS Tracking post for more info.

Most of our time has been going to developing a sensor interface system that can read various sensors, log data, and actuate electromagnetic pumps, solenoids, and relays.  This can operate as a stand alone system or be driven by an Arduino, BeagleBone, or Raspberry Pi.  It’s contained in a rugged, waterproof enclosure and should be available soon.  The various subsystems in this design will be broken apart to make various shields as well.

 

Arduino Multi-Channel RTD Shield with RS232 and RS485

Our first shield design rolled out last week. You can find the Arduino Multi-Channel RTD Shield with RS232 and RS485 in our store.  We also strive to have the best documentation possible.  The docs for the RTD + RS232 + RS485 shield are available here.

We left it running for days to make sure everything was stable.  Everything seems to be running great.  We set it up to read the resistance values of precision resistors that were connected in a four-wire configuration.  It took about 40 milliseconds to cycle through all of the channels and get a new reading back to the Arduino.  On the shield it takes multiple readings and calculates the median value, which it saves and reports to the Arduino when queried.  This provides some basic filtering and eliminates any outliers that may have been encountered.

The shield is easy to use and has some nice features.  We tried to come up with examples that showed how all of the routines work.  If you have any questions, let us know!

Lessons Learned

  • Don’t try to access the EEPROM while in the I2C slave interrupt.  You can’t read the data from the EEPROM fast enough to properly service the I2C slave response to the master even with clock stretching enabled.

Reflow Oven

We got to wondering why no one sells a ready to use reflow toaster oven.  We’ve seen other sites where you can order a controller for your oven, but not a completely ready to use oven straight out of the box.  It seems like this is something that could be done without blatant and obvious legal repercussions.

For example, you can re-sell a product that you modify.  There’s a great discussion over on Avvo.  Maybe it’s hard to etch over the manufacturer’s name on some models.  Also, there doesn’t seem to be an issue with FCC compliance as this would fall under the exclusion for devices used exclusively in an appliance.

Obviously there would be no warranty available through the original manufacturer of the oven and any UL or other listing they obtained would no longer apply, but it would be a great way for makers to get up and started quickly with solder paste reflow.

Let us know what you think.