DIY pick and place machine

Current status of my DIY pick and place machine

Current status of my DIY pick and place machine

When I started developing the RasPiComm Plus I soon realized that I need the ability to manufacture smaller batches of our boards since we will have at least 10 different extension boards. I also wanted to stick to my 100% made in the EU principle.

Usually I would use my manual pick and place system to assemble prototypes. The boards are manufactured in Germany and sent to us. For larger quantities I would send the parts and boards to another company in Germany and let them assemble them. That costs almost €4.000 per 1.000 boards just for the assembling in the case of the RasPiComm. And it will take time, up to 4 weeks depending on their schedule. I needed a better solution and faster turnaround.

no more manual pick and place

no more manual pick and place

Since I have a manual stencil printer and a really cool vapor phase soldering oven a pick and place machine is the missing piece of equipment to have a reasonable low volume production facility.

So those were my options:

Buy a new pick and place machine

I compared prices of various options. An US company sells a cheap pick and place, very simplistic design (no housing, aluminum profiles), for about $25.000. Shipping to Austria would have added another $2.500. The machine itself was not impressive at all. I had my doubts if it could handle 0402 relieably.

The TM220A, a $4.000 toy-grade pick and place as Dave L. Jones calls it (and I am completely with him on that) has no vision. And it does not even look like it is worth $4.000. Not an option at all.

Buy a used pick and place machine

Tempting. Ryan O’Hara bought a Quad PnP for about $16.500 (without the feeders). He talked about it on The AmpHour. It is not that easy if you are not living in the States. I cannot come over and have a look if this machine is what I want and shipping is of course awfully expensive to Austria. Another thing is the software. This price only applies to the DOS version. I like having control over the software and my processes.

Build one

Well this option has the bonus that I’d have to build something from scratch. Do you need more reasons apart from this one? I know, me neither.
Nevertheless it has to be clear that building such a machine is inevitably more expensive than buying one in the short-run. If you don’t consider your time worthless of course. But one gets better with each project, you will learn a lot and you will have a system which you understand down to the tiniest bit of wire and code, so you can tackle every problem that arises, you can adapt software and hardware to your needs. And as an entrepreneur I also keep in mind that it maybe will be a product someday, or parts of it, so I always consider these kind of projects as an investment for the future not only in terms of learning and training for me and my employees but also having working modules that can be reused later on.

Scope

I thought about my goals, what I needed and what I don’t need. First of all this should be a rapid prototyping project. I will make design decisions based on if they are practical and the effort/benefit ratio fits for me. It should not be a project which is never really usable. Since this is more a side project that  a full-time project I gave myself 3 months. As I am writing this the 3 months are not over yet, so it is still in time.

I also did not want to think about automatic feeders too much for now. I knew I’ll have to redesign small areas of the machine for automatic feeder support. Until then working with belts held down by a polycarbonate shield should be sufficient for prototype quantities. For the small volume production target feeders are a must of course. So this is a compromise I make when starting this project – in the beginning I won’t have automatic feeders.

Hardware

After some hours of 3d-modelling we milled the first aluminum parts and ordered some off-the-shelf components and aluminum profiles. Milling was done with a very simple and cheap CNC, not even my good one (I got two of them). The CNC does not have a toolchanger, not even ball screw bearings. But it does its job. After that the parts went to anodization. Black of course.

Next step: Motors. I used quite beefy stepper motors in closed-loop mode for the X and Y axis and servos for the 2 heads I planned. Part rotation is again done by a stepper motor with a hollow shaft. Two simple turning parts made from stainless steel made the pickup base for the nozzle. I glued a magnet to the bottom. I used simple fuse clips as the nozzle holders. Nozzle-changer: done.

X and Y have ball-screw bearings with a pitch of 20mm to get the speed up. With a 500 step encoder with quadrature encoding this means a positioning precision of +/- 0.09° which would be  +/- 100µm. Enough for this machine. I plan to switch to BLDCs for a couple of other reasons with a 4000 step encoder which would lower that to 50µm in normal mode and 12.5µm with quadrature encoding. This is of course hypothetical, the mechanics are not that precise but still very good since I only used high quality ball bearings for X, Y and Z axis. The guides are also precision ones.

