Brent’s Sharpening Pages…

My experimenting with plane sharpening has (like so many other things) caused me to research stuff on the Internet. I’ve been working on grinding the back on my older plane using sandpaper cemented down to a flat piece of glass. It’s still not quite there after about a solid 30 minutes of work, and it’s pretty clear to me that the grit is breaking down and not cutting as fast as when it was new. So, toward that end I started to consider the possibility of investing in some sort of grinding stone. But, I don’t know anything about them, so I started reading. That’s when I ran across this page, with tons of information and designs for jigs that can be used to help make sharpening quick and repeatable. I haven’t absorbed it (or even read it all), but I’m stashing this link for future reading.

Brent’s Sharpening Pages

30 minutes in the workshop…

So, last night about 9:30PM I decided to spend a little time in my garage workshop. I cleared some items off the top of my rolling workbench and decided to do a short bit of work on two projects.

A couple of days ago I had started making a cross cut sled for my tablesaw. I had cut and glued two oak runners to a piece of 3/4″ ply. Today I trimmed the extra bits off from the board, and smoothed the ends with a bit of work using my belt sander. I took some extra time to rub some paste wax into the bottom, and now it slides easily in the miter slots. I didn’t feel like doing anything more on it, because I want to spend some time to double check my table saw blade for square before making any additional cuts. I have some 3/4″ ply cut to serve as the end fences already, but will need to chop it to length and glue up a double thickness to serve as the rear fence too. Perhaps I’ll get to that this weekend.

But, I didn’t feel like stopping, so I decided to try my hand at sharpening.

Old (and dusty) wooden fore plane. Bed length is about 16.5″…

Years ago, my wife got me a couple of planes as a gift. She had found these in some antique store and I had mentioned to her that I liked old tools, so she bought them for me (she assures me they were inexpensive). I always thought they were nice objects, but hadn’t either displayed them or converted them into working tools. One was a molding plane that I haven’t got any serious plans for, but the other is an old wooden fore plane, with a 2″ wide iron and about 16.5″ in length that appears to be in pretty good shape.

I thought I might actually try my hand at restoring it to working shape. And I figured the best way to start is to sharpen the tool iron. Inspired by Rex Krueger’s video:

I decided to give it whirl! I had a large 24″ square piece of flat tempered glass, and took a piece of 150 grit sand paper, prayed it with some 3M Super 77 spray adhesive, and glued it to one corner.

Examining the old iron, it looks to me like it hadn’t (perhaps ever) been properly sharpened (he say’s boldly, having literally no experience with it). The back looked like it had never been flattened, and the bevel was rounded and uneven.

A couple of weeks ago I ordered a honing guide from Amazon. The basic idea of this is to hold the iron at a particular angle that you can set by adjusting the amount of the iron that protrudes out the front, and the guide will hold the blade at the proper angle. For a 25 degree bevel, it required a 50mm (or 2″) protrusion. For fun, I decided to give it a try.

Hard to photograph, but the white area is the newly ground surface. As you can see the leading edge is blunter, and not even.

A few minutes of work revealed what I thought. The leading edge of the blade was actually much blunter than 25 degrees. It will probably take some work to get back to a single, consistent bevel.

My understanding is that many fore planes actually used a curved or cambered blade. This is because fore-planes were used to make fairly aggressive, overlapping cuts to roughly flatten stock. But there was a significant left to right change, so I thought it probably would be best to try for a simple, flat bevel, and worry about trying to adjust the camber at some later date.

But first, I needed to flatten the back. I took the iron out of the honing guide and set to work. My goal was to get about 1.5″ of the back flat. A few minutes of work revealed that the center of the iron was obviously significantly concave, and pretty rough overall. There was also some general uneven-ness near the the leading edge, and one side looked like it was a a bit rounded relative to the rest of the surface.

After 15 minutes you can clearly see the concavity in the center, and the left side is a bit off as well.

I kept at it for about 15 minutes. It rather reminded me of my old days of working grinding telescope mirrors. Careful, even pressure, long strokes, examining your work at intervals.

It still needs a lot of work. While the portions to the left and right are now nice and bright and smooth, the leading edge is still a bit stained and uneven, and you can see a fair amount of concavity still remaining in the center, although it’s much better than when it began. It was getting late though, so this is where I halted for the night.

As I went off to sleep, I started to consider the meta question: how flat was flat enough? And why is having a flat back to the iron important anyway?

Ask questions, and the internet provides the answer. This article from Fine Woodworking provided me some light reading before sleep took me.

Anyway, the time in the garage was quite relaxing. I did decide that I needed to add another LED light strip toward the front side of the garage, because I was basically standing in my own light. Perhaps I’ll get to that this weekend.

Hopefully, my next update will be to let you all see how nice and flat this iron has become, and how I’ve ground a proper bevel. Stay tuned.

Making a cross cut sled for my table saw…

Okay, a few weeks ago I bought a little Dewalt DW745 table saw for use in my garage. I’ve never actually owned a table saw, but lately I’ve been wanting to do more construction, and I thought investing a fairly small amount of money in a table saw would be a good way to go.

And I’ve begun to do experiment with some cheap, simple projects to learn how to operate it and operate it safely.

The way I’ve decided to start is by trying to research and build some simple jigs to help me safely and accurately cut pieces of various types. One of the jigs which everyone recommends that you build is a cross cut sled.

I had some old 3/4″ plywood lying around my shop, left over from when I built my last telescope more than a decade ago. I decided to rip some pieces to form the bed and the two ends of the cross cut sled. It was good practice. All the pieces had nice clean edges, and sighting along them and checking them with a square shows the edges to be nice and straight.

The only part that I didn’t have was material to make the rails that will fit in the miter slots. While I have a fair amount of scrap plywood and softwood like Douglas Fir 2x4s lying around, I haven’t done any hardwood woodworking before, so I don’t have the usual oak or maple that most people use for it. I will probably go out and source some 1″ material I could trim down over the next few days, but while thinking about it, I ran across this nice video series of videos to help newbies like myself build their first cross cut sled.

They suggested that it actually is reasonable to cut runners out of plywood, at least if you use a good quality plywood like Baltic Birch. As it happens, I don’t have any of that either, but there is still a lot of good information here which I’m trying to absorb. If you are a beginning woodworker, you could probably learn some good stuff from this series too.

Antique handsaws from a friend’s estate sale…

I heard some friends of mine that I haven’t seen in some time were having an estate sale, so I drove over to say hi and, well, to also see if they had anything interesting. Lately I’ve become interested in doing more work in my shop, and I’ve always had a bit of a fondness for old tools, even though I know almost nothing about them. I had a nice visit, and then dug around. In their old workshop, I found I found this trio of old saws, which they generously donated to me. They are a bit dirty and rusty, and I don’t know anything about old tools really, but I liked the shape of the handles and the wheat motif that was carved into the handles, and imagined that they were probably fairly old.

In fact, I think they are probably over a hundred years old. I took some photos, and will ponder what I’m going to do with them. At the very least they could stand a bit of rust removal and cleaning, and probably have some linseed oil rubbed into the handles.

As you can see, these are a little rusty and dirty, but it’s mostly surface corrosion, and they are in pretty good condition. I doubt you would really call them sharp, but they are not missing any teeth, and they are straight and even. One has a fairly loose handle, and the one pictured on the bottom has a split in the handle. The handles are secured to the saws with screws which are (I believe) brass.

This one is probably in the roughest shape. As you can see, the wood is split right through the medallion in the center, and there is a fair amount of sticky, gloppy looking stuff stuck onto the handle, specially near the base of the wheat motif.

