New L6470 Stepper motor controller board in progress.

boardimage

Coming soon

4 Channels L6470

USB interface (micro USB)
8 MHz oscillator for L6470 and PIC microcontroller (PIC24FJ64GB002)
Header for external SPI interface if using Arduino or different microcontroller board.
Headers for step and direction interface, for microcontroller or parallel port PC interface.

 UPDATE

I haven’t worked on this since October 2, 2013 (and it’s now January 21, 2014) so I’m uploading the Eagle [6] design files for you to use as you see fit. If you actually build this board I would love to see how it comes out!

NOTE: I have NOT tested this board design but I believe it works. I am a professional but that doesn’t mean my work is flawless.

 EAGLE files for this board

Multiple web cams in Linux

The machine has two cameras currently:

One camera looks up, the other looks down.
It won’t always be held by rubber bands.

 

Yesterday I set out to see both cameras at the same time. Simple – they’re USB, I’ll just fire up two instances of VLC:

cvlc v4l2c:///dev/video0 :v4l2-width=640 :v4l2-height=480 :v4l2-fps=4&
cvlc v4l2c:///dev/video1 :v4l2-width=640 :v4l2-height=480 :v4l2-fps=4&

Well, one shows up. The other cvlc instance crashes. It turns out that some webcams claim the whole available USB bandwidth in isochronous mode. Being smarter than it needs to be, the computer decides that I wouldn’t be happy with choppy video, and the result is that I’m not allowed to see both video feeds at once.

Some web searches indicate that I might want to try changing to a compressed video mode such as MJPG. It would take up less bandwidth than whatever uncompressed mode it defaults to – so I tried changing the video mode to MJPG, using v4l2-ctl:

v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=MJPG -d /dev/video1
v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=MJPG -d /dev/video0

There’s also an option to set MJPG when invoking vlc itself, however I can’t remember it at the moment, and it doesn’t matter because it didn’t work. It’s likely I will settle for taking individual snapshots with vlc and bringing them into OpenCV. I’m not quite at that point yet, but I’ll update when I am.

Mechanical mock-up

I put together the components that I had to produce a mock-up of the gantry system:

pnp machine mockup
3D gantry mockup

The wood sticks are only temporary. I assembled it using my narrow crown stapler. I really don’t regret buying it as I use it often.

I’m having second thoughts about the x/z slider mechanism. I knew this all along: there will be torsion on the v-wheels of the x axis bar (the bar going between the two longest rails)

I haven’t seen machines where people have done this. A lot of people are using a ball screw system for the z axis. I stayed with the timing belt system in order to use as many standard components as possible. I guess I’ll find out how well it works/doesn’t.

Here are a couple other angles:

 

Makerslide parts received!

Today I received a 1 meter long box containing the makerslide components that I purchased:

I put everything together to see how it works out and I have to say I was very impressed at how smooth the carriage rides on the rail.

I used the insertion nuts to attach the wheels because they were the only 5mm nuts I have.

I made a test cut of the makerslide extrusion using an 80 tooth 10″ carbide tipped saw blade in my miter saw. The cut exceeded my expectations – as you can see from the picture of me holding the cutoff piece, the cut is very smooth. The irregularity you see in the picture is actually caused by the flash. I would say the roughness across the cut is no more than 0.01″

 

USB Microscope

I just purchased a USB microscope for my pick & place setup. It’s a:
Veho VMS-001 x20-x200 Magnification Discovery Digital USB Microscope

And looks something like this:

 

Pick and place machines commonly have one or two cameras. The highest precision machines have two cameras, one looks up and one looks down.

The up-looking camera is mounted somewhere near the part feeders. After picking up a part, the head moves over to the up-looking camera. The software looks to make sure the head actually picked up a part. If the part is there, it looks at the part to measure it’s rotation angle and x/y offset. The x/y offset is saved, and the software then knows more precisely where to place the part. Why? Because the head might have picked up the part a few mils away from the ideal center point of the part. An 0201 sized resistor is only 0.6 by 0.3 millimeters – if you’re off by 0.2 mm then you might have a problem.

Which brings me to the second camera: the downward-looking camera. The downward camera is mounted to the moving head, and is used to:

  • Calibrate x/y relative head location (by looking at fiducials)
  • Verify PCB pad position
  • Verify correct part placement
  • Locate part in feed tape

If you don’t have these cameras then your machine has no concrete proof that it is correctly placing parts. If you’re placing the smallest components, i.e. 0201 and 0402, then you almost certainly need a high precision system that has vision.

If you’re placing 0603 and larger parts, you can probably get away without vision as long as you have decent linear encoders on your x and y axes.

And if you don’t have linear encoders you’re flying in the dark and you’re probably stuck with 0805 and larger.

For my machine I’m really hoping to be able to place the smallest components. So I’m shooting for the highest performance I can reasonably achieve. We’ll see where I end up.

 

Optical Encoders

I just bought a bunch of these:

They’re transparent strips with parallel lines spaced approximately every 0.0066 inches. You can buy them from Electronics Goldmine. They’re used for precision linear encoding, i.e. so my pick and place machine can get accurate feedback about where the head is.

There are several ways to read these strips. Avago et. al make modules that might be able to read these directly.

Fundamentally you can take a collimated light source – a laser, for example, and shine it through a short strip of this. What you’d have are several parallel lines of light. If you then put another strip in the path of this light and move it, the light will alternate between being visible and completely blocked.

I’ll post a better explanation when I get around to testing them out.

Pick and Place machine

I’ve taken on the task of building a pick and place machine for electronics assembly.

In doing some preliminary research on components, I came across the Makerslide project.
One of the more arduous tasks in designing any low cost CNC machine is finding a low cost yet reliable and accurate linear motion system. I believe the Makerslide project has successfully addressed this issue.

Apparently Makerslide was somewhat difficult to locate. Go to inventables to buy Makerslide components.

 

[iframe src=”http://sketchup.google.com/3dwarehouse/mini?mid=2093a2e75c691dbea28857271b9ddfa1&etyp=im&width=400&height=300″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” width=”400″ height=”300″]

Here’s a short video rendering of the Sketchup model
[iframe src=”http://www.youtube.com/embed/br7g2CBi-Xw” frameborder=”0″ width=”420″ height=”315″]