Saturday, August 3, 2024

Something else to worry about...

 ... if you take yoga classes, or do karate, or see a hypnotist, or do Crossfit, or hunt elk. What could these things possibly have in common? NY State Senate bill S1155: 

https://www.nysenate.gov/legislation/bills/2023/S1155/amendment/A

I was introduced to this particularly bad piece of legislation by someone who runs a metaphysical store, and who was - justifiably - concerned that his services could be impacted by it. Since then I've done my own research and concluded that it's even worse than he thought. Here's the letter I just sent to my representatives in Albany; if you share my concerns, I suggest contacting your own assembly member and state senator, so they're aware of it for the next session.

-----

I'm a resident of Cicero, NY where I have lived for the past 29 years. I'm in the 50th Senate and 127th Assembly districts. I'm writing you today to express my deep concern about a piece of legislation in the just-completed legislative term, S1155/A4166, sponsored by Senator Skoufis and Assemblywoman Levenberg. Although I am relieved that the bill did not become law this term, I note that it has been introduced each term since 2017, and I'm concerned it will be re-introduced in 2025.

The stated purpose of the bill is to require "self-help practitioners" to disclose information to their clients, and produce a plan to manage the risks of their services. This may seem a reasonable goal; however, the bill suffers from a number of problems, starting with the observation that it is clearly a reaction to a specific crime, a kind of delayed revenge against the perpetrator. This is not to understate the magnitude of the event, which led to the tragic deaths of three people and serious injuries to many more. And yet, not only did the event in question take place fifteen years ago in another state, the bill would be unlikely to have any impact on the possibility of it recurring.

Now known as the Sedona Sweat Lodge Deaths, what took place on October 8, 2009 in Sedona, AZ at a retreat led by a man named James Arthur Raywas clearly a crime. The details of the tragedy are widely documented online. Ray was arrested and tried for his role, and sentenced to two years in prison. It's certainly arguable that he deserved a much more serious punishment.

In response to the deaths, to Ray's light sentence and his attempts to return to his previous career, a group called SEEK Safely was created <https://www.seeksafely.org/> It proposed the legislation introduced by Senator Skoufis, which sadly is both far too specific and unnecessarily broad to accomplish its original goal.

A simple reading of the bill reveals a number of details that seem strangely disconnected:

 - It specifically defines "Sweat lodge ceremonies" and makes clear that they are considered a serious threat, first in the list of high risk activities. The Native Americans who created the sweat lodge would actually agree with this; they have warned against non-native appropriation of the ceremony, and in fact the Lakota Nation sued James Earl Ray for his actions. They might applaud this law if it recognized that Native ceremonies are sacred and must be protected; instead, the law would put obstacles in the way of their own use of it (though to be clear it is not a tradition of the Haudenosaunee).
 - "Trust exercise" and "Strength exercise" are also defined and listed; they are, of course, common events in various types of teambuilding and martial arts programs, respectively.
 - It defines "Coercive control techniques" in a very odd way, as "activities that seek to change behaviors". Some might call that "therapy" or "training", and although some of the defined techniques may be abusive, the inclusion of "sharing of personal trauma in a public setting or large group" sounds very much like group therapy, a respected and commonly used modality.

The connection between these choices and the specific definitions becomes clear when reading histories of the Sedona deaths and Ray's practices, since they are a catalog of the techniques he used. While his actions are indefensible, the individual activities are not inherently wrong. Instead, their inclusion seems more like an attempt to retroactively condemn Ray.

The much larger problem with this bill, however, is that it is much too broad. The first problem comes with the definition of "Self-help practitioner", who is anyone "offering financial, spiritual or educational guidance for the purpose of improving personal awareness, identifying and developing personal talent and potential, enhancing the quality of life of a person and/or contributing to the realization of personal aspirations in exchange for payment." This definition would certainly include so-called "gurus" like Ray. It would also include, for example:

 - yoga instructors
 - martial arts instructors
 - boxing coaches
 - summer camp counselors
 - gym trainers
 - hunting guides
 - corporate trainers
 - adult education teachers

As well as many others. I list those particular employments since they would also run afoul of the other over-broad provisions of the bill, as I explain below.

The new requirements to be placed on self-help practitioners are in four parts, with the last two related. The first, providing a disclosure and disclaimer, is perhaps reasonable and also largely meaningless; such disclosures are common everywhere from trampoline parks to cat cafes and are seldom read or understood by the customer. The second, providing a copy of credentials, is likely something a practitioner would do anyway as part of their self-marketing.

The third becomes a serious and expensive proposition, and this is where the above-listed professions would be directly impacted. It requires a "comprehensive risk management plan" for any activity that has a "reasonable expectation of risk of physical harm *or* a qualifying emergency". Although yoga is generally considered a gentle and relaxing practice, there is in fact a risk of physical harm; injuries are not common but do occur. Martial arts and boxing certainly carry a risk of injury, and advanced martial arts students engage in "strength exercises" like breaking boards and training with martial arts weapons, two things called out specifically in the bill. Summer camp counselors routinely lead their charges on "rope and other obstacle courses" and hikes. Gym trainers push their students to "tests of endurance".

The other professions run into the "qualifying emergency" clause, which includes "severe weather or any other similar circumstance". Certainly no hunting guide wants to lead their party into a severe thunderstorm or a sudden blizzard, but this does happen. How could a corporate trainer or an adult education teacher be implicated? Because the bill also includes severe weather that "may result in a building structure and/or its fixtures being at risk of significant damage". This seems rather silly, and yet it is certainly possible; New York has tornados, hail and winds that break windows, snow that collapses roofs. And corporate trainers may engage in the specifically condemned "trust exercises" to boot.

The preparation of a plan would add complexity and cost to all of these activities, though it is still not something which would present an insurmountable issue for most practitioners. However, the fourth requirement would make many events impossibly expensive; it requires any "session or service" which requires a risk management plan to have "licensed medical professionals made available to clients". An EMT standing by at the yoga studio? Tagging along with the deer hunters in their blind? Sitting by while the night school class hears about IRAs? Clearly this is ridiculous.

And yet, this is the bill as proposed. After a careful reading it seems clear that although the founders of SEEK Safely are trying to prevent a recurrence of the tragedy that impacted their family, the end result is a poorly constructed mess which would cause untold amounts of unintentional damage.

It's also concerning to me that this bill appears to have been written with no feedback from the community of practitioners or their students, shows prejudice against Native Americans, and seems designed to single out alternative health practices. I believe that it would be possible to craft a more careful and thoughtful bill which would prevent the recurrence of the Sedona deaths. However, I also believe that the legislature has more important work to do than trying to address an issue that took place fifteen years ago in another state, and which, as tragic as it was, caused the same number of deaths as occur on average every week in the NYC Subway, every four days on New York roads, and every two days from drug overdoses.

