Tuesday, February 10, 2015

Piclop Bill of Materials

My accumulation of parts for the Piclop build is complete, and here's the Bill of Materials that I've come up with.

Item Source Price
Raspberry Pi Adafruit or MCM Electronics $35-45
Raspberry Pi camera Adafruit or MCM Electronics $25-30
8"/200 mm camera cable Adafruit $2
NEMA 17 stepper EMSL $15-16
16014 ball bearing Amazon/WJB $10
line laser module AixiZ (on eBay) $8 each
A4988 stepper driver MakerGeeks $10
ULN2003A driver IC Discount Components Warehouse (on eBay) $7.49 (for 10)
RasPi HAT protoboard Adafruit $5

I already had a few things to start with, including the Raspberry Pi; however, it was the old model B and the availability of the new Raspberry Pi 2 was too much temptation, so I've replaced it. It isn't hard to find a place to buy the Pi 2 but it can be difficult to find one that actually has stock, at least until the manufacturing catches up with demand. In the meantime, if you have a Pi of any flavor it should work fine, and the Pi 2 will be a worthwhile upgrade when they're more readily available. You'll also need the Pi camera of course, which luckily has been out for a while and is easy to get. And in order for it to reach the front of the mount, the cable needs to be a little longer; Adafruit makes an assortment, of which the 8"/200 mm seems to be about right. That could change, though, if it turns out the camera needs to be mounted differently; I also ordered a 12"/300 mm just in case.

The turntable doesn't ask much of the stepper motor used to turn it; the big bearing keeps the friction low even for heavy objects, and prevents binding from the weight being off-center. EDIT: the original version of this article listed two motors that are 48 mm tall, and I've since been told that they won't fit in the Ciclop turntable base. That makes the motor selection a lot more difficult. The motor that remains in the BOM is not the one I'm actually using, but one that I've bought in the past to upgrade a 3D printer and can recommend. However, it is 1.8 degrees per step, or 200 steps per revolution. With standard 1/16th microstepping drivers like the A4988, that means 3200 steps per complete revolution. The default setting for FreeLSS is twice that, 6400 steps, which is most easily obtained by switching to a motor with 0.9 degree per step. They're less common, and I have not yet found someone who sells a 0.9 degree per step motor that's less than 48 mm tall. For reference, the motor I'm using for the Piclop is a Wantai 42BYGH610P2, but the supplier I bought it from is out of stock and doesn't appear to be re-ordering.

The big 16014 bearing is a key feature of the Ciclop turntable design and I think it's an excellent idea. They aren't the easiest things to source, however, with prices ranging from $10 to well over $100. The one I listed was amongst the cheapest I found at $10, though shipping doubled that price. It seems to be well-made and works fine but if you can find one locally you might be able to do better on the total cost.

I did some shopping for laser modules before settling on the ones from AixiZ; they're available from many sources, but I was concerned that most of them don't have the ability to focus the laser optics. In normal use they'd be expected to be used over a considerably longer distance than we'll need for the scanner and without focusing I was afraid they'd produce a blurry line. AixiZ seemed to have a good reputation, and later I heard from Uriah Liggett, creator of FreeLSS and ATLAS, that he likes their modules. One thing that I didn't realize at first is that they're somewhat larger, at 12 mm diameter; the original Ciclop holders were made for 8 mm modules and needed to be redesigned to work with these lasers.

