Attempt to Build a CNC Router

A few years ago in 2013, I’ve attempted to build a CNC router in order to quickly make parts for other projects.  My goal was to have the machine to be desktop sized with a work-area about 16″x16″ and be powered by LinuxCNC.  The project wasn’t a success, but I have learned a lot in the process.

CNC AssemblyMy first attempt to build the machine was built with 1/4 plywood, 10mm rod, and linear rail bearings.  The machine was designed with auto-desk inverter and then the parts were cut with a much larger CNC machine at work.  I was initially proud of the design, but after cutting and assembling the parts it would not work as well as I hoped.  The machine had far to much flex in all of the axis’ and wouldn’t have the precision needed.  This design did help with designing the next version of the machine.

CNCcad1The second machine will use a similar design, but utilize OpenBuild’s v-slot linear rail and use aluminum for the body.  The v-slot rail was much sturdier then the 10mm rod linear bearing.  The ACME screws and NEMA stepper motors would be recycled form the old machine to the new machine.

All of the machine’s parts was designed in Autodesk Inventor and the parts were milled from the design from aluminum on a much All the parts arranged to be milledlarger CNC machine.

Once the design was complete, all of the parts were laid out on a 2D drawing and the G-code was generated for milling.

The parts to the left were for the z-axis assembly.  Most of the parts for the assembly were brazed together, except for the two pieces of v-slot rail, which could be disassembled to change out the rotary tool.

Once the machine was fully assembled, it still had some problems with accuracy but it was a vast improvement over the wood version.  There was still plenty more work to be done to make the machine accurate enough for milling.  I found that the design for the X and Y axis worked pretty well, but the Z-axis needed to be re-engineered.  After two years of off and on work, I decided to scrap the machine and sell off most of the parts.  There are now plenty of off the shelf machines that are aimed at the hobbyist market that are better designed and more accurate.   I don’t have any regrets  building the machine for I have learned a lot

Here are some more photos of the completed CNC machine after the break.

Continue reading

Using a Huawei LTE modem with Linux

I was having some issues getting a Huawei E3276s-500 LTE modem that I purchased to work with Linux Mint.  The modem worked with windows, and it worked with linux after initiating in windows.

Following instructions for a similar modem I was able to get the modem to work without much issue.  I’ve added the following rule to /etc/udev/rules.d/70-huawei_E3276s.rules to use usb_modeswitch to initiate the modem when plugged in:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14fe", RUN+="/usr/sbin/usb_modeswitch -v 12d1 -p 14fe -M '55534243123456780000000000000011062000000100000000000000000000'"

Now the modem connects without issue when plugged in.  There are some features of the modem that are still not fully supported such as sending & receiving SMS messages to manage a prepaid account and seeing what wireless technology that the modem is currently using.  For now the modem is working well connecting to the Telcel network in Mexico.

Repairing M-Audio AV 30 Speakers

AV30-Repair1I have been hearing a 60Hz buzz though my M-Audio Studiophile AV 30 Speakers and suspected a problem with the filtering capacitors.

One of the capacitors failed producing the nasty buzz, but it was an easy fix.

After ordering a pair of Nichicon 4700μF capacitors from a seller on eBay, it was an easy job desoldering the old capacitors and soldering the replacements.

AV30-Repair2AV30-Repair3The speakers now perform as well as they did when I first bought them.

Using Opus & Codec2 to Compress Podcasts

With my current job, bandwidth is sometimes limited and can be expensive. I have been thinking about how to better enjoy all of the podcasts that I listen to every week. Each episode can be anywhere from 50Mb to 150Mb, resulting in 1-2Gb of bandwidth being used just for podcasts. I am working on a system that would run on a VPS, downloading the podcasts and transcoding them to a more efficient codec. Opus is an excellent codec for voice, especially at low bitrates but what if I wanted something more extreme.

David Rowe’s Codec2 is being designed for amateur radio for use on the HF & VHF bands. Codec2 isn’t being designed for audio storage, and there isn’t any container format that supports it but I was able to transcode the original podcast to a raw bitstream that can be saved to a file. There currently isn’t a player that supports Codec2, so you have to feed the bitstream though the decoder to save it as audio that you can play.

For the source I will be using the first minute of episode 747 of the No Agenda Show as the source for the demo, it can be listened to below:

The original podcast is 143.4 MB.  I’ve experimented with encoding the podcast with three different codecs (Mp3, Opus, and Codec2) at different bitrates.

Codec ChartThe file sizes are similar at the same bitrate (as expected) but Opus does a much better job with the lower bitrates.  Mp3 has a lot of compression “warble” while the Opus maintains the treble and base tones of the host’s voices.  The samples at different bitrates can be found below:

Mp3 Opus
32 kb/s
24 kb/s
16 kb/s
8-6 kb/s

Opus performs well, even down to 6kb/s while Mp3 is completely unlistenable at it’s minimum at 8kb/s.  But I want to try something more extreme, so I started playing with Codec2.  To create the test example I used Audacity to down-sample the original to 8000Hz mono raw PCM file.  The raw PCM audio was processed by the Codec2 encoder at different bitrates and saved.

3200 b/s
1600 b/s
1600 b/s

At 3200 b/s Codec2 does a reasonable job with the presenters voices, but the introduction and sound effects doesn’t compress well.  Even down to 1200 b/s still sounds intelligible, but any non-voice audio doesn’t compress well at all.  In order to make this work, some significant audio preprocessing would have to be done for it to be compressed properly. I am excited for the possibility for having 3+ hours of audio being compressed to a 5Mb file.

My next task is to get a script working on the server to act as a podcatcher and automatically transcode the content, then create it’s own private RSS feed for my device to make the much smaller podcast available for download.  For now I will be using Opus, but more research will be done with Codec2.