Here is a not very good picture of the medallion. It’s fairly corroded, but I haven’t tried to clean it yet. My guess is that it says “DISSTON”, but I’m not 100% sure. I looked at this quick identifying chart, and believe it to be a Disston D-23 or one of the related models. Neat!

The next saw:

has another dirty/gunky medallion.

It is pretty clearly another Disston saw, also tagged with USA. I think it might be a No. 76, but I’m not sure. If so, it’s a bit more rare than the first saw, and while the blade is in kind of gunky condition, the handle and hardware appear much better. Overall the feeling of the saw is more modern, but what do I know?

The last is a different manufacturer.

Rather odd construction to my eyes. The slotted/split construction is particularly odd, and the curves are more exaggerated. Looking at the medallion:

Reveals a kind of nice motif with a crescent moon and five pointed star, and “SIMONDS MFG CO. WARRANTED”. I wasn’t able to find too much more information about this in a casual Google, but it’s a cool medallion.

Anyway, I doubt I am going to be using them for much woodworking, but I thought they were cool objects. I’ll probably try to get them cleaned up at least, remove the rust and figure out some way to display them. If anyone has more knowledge/expertise about old handsaws you can email me or drop a comment. I’d love to know more.

My prototype data logger experiment: bunyan

A couple of days ago, I found out about thecavepearlproject.org through a link on hackaday, and an article which gave an interesting idea about how to do temperature sensing using an Arduino and no additional parts. I didn’t really recap the actual underlying technique. The idea was a fairly interesting one. The watch dog timer (WDT) in the ATmega328 (the chip of many Arduino variants) is normally used to help detect if your embedded application has crashed or hung. You configure the watchdog timer to trigger a routine (ISR, or Interrupt Service Routine) after a given interval, say one second. In your application’s main loop, every once in a while you “feed” the timer by calling the wdt_reset function. This resets the timer, and keeps the ISR from triggering. If your application goes into a loop or hangs, then the wdt_reset won’t get called, and when the timer expires, it triggers the routine (perhaps resetting system).

What does this have to do with temperature sensing? The WDT is driven by an oscillator inside the ATmega328, and which runs independently of the main (usually crystal) oscillator. And, as it happens, it is not engineered to be especially accurate or stable. It is not derived from the input crystal (crystal oscillators are normally pretty stable). In particular, it is not designed to be temperature stable. And it’s not. It’s that instability that makes using it for temperature sensing. You measure the time it takes to trigger the WDT, and then, with a little math (more below) you can figure out the temperature.

Anyway, that’s the theory. I wanted to give it a whirl. So, I tinkered together some code, using my favorite development environment platformio, and running on a Sparkfun RedBoard, with some other sensors that I had lying around: an Si7021 temperature humidity sensor and a DS3231 real time clock. Previous data logging experiments I had done mostly used to log data to the Internet (I mostly have been using ESP8266 boards like the WeMOS D1 Mini), but I was inspired by the work on The Cave Pearl Project website, so I decided to try to log the data to a MicroSD card instead. So, I tinkered this code together:

#include <SPI.h>
#include <Wire.h>
#include <SdFat.h>
#include <RTClib.h>

#include <avr/sleep.h>
#include <avr/wdt.h>

/*  _                            
 * | |__ _  _ _ _ _  _ __ _ _ _  
 * | '_ \ || | ' \ || / _` | ' \ 
 * |_.__/\_,_|_||_\_, \__,_|_||_|
 *                |__/           
 * an Arduino based data logger
 *
 */

#define BUNYAN_VERSION          "1.00"

////////////////////////////////////////////////////////////////////////
RTC_DS3231 rtc ;
////////////////////////////////////////////////////////////////////////

void
fault()
{
    Serial.println("::: SYSTEM FAULT RECORDED") ;
    delay(10) ;
    for (;;) ;
}

////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
// microSD card adapter settings 
////////////////////////////////////////////////////////////////////////

SdFat SD ;
SdFile f ;

void
motd()
{
    int ch ;

    if (! SD.exists("README.TXT")) {
        Serial.println("::: no motd") ;
        return ;
    }

    if (f.open("README.TXT", O_RDONLY)) {
        while ((ch=f.read()) > 0) {
            if (ch == '\n')
                Serial.write('\r') ;
            Serial.write(ch) ;
        }
        f.close() ;
    } else {
        Serial.println("motd: not found.") ;
        fault() ;
    }
}

////////////////////////////////////////////////////////////////////////
// It's useful to be able to detect all the devices on the I2C bus.
////////////////////////////////////////////////////////////////////////

int
i2cprobe(int addr)
{
    byte error ;
    Wire.beginTransmission(addr) ;
    error = Wire.endTransmission() ;
    return error == 0 ;
}

void
i2cdetect() 
{
    char buf[12] ;
    
    Serial.println("    SCANNING ALL I2C ADDRESSES") ;
    Serial.println("    =======================") ;
    for (int i=0x08; i<0x78; i+=8) {
        Serial.print("    ") ;
        for (int j=0; j<8; j++) {
            if (i2cprobe(i+j))
                snprintf(buf, sizeof(buf), "%02X ", i+j) ;
            else
                snprintf(buf, sizeof(buf), "-- ") ;
            Serial.write(buf) ;
        }
        Serial.println() ;
    }
    Serial.println("    =======================") ;
}

////////////////////////////////////////////////////////////////////////

volatile boolean WDTalarm=false;

ISR(WDT_vect)
{
    wdt_disable() ;             // only fire once.
    WDTalarm=true ;
}

////////////////////////////////////////////////////////////////////////

#include "Adafruit_Si7021.h"
Adafruit_Si7021 sensor = Adafruit_Si7021();
////////////////////////////////////////////////////////////////////////

char msgbuf[40] ;

char fname[40] ;

void
setup()
{
    // Most of the time, we won't really have (or need) a serial
    // cable attached to the data logger, but during development it
    // is convenient, and I'm not really working at trying to eke out 
    // every last bit of battery life, so we'll go ahead and turn it on
    // here.

    Serial.begin(115200) ;


    // wait for the serial port to be initialized
    while (!Serial) delay(10) ;

    Serial.println("BUNYAN Version " BUNYAN_VERSION) ;

    Wire.begin() ;
    i2cdetect() ;
    Serial.println() ;

#if 1
    Serial.println("::: testing WDT_count()") ;
    snprintf(msgbuf, sizeof(msgbuf), "::: CNT=%ld", WDT_count()) ;
    Serial.println(msgbuf) ;
#endif

    // I envision A0 to be connected to a simple resistor divider, so we
    // can keep track of the battery voltage.

    Serial.println("::: A0 set for analog input") ;
    pinMode(A0, INPUT) ;

    // Try to setup the SD card...
    snprintf(msgbuf, sizeof(msgbuf), "::: SPI MISO=%d MOSI=%d SCK=%d CS=%d",
        MISO, MOSI, SCK, SS) ;
    Serial.println(msgbuf) ;

    if (!SD.begin(SS, SD_SCK_MHZ(4))) {
        Serial.println("::: unable to initialize microSD card reader") ;
    }

    motd() ;

    if (i2cprobe(0x68)) {       
        Serial.println("::: found DS3231 at I2C address 0x68");
        rtc.begin() ;
        if (rtc.lostPower()) {
            Serial.println("::: DS3231 lost power, resetting time.") ;
            rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
        }
        DateTime now = rtc.now() ;

        snprintf(msgbuf, sizeof(msgbuf), 
                "::: %02d/%02d/%04d %02d:%02d:%02d [%ld]",
                now.month(), now.day(), now.year(),
                now.hour(), now.minute(), now.second(),
                now.unixtime());
        Serial.println(msgbuf) ;

    } else {
        Serial.println("::: could not find DS321 RTC module") ;
        fault() ;
    }

    if (sensor.begin()) {
        Serial.print(F("::: found "));

        switch(sensor.getModel()) {
        case SI_Engineering_Samples:
            Serial.print(F("SI engineering samples")); break;
        case SI_7013:
            Serial.print(F("Si7013")); break;
        case SI_7020:
            Serial.print(F("Si7020")); break;
        case SI_7021:
            Serial.print(F("Si7021")); break;
        case SI_UNKNOWN:
        default:
            Serial.print(F("Unknown"));
        }

        Serial.print(" Rev(");
        Serial.print(sensor.getRevision());
        Serial.print(")");

        Serial.print(" Serial #"); 
        Serial.print(sensor.sernum_a, HEX); 
        Serial.println(sensor.sernum_b, HEX);

        float fT = sensor.readTemperature() ;
        float fH = sensor.readHumidity() ;
        
        int iT = (int) (100. * fT) ;
        int iH = (int) (100. * fH) ;

        snprintf(msgbuf, sizeof(msgbuf),
                "::: TEMP=%d.%02d RH=%d.%02d%%", 
                iT / 100, iT % 100, iH / 100, iH % 100) ;

        Serial.println(msgbuf) ;
    } else {
        Serial.println("::: could not find temperature humidity sensor") ;
        fault() ;
    }

    int cnt = 0 ;

    do {
        snprintf(fname, sizeof(fname), "DATA%03d.CSV", cnt++) ;
    } while (SD.exists(fname)) ;

    Serial.print("::: Using ") ;
    Serial.print(fname) ;
    Serial.println(" for data.") ;

}

