Gas station without pumps

2018 July 29

Fixing Monoprice Delta Mini end stops

Filed under: Uncategorized — gasstationwithoutpumps @ 20:17
Tags: , ,

I noticed that the automatic bed leveling on my Monoprice Delta Mini was not really working, and so I researched the problem on the web.  The general idea from several posts was that the end stops were not precisely positioned, and the automatic bed leveling couldn’t deal with that.

There seemed to be two approaches to fixing the problem:

  • Fuss with the end stops mechanically, loosening screws, tweaking position, and retightening them.  Getting that accurate to 0.1mm or better seemed unlikely to me, and one cautionary tale was of someone dropping one of the nuts and not being able to get it back on the screw.  That sounds like the sort of problem I would have, so I was reluctant to try this.
  • Repeatedly measure the bed, tweaking the firmware offset for the end stops.  That sounded more like the sort of thing I could do, and I even found a program on-line that would do it automatically. https://github.com/TechnoSwiss/MPMD-AutoBedLevel-Cal

I downloaded the program and looked at it carefully, to make sure it wouldn’t mess up my printer.  It seemed pretty clean, except for one block that set the steps/mm for the stepper motors.  The step setting would have been way off for my printer (I think it was appropriate for an older version of the software that had a coarser microstep option).  I removed all the code that referred to steps/mm, since  I had already calibrated that with the Make dimensional print (see Monoprice delta 3d printer glass clips).

I also set the initial values of L (the length of the diagonal rod) and R (the radius of the delta tower) to the factory-set values (120.8 and 61.7) reported by my printer (using the M503 command to print settings), so the program would be working with best estimates I had.

I fixed one parenthesis bug (which would not have caused problems in Python 2, but did not work with the print() function in Python 3).

The program works by doing the 4 taps used for bed leveling, and reporting the position of each point, then doing a linear estimate of how to adjust the end-stop offsets and R to make the numbers come out right.  It makes the adjustments and repeats the measurements until the points are all at about the same Z height.

For my printer, the adjustments were X-0.165  Z-2.923 and R=63.138.  The 3mm offset for the Z-tower was about what I expected based on how tilted the first layer of the prints had been.

I switched over to using the newest version of Cura (3.4.1) from the version 3.2.1 that I had been using, since I now understood the printer well enough to be able to add it as a custom filament printer, without needing a bunch of files from the web to define the printer.  I printed the Make dimensional test piece again, sliced by Cura 3.4.1, to check that I hadn’t messed up the setup of Cura.

It printed fine (on the 2nd try—the first try had a typo in the setup code and was trying to print 3mm up in the air), with a flat bottom layer adhering uniformly to the glass plate—indicating that the end-stop corrections were working as hoped. Its dimensions were

design measured x measured y
25mm 25.25mm 24.65mm
20mm 20.05mm 19.75mm
10mm 10.10mm 10.00mm

which indicates that the steps/mm are accurate to about 1%. I could tweak them a little, but I’m not sure that I’d get consistent improvement from doing so.

I’ve also been working on creating broomstick threading on the printer, both to test the ability of the printer to do screw threads and to make a socket and bracket for attaching a broom head to a telescoping pole for cleaning the valleys of my tile roof.  I’ll post on that in a separate post, with pictures, once I get the whole thing working.

2018 July 19

Dropping old LED lighting project

Filed under: Uncategorized — gasstationwithoutpumps @ 14:28
Tags: , , , , ,

About 4 years ago, I started a project to replace the breakfast room ceiling fan (which my wife has always hated) with an LED fixture of my own design.  In order to do this, I designed some custom LED boards that could work over a range of voltages with PWM control of the brightness and I made some desk and table lamps using the boards, as well as a stroboscope (Summer project, LED board I-vs-V curve, Summer project 2, Desk lamp, Newer dimmer software, LED strobe using dimmer boardHalloween 2016, … ).

Although I have had the electronics done for the breakfast room fixture for about 3 years, I’ve not been able to come up with a mechanical design that I think will look good.  Also, the task of cutting the conduit in the attic to install an outlet for the wall-wart power supply did not appeal to me, so I kept putting off the project.

Last weekend, my wife, my son, and I went to the local Habitat for Humanity ReStore, ostensibly to look for cabinet handles and doors, but mainly just to browse. While there, we saw a used drum light ceiling fixture that was on sale for only about $16 (it is one that normally sells for around $120 new from Home Depot).  Since I had pretty much given up on coming up with a design using my LED boards that would look good, and my wife liked the drum fixture, we bought it and my son helped me install it.

The hardest part of the installation was probably pulling new wire through the conduit, since I did not want to use the old cloth-covered solid copper wire that was there.  I also added a grounding screw to the junction box for the lamp, since the old ceiling lamp had no ground connection.