I urge you to reject this bill if it is reintroduced in the next legislative session, and in the event that some action is still desired, to pursue it in a thoughtful, careful manner that involves the community and pays careful attention to avoiding unintended consequences.

-----

Wednesday, September 15, 2021

Magic Band Adventures

I've been playing with 6 meters for a couple months now, since I got tired of my Yaesu FT-991 sitting idle over the summer (in the winter it's been one of my AM DXing receivers). I started by cutting down an old 10 meter dipole that my father (N2RJB) had made around 30 years ago, using a balun from a now-defunct company called Van Gorden Engineering, and immediately started making FT8 contacts! Of course, that was blind luck; I had turned on the station when the band was open, and it closed down 35 minutes later. 

Days passed... I couldn't stop them! Three days later I made two more FT8 contacts, about an hour apart, then nothing, then six more in 48 minutes the following day. Then 20 in one afternoon! Four days of silence, then 14 more in two hours. Then four contacts... over three weeks. Another opening yielded 13 in an hour and twenty minutes. All of this with 15 watts and a dipole, which I should mention is mounted indoors, hanging from an unused plant hook above the desk in my first-floor home office.

Then came the September VHF contest, and I decided I had to get a little more serious. I didn't trust the indoor antenna at any higher power, and I knew it was fairly deaf compared with other local stations on pskreporter.info so something outdoors was called for. I could drag the dipole outside, but didn't have any good location for it. However, I did have this:


It's a Cushcraft (ie. MFJ) AR6 Ringo, which Dad had bought without realizing how BIG it is. So after a time leaning against the wall in his dining room (in the box!) he handed it off to me, whence it spent a longer time leaning against the shelf in the basement. I happened to have an old Radio Shack roof tripod and a couple sections of tubing, so up it went.

And to keep it *down*, 45 pounds of dumbbells:


A piece of coax sneaking through the window, and we were ready for action... of which there wasn't much. I've heard that sometimes the contest lines up with spectacular propagation, but not this time, at least not for me. I could hear stations in the Northeast, but that's about it, and even with triple the power, a whole 45 watts, they could only sometimes hear me. Clearly a lot of the contesters are running a lot more power and directional antennas; I'm learning that I need to jump in on the tail end of their contacts when they're pointing my direction, and then I have much better luck.

In the end I submitted a log with 12 contacts and 6 multipliers, which is enough that I might not be at the very bottom of the standings. It did result in one new state and three grid squares, so that's not too shabby. 

And since then I've left the FT-991 connected to the dipole and heard... nothing. Not a single station calling since the contest ended, and nobody answering my CQ. Waiting for some more magic!


Sunday, December 17, 2017

Your iPad and U(SB)

A few weeks ago I bought an Apple Lightning to USB3 adapter in the hope that I could transfer scanned photos to my iPad. Nope. Not because it didn’t work, but because Photos apparently couldn’t understand the scanned image format. I was considering returning the adapter, it’s not cheap - $39 at the Apple store - when I noticed something in the product description...



Ethernet adapters? That would be interesting. A cheap Monoprice USB adapter was closest to hand and it worked fine:



That gave me the idea of trying to SSH into a Raspberry Pi that I wanted to work on. No configuration needed for either network interface, both the iPad and the Pi support mDNS so a simple connection to ‘raspberrypi.local’ is sufficient. Having logged in, I could set up VNC as well:



This particular Pi is running the Google AIY Voice kit, which is a lot of fun to play with. The next Google AIY project is going to use a Pi Zero W, so I had one of those on hand too. It doesn’t have a built-in Ethernet, but it turns out you can enable a cute feature called Ethernet Gadget, where the USB on-the-go interface emulates an Ethernet device. There's a thorough guide written up by Adafruit, and it's really quite easy - just two config changes. Wonder if that will work with iOS?

Yep! Same drill - automatic configuration of both devices and I could SSH or VNC into the Zero:



Well, that’s all working very nicely indeed, and much simpler than having a USB Ethernet adapter on both sides.

I wondered if I could get the iPad to talk to some of the super-cool Adafruit Circuit Python boards that I’ve just started to play with. I started with a Trinket M0, which should act like a mass storage device and a serial port. No errors, and the Photos app started right up, which says to me that the iPad is recognizing the storage device part. But there are no photos on the board, and it doesn’t appear that there’s any way to access it as a general-purpose drive; neither the built-in Files app nor third-party file managers are able to see it. And although it doesn’t throw an error, the serial port does not seem to be accessible by any app I’ve been able to try.

Maybe the Circuit Playground Express would have a better time? Nope:



Hrmph. Maybe a WiPy? No. A pile of USB serial adapters with various chips don’t work either. My limited amount of poking around various developer forums seems to indicate that serial access is highly restricted, or maybe not allowed at all. Oh, well. But what if I soldered a header on that Pi Zero and used its serial port to talk to the Trinket? Hmm... but it will have to wait for tomorrow.




Sunday, March 29, 2015

The Internet of not-so-many-Things

... or: Brother, Can You Spare a CR2032?

Last fall I had a fun lunchtime conversation with someone who had just returned from seeing a Gartner presentation about the Internet of Things. They'd made a bold claim, that there will be 500 IoT devices in your house within the next few years. Specifically, they said that "a Typical Family Home Could Contain More Than 500 Smart Devices by 2022" as their headline for the press release announcing their report.

It was an interesting back-and-forth during that lunch because I was quite skeptical about such a large number. I based my argument on the fact that there aren't 500 *electronic* devices in a typical house of 2014; even in my unusually geeky house I don't think I could get to that number. And after lunch, I forgot about the whole thing, passing it off as yet another attempt by Gartner to get 15 minutes of publicity and sell a few copies of the report.

Last week, though, the topic came up again when this picture popped into my Twitter stream, posted by Jan-Piet Mens from the IoTConf in Berlin. I don't know whose presentation it was, but it hardly matters; the point is that Gartner's claim has become a talking point. After agreeing with JP's skepticism about this claim, I resolved to dig into it further. Of course I don't have access to the actual report, but neither do most other people, so I decided to rely on the press release itself. It's mostly a rehashing of things that are fairly obvious to anyone who has paid any attention to IoT: there are lots of choices with no clear leaders, most of them are not interoperable, the installed base is largely "techno-geeks" - a label I wear with pride - and yet, right at the top there's that claim of a two orders of magnitude increase in adoption over the next eight years. Well, with one little hedge; the prediction only applies to "a typical family home, in a mature affluent market" for whatever that's worth.

My family is by no means typical, but in this case I think that gives us an advantage. The four of us are all digital-savvy, and we've made sure that everyone has access to their own devices; the only residents without their own computers, tablets, laptops and phone are the dogs. And only because they've never asked. We aren't "affluent", but we can afford to get decent things. So unless Gartner is restricting their analysis to Bill Gates and Elon Musk, we ought to be right in line to become a "typical family home" of 2022.