Assembing was easy, it took a couple of hours. Wiring was a bit of a pain, it took a whole day.

For the vision system I am using are 2560×1680 pixel USB3.0 cameras. One from the bottom for part alignment and a top camera for PCB/feeder alignment. I made a simple ringlight with 48 650nm wavelength LEDs. Funny detail: I was not able to do a circular pattern alignment of the LEDs in Altium, so I wrote a tiny Autohotkey script which allowed me to enter a number of parts and a diameter and it automatically aligned the parts correctly. Huge timesaver when you want to play around with the radius in which the parts are aligned on the PCB.

I also added a joystick to move around in the x-y plane, for testing and basic board adjustment. Fiducial recognition and board alignment should be done by camera of course, but to give the software a hint where the board is the joystick allows to move to the approximate position.

I wanted to have the top metal platform made since my CNC is too small to mill it so I asked a company what it would cost to do it for me. The price was about €1.500, too expensive for now. Thats why currently I only mounted a 10mm thick and 200mm wide aluminum sheet I had. Enough to hold my small PCBs and a couple of smd parts.

Software

Pick and Place Software

Pick and Place Software

Since I already did write some code some years ago for a pick and place thing I had something to start from. Writing a gerber-file importer took me two days (I did it from scratch using the gerber file format specification from Ucamco). Martin adapted the old code and added the support for our motor drivers, our cameras as well as reading the pick and place csv files. So we had our complete software solution to load gerber and pick and place data and control our motors. Sweet!

For the vision I used OpenCV which I knew a bit. This was very straight forward, it took me under an hour to get a usable rectangle detection on an 0402 part with the rotation information. Still have to test how it will work in the real world. If I learnt anything from building machines than that in the production environment not a single thing will be as in your lab/test environment. I set the filters so that only the red light of my ringlight is captured. That way sunlight won’t screw up my detection. We have a glass roof in the office and no housing for the pick and place yet, so that was quite a good test for the relieability of the alignment algorithm.

Another cool thing when writing your own software is that it can be taylored to your specific process. Since I use GIT as my version control system (even for Altium) I want the pick and place machine to pull the project and load the PnP and gerber data. The PnP will of course have a wireless lan built in and a nice sweet touchscreen and nice GUI.

On what hardware should the software run? Raspberry Pi?

The PnP could be controlled with a Raspberry Pi with our RasPiComm+ and in the beginning I wanted to use this as a platform. But since our old software is built with WPF (windows presentation foundation, a very powerful GUI framework), porting the GUI would have been too cumbersome. The bussiness logic would be easy to port since Mono runs on the Raspberry Pi. But in terms of GUI there is simply no match for WPF out there. And I want to use a touchscreen to control the PnP. Easy to make custom UI controls with WPF, very time consuming with other technologies. And when it comes to the vision system a little ARM processor would definately slow things down. The USB 3.0 cameras are running at 15fps at full resolution, pumping 180MB/s into the OpenCV algorithms, easy for a modern CPU but not realistic for an ARM processor (there is of course no USB 3.0 support limining bandwith even further). I also considered the Xilinx Zynq since I have a ZC702 development board. I played around a little bit, attached a camera but after a day I realized thats not the way to go. In terms of development time nothing can beat C#. And CPUs are fast enough for what I needed, and power efficency is not a mayor concern here. To be up and running fast I also would have needed extremly expensive Xilinx IP which I would avoid at all costs (no pun intended). And then there is the problem with fast adoptions. I want to be able to tweak and parametrize the vision system algorithms for different part classes, easy and fast when done in pure software, hard and time-consuming when done in FPGA logic even with all the amazing IP Xilinx provides.

So in the end it is a boring mini-itx board with a 3.2GHz quad-core and 4GB of RAM. More than enough, and alltogether (including CPU, RAM, SSD and full-HD touchscreen) cheaper than the ZC702 development board alone.

Automatic Feeders

The automatic feeders are not done yet, I just have some basic design approaches. Some say they are the hardest part. I don’t know yet, my focus was to get the PnP up and running. But if its too hard I will simply buy some. Currently I only have a simple aluminum board holding down the components with a polycarbonate sheet just for initial test run purposes. Simple but it works for now. I’m still a bit struggling with the resonance of the motors, at certain speeds small parts can flip. But on one hand the resonance can be minimized by tweaking the CL-parameters of the motor controller which I have not done yet , on the other hand I still want to design proper feeders and replace the stepper motors with BLDCs. So thats not a mayor concern for now.

