Monday, May 30, 2016

South Bend Junior Lathe Lives - Almost

Well, here we go.  It's been a while since I've posted, and I just HAD to post, since I've finally made some progress on my Jan 1930 SB Junior 9".  I bought it back in November, and it's the first foray into machining for me (after I rebuilt a 1939-1941 Craftsman Dunlap wood lathe, it was the next logical step).  I've refinished everything, cleaned up all of the surfaces, repaired the back gears using a hodgepodge of parts (try finding a decent back gear for a Junior 22YB - everything was either too big or not big enough) from a 13" and reusing the eccentric shaft.  But, it went back together.  I re-shimmed the headstock to make sure it was tight, and built a jackshaft to go between the treadmill motor from a C2000 NordicTrac, driven by a BC141.

The first time I tried to fire it up - it wouldn't turn.  I greased the zirks on the shaft pillow blocks, and tried it again.  I adjusted, thinking the belt was too tight.  Both of those helped, and the speed was nearly controllable, except when it engaged the headstock.  It barely turns the headstock.  I think I got the shims wrong on the headstock, and it's too tight.  We'll re-shim it again, and give it one more go in the near future, but I feel really close!

Wednesday, May 25, 2016

South Bend Lathe Motor - Finally Progress

So, I've had the South Bend Junior 9" lathe since late November.  As I've worked on getting an old lathe up and running, I've had some great experiences, from the "Eureka!" moments with calculating gear ratios for thread pitches, to finding some pretty great parts along the way.  However, the thing has yet to be put back into use.  One of the big hold-ups has been the lack of a good motor.

Don't get me wrong, I've had a good motor.  Just no way to control it.  I've had a Quadra Performance Drive 2.6 HP Peak (1.5 HP Continuous Duty) M-204432 (C3354B3352 or E62788) motor from a NordicTrack C2000 treadmill.  I also had the MC-2100 controller.  However, my pinouts must have been different from the others out there, because I could not get it to work based off of a potentiometer for speed control.

I finally gave up on all of that, and found a BC141 controller on eBay.  I ordered, it arrived today, and I've already connected everything up, and fired up the motor.  It works!  It actually works great!

My next step is to put a hinge on the jack shaft, fabricate a mount for the motor so that it can then attach to the jack shaft, and then install it.

Tuesday, May 24, 2016

Motion Detection with Multiple RTSP Cameras

Well, here we go again.  One of our cameras went on the fritz, so I started looking.  There were two decent cameras that had the same resolution and the same outdoor ratings (e.g. windproof, water resistance, and dust resistance), so I picked them up.  Unfortunately, they do not expose an jpeg stream, so I had to use a different Linux motion tool, available from :

Now for the REAL down-side.  I compiled it, and loaded it up with two camera streams.  It worked great, for a day or two, and then the process would vaporize. I found an obscure message in the log file that consisted of :
    May  7 00:36:00 ch abrt[29014]: Saved core dump of pid 26188 (/usr/local/bin/motion) to /var/spool/abrt/ccpp-2016-05-07-00:35:55-26188 (548212736 bytes)
So, I loaded the application up, then attached to it via the debugger (gdb motion 123456) and got the following stack trace after a few days :
    [New Thread 0x7fffecdfa700 (LWP 23598)]
    [New Thread 0x7fffd3fff700 (LWP 23599)]
    [New Thread 0x7fffd21fc700 (LWP 23600)]
    Detaching after fork from child process 23603.
    Detaching after fork from child process 23604.
    Program received signal SIGABRT, Aborted.
    [Switching to Thread 0x7ffff72a8700 (LWP 23594)]
    0x00000030b5032625 in raise () from /lib64/
    (gdb) bt
    #0  0x00000030b5032625 in raise () from /lib64/
    #1  0x00000030b5033e05 in abort () from /lib64/
    #2  0x00000030b5070537 in __libc_message () from /lib64/
    #3  0x00000030b5075e66 in malloc_printerr () from /lib64/
    #4  0x00000030b50789b3 in _int_free () from /lib64/
    #5  0x0000000000416b20 in netcam_cleanup (netcam=0x7fffa0000030, 
        init_retry_flag=0) at netcam.c:2581
    #6  0x0000000000412d28 in vid_close (cnt=0x678a10) at video_common.c:555
    #7  0x0000000000406f19 in motion_cleanup (cnt=0x678a10) at motion.c:991
    #8  0x00000000004097b8 in motion_loop (arg=)
        at motion.c:2231
    #9  0x00000030b58079d1 in start_thread () from /lib64/
    #10 0x00000030b50e88fd in clone () from /lib64/
So, I then checked in the log, found the above stack trace was not related, and that that run may have had other issues going on.  My real stack trace is :
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    Reading symbols from /usr/local/bin/motion...done.
    warning: core file may not match specified executable file.
    [New Thread 4667]
    Reading symbols from /lib64/ debugging symbols found)...done.
    Loaded symbols for /lib64/
    Core was generated by `/usr/bin/keyutil --command genreq --ascii --renew /etc/pki/tls/certs/cottonwood'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x00000030b5047e2c in ?? ()
    Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.149.el6_6.5.x86_64
    (gdb) bt
    #0  0x00000030b5047e2c in ?? ()
    #1  0x0000000000000023 in ?? ()
    #2  0x00007fff1c7768c0 in ?? ()
    #3  0x0000000000000000 in ?? ()
Bah!  Next, in the logs, I found :
    /var/log/messages:May 22 20:29:00 ch motion: [1] [ERR] [EVT] event_image_snapshot: Could not create symbolic link [01-20160522202900-snapshot.jpg]: No such file or directory
    /var/log/messages:May 22 20:29:30 ch motion: [1] [ERR] [ALL] create_path: Problem creating directory /home/media/security: Input/output error
    /var/log/messages:May 22 20:29:30 ch motion: [1] [ERR] [ALL] put_picture: Can't write picture to file /home/media/security/cameras/camera-backyard//01-20160522202930-snapshot.jpg: Input/output error
I completely missed the "Input/output error" and checked the filesystem location, only to find my entire disk had failed, so it could not write videos.  Sometimes, debugging can be such a pain!  Here comes a nice recovery fee and a nice fat check going out for a NAS with mirroring!