In 2015, though, we aren't quite there. I took a pad and paper (how quaint!) and went around the house to see what I could find out about the potential for hundreds of smart devices to sprout up. As a baseline, our house was built in 1968 and has a typical colonial-style floorplan with two levels above ground (1800 square feet) and a full basement (900 square feet). We make full use of every square inch, and then some. Here's the result of my inventory.

Room Outlets Extensions Lights Devices
Master bedroom 12 8 1 11+2
Guest bedroom 8 0 1 1+1
Back bedroom 8 5 1 8+2
Front bedroom 8 6 1 11+2
Upstairs bath 2 0 5 1
Upstairs hall 2 0 1 1+1
Downstairs hall 0 0 2 0+2
Living room 14 18 0 18+2
Downstairs bath 0 0 4 1
Kitchen 14 0 1 10+2
Family room 10 0 1 6+1
Office 12 19 2 25
Garage 4 0 2 2
Basement 24 20 9 22+1
Exterior 4 0 2 0+3
Living space totals 90 56 20 93+15
Household totals 122 76 33 117+19

A few explanations before I try to figure out what those numbers mean. I think this is a fairly typical number of outlets in the above-ground part of the house, the portion that would be considered living space. Back in 1968, builders weren't expecting people to have quite as many electrical devices as we now have, so they typically installed one duplex receptacle on each wall. Modern standards call for somewhat more; typically one every six feet, though that varies. But we have what we have, except in the basement where it's easy to run additional wire, and that's why there are so many listed; I installed all but one of those after we moved in. It takes considerable effort to install more outlets even on the first floor, where they have to be stubbed up into the walls; it is a major project to put any more in the second floor. Hence, we have quite a few extension cords and plug strips in order to create more outlets; that's the second column. The total of the two, 146 for the living space and 198 for the whole house, is all the A/C powered devices we could have connected at one time (unless I go to the hardware store and buy still more extensions, of course!)

Our particular builder wasn't much for ceiling fixtures, choosing to install them only in the kitchen, dining room (which is now the office), closets and hallways. Most of the house is lit by table lamps, again except for the basement where I could run my own lighting circuits fairly easily.

As for the devices, that's my count of everything that is receiving A/C power either through an outlet or by being hardwired, along with anything else that is electronic and powered on - the items after the plus sign. Some of those receive power another way, including our thermostats (which are programmable but not connected) and doorbell (purely electromechanical). Others are battery powered, like wall clocks, smoke and carbon monoxide alarms, and our one true IoT device, which I'll get to later.

Now, let's consider the totals. As it stands, if I were to occupy every single outlet in the house, I could have 198 things powered on, about twice what I count as actually being in place. I guess I don't need to go shopping for more plug strips right away. So in an IoT future I could have a bunch more Things on my Internet, except... what is already in the house is most everything we need. There's already a refrigerator and a chest freezer; we won't be adding any more. There's only one garage door to be opened, the heating system only requires a single furnace. We have large and small food processors, separate coffee and spice grinders, hand and countertop mixers; what else would we get? Even if we doubled the number of devices we'd only get to about 240, and have no room to keep most of them.

So we won't be increasing the number of conventional devices. But won't all of them become smart? Well, let's think about that. I just did another walk around the house and looked for things that already are connected, and things that could potentially be. We have a dozen or so computers; obviously they count already. Four phones, two tablets, two e-readers, a half dozen music players. A Bluetooth speaker - that's arguably smart, although it only knows how to talk to its paired device. The TV (just one!), Apple TV and Blu-Ray player are all connected. Three networked cameras (two to watch the dogs, one to watch the 3D printers). And my one true IoT device (still saving that for later). What could we make smart? Everyone wants a smart refrigerator, I guess. Plus the freezer, so it isn't left out, and of course the microwave; our stove is from the 1950s though so it won't be getting any upgrades. All 33 light bulbs, if for no other reason than so we can play tricks on each other ("Hey, who turned out the lights!") All said, I figure that if we smartened-up all the devices that make any sense at all, we could have another 50 or so, but try as I might I can't come up with a total of 100 smart things.

Okay, you say, but what about the new things - little smart devices that will allow us to instrument our homes. Well, I'm all for that! In fact, I have a lovely little IoT device aptly called a BLEThrowie. It uses a tiny processor that has a few I/O pins and a built in Bluetooth Low Energy radio, and can monitor temperature, humidity and light levels. Right now it's sitting in the basement, helping me keep track of the humidity so we don't get mildew. I'm on the waiting list to buy a couple more, so I can instrument other spots in the house. Thanks to careful power management it can run for months off a single CR2032 coin cell, so you can "throw" it anywhere and talk to it wirelessly from your phone. Maybe those devices will account for the other four hundred Things in the typical house? It would certainly make retrofitting a lot easier; imagine a version that sits on top of the compressor for your fridge and monitors when it runs, or sticks on the front door frame and works as a wireless doorbell. There could be lots of those... and then the top search on Google would be "best prices on bulk CR2032 batteries." And we'd have a new job market for people who specialize in tracking down little IoT gadgets and swapping their cells. Maybe not.

Finally, let's look at this one more way. If I currently have 50 smart devices in the house - being generous, but that's okay - and I want to get to 500 in the next eight years, that means buying and connecting 56 new smart things each year. Even if I backed everything on Kickstarter and Indiegogo, I couldn't get a new smart device every week. Perhaps that's another new job for the mature, affluent household - IoT purchasing agent?

I fully expect that our house will become ever smarter and more connected, and there will be cool gadgets that I haven't thought of. I'll be buying and trying them out, maybe even making some of my own. I have an optimistic view of a future, smarter, better connected world. And I can't say what will happen in eight years, but I think it's a fairly safe bet to say what *won't* happen, and that's "500 smart devices in a typical family home."

Friday, February 27, 2015

High resolution test with the Piclop

I mentioned the Piclop on the 3D scanning subreddit and ComeOnDoolittle asked me about scanning some rather unusual objects: stone arrow heads or spear points.  Sadly,  I didn't have either. As a substitute I tried scanning a couple of small rocks, but the results weren't really all that interesting and I wasn't sure they would be applicable, though ComeOnDoolittle was satisfied with the early results.

Enter eBay, where it's well-known that you can buy anything, including stone arrow heads (spear points too, but they're quite a bit more expensive). Many are quite pricey, but after a little shopping I found a nice-looking one described as an "Authentic Missouri arrowhead", selling for the very reasonable sum of $2.99. Although shipping almost doubled that, an arrow head for $6 seemed like a good buy.

As soon as it arrived, I realized that I'd need some kind of support in order to put it on the scanner turntable. I've seen people use clay or blu-tack in order to anchor objects, but I didn't have either one handy, so I improvised with some stiff wire wrapped around the base. That's visible in the scans, I think it could be edited out. Still, some clay would be a better bet. And of course the arrow head would need to be turned over and have the base scanned too in order to get a complete picture; I haven't done that yet. Here's what it looks like mounted to the turntable:




I've used the arrow head for several tests now, leading up to the first attempt to do a full-resolution scan with both lasers, 5 megapixel mode on the camera and 3200 steps/revolution. And here's what that looks like:




I am impressed with the quality that the scanner has been able to achieve. There's actually a bit less detail in the point cloud than it appears, because the color changes trick the eye into thinking that there are shape changes too; nevertheless, the scanner managed to get the proportions right and avoid any extraneous points. The edges are pretty sharp too, just like the original.

There was also a question on the Google+ ATLAS group about how much CPU load the Raspberry Pi 2 was under. I installed a simple monitoring application called RPi-Monitor and used it to display the load average during the scan:


I started the scan at 22:22 and it finished at 01:44. The long-term average during the scan was about 0.6, but RPi-Monitor itself puts a background load on the machine of 0.2-0.25, so the actual usage by FreeLSS is less than 0.5 for the scan, and about 1 during the final processing. When I was monitoring the load average at the CLI, before installing the monitor software, I was seeing those kinds of levels; the processing peaked at about 0.9 or so. Since the processing is taking most of one CPU and the Pi 2 is 900 MHz versus 700 for the B+, I think that means there is a speed-up during that phase. Of course, if the processing step could be multithreaded the difference would be much more dramatic.

And for anyone who would like to play with it, I've posted the compressed PLY file on Drive:  1424913318.ply.gz  Be aware that it is a 24 MB download and will uncompress to 83 MB. I've been using Meshlab to view all the PLY files, though I confess that I don't know enough about the program to do anything other than look at them, yet. That's the next thing to learn. . .


Friday, February 20, 2015

Camera holder for the Piclop

My early experiments with the Piclop were done with scotch tape holding the camera module onto the front of the tower; that worked, but obviously wasn't going to be a satisfactory solution. I planned for a simple mount that would hold the camera right against the front of the tower, but after a few scans discovered the need to adjust it at least a little. The camera module needs to be perfectly vertical when viewed from the side; in other words, parallel to the Y axis, which is perpendicular to the turntable surface. It also needs to be aimed directly at the center of the turntable, using the "Camera" screen in FreeLSS and lining up the red cross-hair to hit the center. And that cross-hair also needs to be vertical, which I measured by putting a square on the turntable.

The camera mount I've come up with is easy to print and install, solid, and allows fine motion for two of those adjustments. However, it can't adjust the third, and in that respect it is somewhat lacking; I have a workaround, but ultimately it may need to be replaced with a better design. The files are on Thingiverse: http://www.thingiverse.com/thing:691191 It's still a work in progress because of the limited adjustments; in the meantime though, here's what it looks like.

My apologies for the overexposed pictures; it's really hard to take good photos of shiny black PLA. As you can see, the case is very simple, printed in two halves that snap together to hold the board. The four mounting holes on the board line up with holes in both halves, and M2-20 screws pass through all three and thread into the camera tower.

The case is held away from the tower by a ~1 cm square of closed-cell foam about 4 mm thick, cut from a piece that some electronic components were shipped in. The idea is to provide a little spring effect between the tower and the case, so it will be held against the screw heads and they can be tightened or loosened to adjust its position. Four small springs under the screws would do the same thing, but the foam seems simpler.

The first adjustment I made was to line up the case vertically, by setting a square on the table and making sure that the front of the case was parallel to its edge.

Second, I set the square on the turntable with its corner at the center and went to the Camera page in the FreeLSS web interface, and made sure that the red crosshair was in line with the edge of the blade. The camera mount doesn't have the ability to make that adjustment; that's the limitation I mentioned above. Theoretically the squareness of the printed parts and the flat table should have ensured that the alignment was good, but it wasn't quite close enough. The simplest way to achieve that was to shim the right edge of the turntable with some folded paper. For a permanent solution I'll glue some paper to the bottom of the turntable, but I also need to make sure that my table is entirely flat, which it might not be.

The final adjustment was to make the camera point directly at the center of the turntable, which is easily done by loosening or tightening both screws on one side. Here's what the picture should look like once everything is lined up.


That completes the camera alignment, at least as far as I understand it to this point - if there's a step I missed, I'll be sure to edit this post to correct things. While I have the square on the turntable, though, I also line up the lasers. In the same FreeLSS page there are buttons to toggle each laser on and off, so I turn them on one at a time and make sure that they are focused, vertical and lined up with the very edge of the square. This is the result after both have been aligned.


That's the whole alignment process, and once it is done the scanner should be ready to be measured for calibration.

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.

Friday, February 6, 2015

Ciclop turntable build

I've finished the Ciclop turntable assembly (using the files from GitHub) and it is solid and functional, and looks quite nice in my opinion.

The base is chunky but with pleasantly rounded lines; the turntable support and bearing clips go together well without any cleanup or fitting needed; the motor-to-turntable connection is well thought out and makes assembly very easy. The only problem is that some of the nice features also make it hard to print.











The pretty arch on the bottom of the base is a classic no-no in FFF printing, starting off easy but becoming an impossible overhang. And not visible in my photo but just as important, the flat area where the motor attaches is also unprintable, even as a bridge, because it has to contain the holes for the motor shaft and the four attachment screws.










There are a couple of ways this could be dealt with. One would be to slice the entire piece in half horizontally, to allow the curved base to be printed upside-down and the flat top upright, with screws holding them back together. A small redesign might even allow for the four motor screws to to the job. I don't know for sure whether the flipped lower part would print cleanly, but I think the fillets along the curved edges would help.

All that said, the motor base does print; even though the finished product is a little bit sloppy the problem areas aren't readily visible, and it is still entirely functional. I did some basic cleanup of strings and drooping lines, and had to drill the holes for the M3 screws to mount the motor since they were completely closed over; I was able to use the top infill pattern to locate them pretty well. It is printable because the designers at BQ included hand-drawn support material, visible at the edge of the arch. Slicer-generated support material is a mixed bag in my experience, typically effective but often very difficult to remove. In this case it might be a real improvement though, since the supports as supplied were barely functional. The very large and solid puck at the bottom printed fine, but the tiny, single-walled tubes that were intended to do the actual support work were too weak and didn't print cleanly, with only about half of them making it all the way to the point where they were supposed to hold up the overhangs.






The finished product is the first functional part of the scanner, so naturally I had to jury-rig a circuit to allow the Raspberry Pi to drive it. I have more appropriate prototyping parts coming in the mail: an Adafruit T-Cobbler to connect the GPIO pins instead of using spare motor and endstop cables, and a USB serial console cable (also from Adafruit) that connects directly to the right pins. But this bodged version was able to make the turntable spin, and by good luck I actually connected it to turn in the correct counterclockwise direction.





Power is coming from a tiny switching supply that I salvaged from an old external disk enclosure; it produces 12 and 5 volts at 1.5 amps each, which ought to be enough for this project. While testing I'm using an old Model B Pi, but I have a shiny new Pi 2 waiting in the mailbox to replace it.