// https://thecavepearlproject.org/2019/02/25/no-parts-temperature-measurement-with-arduino-pro-mini-to-0-005c-or-better/

unsigned long 
WDT_count()
{
    noInterrupts() ;
    MCUSR = 0 ;
    WDTCSR |= (1<<WDCE) | (1<<WDE) ;                    // prep for update
    WDTCSR = (1<<WDIE) | (1<<WDP2) | (1<<WDP1) ;        // and change it to 1s
    wdt_reset() ;
    WDTalarm = false ;
    interrupts() ;


    unsigned long st = micros() ;

    while (!WDTalarm) {
        set_sleep_mode(SLEEP_MODE_IDLE) ;
        noInterrupts() ;
        sleep_enable() ;
        interrupts() ;
        sleep_cpu() ;
        sleep_disable() ;
    }

    return micros() - st ;
}

void
loop()
{
    Serial.print("::: LOGGING TO ") ;
    Serial.println(fname) ;

    if (f.open(fname, O_CREAT | O_APPEND | O_WRONLY)) {
        Serial.print("::: ") ;
        Serial.print(fname) ;
        Serial.println(" open, logging data") ;

        // First, get the time
        DateTime now = rtc.now() ;
        snprintf(msgbuf, sizeof(msgbuf), 
                "%ld,", now.unixtime()) ;
        f.print(msgbuf) ; Serial.print(msgbuf) ;

        // and the temperature and humidity
        float fT = sensor.readTemperature() ;
        float fH = sensor.readHumidity() ;
        int iT = (int) (100. * fT) ;
        int iH = (int) (100. * fH) ;
        snprintf(msgbuf, sizeof(msgbuf),
                "%d.%02d,%d.%02d,", 
                iT / 100, iT % 100, iH / 100, iH % 100) ;
        f.print(msgbuf) ;
        Serial.print(msgbuf) ;


        unsigned long wd_cnt = WDT_count() ;
        snprintf(msgbuf, sizeof(msgbuf), "%ld,", wd_cnt) ;
        f.print(msgbuf) ;
        Serial.print(msgbuf) ;
        
        f.println() ;
        Serial.println() ;

        f.close() ;
    } else {
        Serial.println("::: Problem saving data.") ;
    }

    // Wait for a minute, then begin again...
    delay(5000) ;
}

And I wired up the hardware on a breadboard.

Yes, it is just a mess, just like the code.

The data file looks like this. Each line consisted of a time stamp , the temperature and humidity reported by the Si7021, and then the time (in microseconds) that it took the watchdog timer to overflow.

 1551560320,21.90,50.91,1044184,
1551560326,21.86,50.75,1044408,
1551560332,21.88,50.53,1044404,
1551560338,21.86,50.38,1044404,
1551560344,21.88,50.96,1044424,
1551560350,21.88,51.57,1044432,
1551560356,21.90,51.68,1044472,
1551560362,21.90,51.86,1044452,
1551560368,21.90,52.38,1044472,
1551560375,21.91,52.36,1044464,
...

I left this running on my dining room table overnight, recording the data every five seconds (overkill, but why not?) and in the morning I had a data file with about 7800 entries. So, the question was, what to do now? How could I figure out how to convert the raw counts into temperatures?

The answer is of course “math” and the tool I like to use when doing math with computers (particular when the math consists of lots of data) is the numpy library. It turned out that the numpy.polyfit function is just what we need. I wrote 17 lines of code (only two or three which are interesting) to compute an order 2 polynomial that will convert the counts into temperature. I also computed RMS error, and found that the RMS error for the fit curve was about .128 degrees. Not bad at all, and probably pretty comparable to the Si7021.

!/usr/bin/env python
import numpy as np
a = np.loadtxt("data008.dat")
cnt = a[:,3] - 1e6
temp = a[:,1]
p = np.polyfit(cnt, temp, 2)
ptemp = p[2] + cnt * (p[1] + cnt * p[0])
e = ptemp-temp
print "# rms error %.3f" % np.sqrt(np.sum(e * e) / len(e))
for a, b in zip(ptemp, temp):
print "%.2f" % a, b

Here is a graph comparing the two (plotted with gnuplot):

As you can can see, there is a bit of deviation at the very beginning (perhaps caused because the board itself had not been powered before, and therefore may not be subject to self-heating), and there are a couple of glitches, but overall the predicted value is a bit noisier, but tracks the temperature from the “real” sensor pretty well.

What’s left is to try to calibrate the sensor over a much larger temperature range, and to potentially determine how to compensate changing battery voltage if I were to power it from an unregulated source. But it seems like a completely viable way to do temperature sensing, at least if you take the time to calibrate the temperature against a known source (the same coefficients will not carry over between individual boards).

Addendum: The code above was pretty simple, but I did encounter one issue. I had been slowly adding functionality to the sketch, when suddenly code that had worked before began acting erratically, resetting the board and generally causing chaos. I spent about 20 minutes scratching my head, then went away and came back to it later. I then realized that what probably was happening was that I was nearing (or exceeding) the amount of RAM memory for the sketch. I hadn’t been using the ATmega328 in a while, and had forgotten that it only has 2K, so that’s actually pretty easy to do. In addition, the SdFat library consumes a fair amount of RAM as well, so you have to be careful. I did a few things to trim back memory consumption, and should go back and make sure that all the constant strings that I use for information printout are wrapped in the F() macro to make sure that they are stored in flash. If you do not do that, then they get copied into RAM, which is no good at all for memory consumption, and almost certainly not needed.

Temperature sensing on an Arduino w/o additional hardware…

Last night I began dusting off my solar project a bit. It still seems like we are at the bottom of the atmospheric river, so I don’t think it will be going outside any time in the near future, but I wanted to make some software changes.

It uses a pair of temperature sensors and records it to an MQTT server. It revealed that my garage seldom gets below 55 degrees or so (not too surprising, since the weather here seldom gets that cold, but we did have a couple of snaps down around freezing). Over the last 24 hours it’s recorded the following:

From my garage…

This data comes from a Microchip MCP9808 board, and the temperature reported by an MPL3115A2 barometric pressure sensor. I haven’t bothered doing a calibration to see which one is more accurate, but you can see that they seem to report the same values up to an offset. Both are more accurate than I really need.