Next steps

My next step is tuning the pick and place process and do a video. And building feeders of course.

Here is a short speed/motor test with a joystick (no actual pick and place action yet, I’ll do that in a separate video):

UPDATE: First pick and place test with and without vision:

RasPiComm+

Here is a quick update on the RasPiComm+ status. We are currently working hard on the Raspberry Pi drivers and hope to get the RasPiComm+ out there in Q3.

RasPiComm Plus

RasPiComm Plus mounted on Raspberry Pi with GSM and 16 isolated I/O extensions

The board itself is a 56x74mm 4-layer board, most components are mounted on the bottom. The top-side only features 4 edge-board connectors for the modules, power LEDs and two JTAG debugging/programming headers for the Cortex M3/M4F and the Altera MAX V CLPD.

We currently have 6 RasPiComm+ modules which we are testing:

RasPiComm+Extensions

CAN bus, RS-485, 8 inputs and 8 outputs RasPiComm+ extension boards

  • 8 Input (with adjustable reference voltage, can be jumpered to 5V or 24V or fed from outside)
  • 8 Outputs (5V or 24V or fed from outside)
  • GSM module
  • RS-485 (two RS-485 on one board)
  • CAN (two CAN bus ports on one board, you’ll need the ARM Cortex-M4 option to use both simultaneously)
  • 16 isolated I/O (using th iC Haus iC-JX)

The firmware of the Cortex M3/M4F (both can be populated) will provide a bridge from the extension boards to the Raspberry Pi and interface with the drivers. The ARM microcontroller can be programmed from the Raspberry Pi for power users. It will come with a fully functional firmware and does not need to be changed though. If you want do do realtime or high relieability stuff you can do this by programming the ARM microcontroller.

The CPLD is also programmable via the Raspberry Pi, so changing configurations for different extension modules is easy.

RasPiComm+ bottom side

RasPiComm+ bottom side

The big metal box on the bottom side is an isolated DC/DC converter. This will be optional and powers both the RasPiComm+ and the Raspberry Pi from a 24V power supply. The battery holder is for the real-time clock backup battery for which we will also add driver support, so that the Raspberry Pi can get the current date and time.

The driver is very elegant I think. You can dynamically load and unload driver modules and they create an interface (for example /dev/ttyRPC0) to the specified module in case the module is a serial module (this applies to the GSM, RS-485 and the CAN module). This is already working quite well, we successfully sent SMS messages from the Raspberry Pi.

For the I/O modules we are looking into a driver interface similar to the Raspberry Pi GPIOs, but this is still work in progress, if you have suggestions what the best way is to implement I/Os leave a message :)

I will post separate articles about the RPCP extension boards to explain them in detail.

And if you have any other ideas how to make the RasPiComm+ even better let me know!

RasPiComm Plus – an early insight into the ultimate Raspberry Pi extension board

ImageOur primary goal is to make the ultimate connectivity extension boards for the Rasberry Pi to connect it to the outside world. We think with the RasPiComm Plus we took the possibilities one step further.

Since I already wrote about our intention to develop a “RasPiComm Plus” I want to share details about this project in quite an early stage so you have the chance to comment on the design. We have a perfectly working prototype, so not as early as you might think now, but the RasPiComm Plus is a bit more complex than the RasPiComm, so we have quite a bit of software development work ahead of us. But first things first.

With the RasPiComm Plus we wanted to tackle some issues that are inherent to extension boards of that kind, flexibility and size being two of them. So what we did is to build an expansion board for expansion boards. Sounds complicated but it’s quite straight forward as you’ll see.

The RasPiComm Plus (our internal project name is Tiny Chameleon, you’ll see why) is a board with its own microcontroller (an ARM Cortex M3) and 4 edge-card connectors on the top side and the ICs and Raspberry Pi connector on the bottom. Now here is the cool part: You can plug up to 4 extension boards into those connectors depending on your needs. You can mount them with two screws so that the RasPiComm Plus is a wiggle-free, rock-solid customized extension board.