Here is the “new” ceiling lamp in daylight.

Here is the ceiling lamp with 3 2700K LED bulbs.

Lining up the screw holes of the fixture with the screw holes of the junction box was also a bit tricky—my son’s holding the fixture while I fussed with that was a big help.

The whole project cost under $30: $16 for the fixture, <$3 for screws and wire, $7.50 for 3 LED bulbs. The new lamp is not dimmable (because of the cheap bulbs I chose), but that feature was not really needed for the breakfast room anyway.

So I now have a lot of spare LED boards that I need to find a project for—I’ve used a few of the boards for the desk lamp and stroboscope projects, but I don’t really need another desk lamp or stroboscope.  Anyone have any ideas?

2018 July 18

Santa Cruz Shakespeare’s Love’s Labour’s Lost

Filed under: Uncategorized — gasstationwithoutpumps @ 23:10
Tags: , ,

Last week my wife, my mother-in-law, and I went to see the first preview of Love’s Labour’s Lost performed by Santa Cruz Shakespeare in Delaveaga Park.  The play has a simple, rather obvious plot, but there is a lot of fun wordplay (much of which is lost on modern audiences, even with a good dramaturg and director).  I suspect that SCS chose the play partly for the ease of understanding, but also because the near gender balance of the play makes their policy of gender-balanced casting easier.

Only four parts are cast cross-gender: Moth, Boyet, Holofernes, and the messenger Marcadé).  Moth is supposed to be young enough that gender is really irrelevant, Holofernes works perfectly well as a schoolmarm rather than a schoolmaster, and the messenger Marcadé is just a messenger, whose gender doesn’t matter.  That leaves Boyet, who is normally a lord attending the French princess and is often played as an older, gay man.  Converting the part to that of a middle-aged woman works well enough, except for one exit, when Boyet is sent to the King’s court, where no women are allowed.

SCS’s performance is worth seeing, but not stellar.  I found the performances by Tommy Gomez (as Don Adriano de Armado) and Kailey Azure Green (as his page Moth) to be the best—Don Adriano comes across more 3-dimensional than the part is usually played without losing any of the humor, and Kailey captured the essence of Moth well.

Usually Berowne’s part is the best one, but I did not find Brian Ibsen to be a convincing Berowne.  He rushed the speeches a bit and did not seem really to get into the part (he also may be a bit old for the part—he should be the quintessential fratboy, not obviously 10–15 years older than the other lords).  I suspect that he’ll do better as Thomas in Venus in Fur.

The four ladies of France, with Boyet barely visible in back. Photo from https://www.santacruzshakespeare.org/about/media-room/

The costuming was good (1916?), but the set was rather dull. Perhaps it will look better when it is lighted at night (the first preview is a matinée).  I’ll get another chance to see the performance in the evening with the lighting near the end of the run—perhaps I’ll change my mind about the set then.

 

2018 July 9

Monoprice delta 3d printer glass clips

Filed under: Uncategorized — gasstationwithoutpumps @ 14:50
Tags: , , ,

In addition to the legs I added to my new Monoprice Delta Mini 3d printer, I’ve also added a 120mm borosilicate glass plate to the heated bed.  The glass plate needs to be immobilized, so I designed some clips loosely based on designs I saw on Thingiverse.

This is version 7 of the clip. The clip here is shown upside-down, which is how it is built on the printer. The rim holds the plate down, and the two cantilevered sections fit under the aluminum baseplate.  The image is exported directly from OpenSCAD.

Here is another view, with the clip the right way up, viewed from the pin side, rather than the glass side. The existing pin for holding down the aluminum plate rotates into place in the semicircular hole left for it.

Several of the dimensions of the clip are critical, and getting them even half a millimeter off made the clip non-functional. Because I’m not very good at measuring (nor very observant about all the dimensions I needed to measure), it took me seven tries to get a design that would work.

To make the design easier, I recalibrated my printer based on the Make magazine dimensional accuracy test object. The test object was printing a little smaller than it should, so I scaled the steps/mm calibration from the 113 steps/mm to 116 steps/mm. To make the change, I gave the “m503;” command to get the current settings, then “m92 x116 y116 z116;” to rescale the steps, and finally “m500;” to save the settings in non-volatile storage. I power-cycled the 3d printer and confirmed that the settings had been saved with “m503;”.