Several years ago I didn’t have such sensors in my junk box, and tried just measuring the forward voltage drop across a very cheap 1N4148 diode. That “worked” after a fashion. It wasn’t especially sensitive, since each bit of the value returned by analogRead() turned out to be about 2 degrees C. The post generated some comments however, and pointed out that I could use either the internal 1.1V reference or the actual internal temperature sensor to get more accurate values. It was fun, but soon after I got real temperature sensors which promised still better accuracy, and I didn’t revisit the issue.

But today I found an interesting and different approach on the Cave Perl Project Blog. The ATmega328p used on the Arduino uses an internal RC oscillator to run the watch dog timer. It runs at around 110Khz, but isn’t especially accurate. It is… you guessed it… highly temperature dependent.  So, you can time the amount of time it takes the WDT to overflow, and with some math determine what the temperature might be. And it turns out that the results are likely sufficiently more accurate, perhaps down to around 0.1 degrees C, which is better than a lot of inexpensive sensors. There are some details which are interesting to read and think about, but I might have to try experimenting with this.

In any case, the website is actually pretty cool for other projects as well. It was founded to develop “a submersible data logger system for long term environmental monitoring projects” and has lots of other good data and ideas. I’ll probably be killing a few hours reading it tonight. I think you all could do worse than do the same. 🙂

Have a good one.

Brief experience (failure) printing with Sainsmart TPU

I’m still heading toward changing my Creality CR-10 over to use a BLTouch bed leveling sensor, but I still need a few parts that I’m waiting on. I thought it might be a good time to try some prints with a filament that I never used before: namely a roll of Sainsmart TPU filament that I bought months ago but was too chicken to try.

TPU is a soft and stretchy filament which presents some challenges, especially for prints like the CR-10 which uses a Bowden extruder. The filament is pretty soft and compressible, which means that the extruder has to work very slowly to keep the pressure down sufficiently to keep it from bunching up and jamming in the printer. Most people also recommend modifications to the extruder to make sure that the filament enters the feed time immediately after exiting the feed gear. Otherwise a common failure mode is for the pressure to build up and for the filament to kink right there, causing extrusion to stop. My new aluminum replacement extruder hardware seemed pretty good from this perspective, so I thought I’d give it a shot.

Calibration cats, in PLA at 100% and 50% scale

I used most of the suggested settings from the Sainsmart page, which basically meant slowing down the print speed to between 15mm and 30mm/s, and go even slower on the first layer and to disable retraction. For my first test print, I decided to use a calibration cat that I often use for test prints, and is slightly less boring and not much more difficult than a simple cube.

Failed attempt at Sainsmart TPU. Pink is from leftover red PLA in the extruder.

Sadly, it didn’t go particularly well. I had two failures in a row which were basically caused not such much by filament backing up in the tube, but by some back pressure causing the drive gear to stop getting traction on filament, and it just ceases to advance. This happened about 1cm into my first print, so I decided to up the temperature a bit to hopefully reduce the pressure and try again. That print failed almost immediately, about three layers in.

This caused me to abort my attempt for the day, and go off and scratch my head some more.

The obvious things to try would seem to be:

  • Additional temperature changes (higher, perhaps as high as 230?) but I think that higher temperatures also increase stringing and other undesirable problems.
  • Make sure that my drive gears are sharp and see if I can increase the tension on the drive spring.
  • Go even slower. Perhaps 15mm/s or even 10mm/s is reasonable.

Anybody have any other suggestions?

Steps toward getting a BLTouch Bed Level Sensor on my CR-10…

I’ve had my Creality CR-10 for quite some time, and fairly early on I decided that I needed a bed leveling sensor. It wasn’t just because it was difficult to level the bed. The bed itself isn’t anywhere close to flat. Since the printer doesn’t know that, you have all sorts of problems with adhesion. To be honest, I’m not 100% certain I understand what math the bed leveling sensor does (it’s been on my list to understand). Let’s say that the bed has a 0.1mm crown in the center. Does this make the printer lay down a first layer which is 0.1mm thinner in the center? Or does it distort the print so that the first layer actually follows that contour and maintain a constant layer height?

I don’t know, but for now I don’t care. I just wanted it to work better when laying down the first layer to make sure that it stuck.

So I ordered the easiest bed level sensor solution I could find: the EZABL from TH3D. It’s not super cheap, but it’s convenient and didn’t require any soldering. They also have a version of the Marlin firmware available (the TH3D Unified Firmware) for download which is simple to configure for a wide variety of printers and directly supports their hardware.

And it works… okay.

About 9 times out of 10 I’ll get a good first layer. But every once in a while, the calibration will be twitchy, and something bad will happen. I think that ultimately it boils down to lack of repeatability. The sensor is a non-contact capacitive sensor and it appears to me (without scientific testing, and no slander intended) that the repeatability of probing (especially if I haven’t let the sensor heat up for quite a while) is pretty low. I’ll probably investigate that further, but in the mean time I thought it might be worthwhile to consider using a different type of sensor entirely: namely, a BLTouch, which uses a contact sensor. This has the advantage that whether I print on the aluminum bed, on tape, or on mirror tile I usually do, it will sense the actual surface that I’m printing on. That seems good to me, and the BLTouch has been pretty well regarded.

So I ordered one. Not super cheap either. You can get cheap clones on AliExpress, but I didn’t feel like waiting. With Prime I received mine yesterday.

The Bullseye duct…

So, I started thinking about installing it. I knew that I’d need a different mounting to put it on my printer. I had been using the PetsFang duct with the EZABL, so I thought about printing another one, but I noticed that they had updated a new design called the “Bullseye” which seemed to fix a few mechanical issues that I didn’t especially like with the original. It was also a modular design that enabled me to print holders for either the EZABL or the BLTouch, so that seemed like a good thing. I downloaded the parts and it took about six or seven hours to print all the parts.

Now, onto firmware and wiring…

And here’s where this project turned into a bit more of a headache than I would like. In a previous posting, I complained that the MELZI motherboard in the CR-10 used an ATmega1280 which has just 128K of flash. As it happens, the firmware that they’ve jammed into the CR-10 is really close to the limit. Thus, when you add new features to the firmware, you are often playing a game of “what features do I enable or disable to get it to fit.” This game is annoying. When I was using the TH3D Unified Firmware, they had done a lot of the work already, but the BLTouch is not (or badly) supported by recent versions of their firmware. The stock Marlin is a bit of a rats nest though, and while it does use platformio to compile (which I love), getting the configuration options set up properly is not a lot of fun.

But it gets worse…

The BLTouch sensor has basically five pins which need to be wired to it, and the MELZI motherboard doesn’t direct support for it. The usual solution is to hijack the pin that provides the buzzer sound (pin 27) and hijack it to control the BLTouch. This requires a bit of wire snipping and soldering, or you could use a board which looks like this:

Pin 27 adapter board…

It’s a dumb little board whose purpose is to inject itself between the the connector for the display and the motherboard, and then breaks out the right pin to the side where you can easily attach the BLTouch. It’s got no active components on it at all: just a 10 pin IDC socket, with 10 header pins on the bottom and three 90 degree header pins on the side.

And they sell for a ridiculous amount of money (one seller on Amazon charges $20 for this little adapter board.) Absolutely insane. I’m pondering spending an afternoon to dust off my meager KiCad skills, draw up a quick PCB board, and have a bunch made by JLC PCB, as well as making the Gerber files made available so you can make your own. Stay tuned for that.

And I’ve found it difficult to find instructions that compile a reasonable version of Marlin for such a configuration. If I get time this weekend, I’ll try to work my way through it and document it so that any humble reader who stumbles across this can make one for himself.