Here are the extension boards we want to start with:

  • 8 Inputs (5-35V), switching on 1/2 of the reference voltage with hysteresis
  • 8 Outputs (5-35V, 350mA/500mA peak with thermal shutdown and output transient protection/clamp diodes)
  • dual RS-485
  • CAN bus
  • GSM module
  • development board

Extension boards we are planning to make:

  • Isolated inputs and outputs
  • isolated RS-485
  • isolated/non-isolated RS-232
  • isolated CAN bus

To make these 4 connectors totally flexible we have a CPLD (complex programmable logic device) between the connectors and the microcontroller. So you are totally flexible which connector goes to which pins on the microcontroller and therefore you are able to plug any extension board in any slot!

As always, we want to provide a plug-and-play solution, so no playing around with the CPLD is needed, neither with the microprocessor, if you don’t want to. We will provide a serial driver module that will map the serial ports to /dev/tty devices as we do it with our RasPiComm board, and an API for the I/Os and the GSM module all hosted on github and on our repository for easy apt-get installation (which is also true for our RasPiComm drivers if you didn’t know yet!)

If you want to make your own microcontroller applications you can program the ARM processor directly from the Raspberry Pi via the serial port /dev/ttyAMA0 and the build-in bootloader. And if you want full control (ARM debugging and CPLD programming) you can use the JTAG headers (one for the ARM and the other one for the CPLD) to do your own custom solution. You want your outputs to react to inputs in 7 nanoseconds? No problem, program your logic into the CPLD and there is your ultra-fast “direct-wiring”.

You want a real-time system for your automation solution? Just program the ARM-processor any way you like using the extension boards mentioned above.

You need a stepper motor controller? Thats definitely on our list for further extension boards!

Here is a bottom view of the RasPiComm Plus where you can see the Raspberry Pi GPIO connector:

RasPiCommPlus-bottom

As you can see it uses the same piggyback approach as the RasPiComm even though it is longer extending over the borders of the Raspberry Pi. But that also has an advantage: you have 2 mounting holes and in fact you are not losing much space since the SD card of the Raspberry Pi is sticking out in this direction anyway.

Here are some features of the RasPiComm Plus:

  • 74x56mm
  • Real Time Clock with backup battery
  • ARM Cortex-M3
  • CPLD connected to the ARM, the Raspberry Pi and the 4 extension connectors
  • 5V supply connector
  • 24V supply connector
  • 24V-5V isolated DC-DC coverter (optional)
  • Raspberry Pi GPIO connector

Be aware that this is an early stage as I said, so there is no release date yet. But we would love to hear your ideas and comments on this design!

More infos about the RasPiComm Plus will follow soon so stay tuned!

Also have a look at our already availabe RasPiComm, the tiny Raspberry Pi piggyback board with RS-232, RS-485, real-time clock, joystick and more!

Use RS485 from your Raspberry Pi via /dev/ttyRPC0!

Our RasPiComm device driver is available now! You can now use /dev/ttyRPC0 (RPC for RasPiComm) to access the RS485 port. Find the sourcecode on Github!

Go to our community forum if you have any questions!

RasPiComm Forum is online

Our new website is online!

Have a look at www.amescon.com/forum.aspx and start discussing or asking questions about the RasPiComm extension board.

You can even win a RasPiComm if you vote on the forum:

1st place: A Raspberry Pi + RasPiComm + OLED Display
2nd place: A Raspberry Pi + RasPiComm
3rd-5th place: A RasPiComm

The winners of the contest will be announced on 01/27/2013.

RS ordered RasPiComms!

Finally!

RS Components placed the order, we got a slot on Friday (yes, RS has timeslots, you cannot simply send your stuff).

So we already have a UPS pickup organized, RasPiComms will arrive on Friday at RS. No, it is not yet on the RS shop for preorder, no, I don’t know what they add to our price. But the good news is that the RasPiComm will be available very soon!

Big thanks here to LTEK, they “borrowed” us their account, so on RS the vendor will be LTEK for the first shipment. When our vendor account is set up we can sell directly. We had to do this because apparently it takes more than 3 months to set us up as a vendor and thanks to LTEK we do not have to wait until this process is finished.