I designed the clips with OpenSCAD and sliced them with Cura, using 0.1mm/layer, 3 layers for the walls, and 4 layers top and bottom (I think—Cura does not save any of this metadata in the gcode file except the layer height).  The V7 clip supposedly uses 70cm of filament, which at 1.24 g/cm3 or 3g/m for 1.75mm diameter PLA is about 2.1g of PLA per clip. At 2¢/g, the clips cost under 20¢ for materials, even with the 6 failed designs, but I spent a lot of time on the design and a fair amount on the printing (each print run takes about 15–20 minutes, so there were about 3–4 hours of printing involved).

Some parts of the design were simple, like getting the 120mm diameter circular arc and the 2mm wide lip to hold down the glass plate. The harder parts were getting the pin diameter and distance from the glass plate right, leaving room on the bottom for the alignment pin, and making the clip under the plate thin enough not to interfere with the button movement for the automatic bed leveling.

This is the top view of all 7 clip designs showing the evolution from a pair of circular arcs to a more solid object.

The bottom views are more informative. V1 did not extend below the aluminum plate at all, and had too small a radius for the pin. V2 extended below the plate, but did not wrap around it and the cutout for the plate did not extend back far enough. V3 extended the cutout for late back far enough, but got the angle wrong. V4 tried wrapping around the edge of the plate, but got the depth of the slot wrong—I also had to cut some of the print with diagonal cutters to make room for the alignment pin. V5 fixed the angle of the slot and left room for the pin, but did not correct for the change in angle by increasing the slot depth. V6 got the slot depth and other XY dimensions right and reinforced the side of the slot by adding triangular panels to the clip, but was too thick below the plate, so that the buttons wouldn’t press. V7 extended the plates to reinforce the slot for the whole length of the slot and had only 1mm below the plate.

Here are the clips in place, holding down the glass plate after reprinting Make‘s dimensional test.

The prints pop off the glass plate very easily—perhaps too easily.  I used the last of our spray fixative on the plate before printing, as an attempt with nothing on the plate ended up with no adhesion—I’ll probably go buy some hair spray to use as fixative for future prints.

The glass plate does result in a shiny bottom layer for the prints—a much smoother bottom layer than the slightly textured surface of the provided bed.

Here are the dimensions of the dimensional test printed on the glass bed:

nominal 25mm 20mm 15mm 10mm
center X 24.95mm 19.95mm 15mm 10mm
center Y 24.85mm 19.9mm 15mm 10mm
outer X 25.05mm 19.95mm 14.9mm 10mm
outer Y 25.15mm 20mm 15.25mm 10mm

Center Z height: 20.4mm  Outer Z height: 20.5mm

The X measurements are using the edges with a notch, and the Y measurements are from the perpendicular pair of edges. The center measurements are from the copy closer to the center of the bed. All XY dimensional inaccuracy is less than 1%, so the step size is adjusted about as good as I can make it (maybe I could change the X to 116.1 steps/mm and Y to 115.9 steps/mm) , but the Z dimension is 2–2.5% too large, so I should set the Z steps/mm to 113.4.