Okay, that’s it for 3D printing this weekend. Have fun melting plastic.

Pondering the 18650 Li-Ion Battery…

Back in October, I attended Pacificon, the local ham radio convention. While I was there I picked up a couple of wacky things that were super cheap on the vendor’s tables, and among them was a super inexpensive battery charger along with an 18650 3.7V Li-Ion battery.

If you’re like me, you are probably used to the common AA and AAA type batteries for most of your portable electronic needs. If you seek rechargeable batteries, these are often the NiMh or nickel metal hydride type. Typical ratings for such batteries is 1.2V and 2400 mAh, or about 2.88 watt hours of power per AA cell.

Recently though, lithium ion batteries in the 18650 format (18mm diameter, 65mm long) have become available and popular. They are a bit better than a AA (which are 14mm in diameter and 50mm long) but are pretty lightweight, and common types have a voltage of about 3.7V and capacity of maybe 2600 mAh for a total power of about 9.6 watt hours, or a little more than three times the power of a good high capacity AA.

Anyway, decided they might be interesting to play with, and the price was (suspiciously) cheap at the show, so I thought I’d give them a go. The combination was an “Ultrafire BRC18650”, along with a super cheap looking charger with the product identifier of “HZM888MA”. It’s hard to overstate how uninspiring the charger actually is. I admit that I buy a fair amount of dodgy Chinese electronics, but this seemed dodgier than most, and because of the energy density and the rumors of batteries bursting into flames has me paying rather more attention to it

My recollection is that when I bought the charger I did test it by charging up the battery and that it did its usual “red while charging, turn green when done” with its indicator LED. But when I found the charger and battery in my storage case, I decided to try it again. Now, my dodgy charger just blinks the red LED, which in the international language of devices should indicate that something bad has happened. Nothing appears to have caught fire though, the battery doesn’t get hot, so I am not sure what is going on. I decided to get a higher quality Tenergy model to test it, and the same thing happens: blinking red LED.

I have decided that ordering a higher quality charger is probably a good idea, especially one that can handle different battery types, so when that arrives I’ll give them both a try.

In the meantime I looked up the UltraFire BRC 18650, and found this article on YouTube, showing that their rated capacities are nowhere near realistic, and they often have less than one third of the total listed on the packaging.

I guess you get what you pay for.

Anyway, these might find their way into an IOT device that I’m working on, and it will be interesting to see how they perform. I may also tinker together a constant current load to test their capacity myself.

In the mean time, buyer beware.

A few thoughts on 3D printing and the Creality CR-10

A name plate, printed in two different colors of PLA filament on my Creality CR-10.

Over the last couple days, I’ve been pondering my journey through 3D printing. After having taken a three month break from it (more on that below) I’ve managed to get my Creality CR-10 back up and running in a reasonable way, and have donated my Anet A8 (my gateway drug to the world of 3D printing) to our hacker space at work, and I’m slowly tinkering it back into fighting shape. Last night I decided to try the “change filament” option in the Marlin firmware for first time, and it worked really well. I made the name plate pictured on the right, first by laying down the base in Fire Engine Red PLA I had, and then once the layers with the embossed lettering started, initiating a Filament Change from the front panel. This stopped the print in progress, moved the hot end off to the side and then retracted the existing filament and told me to load the new color. I used 3D Solutech white. The firmware allows you run several purge cycles to get the old color out. It took several tries to get the filament to turn reasonably white, as opposed to pink, but then I hit continue and it worked perfectly. Neat, and with no fancy G-code modifications.

But I digress.

Dean Segovis tweeted this yesterday:

https://twitter.com/HackAWeek/status/1096020904977428481

and followed up with:

https://twitter.com/HackAWeek/status/1096020906432958465

And this has got me thinking about writing up what I think is good and bad about my choice of 3D printer, and where I think the perfect “hacker” 3D printer might be going.

My first printer was an Anet A8. They are still available, and very inexpensive, at $150. I do not recommend them as a printer, even though I had a lot of fun with mine. It’s actually a remarkably capable little printer, and I made some pretty impressive prints with mine. The pluses?

  • It’s inexpensive, at just $150 or so.
  • It is (or at least was) a fairly popular option, so a large community with lots of information and upgrades is available.
  • Replacement parts are cheap.
  • It runs the Marlin open source firmware, so upgrades are relatively easy to perform.

But it does have a number of significant drawbacks.

  • It’s not just inexpensive: it’s cheap. The frame is from laser cut plastic, and it’s easy to break parts if you overtighten bolts. In fact everything about the printer is cheap. I spent a lot of time replacing parts which are broken or just substandard.
  • It’s not ready to go out of the box. It comes as a kit, and there is a lot of assembly. It took me the better part of a weekend to get it going properly.
  • It is not very well engineered for safety. By default, the version of Marlin installed on mine didn’t even have overheat cutoffs. The connectors used to power the hot bed are not really sufficient to handle the current, and present a fire risk. I wouldn’t leave the Anet printing unattended without a serious audit of all the safety features.
  • I hate the bed leveling. This isn’t unique to the Anet, I hate it period, but the Anet is pretty bad. The hot bed on mine was not even close to flat, probably well over a millimeter down in the center. Printing directly on the hot bed (or covered with tape) seems wrong. And my pet peeve: nothing that needs to be leveled should ever do so with four screws. It’s overconstrained and never works right. When I used to make telescopes, all my mirrors were adjusted with three screws, which are all you need to define a plane.
  • The extruder is a direct drive MK-8 extruder. There are reasons to like the direct drive. In theory, they allow you to use less retraction and they will have less stringing than the Bowden type. But there are several pragmatic issues that make me despite them. They seem more complicated to assemble and disassemble. Because the stepper is mounted right next to the heat block, they carry more mass than a simple Bowden style. Loading and unloading filament is kind of a pain, as you don’t have any way to visually inspect the entry of the filament into the hot block. And the way that it’s mounted on the A8 is annoying, and requires that you unscrew a set screw which is awkwardly placed underneath the assembly when its mounted in the printer.

After tinkering with mine for three months, I was sufficiently excited by 3D printing to justify getting a new printer. I settled on the equally (or perhaps more) popular Creality CR-10. This has become my workhorse printer (well, since I use it primarily for tinkering, perhaps “workhorse” is the wrong word, but you get the idea…)

The Creality CR-10 has a number of significant advantages:

  • It is a very popular machine, with lots of information and support.
  • It supports the Marlin firmware as well, so upgrades are fairly common.
  • It’s much less of a kit. It comes in three parts, and if you know what you are doing, you can probably assemble and get the whole thing going in an hour or so. Not quite “out of the box”, but pretty close.
  • It has a 300mm print bed, and can handle prints up to around 400mm high. That is an awesomely large print bed.
  • The electronics are housed in a custom aluminum enclosure, and so has a much less erratic appearance compared to the A8.
  • It uses 2020 Aluminum extrusion for all the structure members.
  • It uses a Bowden style extruder, which makes the moving parts on the X gantry much lighter and generally easier to service. Loading and unloading filament is much easier.
  • It is more expensive (~$400) but generally just feels like a better engineered product. I am not constantly terrified that it will burn my house down if I turn my back on it.

