The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Administrivia

Overhead

  • Where Web Content Comes From

    Make sure you’re running an ad blocker and perhaps a script killer, feed “Larval Engineer received a Pilot InstaBoost” into your favorite search engine, along these lines:

    Google

    DuckDuckGo

    Bing

    The first (few) hits should be the various ways my original post from late last year appears on wordpress.com, but the rest (particularly from Google) will be spam blogs and scraper sites that ripped my text, ran it past a thesaurus (euphemistically known as article spinning), larded the result with keywords, and reposted the shattered remains. If you click on the links, you’ll have the experience of reading text where short sequences of words make sense, but the overall corpus leaves you shaking your head in disbelief.

    Even though Google allegedly doesn’t reward such sites, they make up the bulk of its list. DuckDuckGo does a slightly better job of suppressing them and Bing kills nearly all of the junk, which suggests that Google operates with a powerful incentive to not notice problems in sites serving (its?) advertisements.

    There’s obviously no point in getting annoyed with any of the participants…

    FWIW, that particular post seems to have drawn the attention of scammers due to the presence of a trademarked brand name with good search-ability. Other posts have been more fortunate in escaping their attention, despite my glowing prose…

  • Scratching Their Itch

    Although the Big Search Sites no longer provide the keywords that select my posts (because they sell that data to their advertisers), a few snippets leak in from smaller operations.

    People evidently have this problem a lot:

    • if you take brewers yeast will bed bugs bite you
    • bed bug teflon tape
    • hot box bed bug
    • co2 bed bug trap
    • bed bugs in chairs
    • does denatured alcohol kill bed bugs
    • does frog tape wcatch bedbugs
    • carpet tape bed bugs
    • how to use yeast on bedbugs
    • can you trap bed bugs with hand warmer and dry ice

    But it’s not all bed bugs:

    • information on chili powder beetles
    • what bugs like chilli powder
    • get rid of chili powder beetles
    • why does arizona smell like chili powder at night

    Make you itchy just thinking about it, eh?

  • Blog Summary: 2014

    You can tell what’s important, out there in Search Engine City:

    Blog Summary - YE 2014
    Blog Summary – YE 2014

    The Arduino PWM frequency remains entirely too low, American Standard faucets must be reaching the end of their service life, and fruit flies crawled above bed bugs to reach the top spot of entomological concern.

    For the third year in a row, the fifth most popular post described removing a water heater anode rod.

    I feel badly about the Airship Pirates post: it must be a great disappointment for most folks who expect lurid Steampunk Comix action.

    You gotta admit: it’s eclectic!

  • How Big Is Your Blog, Ed?

    So the good folks in the wordpress.com support infrastructure have been manually exporting my blog and sending me a link to the ZIP file, pursuant to the still unresolved failure-while-exporting issue. A bit of back-and-forth around the latest backup / export produced an interesting data point:

    The message about the export file not being found is simply an indicator that the huge export could not finish compiling before a more general time limit was reached — in this case because your site is easily in the top .1% for size. I will pass your suggestion for improved exporting along.

    I’m sure that’s among the freebie blogs on wordpress.com, but I never thought of myself as a member of the 0.1% club.

    Huh. Snuck up on me while I wasn’t paying attention. If I could do that with money, I’d be on to something.

    I’ve never participated in their post-a-day challenges, because that’s what I do around here. Should you find something interesting, every now and again, that’s a bonus.

    Back to the workbench…

     

  • Spam Volume

    Here’s what happened when I shut down comments on posts older than a few days:

    Softsolder Daily Spam Catch - 2014-04 to 2014-06
    Softsolder Daily Spam Catch – 2014-04 to 2014-06

    Apparently the spammers’ scripts can’t keep up with a short window and most comments happen in a few days, so this seems like a workable compromise. I know for a fact that spammers also employ humans to type comments, but that model doesn’t scale well at all.

    Akismet disposes of most spam automatically, but presents me with a list of comments that it can’t classify. That list amounts to 10% of the daily catch, meaning I had to process that much junk every day just to keep up. I don’t know why Akismet can’t classify total gibberish as obvious spam and automatically delete it, but that’s how Akismet works.

    As mentioned in the sidebar, send me a note to comment on an older post.

    Now you know …

  • Writing Too Much

    Being that type of guy, I make a local backup of this blog, using the Export function that normally serves to migrate blogs from WordPress.com to a self-hosted WordPress site. WordPress handles the disaster-recovery backup just fine, but cloud-based Internet companies have a tendency to just vanish without too much warning (Everpix and Code Spaces come to mind), so having my blog’s verbiage where I can touch it gives me a warm, fuzzy feeling.

    Anyhow, the most recent export failed completely, whereupon I filed a support request:

    My irregular backup involves exporting my blog, which has worked up to this evening, and tucking it away. Alas, it dies with the cryptic message This webpage is not found

    Clicking More reveals:

    No webpage was found for the web address: [... huge URL snipped...]

    Error code: ERR_FILE_NOT_FOUND

    [… snippage …]

    Can you get Export working again?

    The response included the usual reboot-that-sucker advice:

    […] If you have problems next time you export your site, try clearing your browser cache and cookies and redoing the export. […]

    But shaking the dice never really works:

    OK, I’ve done that with three different browsers: Chromium, Firefox, and Pale Moon.

    I’ve run Firefox in Safe Mode with all add-ons disabled, flushed everything, and the export function fails the same way.

    The file name you gave me does not resemble the file name / URL / whatever presented to my browser.

    That suggests the hole is not in this end of the boat.

    Which forced a bump to Level 2:

    […] I’ve been discussing this with our developers and it seems the problem is that your export file it too large. We are hoping to fix this so that it won’t be an issue for you in the future but for the time being, you will have to export date-ranged posts. […]

    I realise this isn’t ideal but it’s just a temporary workaround until this becomes a working feature in the not-too-distant future. I don’t have a date of completion at this stage.

    Translation: “It’s like that and that’s the way it is.” When there’s no “date of completion”, that means the project is not on their calendar, which means they’ll never get around to doing it. A later conversation suggests that maybe August is the target date; we shall see.

    So, how big is your blog, Ed?

    The most recent backup export XML file weighed in at 28 MB, which doesn’t seem all that large by contemporary standards. Bear in mind that the file doesn’t include any of the 4300 images that occupy just under 1 GB (of the 3 GB one gets without buying a “media upgrade”).

    It turns out size doesn’t matter:

    It’s not the size of the file that is causing problems but rather the number of posts and media files. There are over 2000 posts and over 4000 media files.

    I cannot imagine that those limits are held in 11 or 12 bit binary fields, but that would explain everything.

    Apparently, the WordPress designers never expected anybody to produce one post a day, every day since late 2009. I’m certain I’m not the most prolific blogger on wordpress.com, but perhaps I’m the only one who’s ever tried to export the results …

  • Hall Effect LED Current Control: Crisp Gate Drive Shaping

    Because the current control loop closes through the Arduino loop(), the code’s path length limits the bandwidth. Worse, the PWM filter imposes a delay while the DC value catches up with the new duty cycle. Here’s what that looks like:

    LoopStatus ILED 50 mA div - 200 50 150 25 mA
    LoopStatus ILED 50 mA div – 200 50 150 25 mA

    The setpoint current for this pulse is 200 mA, ramping upward from 50 mA. It should have started from 25 mA, but the loop really wasn’t under control here.

    The top trace goes low during the drain current measurement, which occurs just before the code nudges the gate drive by 1 PWM count to reduce the error between the setpoint and the measurement. A delay(1) after each PWM change, plus the inherent delay due to all the program statements, produces an update every 1.7 ms, more or less.

    Even at that low rate, the current overshoots by 50 mA before the loop can tamp it down again. The current varies by 200 mA for 7 PWM counts, call it 30 mA per count at the high end, so overshooting by 50 mA comes with the territory. There’s just not a lot of resolution available.

    The program reads each pulse duration and amplitude from an array-of-structs, so it’s a simple matter of software to save the gate drive voltage at the end of each pulse and restore it when that pulse comes around on the guitar again:

    	if (millis() >= (EventStart + (unsigned long)Events[EventIndex].duration)) {
    		Events[EventIndex].drive_a = VGateDriveA;						// save drive voltages
    		Events[EventIndex].drive_b = VGateDriveB;
    
            if (++EventIndex > MAX_EVENT_INDEX)								// step to next event
    		    EventIndex = 0;
    
    		VGateDriveA = Events[EventIndex].drive_a;						// restore previous drives
    		VGateDriveB = Events[EventIndex].drive_b;
    
    		SetPWMVoltage(PIN_SET_VGATE_A,VGateDriveA);
    		SetPWMVoltage(PIN_SET_VGATE_B,VGateDriveB);
    
    		delay(PWM_Settle);
    
    		digitalWrite(PIN_ENABLE_A,Events[EventIndex].en_a);				// enable gates for new state
    		digitalWrite(PIN_ENABLE_B,Events[EventIndex].en_b);
    
            NeedHallNull = !(Events[EventIndex].en_a || Events[EventIndex].en_b);	// null sensor if all off
    
    		EventStart = millis();                                          // record start time
    	}
    

    … which produces this happy result, with a different time scale to show all four pulses in the array:

    I Sense Amp  ILED 50 mA div - 200 100 150 50 mA
    I Sense Amp ILED 50 mA div – 200 100 150 50 mA

    The top trace shows the current amp output that goes into the Arduino analog input and the bottom trace shows the MOSFET drain current. Notice those nice, crisp edges with a nearly complete lack of current adjustment.

    The small bumps in the amp output just after the LED turns off happen while the the code nulls the Hall effect sensor offset. Whenever the LEDs turn off, the code nulls the sensor, which is probably excessive; it really doesn’t have much else to do, so why not?

    This trickery doesn’t improve the loop bandwidth at all, because the code must still drag the current to meet each setpoint, but now that happens only when the pulse first appears. After a few blinks, the current stabilizes at the setpoint and the loop need handle only slight variations due to temperature or battery voltage changes.

    Speaking of voltages:

    VDS ILED 50 mA div - 200 100 150 50 mA
    VDS ILED 50 mA div – 200 100 150 50 mA

    The top trace now shows the MOSFET drain voltage and the bottom still has the LED current. There’s only 650 mV of difference at the drain for currents of 50 mA and 200 mA through the LEDs, with about 1 V of headroom remaining at 200 mA.

    The power supply delivers 7.4 V to the anode end of the LEDs, so they drop 6.3 V @ 200 mA and 5.7 V @ 50 mA. Some informal knob twiddling suggests that the MOSFET loses control authority at about 6.5 V, so, given that there’s not much energy in the battery below 7.0 V anyway, the program could limit the  maximum current to 50 mA when the battery hits 7 V, regain 650 mV of headroom, and run at reduced brightness (and perhaps a different blink pattern) until the battery drops to 6.5 V, at which point the lights go out.

    There’s more improvement to be had in the code, but those pulses look much better.

    (If you’re keeping track, as I generally don’t, this is Post Number 2048: love those round numbers!)