The driver board needs two ICs, the A4988 stepper driver (which is actually a tiny circuit board with the IC and a bunch of other components) and a ULN2003A Darlington array to drive the lasers. Both are widely available; most 3D printers use the A4988 to drive their steppers and if you use RAMPS on your printer you may already have a spare (if you don't, I highly recommend buying one!) I got mine from MakerGeeks since I was ordering other things from them anyway, but they're essentially generic items. The ULN2003A is even more generic, so I picked an eBay seller with a good rating and a decent price, albeit for a pack of 10 chips; I figured I might need spares, and the cost of buying just one was going to be several dollars by the time I paid for shipping from a commercial supplier. I'm hoping to assemble the circuit on the Adafruit protoboard HAT, though it will be tight; I haven't yet tried to wire it.

There are three voltage levels needed for the FreeLSS driver circuit: 12 volts for the stepper motor (via the A4988 driver), 5 volts for the Pi, and 3.3 volts for the laser modules. It's easy to get all three from a modern PC power supply, but I didn't want to have that kind of bulk. For testing, I've been using a supply that I salvaged from some old equipment, capable of 3 amps at both 12 and 5 volts, with a regulator on the protoboard to produce 3.3 volts. For the final product I'll either continue with that supply or just bring 12 volts to the board and use separate regulators for the other two, depending on the real estate that's available.

Of course all the parts needed to be printed, and for that I decided to start with a fresh roll of 1.75 mm PLA; I hate running out partway through a project and having to change colors! For this one I picked MakerGeeks 'Dark as Night' black, one of the filaments that they have started to make in-house. The quality has been excellent and the prints are very nice; the only thing I noticed is that it wants to be a lot hotter than any of the other PLA I use, 225° C rather than the 200° I am used to.


  1. Thanks for all the info and all your efforts.

    Maybe just some info I found that could help with the modding of hardware. I browsed through the code and found the following:
    cameraLocation.x = 0;
    cameraLocation.y = 82.55;
    cameraLocation.z = 260.35;

    leftLaserLocation.x = -125.73;
    leftLaserLocation.y = 82.55;
    leftLaserLocation.z = 260.35;

    rightLaserLocation.x = 125.73;
    rightLaserLocation.y = 82.55;
    rightLaserLocation.z = 260.35;

    Could this be a possible cause for you calibration issues? I'll go through the code of cyclop to see if I can find similar values.

    My motor holder is printer and the rest is busy printing right now.

    Thanks again.

  2. Those look like the default values that come up in the settings screen of the FreeLSS web interface. I had to change them because my hardware isn't exactly the same as the ATLAS, but I tried to keep everything in the same ranges. I may need to make the Z distances longer since the camera seems to be slightly out of focus at the current spacing. The thing that's noticeable about the settings is that the camera and laser Z is all the same, as is the Y. The software seems to assume that the camera and both lasers will be all in a line, perfectly level and square to the turntable. I think I can achieve that with some tweaks, but it makes the setup a bit more difficult. I'm not sure why Uriah put those fields in the setup screen, and made them separate variables in the code, if they have to be the same.

  3. OK I recieved my motor and I think I found another problem. The motor specified in the Cyclop BOM is a 1.8 deg motor while Uriah specified a 0.9 deg motor. (he dropped me mail a while ago)

    Next issue is I can't find a 40mm 0.9 deg motor - only 48 - thus my motor base 7mm of the ground ...

    1. Ouch, I never looked at the height of the motor, just grabbed one that wasn't in use and put it in (it was a leftover from a printer project). You're right, it definitely needs to be 40 mm or shorter, and of the three I listed only the one from EMSL will fit (it's 34 mm). I just deleted the two taller ones from the BOM and changed the text to reflect that. As for 0.9 degree/step motors, it looks like Wantai does make them: http://www.wantmotor.com/ProductsView.asp?id=157&pid=80 but it doesn't look like anyone stocks them.

      That said, I'm not sure how important it will be; the difference is 3200 steps/rotation versus 6400, but the standard scan is only 800 steps. You could go four times higher without hitting the limit of the motor as it stands right now. And in the end it might be easier to get a 1/32 microstepping controller than it is to find a motor that fits. Or redesign the scanner to be taller, I guess ;)

    2. Came across this one while looking last night. http://www.aliexpress.com/item/Recomend-High-quality-and-hot-salesLongs-Motor-Nema-17-Hybrid-Stepping-Motor-with-0-9-degree/1252288185.html

  4. Just another thought on the measurements of the xyz - don't you think one should try to get x values of the lasers exactly the same as Uriah's? I did read somewhere his calculations work on triangulation ... or one should change the values to fit the cyclops? I don't think the Y and Z should make difference ....

    1. I don't know, and that's a little bit frustrating. I drew a picture of the axes and posted it to the Kickstarter comments, and he said that I had them right; then I asked about how the camera should be positioned relative to the lasers and never got a reply. . .

  5. http://www.matterhackers.com/store/printer-accessories/nema-17-stepper-motor

    Sells a 40mm tall 0.9 stepper

    1. That looks like it would work. The shaft looks longer than usual, but 24 mm is what other motors are spec'ed to, so as long as it is measured the same way it should fit.

  6. Did I need to order a 'stacker header' for the top hat? I did order the standoffs just in case. I'm not ready to wire yet (I'll need some help for that), but just going over the BOM and making sure I didn't miss something.

    1. If you just want to build the FreeLSS control circuit, I think that will all fit on a single HAT board. It's really tight; two of the pins on the ULN2003A will hang off the board, but they're not used anyway. What I'm trying to do now is figure out how to add lighting control to the whole setup, and that may require an additional board stacked on top, in which case the stacking headers are needed. There's also another prototyping board just introduced by Pimoroni in the UK, and I think it would be more suitable for this kind of circuit but I don't have my hands on one yet. Sadly, I don't know any electronics CAD software so I can't design my own board even for this fairly simple circuit...

    2. I am so glad that it's a fairly simple circuit for you. For years I've been trying to interest my grandsons in the Raspberry PI, so I could go through that area of electronics. I am an Amateur Radio (Technician, never bothered to upgrade in 30 years) and a Robotics guy, but lately you'd never guess that. Anyway...
      I finally ordered the rest my hardware today. I did get the stepper motor that Michael Mullins mentioned. I also found a 5v laser module (650nm 5mW adjustable 3.0V-5V red line laser head usa sell A096 Item# 331417893402) on ebay and bought 2 of them. I just didn't want to deal with so many outputs on a power supply, but that's another conversation. So in another week or so, I will need your help once or twice again.
      Hopefully tomorrow, I'll go get the 5/16 threaded rods and that hardware. Speaking of which, does the Raspberry and top hat still fit into the tower/camera holder or should I figure on getting a case? Any pictures you might want to share would be appreciated too, so I have an idea of what it should look like. Emailing me is easy, I'm on your Google+ circle.