I really like mine. I think that it’s an excellent buy if you are a tinkerer and want to learn a lot about the nuts and bolts of 3D printing, but don’t want to either invest a ton of money nor waste your time with a pile of substandard parts. But there are still things which I don’t like about the Creality CR-10, and I’d be remiss if I didn’t enumerate some of them.

  • Fans are noisy, and it has a lot of fans. The extruder carries two small fans, which are usually not a lot of trouble, and are straightforward to upgrade. The worst ones are inside the power supply/control box. And while we are complaining about the control box, it’s annoying to open to gain access, and you will need to gain access to upgrade its firmware because the controller doesn’t contain a proper Arduino boot loader.
  • The Anet A8 had dual Z steppers, which helped keep the X axis level. The Creality drives only one side, and to keep it level and moving smoothly, you have to adjust it fairly carefully and keep the tension just right. There are upgrades for the Creality to make it a dual Z machine, but that’s an extra cost and I haven’t done mine yet.
  • The extruder is a Bowden sort, which means that only the heater and fans are carried on the X-axis. That also simplifies the mechanics there, but the stock housing is pretty bulky and makes access and viewing of the nozzle more cumbersome. It also has questionable value in directing the nozzle fan. Updated “fangs” are available, I printed the Petsfang v2 for mine, which I have my own complaints about (it’s a pain to install and take off, and it’s not the easiest thing to print) but it works better.
  • All the bed leveling issues I had with the Anet A8 are true for the CR-10 as well. I installed an https://www.th3dstudio.com/ezabl-kit/EZ-ABL bed leveling kit on mine to help, and while it does work, it’s been a bit fussier than I would like. The overall repeatability of measurements seems pretty iffy (maybe only accurate to 0.2mm) and occasionally much worse. I think if I were to redo it, I’d probably go with a BLTouch instead.
  • The bed itself wasn’t super flat (probably off by half a millimeter). I covered it with a piece of mirror tile from Lowes, which helped, but I ended up using 5×5 probing to help get things to lay flat on the first layer. Honestly, can we actually get flat build plates? The telescope maker in me hates this with the power of a burning sun.
  • The controller is based upon the ATmega 1284, which means that the Marlin firmware fits barely into the controller. When new features come out, sometimes you have to disable other functionality to get them to work. I’ve been using the TH3D Unified Firmware Package which works pretty well, but I do wish we had more space. A replacement motherboard is actually pretty expensive to replace ($40) and doesn’t have replaceable stepper drivers, which makes a failed stepper driver a bigger issue than it should be. A motherboard like the MKS Gen L is only $20 or so and allows the possibility of replacing the driver modules with higher quality (and quieter) drive modules. I haven’t done that, but I like the idea. The overall board layout seems nicer as well, and the board supports dual extruders and has the ATmega 2560 which has double the flash space.
  • I’ve mostly done printing with PLA and a smattering of PETG. I tried to get the bed to heat to 100C for printing ABS, and it seemed like the maximum temperature it could reach was about 82C. If you are wanting to print ABS, you’ll probably need to do some mod to insulate and/or boost the power to the hot bed.

In the end though, I guess I mostly like the Creality CR-10 because nothing about it is very mysterious or proprietary. It is in some ways a fairly obvious design, with lots of room for tinkering, replacement or improvement. It is also capable of making good quality prints at a reasonable cost. I have been considering pickup up an Ender 3, which is the little brother to the Creality for jobs which are smaller, and maybe updating the CR-10 to use a larger nozzle (0.6mm) for larger coarser prints. I’ve also been thinking that it would be possible to easily create a home brew printer using aluminum extrusion, an MKS Gen L (or even better) mother board, and many of the same parts that I would use on the CR-10.

But for now, the CR-10 works well for me, and for the pointless kind of things I do, it’s a nice little printer.

If you have any questions or would like to add any of your experiences, leave a comment.

My Computer Controlled Etch a Sketch…

I’ve been wanting to make a computer-controlled mechanical gadget for quite some time. When I finally got a 3D printer a little more than a year ago, I began to think of how I might make a device that could direct a pen under computer control. I even took the time to order a CNC shield which could be used to drive the four channels needed for a 3D printer, but I never really got too far on that project. The NEMA-17 steppers that I ordered have largely sat in a box.

Until a couple of days ago. I wanted to do something, but maybe wasn’t quite ready to embark upon a project as complex as a 3D printer or CNC milling machine conversion. If the cost was low enough, it wouldn’t matter if the thing I built was particularly great: I would learn enough by doing the project to make it worthwhile, and I would gain confidence that perhaps would make me enthused enough to try a bigger project.

Hence, the computer-controlled Etch A Sketch project was born.

I’m of course far from the first to do such a thing. I didn’t let that particularly bother me. I sometimes refer to my hobbies as “timidly going where others have gone before,” and this is no exception. I knew that I wanted to use two of the steppers I had on hand, and probably use the CNC shield that I had. A quick order to Amazon Prime had a nice shiny new Etch A Sketch delivered to my house, and I went to Thingiverse to see what kinds of brackets and adapters people had used on their project. I settled on this set of parts and set my newly repaired and functional Creality CR-10 to printing the new parts.

There were a couple of issues. The original page didn’t have STL files for all the parts, you had to refer to older projects to get the STL files for the larger gears. When I printed one, I found that the center hole was significantly loose. Luckily, the author had uploaded the OpenSCAD file for generating the gear. Reading through the code, I found that the shaft hole was set to a diameter of 5.25mm, whereas a quick check with calipers revealed that mine were more like 4.5mm. I went ahead and printed a new one and tested it. It was a very tight press fit, which was just what I wanted. Huzzah!

The two mounting brackets are curved to fit the front panel and are to be attached with hot glue. I was dubious about this, but a reasonably large amount of glue was spread and the brackets pushed into place. It seems to work rather well, and it looks like they will hold just fine. I then pushed the two gears onto each side. There was a little bit of vertical misalignment: the large gear on one side was originally pushed quite deep, and didn’t mesh well with the smaller gear when it was in place. I used a flat bladed screwdriver to pull it back away from the body until it lines up pretty well. As yet, I don’t have any code to drive the motors, but turning the shaft by hand seems reasonably easy and the amount of backlash or slop is, well, probably not a big deal.

My intention was to drive the two steppers with a system like GRBL, which is a G-code interpreter that is used to drive CNC machines using an Arduino and some stepper drivers (provided by the CNC shield that I mentioned above). But as of this moment, I seem to be having some difficulty configuring the software. I may actually instead just write some simple code to test the stepper motors (perhaps by driving the steppers to draw a square on the Etch-A-Sketch) before I try to anything more complicated. It really wouldn’t be hard to drive the steppers using a simple set of drawing commands: all I’d need to do is dust of the Bresenham’s algorithm that I learned back in my early teens, and I’d be good to go. Next step is to read up on the wiring for the CNC shield wiring, and get the 12V supply running to the steppers to power the gadget. It might also be good to 3D print a stand to hold the Etch A Sketch in a more upright position. Hopefully, by the next time I post about this, I’ll have some video of it doing something nice.

Stay tuned.

Litter Robot data acquisition, or “how I made things complicated for myself”

Okay, as per the previous installment, I carted my new current transformer tap upstairs, and plugged in the Litter Robot. It entered its startup sequence, which ran the motors back and forth, and I was able to grab some data. It looked like the following:

Just 28mV peak to peak, and looking nothing like a sine wave…

Using the built in ADC of an Arduino would give me relatively little accuracy, and the shape of the waveform isn’t super pretty. This gives me some pause.

But it was immediately apparent to me that I was amazingly stupid, and I was totally taking the wrong tactic, with the result that I was making things way too complicated.

See, the fact is that the Litter Robot plugs into the wall, but it does so via this little wall wart:

Input is rated at just 0.5A, output is 15V at 1A.

It is nominally rated at 120V at 0.5A, which means that even if it was running flat out, it would generate a voltage of just 50mV. But I suspect that the reality is that the voltages will be quite a bit lower, because the Litter Robot doesn’t actually take that much power, and because the current transformer probably doesn’t operate very well at these very low current levels.

In other words, I’m using the wrong sensor for the job. I went this direction because my inspiration Brian was already going down this path and I was interested in AC sensing, but had I thought about it, the obvious way to implement what I wanted would be to put a current sensor in the output of the wall wart. In fact, I have a perfectly reasonable sensor for detecting current (and voltage) in that kind of situation: an INA219 based I2C current sensor that is identical to the ones I used in my DC current loop for my solar satellite project. These sensors actually have pretty good sensitivity down to the milliamp range, are inexpensive and compact, and I wouldn’t have to tinker around with mains voltage. It is true that I have used them mostly in DC current sensing applications, but it should not be especially difficult to use them to detect AC current. The wart puts out DC of course, which makes it doubly easy. I’ll review the datasheet and start to figure it out.

I really should think these things out first, before I order parts.

I sense a disturbance in the fo… err… current to my Litter Robot…

Okay, here’s a strange little project that is pushing the limits of what I understand in a couple of ways, and I thought I might write it up and also ask a question from those more knowledgeable than me.

Here’s the idea: in our upstairs bathroom, we have a Litter Robot. This is a commercial product, and basically is a spherical pod that serves as a litter box. When the cat does his business, motion detectors note his arrival and departure, and several minutes later motors engage which rotate the pod around and cause the waste to be sifted and removed from the box, and then rotates back to its starting position. Our cats seem to like it just fine, and it means that daily scooping isn’t required. Huzzah!

As it happens, there is an add-on to this model which makes it an IoT device and it will communicate its operation and control via BlueTooth to your phone. I thought this was a kind of frivolous (and not inexpensive) addition, so we didn’t bother. But refusing to spend a lot of money on a well designed product means I can spend a similar amount of money to bodge something of my own that will be a finicky Rube Goldberg. I justify this by noting that it is a learning opportunity.

I should also thank Brian who inspired this project with a similar “cat litter box” theme: he wants to automatically trigger an exhaust fan. I’m more interested in just the “sensing” part, and may use something like dweet.io or possibly MQTT to merely log when the Litter Robot does a cycle.

Rather than try to do any reverse engineering of this (rather expensive) robot that my wife really loves, the approach that I thought would be most reasonable (and which Brian is again responsible) is to create a current sensor that will note when the current to the robot increases, indicating that the motors are engaged. The way that we decided to do that is by using a current transformer. The idea is to basically create a short extension cord that passes the hot wire from the AC circuit through the center of a clamp on current transformer. You can plug this into the wall, and plug the desired appliance into the other side, and the current transformer will supply a signal (either current or voltage depending on what type you get) that can be sampled by a microcontroller, and you can then do appropriate action depending on what you discover.

So, a scrap piece of Romex, and a trip to Home Depot later, along with an order for a current transformer, and I created this little experiment (again, following in Brian’s footsteps):

An short extension cord, with a YHDC SCT013-010 current transformer…

The extension cord is just indoor Romex, which consists of three 12 gauge wires in a plastic cover. The ground wire is basically a bare copper wire, and it has two insulated wires which are white and black. You wire the bare wire to the green plug, and then put the white on the silver screws in each end, and the black on the gold colored end. I then checked the operation, first with a wiring fault detector, and then by just trying to use it as an extension cord. No problems were noted, so it was safe to proceed.

I then slit part of the out covering to expose the inner wires. The current transformer is (I’m told) only supposed to have the “hot” or black wire passing through it, so I created a little slack and passed it through the snap on part of the current transformer. A little electrical tape (and a little more for good measure) and I was done.

The current transformer is an SCT013-010 from YHDC which cost about $15 via Amazon with Prime. Here, I will tell you pretty much all I know about such things, since I am well out of my areas of knowledge and experience (which is rather the point of this project).

A current transformer is used to monitor the current flow in a circuit. When the current flows through the hot wire which passes through the center of the ferrite core, it induces a much smaller current on the output of the secondary.

If the current transformer is of the “current output” type, then a shunt resistor (called the burden resistor) is normally placed across the output, and the voltage drop is measured across it. Since you know the voltage drop and the resistance, you can solve for the current through the secondary, and then use the specification of the transformer to compute the current through the primary circuit. Normally the output of such a transformer has a pair of protection diodes wired across the outputs because if the secondary output is an open circuit, the switching of the AC causes large voltage spikes at the output, which isn’t good.

If the current transformer is of the “voltage output” type, then the burden resistor is built in to the transformer, and the output is merely a voltage. There doesn’t appear to be a pair of protection diodes that were present in the current monitoring type, likely because the resistor is built in.

The type that I chose was a voltage output type, with a nominal rating of 10A/1V. I took this to mean that if a 10A AC current was flowing through the primary, it would generate a 1V output on the output of the circuit. This means that the signal would be about 100mV/A, which I thought would be about right, or at least measurable via the ADC in an Arduino or an ESP8266.

But before I tinkered with putting a microcontroller in, I thought I should just look at the output of the sensor. I plugged a lamp into my extension cord and I hooked up my trusty Rigol scope to the output of the current sensor and had a peek. And here’s where something confusing happened: I got this.

What’s the deal here?

See, I was expecting to see something approximating a nice sine wave. Unless the transformer is operating in “saturation” mode, one would expect the output to be more or less a linear representation of the input current. But that’s not what we have here. It looks rather like the kind of spikes that you’d expect from some kind of kick back from switching an inductor, but that’s well, not supposed to happen, at least as far as I know. This kind of signal is pretty useless for trying to determine power consumption, since it’s not at all linearly related to the input power.

Five minutes after getting this result, I realized that I was tired and it required more pondering. I shut it down and went to bed. This morning, I still find it to be pretty odd. I’m wondering if perhaps the bad waveform has something to do with the nature of the load I placed on it: the lamp was a cheap compact fluorescent that also serves as a bug zapper. Could that be part of it?

In any case, I am in unfamiliar waters, and if anyone has any suggestions, feel free to tweet (@brainwagon) or leave a comment here. I’ll update you with more information as the project continues.

Addendum: I just went out to the garage and tried a different load. I had a parabolic heater from Costco sitting there, so I decided to plug it into the circuit and see what it did. It generated a much more reasonable looking waveform.

2.32V peak to peak, or about .82V RMS

This signal was about .82V rms, which represents a current of about 8.2A, or a total power (assuming 120V) of about 984 watts (the nominal rating of the heater is 1000W). Huzzah!

So, the new questions are:

  • Is the problem with the other load merely that the load is too low to be measured accurately, or is it the nature of (maybe) a poorly switching fluorescent?
  • Does the Litter Robot have sufficient current draw to operate in this more linear regime?

Stay tuned for more information.

My Rise and Fall on Quora

Back around 2016 I had a tough time. A vertebrae in my neck began to pinch on the nerves that run down my left arm and began to cause pain and weakness. In the end, I had to have an injection into my spine to calm the pain, and spent months in physical therapy. I missed some of the first visits with my youngest granddaughter: while my wife flew out to Florida on an extended visit, I remained home on pain medication waiting for it to subside.

About this time I discovered the question and answer website Quora. On it, people posed questions, and people wrote answers. It had a number of unique features compared to other websites:

  • It wasn’t a forum for debate. The purpose was to allow people to ask and answer questions, and the answers would be evaluated by a system of up or down voting.
  • Comments on answers were allowed, but they were entirely at the discretion of the person who originally provided the answer. If a particular answer was especially ignorant or hateful, the author could simply delete it. This feature alone was an enormous benefit to maintaining reasonable discussions: obvious trolls simply found no traction.
  • It proclaimed that their policy was “Be Nice, Be Respectful.” Unlike platforms like Twitter which have allowed all kinds of hateful or even threatening content to persist on their platform, hateful comments were generally deleted by authors, and hateful answers were generally reported and removed.
  • Quora policy was that people use their real names. Fake identities were not permitted, and when detected generally quick action was taken to remove them. This also helped elevate the quality of discourse.

I found it fun and a useful distraction from my arm pain. While flat on my back, I started writing. I don’t believe that I was a particularly good writer, but I had a few good moments. My answers spanned a wide variety of topics (for a while I was one of the top ten writers on the subject of “Peanut Butter” or “Cats”) but I spent a lot of time musing about various political themes in the run-up to the 2016 Presidential election, and answering a large number of questions about atheism, topics which I never thought to cover here on my own blog.

And, without doubt, my own blog suffered as many of you observed. Since I was flat on my back, many of my own projects lapsed. It was simply easier to answer random questions than it was to develop a coherent project and document it for the enjoyment of all.

But on Quora, I reached a much broader audience than my blog had ever reached. In my best week, I was getting tens or even hundreds of thousands of views. I rocketed past one thousand followers (a level that I’ve never reached on any other platform, even Twitter) and then two, three, five thousand. I got my first “Top Writer” status in 2016. Today the number of followers I have has slowed, but I still have over eight thousand followers and have been consistently ranked as a Top Writer.

But as of this week, I think I may have written my last Quora answer.

The platform has changed. I’ve no idea what their business model or business plan is, but many of the things that I liked about it in the beginning began to be blunted or removed.

It really begins with the quality of questions. I spend a lot of time in the political arena, and I was not immune to the increasingly partisan nature of political communication in the United States. You might expect some degree of partisanship to creep into answers, but what’s really become annoying is how often it creeps into the questions themselves. I routinely downvote such questions. More often than not, when I investigate other questions by the same author, I find a questionable identity that has been creating dozens of questions in the span of a day. Sometimes they are all on a particular theme, but as time goes by, it seems like some are deliberately injecting different but relatively anodyne questions to (I presume) create an illusion that they are in fact a real person.

But it goes further. Recently Quora instituted a program where people could get paid some small amount of money for writing questions. Writing good question is indeed valuable, or even key to Quora’s value. But this has created an odd kind of perverse incentive. It isn’t hard to find people who are doing nothing but writing questions, at a rate of several per hour, in an obvious attempt to game the system and make money. I spent another minute and found another. My feed (and probably everyone else’s) is clogged with crap of this sort, and there is no getting away from it. Far from incentivizing the creation of good, thoughtful content, Quora has instead provided an incentive to open the fire hose of drivel so that a few people could make a few pennies.

But something bothers me even more.

There are tons of fake identities on Quora. I am normally not opposed to anonymous posts. I recognize that there are some legitimate reasons to want to hide your identity. Perhaps you don’t wish your employer, family or friends to know some particular details about your life. But more often than not, anonymity and false identities are used to create poor quality content that may created to manipulate public discourse on topics that clearly need sober and lucid discussion. As more information comes out about state actors using Facebook prior to the elections in 2016, it raises the distinct possibility in my mind that the increasing popularity Quora makes it increasingly desirable as a vector for injecting disinformation into the minds of the public. Even if you aren’t a state actor, there are likely other groups or people who are gaming Quora to drive traffic to other websites or perhaps just to influence the public narrative about topics of the day. Judging by the number of complaints from other Top Writer colleagues, I’m not alone in noting an increase in obvious spam-related answers. It’s not hard to find posts or Youtube videos about “how to drive traffic to your website using Quora.”

Bleh.

One last thing: Quora is almost entirely opaque as a platform. I can get some basic statistics about my own answers from a webpage, but Quora provides no API or analytics that allows me to gain more insight about Quora answers. I can give you this overview of my views over the last 30 days:

Some data, but it’s not especially useful.

But I can’t answer all sorts of meaningful questions like “How many views per day am I getting?” “Is the trend up or down?” “What topics that I’m writing in are the most viewed?” “What are the views per day for a particular answer that I wrote?” And likely dozens of more questions that I haven’t thought up.

On a related topic, there is no meaningful way to search Quora. It’s impossible to find an answer that you wrote with keyword search, much less anyone else. Among other things, this means that many questions are asked over and over again, with slightly different wording.

Sigh.

But really, in the end, the thing that depresses me the most is that it seems to me that Quora simply doesn’t scale. Maybe it’s simply impossible for public discourse of this kind to scale, and that it will always generate 99% chaff and 1% wheat, but it felt like it was doing a better job before, and now it is fundamentally broken.

So, a couple of days ago I simply logged off with no intention to return. Breaking the habit is difficult, but as you may have noticed one positive benefit is that I’m back to boring you all with reports about cleaning my garage, which at least has the virtue of being a true story about me, who is an actual person.

And for the most part I’m happier writing about vacuum cleaner repair than talking about the increase in hyperpartisanship in the United States. I hope that overtime I will recover my desire to talk about the nerdy and mundane, and that somebody’s life will be better for the effort, even if it is only mine.

I’m back to thinking about radio and electronics. Tools and woodworking. The upcoming Maker Faire. And maybe even some new topics, like building ships in a bottle or model railroads. I think that even though fewer people will read this stuff, more people will feel happier having done so.

At least, I hope so.

Added LED shop lights…

I didn’t accomplish much in the garage on Sunday, but I did manage to take down some old, flickery and generally unreliable flourescent lights and replace them with some very inexpensive LED lights. I had previously tried to continue to use two of the old fixtures, including their old fluorescent ballasts, but in general that proved to be more trouble than they were worth. The connectors were already unreliable, and occasionally one of them would just turn off and back on again at intermittent intervals. I grew tired of them, and decided to just take down and take them to the recycling center and replace them with new but inexpensive LED shop lights.

I unplugged the old fixtures and then took them down. They were actually screwed into mostly dry wall, I’m kind of shocked that they didn’t just fall out of the ceiling. We decided to make a run to the El Cerrito Recycling and Environmental Resource Center to get rid of them and the stock of old fluorescent bulbs that we had lying around. They are a great resource, and took everything but the ballasts (I had to snip them out). I guess they have some kind of hazardous chemicals in them, and I have to take them to Richmond Hazardous Waste instead. We have some old paint cans we have to take over there anyway, so that will probably be on next week’s task list.

I didn’t want to replace them with anything expensive, so I decided to continue with some cheap $20 hanging fixtures that I got from Lowes. I had good luck with a couple of these cheap lights from Lowes and manufactured by Lithonia. They actually are an integrated unit: you can’t change the bulbs out, they simply run until they are dead, and then you replace them. They are nice and bright, and I had installed two of them a couple of years ago with no complaints. They are also incredibly lightweight (which could also be considered as “flimsy”) at a weight of 1.7lbs. Ironically, they are listed as “4ft” bulbs, but the fixture length is a little over 45 inches. I purchased four more of these, and hung two of them immediately, with the other two waiting until I can get rid of some telescope grinding equipment. I just used wimpy hooks to attach them to the rafters, but the hooks have too fine a thread to be secure in just dry wall. I’ll have to get a couple of dry wall anchors to fix one in the place I intend.

At about 36 watts a piece, I now burn about 150ish watts for lighting in there, but the garage is actually bright and easy to work in. Huzzah.

Addendum: I also decided that my Workmate rack of yesterday wasn’t entirely adequate. Because it was only fastened to the wall in the center (that’s the only convenient stud to attach it too) it actually looked like it could twist a bit (the wood is soft and the lever arm is relatively long). I decided to change the simple cross bar into a T shape. I took out my Kreg pocket hole jig, and bored two holes in the end of another scrap, and then fastened it to the original crossbar with glue and pocket screws. I drilled a couple of holes along its edge with a Forstner bit, and then fastened it back (a little bit lower) on the wall. Now, since it has fastening bolts along 2 feet of stud instead of just a couple of inches, it’s rock solid.