This week, before the boards arrive at RS, our website will get its well deserved relaunch, so there will be a forum through which we will provide support.

Short RasPiComm status update

You had to wait a long time without updates, sorry for that! We have been really busy with a lot of things including the RasPiComm.

As you probably know we have manufactured our first batch already. Sadly we still do not have the order from RS.

I’ve been to the Electronica in Munich to meet some guys from RS and we found a solution to speed up the process a little bit by placing the initial order through another company which is already listed as a supplier. That is now all in place, the RasPiComm is set up, so the next step is waiting for the order.

When we have the order we can ship the boards. So we are almost there, but I already said that a month ago.

Just wanted to let you know that we are still pushing here, and we are coming closer to shipping the boards. Thank you for your patience!

RasPiComm API

The RasPiComm API is here!

Martin did all the hard work and now it’s online: https://github.com/amescon/raspicomm

Check out the readme.md for instructions on how to install and use it. There is also a Demo-Tool where you can test the basic functions of the board.

We also added a deamon which you can use to forward RS485 communication via TCP/IP. We used it to make an Andoid App to control a stepper motor. Videos will follow soon!

RasPiComm Update

RasPiComm v3

I want to give you a short update about the status of the RasPiComm project.

We already have ordered parts for the first production batch of 1.000 RasPiComms. We expect all parts to arrive in 4 weeks, so the RasPiComm will be available in approximately 6 weeks.

RS-Components!
We are also had a conversation with RS-Components. We are very confident that they will add the RasPiComm to their product lineup! So if everything works out the RasPiComm will be available worldwide!

Raspberry Pi with RasPiComm

Raspberry Pi with RasPiComm

The RasPiComm will most probably get a distinctive subsite on Designspark.

I made some changes to the final board, most of them are minor layout changes.

I2C
The pull-ups for the I2C were removed since they are already present on the Raspberry Pi. I still have to check how the I2C pull-ups are with the RasPi rev2.

ESD Protection
I also made an important change to the RS-232 and RS-485 ports. I added TVS-diodes for protection which is a massive improvement in terms of stability.

Here are the specs of the ESD-protection:

RS-232 port:

  • 300 watts peak pulse power (tp = 8/20µs)
  • ‹40 watts peak pulse power (tp = 10/1000µs)
  • ‹Transient protection for data and power lines to
    • IEC 61000-4-2 (ESD) ±15kV (air), ±8kV (contact)
    • IEC 61000-4-4 (EFT) 40A (5/50ns)
    • IEC 61000-4-5 (Lightning) 12A (1.2/50µs)

RS-485 port:

  • 400 watts peak pulse power (tp = 8/20µs)
  • ‹Transient protection for asymmetrical data lines to
    • IEC 61000-4-2 (ESD) ±15kV (air), ±8kV (contact)
    • IEC 61000-4-4 (EFT) 40A (5/50ns)
    • IEC 61000-4-5 (Lightning) 12A (8/20µs)

RasPiComm Technical Specifications

RasPiComm Technical Specifications

  • Size: 35,2 x 56mm
  • RS-485
    • up to 230.400 baud
    • pluggable screw terminal connector (A, B, GND)
  • RS-232
    • No hardware handshake
    • up to 115.200 baud
    • pluggable screw terminal connector (RX, TX, GND)
  • Real Time Clock
    • battery included
    • powers the clock for approximately 10 years
    • counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap-year compensation valid up to 2100
  • 5 Inputs
    • connected to onboard joystick (4 way + push)
    • 5V tolerant
    • 2mm pitch external connector, not polulated
  • 2 Outputs,
    • 5V, 100mA max. each
    • 5V relays can be connected without additional circuitry
    • 2mm pitch connector, not populated
  • SPI Connector
    • 2mm pitch connector, not populated
  • 2 I2C Connectors
  • Power Connector
    • pluggable screw terminal connector (+, -)
    • either powers the Raspberry Pi and RasPiComm (5V, 1.5A max)
    • or is a power output when powered over USB
  • RasPiComm Power Ponsumption
    • max. 10mA (outputs off)
    • max. 210mA (outputs on and maximum rating drawn)
Follow

Get every new post delivered to your Inbox.

Join 200 other followers

%d bloggers like this: