CNC Build – Stupid cables

Connecting the new sensor cable is tough — it’s a “real” RS232 cable, so the female end has two protruding female studs, so that two cables can be bolted together. This totally doesn’t work with the way I attached the sensor jack to the back of the PC (with zip ties — that’s quality right there).

My original workaround was to just attach the original sensor cable in-line with the new one, and that worked fine (the original cable has more clearance in the studs area), but for some reason, I was not getting any signal at the Super-Pid, and it’s been long enough that I can’t really remember what the behavior “should” be, other than “if it’s all ‘off’, that’s not correct”.

So I spent the evening trying to ohm out cables to figure out how things worked, and I was unable to really get solid readings (I need a better way to pin-for-pin test DB9 cables, because the way I was doing it really stinks).

I then decided that I should get a DB-9 to terminal block connector, and reconnect the whole thing.

Or maybe I could use Sugru instead of zip ties to attach, and that would leave enough clearance?

I’m still figuring it out.

Testing the cables involved a lot of booting and rebooting the PC, and it’s definitely an older box and needs to be handled with care, because for a minute there, I wasn’t being able to get it to boot up at all (I was trying to use the built-in USB hub in the monitor to drive the keyboard and mouse, and apparently something went sideways there… grumble). I have it fairly stable now (although I have to reset the system clock in BIOS everytime I unplug), but I’ll keep an eye on it. One reason the box is so valuable as a CNC driver is that it’s one of the last tower PCs made that still has a parallel port on the motherboard. That’s essentially the entire reason I still have the box.

ok, so I still have to figure out the sensor cables, but I’m on the case.

Posted in Computers, Electronics, Knowledge, Making, Technology, Woodworking | Tagged | Leave a comment

CNC Build – Courage is the first virtue

Well, as per normal in the way my life and hobbies go, it took two months to get back to the CNC once I’d determined that the cables fit properly.

I decided that I was going to push forward today, so the first step was to confirm that the control PC is still in working order.

The clock battery had died, so there was a little fun in the BIOS setup before I could get started, normal stuff.

Then I had to swap out the keyboard and mouse, because apparently an Apple keyboard and SmartMouse were not going to work in XP, at least not right out of the box.

Luckily, Windows populated the username for me (I never would have remembered that particular one), and of course I nailed the password on the first try, w00t

Mach3 came right up, and after hemming and hawing quite a bit (I did a lot of checking-that-the-motors-were-hooked-up and stuff, I turned on the G540, which booted up perfectly, and I was able to move the motors around manually in Mach3. Hey, this isn’t too bad.

OK, I admit that I’d hooked the motor cables to the wrong axes, that took a little figuring out (ended up looking at the fixture settings in Mach3 to determine the correct configuration — love it).

I left the spindle and sensors out of the equation, but crossed my fingers and re-ran the Fateful Test (“speeds n feeds”) that had gone so badly, all those years ago.

ran like a champ.

I ran it a few times, just to make sure that I understood what was going on, then I spent a bunch of time, re-bundling the motor wires, and re-rigging them neatly. It’s not 100% ship shape, but I don’t think any wires are going to catch on the machine.

Now, for the real test, I re-ran the test with the cables tailed properly (which is when things went sideways last time — electrical interference gets worse when the cables are in close proximity and running parallel to each other).

ran like a champ.

I shot a video of the happy occasion (too large to post without editing, of course), and after a small amount of messing about with the sensor cable and SuperPID (to no avail), I decided to declare victory and call it a day.

Things are really looking up! The machine works, and I would say that I’m probably 80% of the way back to where I was when I put this thing in mothballs.

Up next, figure out the sensor cabling, and then run sensor and s-pid tests.

Posted in Computers, Electronics, Making, Technology, Woodworking | Tagged | Leave a comment

CNC Build – Once more into the breach, … again.

The last time I used the big CNC machine, it tried to kill me. So I shut it down, and there things sat for … 4 years?

The problem, I believe, is that the motor cables (I was using CAT5 Ethernet cable with DB-9 connectors at the ends) are unshielded, and so when I put them all together in a bundle (you want to keep your cables tidy with a robot that moves around quite a bit), there was some kind of cross-chatter that did unhealthy things.

I spent a long time, occasionally looking for shielded Ethernet cable, but eventually I ran across these cables, and they looked like they’d do the trick.

I measured the existing cables, and put in my order. The new cables showed up last week.

Before I could install them, I needed to check one last thing; whether I’d wired the motor connectors “straight through” or with some crazy other pin wiring, which would have required me to cut them and resolder.

This was one of those times where you look back at your 7-years-ago self and say “hope you did right by me today”. I looked up the manual for the motor controller (turns out the schematic is silkscreened onto the case anyway), and popped the motor connector open.

Perfect match. Big sigh of relief.

This means that the new cables are a drop-in replacement for the old ones, and so 10 minutes later, the machine had shiny new cables hooked up.

I decided to declare victory and walk away at this point, because the next step is booting up and doing a few powerup tests, and I want to make sure I understand what I’m doing again, so as not to fry anything.

Next step, read up and re-check the wiring, then boot the machine up and see if the new cables fixed the problem!

It feels good to have finally made an attempt at moving this forward again.

Posted in Making, Woodworking | Tagged | Leave a comment

Raspberry Pi fails me again

I know I’m in the minority when I say this, but I absolutely *hate* Raspberry Pi. The thing is useless. I have tried to like RPi — everyone I speak with raves about them. But for me, the board falls in the Uncanny Valley, between “Arduino” and “a real computer”. Every single time I have attempted to put a RasPi into service, I have utterly failed.

You may or may not know me. I’ve been a Unix hack for a long, long time. I know my way around a sudo and an apt-get. Let’s talk about inode tables sometime.

Here’s the latest fail.

I have some IP cameras hanging about; they produce video on http://camera/video.cgi. I don’t care about motion capture. I don’t care about audio. I just want to see what the camera is pointing at, in an easy way.

So, I built myself a dumb little HTML file, with a table, an iframe for each camera, and a label for each camera. Imagine 15 lines of HTML. Load the HTML from a local file into a browser, and magic.

So I decide “Hey, wouldn’t it be nice to have a machine that runs a little webserver to statically serve up this one page of 3 iframes?”, and, like the sucker that I am, I started looking up how to do this with Raspberry Pi.

Just install lighttpd, put your index.html in the appropriate place, and off you go.

three hours later, I finally had all the permissions and apt-get updates and &c done, and I was able to point a browser (from a real computer) at the Pi, and magic.

Then I decided to point a browser from the Pi to the exact same URL, and nothing. I tried a few different browsers, I played with ffmpeg (which is now called avconv) and mplayer and mjpg-streamer and…

five hours later, I gave up in disgust, plugged the monitor from the Pi into the Real Computer, and put a full-screen browser window up “on the second monitor”.

I wasn’t asking much of the Pi. And it wasn’t super loaded-down, either. CPU was at 0 most of the time, and never spiked when I was requesting the iframes. There were even a few moments where I was able to sort of get something displaying (like when I used avconv to RE-ENCODE the video, and then mplayer could play it back), but nothing like a couple lines of config here, and then magic.

For most projects I build, at most I’d need an Arduino (although I have been enjoying going no-chip and “doing it in hardware” lately). Read a couple sensors, blinky the LEDs, turn the motor… all that is dead simple with a µcontroller, no OS required.

But there are times when you’d like to be able to connect over Ethernet (perish the thought that I could get a stupid RPi to bring a wifi connection online by itself, but that’s another story), or store a bit of data to spit back later, and all of a sudden, the idea of a little Linux box starts sounding good. Great, break out the second keyboard and mouse and monitor, boot the little board, and prepare yourself for a few hours of battle. And once you’re all done, you’re going to find that the Pi is not beefy enough to do the job.

9 times out of 9, I need an Arduino. The 10th time, I’ll try a Pi, fail to get it to do anything useful, and figure out how to 1) live without, 2) do it in a simpler way on an Arduino, or 3) waste a “real computer” on a dumb little job.

If you get your dander up, and decide that you absolutely need to show me the error of my ways, let’s talk about the projects I’ve been working on, and let’s get these little guys up and running!

Stupid Raspberry Pi, always ruining everything.

Posted in Computers | Tagged , | 1 Comment

Julia Set, a fractal

Pretty pictures with math.

Pretty pictures with math.

c = -0.79 + 0.15i

generated with a Python script (150 lines)

Posted in Art, Computers, Knowledge, Science | Tagged , , | Leave a comment

Bees in the yard, must be spring

We hived our three new packages of bees yesterday; the apiary has been expanded from 2 hives to 4. All 4 hives are abuzz with activity; Hive West has its first honey super on, and we’re hoping to get a little maple honey for the first time. It’s a warm, sunny day, with a bunny hopping around the yard, all 6 chickens laying, and the lawn covered in dandelions

Posted in Uncategorized | Leave a comment

Excellent Pot Roast

Pot roast should be one of those fairly easy to cook dishes, but mine usually turned out fairly dry and overcooked. So, the last time that I tried it, I hunted Google for some tips, and came across this gem. Start with some chuck, onions, and carrots, and end with lots of compliments on a job well done. Thanks, Pioneer Woman!

Posted in Knowledge, Science | Tagged | Leave a comment

Rainier Watch

After a couple weeks of clouds, rain, and wind, last night was clear and cold under a waning gibbous moon. Temperature this morning was 28 degrees.

We are in the “too cold to rain” part of the year, which I expect to stick around until a couple weeks before solstice.

Posted in Knowledge, Science | Tagged | Leave a comment

Unplugged

I tested out the power and internet in our camper.

I’m using the same deep cycle battery and inverter setup that I’ve used before to drive the observatory, and the 4G WiFi “puck” to pluck internet from a cellular signal.

So here I am, with no wall power and no ethernet, and yet here I am posting on the blog. Not bad.

Posted in Computers | Leave a comment

Buzz Buzz

It’s good to have bees in the yard again. We got a couple nice hours this afternoon, and the air was suddenly full of honeybees buzzing around. They’re still getting their bearings, so there’s a lot of bees landing on you a lot as you’re walking around. But, in all, it feels very much like spring.

Posted in Uncategorized | Tagged | Leave a comment