Next up will be printing the parts for the other end of the scanner; the camera and laser holders. I've had to redesign both of them in order to match my parts and the physical layout that the FreeLSS software prefers, so while those print I'll document the Bill of Materials, so far.

Tuesday, February 3, 2015

Building the Piclop

The last few weeks have been exciting - at least, if you get excited about 3D scanners that you can build at home. In the past have been plenty of announcements of 3D scanners, either using multiple cameras or lasers, including fully commercial models and ones that were introduced through crowdfunding. But they've mostly been closed-source and expensive.


The announcement that started the excitement was the CES 2015 announcement of Ciclop, from Spanish company BQ. The primary parts of the scanner are mostly printable on standard home 3D printers or available at hardware stores (though with one notable exception) and the electronics are based on BQ's nice-looking Arduino board (the ZUM BT-238) and a custom shield (the ZUM SCAN). The camera is a Logitech USB webcam, and the entire assembly is orchestrated by BQ's Horus software, running on Linux or Windows (and with future possibilities for OS X, since it's written in Python).

The second new scanner is the ATLAS, brainchild of Uriah Liggett. Rather than using the ubiquitous but somewhat underpowered Arduino, he wrote his software for the Raspberry Pi, a package called FreeLSS. To go with FreeLSS, Uriah designed a scanner that can be almost entirely printed, and decided to fund further development with a wildly successful Kickstarter that has raised more than 60x his original goal. The Pi already had a nice camera module, and Uriah designed a simple board to let the Pi control the stepper and lasers, analogous (and similar) to the ZUM SCAN.

As far as I'm concerned, each design has strengths and weaknesses. I like the Ciclop's mix of printed and manufactured parts; the custom pieces are natural choices to be printed, and using threaded rod for the structural bits is inexpensive and solid. Their choice of 8 mm rod is especially convenient for those of us in the non-metric US, since 5/16" rod is a perfect substitute. The only difficult piece is the large 16014 bearing that supports the scanning turntable. It's a very good idea; the bearings in the stepper motor aren't designed to hold up a heavy item while it is being scanned, and relying on the 5 mm wide shaft as the only support for the turntable is a recipe for wobble and long-term wear problems. The bearing appears to be a common one, too, but unfortunately the price varies all over the place; I've found them as low as $10 (albeit with $9 shipping) and as high as $105. Apparently they're used for ATVs and similar vehicles, and I imagine that enthusiasts have opinions about which work best for them. For a scanner turntable, I think the $10 version will be fine!

What I don't like about the Ciclop is the requirement for a dedicated computer to run the scanner, on top of the Arduino/shield/webcam combination. The ZUM Arduino board costs $40 US (plus unknown shipping), I'm guessing that the shield will probably be $30 based on the components. Add the webcam and you're up to around $100; on top of that, you need a computer to which the scanner will be tethered with USB.

The ATLAS has the opposite set of problems. I understand the desire to print as much of the machine as possible, but in my opinion making the frame out of a dozen pieces, all of which have to be screwed together, is taking the concept too far. The Ciclop uses a couple dollars worth of threaded rod and nuts to save hours of printing and effort, and the frame will certainly be stronger and stiffer. Although some of the design details are still being filled in, it also appears that the ATLAS turntable is only attached to the stepper motor.

On the other hand, FreeLSS looks like a great solution. A Raspberry Pi replaces the Arduino and the attached PC, handling both the machine control and processing tasks (yes, it looks as though the new Pi 2 will do an even better job, but nobody has been able test it yet). A simple adapter board holds a standard stepper motor driver module (the Allegro A4988 that most of us rely on for our 3D printers) and a Darlington transistor pack that lets the Pi switch the lasers on and off. The system is designed to be networked and headless, accessed via a webpage that it serves up. The Pi camera has higher resolution than most any webcam and, at $30, costs even less. Its ribbon cable is not as friendly as the typical USB round cord and the one that ships with the camera is too short, but replacements are readily available. All together it is a straightforward, inexpensive and powerful package.

The best thing about both projects, of course, is that they're entirely Open Source. Ciclop is Creative Commons licensed (CC-BY-SA) and both Horus and FreeLSS are GPL; ATLAS hasn't yet been released but is promised to be open. That means I can take whatever I think is best out of both of them, and that's what this project is all about; a physical design based on Ciclop (with some modifications) and driven by FreeLSS on a Raspberry Pi. Hence, Piclop!

In the next post I'll talk about the printing that I've done so far, and the parts that I think need to be reworked or redesigned, as well as the initial BOM and sources for the electronic parts. One other note; the ATLAS Kickstarter is wrapping up as I write this, but there's still time to get in. Although I'm not using all the same parts that Uriah is sourcing, I believe that everything he's chosen would work fine for the Piclop, and his professionally made boards will be a lot nicer than the homemade versions that I'll be making. Even if you don't want a parts kit, a contribution to the project is certainly worthwhile given the effort he's put into making FreeLSS available for all of us to use.
Creative Commons Atribution Share-Alike license (CC-BY-SA) - See more at: http://diwo.bq.com/en/ciclop-released/#sthash.GJlIaWse.dpuf

Thursday, November 6, 2014

Some thoughts on the .314 Atlas

If you follow 3D printing news, or just geeky technical news in general, you've probably seen mention of the "new bullet" that will "make 3D printed guns a reality". Sadly, as with most reporting about the intersection between 3D printing and firearms, the reporting on this topic has been long on emotion and quite short on information. Let's change that.

I should disclaim that although I know something about 3D printing, guns and mechanical design, and I believe I'm reasonably able to read and understand things as varied as dimensioned drawings and firearms laws, I am not an engineer, gunsmith or lawyer. Take anything I might say here with the appropriate serving of salt.

First, let's dispense with the immediate inaccuracy: the .314 Atlas, which is the name given to the project by its creator, Michael Crumling, is not a "new bullet". The bullet is the bit that goes downrange; that is, the thing that the gun shoots out of its barrel. In a modern, breech-loading gun the bullet is combined with three other parts in order to make a round or cartridge of ammunition: the case, the primer and the powder. What Mr. Crumling has designed, and deserves full credit for, is an innovative case. The bullets appear to be ordinary lead balls, the primers and powder appear to be ordinary commercial parts. In fact, calling the .314 Atlas a cartridge design might be very important, as I'll get to a little later.

To understand what the innovative part is, you need to know something about ordinary ammunition. The case is typically made of brass, with a fairly heavy base and thin walls in the form of a tapering cylinder that's open at the top. The primer fits into a machined recess at the bottom, the bullet in the open top, and the powder is contained inside. The Wikipedia page has plenty of pictures and a couple of cutaway drawings. The case can be made of brass because even though the powder is going to burn inside of it, it doesn't have to contain the pressure. When the round is loaded for firing it is pushed into a carefully machined chamber at the back of the gun, a part known as the receiver. It can be a separate piece of metal, or integral with the barrel. The shape of the chamber precisely matches the shape of the case, with the bullet extending just into the barrel and the primer end of the case flush with the edge of the receiver, or protruding just a little (so the ejector can grab it, but that detail isn't important). When the round is fired, a metal pin crushes the primer to ignite it, the primer ignites the powder, the powder burns into hot gas at very high pressure which pushes the bullet down the barrel, and the bullet goes downrange. Afterwards most cases can be reloaded and reused, though some are designed to be disposable.

Of course, where the case is light and relatively weak, the receiver and barrel are heavy and strong. Machined out of steel, they can withstand the pressure of the hot gases thousands of times. The barrel also contains spiral grooves called rifling that cut into the softer bullet and cause it to spin, which dramatically increases accuracy. In the process, the bullet is formed to the barrel so that the hot gas doesn't leak past it; any leakage means lost energy.

Readily available 3D printers, the kind that use Fused Filament Fabrication (FFF) with spools of plastic filament, can't make strong receivers or barrels. The best they can do is make big blocks of plastic that will hopefully not shatter the first time that a cartridge is fired inside them, and even then are only able to handle a small, low-powered round. 

Now let's look at the gun that Mr. Crumling designed to go with the .314 Atlas cartridge. He chose to use a manufactured trigger, its associated parts, hammer and firing pin. That's not important; those things could be 3D printed as well, at least the trigger parts; in his design a heavy hammer and stiff spring may be necessary, and those might have to be metal. But that's a minor detail. The key is the case design, which replaces the thin brass with heavy steel. Effectively, what he's done is combined the cartridge, receiver and barrel into one unit, each of which fires one shot (though his design is readily reloadable after it is used).

I have no doubt that this is an innovation. However, it is also a compromise in several important areas. I'll try to explain everything that I've observed so far; keep in mind that there may be workarounds for some of these complaints, but also that other issues might come up as more experience is gained with the new design.

First, the feature touted for most 3D printed guns is that they can be made entirely out of plastic, and therefore be difficult to detect. That's never actually been true; although the gun can be plastic, the ammunition still needs to have metal in it. But since the ammunition can be brass, copper and lead, it may be more difficult to detect that the typical steel gun. Clearly that will not be the case for this design, since the ammunition will itself contain substantial amounts of steel. I'm also doubtful that the hammer and its spring can be plastic, because of they way the gun works. When it is fired, the hammer briefly holds the cartridge in place, until the bullet has exited, and then the cartridge is "ejected"; really, it is allowed to fly out of the top of the gun. I don't think that a plastic hammer and spring would have nearly enough force to keep the cartridge in place, and it would likely move even before the bullet was out, an obviously dangerous situation. Of course, the hammer and spring should be easy to obtain and this is not an objection for the ability to manufacture the gun, only to conceal it. Those of us who would prefer that guns be detectable will view it as a feature.

Second, this gun doesn't really have much of a barrel. The part of the Atlas case that extends beyond the bullet as it is seated prior to firing is the only effective barrel, and it looks to be about an inch based on this drawing. Short-barreled guns are nothing new. As with anything they have both strengths (small size, light weight, lower cost) and weaknesses. They're substantially less accurate, for at least three reasons: the short barrel doesn't do as good a job of getting the bullet spun in its rifling, the light weight means the gun will be less steady when aimed, and the short distance between front and rear sights makes aiming less precise. They also don't impart as much energy to the bullet, because the hot gases from the burning powder don't push on the bullet very long, and the powder doesn't have enough time to burn before the bullet leaves the barrel. This last problem certainly affects the prototype gun, as can be seen in this picture from Mr. Crumling's website. The spray of sparks is grains of powder that were blown out of the cartridge and burned in the air; they didn't contribute anything to the energy of the bullet. Now, Mr. Crumling says that he's still working on the "load", which is the combination of bullet weight, powder type and amount, and he may very well be able to reduce the amount of unburned powder, but that doesn't give the bullet more energy.

Third, manufacture of the .314 Atlas cases is a precision machining job. Mr. Crumling is obviously a skilled machinist and has been able to turn out quite a few, at relatively low materials cost but a considerable investment in his time. They could also be manufactured by a machine shop, though there is some question about what legal hoops would need to be jumped through for that to be acceptable. In any event, though, there are two possible choices for obtaining Atlas cases: become a machinist (if you aren't already one), or buy them. It's also true that those are the two choices for obtaining conventional gun parts, and have been for some time. So if you're going to need to invest skills or money, why not just make or buy a regular pistol barrel and design a 3D printed gun around it? It might not be as cool, but it would likely be a much better gun. Or you could make a crude gun with little or no machining skill; something like a Colt Liberator or the "zip guns" that have been occasionally manufactured even in prison.

Fourth, the barrel portion of the Atlas case isn't rifled. The drawings show a couple of gun frame designs that include printed barrel sections with rifling, but it's obvious that they won't have any effect on the bullet. If they are sized to actually engage the bullet, they'll be broken off by the first shot; if they're larger, the raised rifling won't do anything and will be worn away by the hot gas in just a couple firings.  It might be possible to machine rifling into the case, though that would be very difficult; I'm not confident that it could be done at all in the current one-piece design. Perhaps if the case were threaded so that the "barrel" portion could be separated from the base, but then the design would be much more complex. An unrifled gun with a one-inch barrel is going to be inaccurate at anything but extremely short distances, a matter of a few feet; even for close-range use like home defense I would not want to trust its accuracy.

Finally, the lack of rifling may be the downfall of this entire concept. I can't see how anyone would make the case that the printed barrel has any function, and therefore the only barrel that this gun has is the smooth interior of the case. Entirely apart from the issues with accuracy and power, that appears to create a serious legal problem. There are a whole class of guns with smooth barrels, called shotguns; they generally fire a cluster of tiny round pellets, or a single bullet that has rifling grooves molded into its exterior to provide some spin. They're perfectly legal and used by thousands of sport shooters and hunters. But the law says that they have to have long barrels. Pistols with smooth barrels aren't part of what the law considers "firearms"; instead, they're in a category called "any other weapon" or AOW. They can be legally manufactured in many states, but must be registered and a fee of $200 paid for each gun. If that isn't done, the owner is liable for severe penalties. And in states with restrictive gun laws, AOWs aren't legal at all. Whether a gun based on the .314 Atlas is an ordinary pistol or AOW is certainly not for me to decide, but the question is undeniable and the chance of running afoul of the law isn't worth the risk, to me.

What's the conclusion of all this? I think that the .314 Atlas is an interesting and innovative idea, though not especially practical. It might become a stronger influence if it causes a realization that a fully 3D printed gun is a dead end, and that it makes more sense to incorporate 3D printing where it has a strong role, for example in producing customized grips and accessories, rather than trying to make it serve in roles for which it isn't suited. Perhaps there will also be a new direction of producing metal parts that are specifically designed to be used with 3D printed components; there could certainly be interesting designs made that way. But this isn't the dramatic development that the popular press would have us think.

Thursday, January 16, 2014

3D Editing the Hard Way

Last spring I was digging around Thingiverse, looking for cool things to print, and came across Dizingof's version of a Klein bottle. It was good timing; a week later he decided to remove all his models from the site, but it was also at a point in my 3D printing experience where such a complex print seemed far too difficult.

In the intervening months, the file sat on my hard drive, up until this week when I finally decided that we'd done enough printing, tuning and fixing to attempt it. I fired up Slic3r, tweaked the config a little to drop down to 0.2 mm layers for all the fine details, and exported the file. This took some time. The result was a 34.5 MB file; I uploaded it to the OctoPrint instance controlling the printer, crossed my fingers, and pressed Print.

The initial result was disappointing. I watched the printer make something that looked very much like this:


The solid line is a double skirt, which simply gives the extruder time to start extruding (double because this printer has a Bowden tube, so it tends to drool a bit while heating up). The little blue dots are the beginning of the print, but they're very small, and oddly asymmetric. And then the Z axis went up a step, and printed this - or tried to:


That looks a bit thin but more like what I expected, albeit with a serious problem: most of those dots didn't have anything underneath them, and the printer was dutifully trying to print them in mid-air. That doesn't generally work. I killed the print, and set about figuring out how to fix it.

The simulated print pictures are from Repetier-host, which lets you step through a print layer by layer. The next two layers were loops and circles but I found a nice solid ring at layer five:


That's what I wanted to have for my first layer, but it was already a millimeter in the air.

Keeping in mind that this is a piece of sculpture rather than a machine part, I didn't have any qualms about modifying it a little to make it print better. I'm sure there are ways to slice off the bottom millimeter of the STL in Meshlab or Netfabb or some other program that I don't know how to use, but I was looking for something I knew, and it would be nice to avoid having to re-slice. Did I mention that the slicing process was slow? I actually left it running overnight, so I'm not sure how slow, but I really wanted to avoid reslicing. So I opened up the .gcode file in my favorite editor, vi, to see what I could do.

I should stop here and point out that there's no need to use vi for this task. Use anything that can edit a text file without adding formatting and font changes and paragraph styles; something that advertises itself as a "programmer's editor" or "text editor" will likely work. The biggest advantage of vi for this task is the ability to repeat a command a specified number of times, which comes in handy a little later.

The first few lines of the file are comments, laying out how Slic3r was configured. The next few are a kind of preamble, with calibration, temperature settings for the heated bed and hotend, etc. I was looking for the first lines that commanded the printer to move, using the G1 command:

G1 F1200.000 E-3.00000
G92 E0
G1 Z0.200 F7800.000
G1 X78.016 Y84.757 F7800.000
G1 E3.00000 F1200.000
G1 X78.736 Y84.197 E3.03034 F1200.000

The "G1 Z0.200" is key, that's where the printing actually begins. The first layer consists of everything between that line and the next move command for the Z axis:

G1 F1200.000 E0.04300
G92 E0
G1 Z0.400 F7800.000
G1 X89.870 Y115.575 F7800.000
G1 E3.00000 F1200.000

This print is using 0.2 mm layers, so every time a new layer starts the Z height jumps by that much. I can keep searching through the file for "G1 Z" and find the start of each layer; since I want the print to begin at layer five, I"ll look for when the height reaches 1 mm:

G1 F1200.000 E2.72067
G92 E0
G1 Z1.000 F7800.000
G1 X96.349 Y83.331 F7800.000
G1 X93.815 Y86.897 F7800.000

It happens to be line 4328. Jumping back to the beginning of the first layer, I note that it's on line 38, so I use vi's delete line command to get rid of 4289 lines between them. That gives me back-to-back Z moves, but I don't want the printer going up to 1 mm; I need it to stay at 0.2 mm and print the old fifth layer as the new first. So I have to fool it with another G-code command, one that Slic3r uses all the time for the extruder but never for the XYZ axes:

G1 Z0.200 F7800.000
G92 Z1.000 ; fool the printer into thinking that it's at 1 mm already
G1 Z1.000 F7800.000
G1 X96.349 Y83.331 F7800.000
G1 X93.815 Y86.897 F7800.000

This makes the second Z move command do nothing, but I've left it there as a place marker. Now I can upload the modified file, and watch as the print gets a nice, solid foundation.




For some reason the first layer is slightly different color, but that made it easier to photograph so I won't complain. I'm quite pleased with the finished product, too!


Incidentally, this trick of editing gcode can also be used to salvage a part that's gone bad, especially if it's mostly finished with just a little more to do, and the remainder is in one piece. You'll need a way to figure out which layer the printer was working on when it failed, probably by measuring the height of the partial print with your calipers. Then find the closest layer to that height by searching for Z moves, delete everything between the beginning of the first layer and that point, and use G92 to reset the Z height as above. With a little luck, and glue, you may save yourself a lot of frustration. . .

Wednesday, January 1, 2014

You Need a Vernier Caliper

... if you're trying to run a 3D printer, that is.

For the last couple of months our two operational printers have been spending most of their time printing parts for other printers; the OB1.4 has been especially busy since it can handle the larger parts, and has been upgraded with a heated bed to prevent warping (highly recommended, even if you only print PLA). But those parts are all done, so they've been looking for work. A couple of weeks ago I saw a jumbo-size geared heart printed by a friend, and decided that it would make a fine Christmas gift; I picked the PLA Heart Gears and put the OB to work. The first part looked great, and the next, but soon things started to go awry. The printer couldn't go more than a few minutes without the extrusion slowing, causing weak layers; sometimes it would stop entirely and ruin the print.

We'd had some similar issues printing the first GUS Simpson prototype, but I replaced the extruder with an improved version and a much better hobbed bolt, and since then had gone through three 2 kg spools of filament with no stoppages. So I started by tweaking the hot end temperature, then lowering the printing speed, trying to use shorter retractions, stopping retraction entirely, and a few other minor tweaks. Nothing really improved the situation, the print had failure after failure. I finally finished the heart late on Christmas Eve by editing the G-code files for two of the parts and printing just the portions after the jams, then gluing the pieces together.

Needless to say, this was very frustrating, not to mention painful - I had been babysitting the printer waiting for it to have a problem and my thumb was sore from trying to push the filament each time it began to jam! I knew that the printer wasn't having hotend issues, because every time I pulled back the jammed filament, cut it off and reloaded, it would extrude with very little pressure. After everything was done, I was determined to find the problem. I went back to the pieces that I'd cut off, the 30 cm or so that was inside the Bowden tube between the extruder and the hotend. It didn't look bad, but when I got out my trusty vernier caliper, here's what I saw. . .




When I first unwrapped this filament I measured it, as usual, and saw that it was elliptical rather than circular; that is, it was significantly thinner measured one way than the other. That isn't a good sign, but it also isn't typically a big problem, as long as the average cross-section is consistent. In this section of the filament however, the measurements at those two points were 1.43x1.55 mm, and 2.03x1.92 mm. Keeping in mind that this is supposed to be 1.75 mm filament, that kind of variation is no good - on several levels.

When an object is sliced, the extruder movement commands are calculated based on an assumption about the volume of plastic that will be extruded for each millimeter of filament pushed forward. I'd told Slic3r to expect a circular cross-section with a diameter of 1.75 mm, so the volume in a linear millimeter is 2.41 mm3. On this filament where it measures 1.43x1.55 mm, the volume is 1.74 mm3 (28% too low) and at the fat section, 2.03x1.92 mm, it's 3.09 mm3 (28% too high). Such wide variation is going to result in weak spots that can allow the print to split apart and blobs that can cause the nozzle to drag through lower layers and pull the part loose from the printbed.

But what was killing my prints was the fat section. Our OB uses a J-Head hotend (a real one, from the designer) and it is drilled out to 2.00 mm diameter. The extra diameter doesn't sound like much, but when I tried pushing that section of filament into a spare J-Head, it wouldn't go in more than a centimeter without a lot of force, and pulled a section of the PTFE liner out when I removed it. It wouldn't fit in an Aluhotend or a Ubis either. The problem is that if you make the inside diameter of the hotend large enough to accommodate these kinds of variations, the filament will kink and jam.

By the way, I'm not going to name the manufacturer of this filament, because I bought it almost six months ago and it's possible they've improved their product. It was purchased on eBay at a very low price, $27.99 with free shipping, so I thought it was worth a try, but I've since discovered that the seller (who is apparently just reselling from an overseas factory) offers no guarantees on the filament diameter, and even goes so far as to claim that if their filament doesn't work it must be the fault of the printer, not the material. So this filament is going in the trash. I will name some of the places where we've bought high quality filament: ProtoParadigm, MakerGeeks, Printed Solid and Printrbot. They're all more expensive than the eBay seller, as much as twice the cost, but the key is that their product works (and won't end up in the garbage can). And even with those sellers I still measure the filament before the first print, just to see. . .


Tuesday, April 30, 2013

The wind and the weather

I love watching the weather, and as a result I'm addicted to the Weather Underground. Some time ago I started to notice a strange thing on their weather radar map; what looked like strong radar echoes south of Buffalo, changing slightly as time passed, but never moving. I filed it away as an oddity until I accidentally came across this page from the National Weather Service. It explains the mystery; the echoes are from the blades of wind turbines, miles away from the radar but still visible to it as they swing through the air. Since the radar is designed to pick up moving things, it's quite adept at locating the wind farm, over and over again.

More recently another set of fixed echoes appeared, much closer to home:


On a hunch I started searching, and soon enough found the Hardscrabble Wind Power Project and their Revised Map, which lines up quite nicely:


I expect that we'll see more and more of these, which as a weather watcher is somewhat distressing. But as it happens I'm a big fan of renewable energy as well; we've been paying a little extra on our power bill for years now in order to buy wind power from another farm nearby. One that, incidentally, doesn't show up on radar. . .

Wednesday, February 1, 2012

Only you can prevent monthly Mailman password reminders!

It's the first of Feburary, and as with every month, people are on Twitter complaining about the flood of email list password reminders from Mailman. Apparently only a few of the many thousands of list subscribers are aware that they have the power, within their keyboards, to stop this catastrophe. Something must be done! In fact, there are no fewer than three routes to email nirvana, the nature of which I shall now reveal. . .



The Easy Way


Your monthly password reminder looks something like this:

Subject: example.net mailing list memberships reminder   
From: mailman-owner@example.net            
To: user@example.org
Date: Wed, 01 Feb 2012 05:00:07 +0100

This is a reminder, sent out once a month, about your example.net
mailing list memberships.  It includes your subscription info and how
to use it to change it or unsubscribe from a list.

You can visit the URLs to change your membership status or
configuration, including unsubscribing, setting digest-style delivery
or disabling delivery altogether (e.g., for a vacation), and so on.    
        
In addition to the URL interfaces, you can also use email to make such  
changes.  For more info, send a message to the '-request' address of 
the list (for example, mailman-request@example.net) containing just 
the word 'help' in the message body, and an email message will be sent
to you with instructions.    
         
If you have questions, problems, comments, etc, send them to   
mailman-owner@example.net.  Thanks!      

Passwords for user@example.org:
     
List                                     Password // URL     
----                                     --------    
software-users@example.net               mysecretpassword
http://mailserver.example.net/mailman/options/software-users/user%40example.org

You've seen and cursed these reminders for so many years, little realizing that they contain the keys to untold power; or at least enough power to stop the hated monthly deluge. Note the subtle hint that 'you can also use email to make such changes'. In fact, email is the only tool you'll need. Start by copying the name of the list; in this case software-users. Compose a new email message and paste in that address, followed by -request and the domain. For this fake version, we'd use software-users-request@example.net. Skip the Subject line, and dive right into the body of the email. You'll need these two lines:

set authenticate mysecretpassword
set reminders off

Send it off, in a few seconds (perhaps minutes) your heart will leap to see the response:

Subject: The results of your email commands
From: software-users-bounces@example.net          
To: user@example.org  
Date: Wed, 01 Feb 2012 10:21:41 -0500   
          
The results of your email command are provided below. Attached is your
original message.

- Results:
    reminder option set

- Done.


The Subtle Way

There is even more power lurking in the reminder email, in the form of a URL at the very bottom. Follow it and you'll be greeted with a simple login screen. Use the password that was conveniently supplied to you to obtain access, but don't be dismayed by the seemingly limited choices on the membership configuration page. Scroll down to the Subscription Options, and look for this:


Yes, that's right; you can exorcise your monthly email demons by selecting the No button. But there's more; if you have subscribed to more than one Mailman list at this server, you can set the option for all of them simultaneously! Sadly there is no universal Mailman, with hegemony over all the lesser servers, but at least this cuts down on the number of times you'll need to repeat the process.


The Noble Way


There is one user with even more power over the mailing list than you; the list administrator. The admin is omnipotent; in a single click all of the password reminders can be disabled, once and for ever. With the zeal of your convictions, surely you can convince them to think of all the other users and their silent suffering, and end the pain for all of you at once. Yes, it is more effort, but think of the good you'll be doing and the karma you must certainly accumulate.


A Moment of Silence for the Password Reminder


Should you find that in the absence of the Mailman reminders you have trouble remembering to give the dog his heartworm medication, pay the cable bill, or return your library books, you can always re-enable it; that's true even if the list administrator has been shown the path of enlightenment.

Now go and spread this word to all of the long-suffering Mailman users, whether they quietly bemoan their fate or shout their rage from the hilltops on each first day. Come to think of it, I may write a Twitter-bot that autoresponds with these instructions. . .