Here is the OpenSCAD code for the clip. It is not the most elegant way to describe the clip (because of the evolution of the code over the 7 versions), but it works. (Update 2018 July 15: I’ve made the clips available on Thingiverse: https://www.thingiverse.com/thing:3001881)

// Clip for holding down 120mm diam glass plate
// on Monoprice Delta printer
// Kevin Karplus
// 2018 July 6 

// xy plane is top of the clip.

thickness= 3;   // thickness of glass in mm
radius = 60;   // radius of glass in mm

overhang_thickness = 2;   // thickness of overhanging lip that holds glass
overhang_width = 2;     // how fare lip extends over the glass.
glass_angle = 42;   // arc in degrees of lip for glass

above_plate= thickness+overhang_thickness;

plate = 2;      // Existing plate is 2mm thick
below_plate=1;  // Max thickness below plate
                // (2mm space, but need 1mm travel for bed leveling)

height = above_plate + plate + below_plate;

pin_radius = 5.5;   // radius of circle cut away for pin
big_pin_radius = pin_radius+4; // size of ring around pin

pin_center = radius + 11;

plate_angle = 100;   // angle of plate edges in degrees.

intersection()
{
    difference()
    {
        union()
        {

            // Part that holds down glass
            intersection()
            {
                difference()
                {   // outer-edge
                    cylinder(r=radius+4, h=height, $fn=180);  // outer edge
                    translate([0,0,overhang_thickness]) cylinder(r=radius, h=height, $fn=180); //glass edge
                    cylinder(r=radius-2, h=3*height, center=true, $fn=180);// inner edge
                } // end difference

                // wedge to reduce arg
                linear_extrude(height=3*height, center=true)
                {   polygon(points=[ [0,0],
                        [100,100*tan(glass_angle/2)],
                        [100,-100*tan(glass_angle/2)]]);
                }

            } // end intersection

            // part that connects with existing clip pin
            translate([pin_center,0,0])
                difference()
                {   cylinder(r=big_pin_radius, h=height, $fs=0.2);  //outer edge
                    cylinder(r=pin_radius, h=3*height, center=true, $fs=0.2); // edge contacting pin

                    // cut to half circle
                    translate([3*pin_radius,0,0])
                        cube([6*pin_radius,6*pin_radius,3*height], center=true); 

                } // end difference

            // triangular fill to reinforce join between pin and glass
            translate([pin_center,0,0])
            {   outside_x= pin_center - cos(glass_angle/2)*(radius+4);
                linear_extrude(height=height)
                {    polygon(points=[ [-big_pin_radius, 0], [0, big_pin_radius],
                        [-outside_x, big_pin_radius+outside_x*tan(plate_angle/2)]]);
                };
                linear_extrude(height=height)
                {    polygon(points=[ [-big_pin_radius, 0], [0, -big_pin_radius],
                        [-outside_x, -big_pin_radius-outside_x*tan(plate_angle/2)]]);
                };
            } // end translate
        } // end union

        // cut away space for baseplate
        triangle_x = 40;  // large enough to cut everything
        triangle_y = triangle_x * tan(plate_angle/2);

        translate([pin_center+3,0,above_plate])
            {    linear_extrude(height=plate)
                    polygon(points=[[0,0],
                                [-triangle_x,-triangle_y],
                                [-triangle_x,triangle_y]]);
            }
    }

    // keep only those parts that don't interfere with the alignment pin
    // trimming the cantilevered below-plate part to a narrow rim
    union()
    {
        // everything above the plate is fine
        translate([0,0,above_plate/2]) cube([500,500,above_plate+0.001], center=true);
        // below the plate, make circular keep-regions
        keep_radius=22;
        translate([pin_center+8, keep_radius, above_plate])
            cylinder(r=keep_radius, h=height, $fn=180);
        translate([pin_center+8, -keep_radius, above_plate])
            cylinder(r=keep_radius, h=height, $fn=180);
    }
}

Analog Discovery breadboard adapter

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 11:16
Tags: , ,

As I mentioned in Analog Discovery Impedance Analyzer, I recently bought two new attachments for my Analog Discovery 2.  I reviewed the Impedance Analyzer in the earlier post, so in this one I’ll review the breadboard breakout.

The breadboard breakout provides a simple way to attach the Analog Discovery 2 to a breadboard, without using the female headers that come with the device.

Here is the breadboard adapter, plugged into the end of a breadboard.

The Analog Discovery 2 can plug into the breadboard vertically, which is compact, but requires disassembly to put the test setup back in its box for carrying.  Here it is shown plugged into the last 15 rows of the breadboard, but I had to move it in two rows to keep the weight of the AD2 from tipping the breadboard.

I tried doing a little work with the breadboard adapter and found it to be a mixed blessing. I used it for testing a circuit where I needed both oscilloscope channels, one power supply, and one waveform generator, which would normally use 7 of the 30 wires on the AD2.  Some of the wires (the power, ground, and oscilloscope 1- and 2- wires) could be quite short, as they connected to the power busses on the breadboard, but the other wires had to be fairly long, as they had to skip past all the trigger and logic-analyzer inputs that I wasn’t using.  I could have plugged the adapter into the breadboard the other way around, but then the AD2 itself would interfere with convenient wiring.  It would have been nice to have the most frequently used connections at the tip of the adapter, instead of the base of the adapter.

For a fixed setup, where the oscilloscope channels are always looking at the same signals, the breadboard adapter is more convenient that the standard flywire connections, which have a tendency to slip off the double-ended male headers that I use for connecting them to the breadboard.  The female headers of the flywires are not designed for many cycles of attaching and detaching, and end up getting too loose after a while.

But for debugging, when the oscilloscope channels have to be moved rapidly from node to node, the breadboard adapter is less convenient than having the separate flywires—unless much longer wires are used (with the attendant problems of extra inductance and capacitive pickup of 60Hz interference). Losing 17 rows of the breadboard to the adapter is also a problem, as it leaves only 47 rows of a standard 64-row breadboard, or 15 rows of half-length breadboard for building the test circuit.

I think that I will use the adapter for lecture demos, where I have fixed wiring to carry around, as I can spend less time setting up the demo just before class, at the cost of slightly more time the night before. My standard lecture setup will use a full-length breadboard with the adapter in one end and a Teensy LC in the other end (for PteroDAQ demos) using up 31 of the 64 rows, leaving me with the equivalent of about a half-length breadboard in the center for the circuitry being demonstrated.

I don’t know yet whether I’ll find the adapter useful for regular debugging—probably not much.

Next Page »

%d bloggers like this: