08/16/2018 12:11am Blog Entry
So you might have noticed the site update. In addition to unplugging Google Analytics* (which was the only use my site had for cookies) I have a new book out, as of mid-July called Raspberry Pi for Arduino Users.
Most Raspberry Pi books assume you're starting from scratch, or that you know some Linux, or that you actually want to learn Python. Raspberry Pi for Arduino Users assumes that you're actually an experienced Arduino user, well versed in writing sketches, but that you want to cross over to build an Internet gadget, or you need more speed, or a GPU, or some other service that just comes with a Pi, but you don't know where to start.
This book is where you start. It will teach you how to use the Geany IDE to replace the Arduino IDE you're used to, and how to leverage the C++ you learned writing sketches to write Linux programs for the Raspberry Pi, from GPIO code to network socket code to PHP for the Apache web server, to building your own 5 volt Arduino compatible that you can program from the Pi's GPIO pins. I break these topics down into digestible chunks with some classic projects, and a few you simply can't do with Arduino.
Most of what you've already learned with Arduino can work with the Pi. This book is how you get there.
*My blog is hosted by blogger.com, so it still has cookies. If you read it on my site, it's fed from the RSS feed that does not.
06/08/2018 12:49pm Blog Entry
I guess, like so many, I thought that Tony Bourdain had roped in his self-destructive demons, that they'd gone quiet as he aged, as he found success doing what he loved: traveling the world, writing, and making TV about it. Obviously it wasn't so. Much as I enjoyed his TV, I enjoyed his books more, the brash, caustic, obnoxious, but remarkably eloquent and humane writing voice was a treasure. It's a balance that's very hard to strike, and he did it over and over again. Unlike many, I don't see it as a self-absorbed act. I see it as a man who'd been staying one step ahead of his demons for 40 years stumbled again, and this time he fell all the way. I wish he'd gotten help instead. It can make all the difference.
My condolences to his friends, his girlfriend, and most especially to his daughter. I can't imagine how awful this must be for you.
Farewell Tony Bourdain.
05/30/2018 01:38pm Blog Entry
So my long-suffering Linux box, Lucky, ate itself a few days ago. I was in the middle of tinkering with a makehuman model, and all of a sudden, I couldn't write to the drive. It'd be having problems at boot time for months. My diagnosis: I suspect all the hangs and reboots finally corrupted the logical volume system.
Since I had to boot from a USB drive anyway (it was that bad), I decided to go ahead and upgrade to Xubuntu 18.04, Bionic Beaver. Seriously. That's what they called it. I get the feeling the name choosers' first language isn't English.
LVM, the logical volume management system (actually LVM2) is pretty robust. I was able, with some poking, to get my /home logical volume operational, albeit with a lot of complaints from LVM. I then rsynced it to my Buffalo NAS. This would bite me later.
After that, I reformatted the drives, set LVM up on it, made the registered boot partition much larger (4GiB) and installed. No problems on the 6th try. Hint: if your installer complains that the install media is corrupt, reboot first, and try fscking it. I got no errors, but the installer stopped complaining and finished the job. Switch to the NVIDIA drivers so I get real performance out of my GPUs: yessss. Works a treat. It boots reliably too, which is fantastic. Then the real work began.
Here's where the Buffalo NAS bit me for what will be its last time. Buffalo NASs come with almost no software, and no supported way to add more. So I had to root it and make some hacks to be able to back my Linux machines up to it at all. When trying to restore the same way, via rsync, it would occasionally drop the link and abort the sync. It never managed to restore my 40GiB windows 10 virtualbox drive. Likewise, copying data over windows file sharing was flaky, although this may be a problem with Thunar. Undaunted (but very pissed off) I finally managed to get the files I needed restored with a combination of those methods plus sftp from the NAS to my desktop machine. I don't need a NAS that I can't restore backups from reliably. I've got an infrastructure upgrade planned, and this piece of crap NAS is going to go away permanently.
So anyway. I've restored what I could not rebuild, and rebuilt what I couldn't restore (or more precisely, rebuilt what couldn't work on the restored files. Wine, I'm looking at you here.) Still have to get virtualbox going again, but I've done that before and it's given me only minimal grief, so I'm fairly (over)confident about that. Thunderbird? Give it its old .thunderbird directory and it picks up where it left off. Makehuman: reinstall and rebuild. Blender? restore the directories and go. Openscad: reinstall. And so on. My actual data loss is fairly minmal, although because some files just turn up missing despite having been restored, I'm going to have to keep that emergency dump around a while.
Anyway. I'd been meaning to tear into this machine and bring it up to 18.04 and try to fix the stability problems. Apparently it decided it was time. So far, that, at least, has been successful.
But seriously. Don't buy a Buffalo NAS unless you're only dealing with Windows or Mac. Even then, it's crappy.
04/06/2018 04:13pm Blog Entry
The time has come to talk about wheels. I said, way back in Ebikin' it 2, that my existing wheels were doing the job without complaint. Well, that's no longer true. I've had more than half the spokes on the drive side of my rear wheel fail, one or two at a time.
What does this mean? Well, I reached out to Jeff who built the bike, and he assures me he never got into building wheelsets, so I really have no idea how old these spokes are. If we assume the rims were built into this wheelset when they were new, these spokes go back to the early 1990s. And they're on mountain bike rims. It's not unreasonable that they are just fatiguing out, especially with the sudden increase in load (me) and rotational stress (the motor.) This was my thought process up to last week. Then, in the process of re-truing the wheel, I took all the tension off it and had a look at the shape the rim would prefer to be.
It was kind of like a potato chip. Not especially round, and in no way true. That, and the tension map I get when I measure the spokes when the thing IS true(ish) tell me that this rim is pretty much toast, alas.
My local bike shop assures me that 26 inch wheels, except for mountain bike downhillers, are pretty much extinct. This... isn't quite the case. As it happens, 26 inch wheels are also favored by the cargo bike and touring bike crowds, and they're fairly common in ebike circles as well. You just have to find them. Well, I have the Internet. The world is my shopping mall.
What I read is that standard wheels, if there are such things, assume a rider in the 150 pound range. My rims, being (in their day) hardcore mountain bike rims, apparently are good for somewhat more than that. The rims I ordered (from a bike shop in Germany, since Ryde's American rep doesn't answer his/her/it's email) are these: https://www.ryde.nl/andra-40. They were recommended on a touring bike forum, where in addition to the 150 pound rider, the bike can expect to support another 50 to 100 pounds of gear, plus a heavy, durable bike. These rims are rated at for a system weight (rider+bike+gear) of 180kg, or about 390lbs. That's more than sufficient. They're also designed with ebikes in mind. And as high class rims go, they're cheap at about 30 bucks each. Plus shipping. From Germany. Still cheaper than most of the rims I was looking at in the U.S.
For hubs, it should surprise no-one that I'm getting Sturmey-Archer drum-brake hubs. I've talked about them before. Here's the thing. Ever since I've been using them (which was when I was in my single digts) I've //hated// rim brakes. Always out of adjustment, lousy when wet, and if your wheel isn't exactly perfectly true, they drag, or you have to adjust them so loose they don't work very well. I like disk brakes fine on cars, where they're protected from the elements by the car's wheel. On bikes, they're right out there in the open, where they get dirty and (worse) greasy, and stop working reliably. I don't especially want to wash my bike every time I ride it. Doubly so for the brakes.
Sturmey-Archer drum brakes are internal. The weather doesn't get in. There are a lot of varying reviews on how well they stop, from one guy who bent his front fork in an emergency stop with his 90mm S-A front drum, to people who say they don't work well. I used drum brakes on my first car with reasonable success, and unlike 1968 VW brakes, the S-A ones are self-adjusting. I have a suspicion that either some people's brake handles don't work well with S-A drum brakes, or that S-A's included cables are a bit too compressable. I suppose I'll find out. I have a 90mm S-A front brake+hub and a 70mm rear brake+hub+cassette coming for my new wheelset.
Yep. I'm building new wheels. Meantime I'm keeping the old ones cobbled together (the front is no trouble at all) so I don't have to do wheel building my first time on an "emergency" basis. I'm starting to understand why people keep more than one bike around. I'm not sure I'm ready to build up a second ebike for myself though.
Okay, I'd //love// to build another ebike, now that I have the tools and (some of) the knowhow, but it remains to be seen whether anyone I know will ask me to. So far, no bueno.
I'll keep y'all posted on the wheel building. Should be fun. :P
04/01/2018 09:09pm Blog Entry
This is a post about degreasing. Not the bicycle, even though my ebike's drivetrain is, let's say, thoroughly greased and oiled, This is about degreasing oneself after working on such a bike.
For guys, at least, the tried and true methods (Boraxo or Lava soap) involve heavy abrasives. This is fine for your hands, but somehow in the process of retruing my rear wheel (again) and replacing the tube after the old one failed (yes, Friday's ride had extra entertainment) I got a sprocket print on my armpit. I was wearing a t-shirt, too. With sleeves. Anyway, Boraxo and Lava (besides not being present in our home) are //rough// on your skin. Like sand it down to the raw, bleeding dermis rough. Not doing that to my armpit, sorry.
Now, back in the day (way back) I did theater. So I can expound with personal experience to the effectiveness of old school cold cream. If you're patient, apply it with care, and scrub carefully, it still utterly fails to do anything useful except give you acne. So what's a bike tinkerer to do?
I am fortunate (for this and many other reasons) to have an SO who does, on occasion, wear eye makeup. She is also not one to tolerate traditional "female" tools that don't work, like cold cream. No. She buys this stuff: King Soopers Eye Makeup Remover. It's the store brand of a whole family of biphasic (you have to shake it up or it separates) makeup removers. Most of the major brands have a version. This one is cheaper. Friends and neighbors, this stuff works. Not just on makeup, but it //dissolves// grease off your skin like nothing you've ever seen. Shake it up, apply to your greasy hide with Kleenex or paper towel or a cotton ball, and the grease //just comes off//. The skin is not brutalized underneath. This stuff is for eyelids, for Pete's sake. (So was cold cream. Word to the wise, don't get cold cream in your eyes. It stings. A lot.).
So many thanks to my sweetie, who not only pointed this stuff out to me, but graciously doesn't make me buy my own bottle. Seriously. Try this stuff. It does the job.
01/29/2018 02:01pm Blog Entry
Re-reading my original E'bikin' post, I thought I should bring things up to date a little.
1. Fuses: I emailed the good folks at Luna about whether or not the battery pack (henceforth "the pack") is overload protected by the charge controller. They assured me it is. So fuses aren't necessary. Which is kind of too bad, since I'd already gotten my hands on some marine DC breakers for quite a reasonable price (when you start pricing fuses that will handle 25 amps at 48v DC, the prices get shocking. Breakers at $12.50 each make more sense.) I got mine here: https://greatlakesskipper.com/, if you're building a pack that is not as well protected. I haven't used the breakers, but I'd happily deal with Great Lakes Skipper again.
2. Wheel life: So far, no problems with the wheels, knock on stainless-steel spokes. The brakes are adequate, but I'm still thinking about drum brakes and lacing my own wheels.
3. Lights: After some effort designing a box that would clamp onto my bike (which was not 100% successful) I 3d printed a switch box, patched a second output into the main pack's connector, and wired in one of these: https://www.superbrightleds.com/moreinfo/led-light-pods/10w-mini-aux-2in-modular-led-off-road-work-light/1699/ And a 48v tail light from Luna that they don't sell anymore. Very happy with both. I don't ride at night, but dusk comes early in the winter, and I didn't want to get squashed. Also didn't want to blind oncoming drivers, so I went with roughly the same lumens as a car headlight. Since I put that kit together, Luna has added a whole bunch of 48-72 volt head and tail lights to their "Lights" section, so if you're lighting your own bike, you might not have to shop as much as I did.
4. Cranks: There is a distinct *clunk* coming out of the crank end of my drivetrain. Reading up, I found that the alloy that Bafang makes their cranks out of is pretty soft, (frequently described as "like chocolate" and assumed I had either a wallowed out connector or a stripped thread on the pedal. I //have// a set of cranks that Shimano made for their own ebikes (same length, same ends) but have not installed them. I need to investigate further, as I now thing it could just be the front ratchet engaging that I'm feeling.
5. Retightening, Oiling, etc.: I've been hard at work on a book, which I hope to finish the primary writing of shortly, so I haven't had time to do much (any) maintenance on my bike. I have a set of Luna's sockets for the job coming, and a brand new pair of (cheap) torque wrenches, so I can torque things up properly as part of the upcoming break-in maintenance. I have about 70 miles on the bike now. It's probably time. I should probably get some loc-tite too. I've read that it's a good idea to lube the BBS02's reduction gears, so I should investigate that too. Mine aren't noisy, especially, but I read that the lubrication on them can be dodgy from the factory, and they last a whole lot longer if they're properly lubed.
6. According to the Denver Post, the advisory panel to Boulder County has recommended banning ebikes from most of their parks and open-space trails. I have heard, though not from an especially reliable source, that this is due to //noise.// Seriously? I don't hear that well, but my tires and breathing make more noise to me than my bike motor. Hopefully the county will reject that as ridiculous. One more reason not to live in Boulder. I have no use for political extremists of any sort, including the environmental flavor.
That's my update. Now off to //ride// the bike and get to work.
12/29/2017 09:48pm Blog Entry
A couple weeks ago, I got my first 4k monitor and hooked it up to my systems. The mac tolerates it (barely, at 30hz instead of 60.) The Linux machine... has been a struggle. So here are my collected hints. Bear in mind, my system is Xubuntu, at least for the moment.
1. Make sure you're getting the full resolution at 60Hz, assuming your video system can do that. I had to switch from a single link HDMI cable to a DVI cable.
2. The print gets really small. Set your font DPI (Settings, Appearance, Fonts). For my monitor, a 28 inch diagonal, at 3480x2160, that DPI works out to 157. There are calculators online.
3. Some applications still have tiny print? Like most especially LibreOffice, where the benighted fools took scaling //out// of the code this version? There's a trick. See, at least with XFCE's settings system, it doesn't propagate your new DPI to the X server itself, and Libreoffice gets its DPI settings from the xserver, not your desktop manager. Edit your .Xsettings or .Xdefaults file (whichever you feed to xrdb) and add this line:
(where 157 is whatever you set your DPI to previously.) Save, log out and back in, and libre office should behave itself properly.
I also have a multi-GPU setting and I keep getting kernel panics at startup (but not all the time). Some kind of race condition is happening, and I think the Nouveau drivers are being naughty (even though they're not supposed to be involved at all.) But that's a different struggle
12/07/2017 12:09am Blog Entry
So I've been riding every day or two for a while now. More observations:
1. Lights. It gets dark //early//. I have circuit breakers on order and lights already installed on the bike. I'll put up another post when I have everything working. Or I've set the bike on fire.
2. I finally found a situation where my brakes were a little bit inadequate. There are some fairly steep walking/bike trails around here. I'd never tried them before when I was on lung power only, and even with the boost at full power (750 watts) my legs were burning quite a bit by the time I got to the top. Then, of course, I had to get down. On a dirt trail, 15-20MPH seems a lot faster than it does on the road. I had enough brake to slow down, but I had to use some front brake, which I normally shy away from doing. (Too many trips over the handlebars). If I'd needed to stop in a hurry, I might have been in trouble. This isn't my usual riding pattern, so it's not urgent to do the brakes. But like I said before. If the wheels give me grief and I have to build new ones, drum brakes for me.
3. When it's freezing out, wear some freakin' gloves. Even at a placid 14MPH, my fingers were going numb where they stuck out of my riding gloves. I need to investigate cold weather gear that's appropriate to biking if I'm going to keep doing this on cold days.
4. It's STILL fun. :)
11/14/2017 08:25pm Blog Entry