tag:blogger.com,1999:blog-25174189429345920522024-03-12T23:39:16.806-04:00Random Music and DesignMatt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-2517418942934592052.post-91916230480194846982013-02-21T22:53:00.001-05:002013-02-21T22:53:03.547-05:00SurfacingIt's been a while since I posted. A long time. Not for a lack of work, just been spending more time on the projects and less on pictures and writeup. I plan to continue to document my projects, but more via youtube video than here.<br />
<br />
I've been spending a bit of time working on a few projects:<br />
<ul>
<li>A Tandy Color Computer retro project, developing a bus interface to mimic both ROM and a few of the more common and useful peripherals, particularly the floppy disk interface. I have the basic circuit design done, and I'm waiting on a small batch of boards to be fabricated. My proof of concept links the CoCo 3 to the Altera DE-2 FPGA board, but the real unit has a 32K EEPROM and a connector to interface with an Arduino Mega board, using a CPLD to handle signaling glue. The intent is to have the board support EEPROM programming from the Arduino, the CoCo accessing the ROM by itself, or the CoCo talkign to both the Arduino and the EEPROM.</li>
<li>I've been learning more about FPGAs and CPLDs and Verilog generally. Lots of fun.</li>
<li>The industrial control project I started has evolved a lot. I'm currently working on a custom PLC that's programmable via an Android tablet. We're getting near final testing and tweaks, so more video on that soon.</li>
<li>The TinyG tablet app has taken a back seat, in part because I've been waiting for the communications protocols to firm up before I rewrote that part of the app. It looks like a new release is happening soon, and so I expect I'll pick that up again.</li>
</ul>
That's pretty much it, but then again, that's about all I have time for at the moment. Subscribe to me at http://www.youtube.com/user/Greyhound716/videos if you want to know when I post more stuff.<br />
<br />Matt Stockhttp://www.blogger.com/profile/16750111559056817171noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-6214511570243952772012-09-24T23:29:00.000-04:002012-09-24T23:29:28.647-04:00Operator CommandsWell, after a very focused dev session, I was able to add the support all of the command DB elements, allow manipulation of the individual command elements (like deleting them), and feeding them to the TinyG incrementally. It's not perfect, but it's working pretty well. Next up is to enhance the communications protocol between the Arduino and the tablet so that it does more than passes the info on to the TinyG. More specifically, I want to be able to send it relay commands in JSON format as well as to enable a download mode that will open up a file for writing on the Arduino. Once I get that done I'll do another demo.<br />
<br />
Code isn't up on github yet, but I expect to get it up there before the project is done. Need to think about how this code will mix with the other TinyG app before I put it up there.<br />
<br />
<br />Matt Stockhttp://www.blogger.com/profile/16750111559056817171noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-66503348987682348192012-09-23T23:33:00.002-04:002012-09-23T23:33:49.512-04:00TinyG Operator Progress<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/yCYs0mEykFg?feature=player_embedded' frameborder='0'></iframe></div>
I've made substantial progress on the Android - Arduino link over the past couple of weeks. I posted this video to demo some of the new work. Still on the docket is to construct actual gcode based on the input, and to store that in the system.<br />
<br />
I'm using a database backend to store the programs and commands. It turns out that's easier than manipulating raw files. I'm also using the same service abstraction I used for TinyG for Android that allows selection of either network or USB host mode interaction. So that means that I should be able to roll this USB Accessory mode capability into the core program without a lot of pain.<br />
<br />
I've started to think about refactoring the existing TinyG for Android code. Instead of having a separate app with the USB support, I'm probably going to make a multi-ADK release. So this means that folks who can use the advanced features will automatically download one app with all the code, and the ones who can only use a subset of a capabilities will get another. It should make some of the handling a little less tortured.<br />
<br />Matt Stockhttp://www.blogger.com/profile/16750111559056817171noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-54859977748127985222012-09-06T21:41:00.000-04:002012-09-06T21:49:11.095-04:00ResourcesI've been asked to put some of the resources I use for my projects all in one place. Here are a few of my favorite things. I regularly try to do video demos of my projects, and so for that take a look at my <a href="http://www.youtube.com/user/Greyhound716/videos">youtube channel</a>. Also, you can look at sites like <a href="http://hackaday.com/">hackaday</a> for ideas, or even your local <a href="http://www.meetup.com/buffalolab/">Buffalo Lab makerspace</a>.<br />
<br />
<u>Arduino:</u><br />
<br />
The <a href="http://arduino.cc/">main Arduino site</a> itself is obvious, but I also like <a href="http://www.sparkfun.com/">Sparkfun</a> and <a href="http://www.adafruit.com/">Adafruit</a> as both sources of ideas and for things like <a href="http://www.adafruit.com/category/17_21">shields</a>. If you are going to use the <a href="https://www.sparkfun.com/products/9628">USB Shield</a> or the <a href="http://www.adafruit.com/products/563">Mega ADK board</a>, the <a href="http://www.circuitsathome.com/category/mcu/arduino/usb-shield">Circuits@Home</a> site is very useful as well. Also, don't forget about the "examples" that are available within the Arduino IDE itself.<br />
<br />
If you are planning to skip the Arduino IDE and "sketch" system completely and build code like your forefathers, you need to understand the underlying <a href="http://en.wikipedia.org/wiki/Atmel_AVR">chipset </a>and have a <a href="http://www.javiervalcarce.eu/wiki/Program_Arduino_with_AVR-GCC">working toolchain</a>. It is very instructive to write a simple C program, have it be compiled to assembly, and to try to discern what that code does. You get extra points if you grok <a href="http://en.wikipedia.org/wiki/Position-independent_code">relocatable code</a> and understand what a linker does. When you finally have object code to upload to the device, you need to choose how to do that last step. Fortunately, the Arduino hardware has a built in method of flashing the firmware via the USB port. You can get an <a href="http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891">AVR programmer</a> if you want to be hard core, or you have a board that doesn't have the secondary bootloader.<br />
<br />
When I'm doing electronic design work, I usually pull parts from places like <a href="http://www.jameco.com/">Jameco</a> and <a href="http://www.digikey.com/">Digikey</a>. there are others, but between these two you can find almost anything.<br />
<br />
Random tip: Always be aware of what <a href="http://www.allaboutcircuits.com/vol_4/chpt_3/10.html">voltage logic</a> you're using. For example, most Arduino boards are 5v, which means they output 5v as a "1" and they have a fairly high voltage threshold for inputs to be considered a "1" (I think something like 2.7v). If you're trying to interface with a device that is based on 3.3v logic or even lower, you can get odd results or even damage your devices. There are ways to do level shifting using options as simple as a <a href="http://en.wikipedia.org/wiki/Voltage_divider">voltage divider</a>.<br />
<br />
There are some standard ways to do things like <a href="http://arduino.cc/en/Tutorial/Blink">light an LED</a> from an output pin or <a href="http://arduino.cc/en/Tutorial/Debounce">"debounce" a switch</a> that is attached to an input. Understand how these simple circuits work.<br />
<br />
<u>Android:</u><br />
<br />
The <a href="http://developer.android.com/">developer site</a> is a great resource, as is all of the free code on <a href="https://github.com/">Github</a> (including <a href="https://github.com/mattstock">my stuff</a>). If you need help, a google search usually turns something up on <a href="http://stackoverflow.com/">stack overflow</a>.<br />
<br />
Hope that helps some. Let me know if I missed anything useful.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-28638529799428963962012-08-26T21:53:00.000-04:002012-08-26T21:53:13.990-04:00Updates to TinyG for Android and a hardware controllerI'm working on a new project that should lead to several big improvements to TinyG for Android. The project overall is to build a simple "operator" control for an existing CNC system, which would be able to send a stored program to a TinyG when the "go" button is pressed. For this to work correctly, the unit will need to be able to home the CNC system on reset. It will also need to be able to handle a few additional control inputs/outputs, since in addition to the "standard" gcode-based axes and spindle controls, the unit requires the actuation of some relays.<br />
<br />
The Android app comes into play as a programming and control pendant for the operator unit. The idea here is to have the Android device be able to train/build a new program by providing step-by-step line, arc, and relay controls, and then to have these programs be able to be stored on the Android device and uploaded to the operator system as needed. During the program mode, the operator control would act like a passthrough.<br />
<br />
There are two reusable components that will come out of this project that are of general interest. The first is the program builder. The second and in some ways the most important is that I will be implementing the operator control as an <a href="http://developer.android.com/tools/adk/">Android Accessory</a>. This will require a shim device between the TinyG and the Android devices (unlike the current Host mode), but has the potential to open the application up to many more Android devices. While my first cut will only support Android 3.1 and up, a compatibility library should allow support to even earlier devices.<br />
<br />
I'm planning to use the <a href="http://www.arduino.cc/en/Main/ArduinoBoardADK">Arduino ADK</a> board as the core of the operator control. It is in effect an integrated <a href="http://arduino.cc/en/Main/ArduinoBoardMega2560">Arduino Mega 2560</a> and a <a href="http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino">USB shield</a>. The Arduino programming environment is kind of clunky, but I expect that it will be sufficient for this project. I probably could have used an Arduino UNO for this project, but the Mega's additional hardware serial ports and additional IOs make it an attractive option. I'll be combining the ADK board with at least a <a href="http://www.adafruit.com/products/254">microSD card breakout</a> to store the programs. The relay integration is TBD. Depending on the switching voltages, I may use a relay shield or a standalone relay module.<br />
<br />
At the moment I'm just sketching out the design and gathering materials. I will be documenting progress as I go, including some photos.<br />
<br />
In other news, I picked up a Xilinx CPLD development board, and I'm looking forward to learning a bit more about Verilog and CPLD/FPGA programming. Given the TinyG project, it will probably need to wait for a while. Lots of fun toys!<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-63133970964566154522012-08-11T22:19:00.002-04:002012-08-21T14:20:01.444-04:00Fun with Old Computers<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-W6RL9sso3M4/UCcHUNqhZKI/AAAAAAAAAFc/DuRT0CrOgn8/s1600/IMG_20120802_210410.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-W6RL9sso3M4/UCcHUNqhZKI/AAAAAAAAAFc/DuRT0CrOgn8/s320/IMG_20120802_210410.jpg" width="239" /></a></div>
One of the benefits of getting older is that you can afford the state of the art tech of your childhood. In my case, I suddenly got the desire to tinker with the 8-bit goodness that is the Tandy Color Computer line that was sold in Radio Shack in the 80's. I had a <a href="http://en.wikipedia.org/wiki/TRS-80_Color_Computer">Color Computer 2</a> with standard BASIC. It had 16k of memory, and used a cassette interface for storage. It was the first computer I ever owned, and the second one I learned to program. The first machine I ever "programmed" was an <a href="http://en.wikipedia.org/wiki/Apple_iie">Apple IIe</a> clone in my elementary school. Of course, programming at the time typically meant copying BASIC programs from magazines like <a href="http://en.wikipedia.org/wiki/Family_Computing">Family Computing.</a><br />
<br />
This go around, I was able to pick up at 128k Color Computer 3 (as well as an original and a coco 2 for good measure!) off Ebay. This model has composite video output as well as analog RGB out (think CGA!). Unfortunately, old analog RGB monitors are surprisingly expensive, and so it's composite for now. I have a Cunning Plan however. There seem to be some inexpensive conversion devices out there (like <a href="http://www.ebay.com/itm/120967105011">this</a>), and if I get sufficiently interested I might pick one up.<br />
<br />
My first goal was simply to play a few old games. In particular, I wanted to play my favorite game at the time, <a href="http://en.wikipedia.org/wiki/Dungeons_of_Daggorath">Dungeons of Daggorath</a>. Unfortunately, my original cartridge was long gone. While many of these games are still under copyright, you can often find ROM images around the net. Fortunately for me, this particular game has a very generous developer (Douglas Morgan) who has <a href="http://frodpod.tripod.com/lisence.html">licensed</a> the game to anyone who wants it. He even offers the source code!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="http://4.bp.blogspot.com/-_OQ-KAShWIM/UCcHRM5NnJI/AAAAAAAAAFU/vMXNMNCo79g/s1600/IMG_20120802_210340.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-_OQ-KAShWIM/UCcHRM5NnJI/AAAAAAAAAFU/vMXNMNCo79g/s320/IMG_20120802_210340.jpg" width="238" /></a>So now I have the ROM image, and my next challenge is how to get the data into the computer. Fortunately, I have some raw materials to work with - an old 8k EEPROM, and an ancient cartridge for Personal Finance. I carefully removed the old ROM from the cartridge, and soldered a socket connecter in the same place. Unfortunately, the ROMs used at the time were a 24-pin 2364 variant, and the "modern" device I had was a 28-pin 27C64 with a completely different pinout. With a little <a href="http://www.faime.demon.co.uk/retro/2364.html">searching</a>, I was able to find a pin mapping, and I was able to build an ugly but serviceable wiring harness.<br />
<br />
The next step was how to program the EEPROM. I had an <a href="http://arduino.cc/en/Main/ArduinoBoardUno/">Arduino UNO</a> handy; problem was, it didn't have enough pins to directly address all of the ROM pins. A little discrete logic to build a 18 bit shift register and I was in business. I decided to directly wire the data lines so that I could read the chip (8 pins), used clock and serial out (2 more pins) and still needed 3 more output pins for CE, OE, and WE. I ended up putting OE and WE pins on the shift register, and leaving CE direct. One output pin left over!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-NS9zRSAQJZc/UCcHOU4p74I/AAAAAAAAAFM/whPcU3aGl2I/s1600/IMG_20120802_210328.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-NS9zRSAQJZc/UCcHOU4p74I/AAAAAAAAAFM/whPcU3aGl2I/s320/IMG_20120802_210328.jpg" width="239" /></a></div>
<br />
I wrote a simple Arduino sketch to initialize and to read bytes from the serial line and follow the relevant chip timing to push the bits out. I them wrote a simple Processing sketch to download a binary ROM image to the UNO. The Arduino sketch is below if you're interested in doing something similar, though it's pretty simple code.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
After that, it was just a matter of popping in the chip, plugging in the "cartridge," and turning it on:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Fy5TBkrdKbw/UCcHXDjEB-I/AAAAAAAAAFk/7VcsQu1ym64/s1600/IMG_20120802_210427.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-Fy5TBkrdKbw/UCcHXDjEB-I/AAAAAAAAAFk/7VcsQu1ym64/s320/IMG_20120802_210427.jpg" width="238" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The Arduino sketch: <br />
<br />
const int addrOut = 11;<br />
const int clock = 12;<br />
const int chip_enable = 13;<br />
const int ready = 0; // ANALOG<br />
int value;<br />
<br />
void setup() {<br />
for (int i=2; i <= 13; i++) {<br />
pinMode(i, OUTPUT);<br />
}<br />
<br />
randomSeed(millis());<br />
<br />
digitalWrite(clock, LOW);<br />
digitalWrite(chip_enable, HIGH); // invert logic<br />
<br />
Serial.begin(9600);<br />
}<br />
<br />
unsigned int loadAddr(unsigned int addr, boolean WE, boolean OE) {<br />
unsigned int d = addr;<br />
<br />
d &= 0x1fff;<br />
if (WE)<br />
d |= 0x8000;<br />
if (OE)<br />
d |= 0x4000;<br />
<br />
shiftOut(addrOut, clock, MSBFIRST, (d & 0xff00) >> 8);<br />
shiftOut(addrOut, clock, MSBFIRST, (d & 0x00ff));<br />
}<br />
<br />
void readEeprom() {<br />
unsigned int addr = 0;<br />
byte value;<br />
int pcount;<br />
<br />
for (int i=2; i < 10; i++) {<br />
pinMode(i, INPUT);<br />
}<br />
<br />
pcount = 0;<br />
while (addr <= 0x1fff) {<br />
value = 0;<br />
if (pcount == 0) {<br />
Serial.print("\nAddress: ");<br />
Serial.print(addr, 16);<br />
Serial.print(" : ");<br />
}<br />
loadAddr(addr, true, false);<br />
digitalWrite(chip_enable, LOW);<br />
for (int i=0; i < 8; i++) {<br />
value |= (digitalRead(i+2) << i);<br />
}<br />
<br />
Serial.print(value, 16);<br />
addr++;<br />
pcount = (pcount+1) % 16;<br />
digitalWrite(chip_enable, HIGH);<br />
}<br />
}<br />
void chipClear() {<br />
loadAddr(0, true, true);<br />
digitalWrite(chip_enable, LOW);<br />
loadAddr(0, false, true);<br />
delay(10);<br />
loadAddr(0, true, true);<br />
digitalWrite(chip_enable, HIGH);<br />
}<br />
<br />
void writeByte(unsigned int addr, byte b) {<br />
for (int i=2; i < 10; i++) {<br />
pinMode(i, OUTPUT);<br />
}<br />
loadAddr(addr, false, true);<br />
digitalWrite(chip_enable, LOW);<br />
for (int i=0; i < 8; i++) {<br />
if (b & (1 << i))<br />
digitalWrite(i+2, HIGH);<br />
else<br />
digitalWrite(i+2, LOW);<br />
}<br />
digitalWrite(chip_enable, HIGH);<br />
loadAddr(addr, true, true);<br />
}<br />
<br />
void loop() {<br />
while ((value = Serial.read()) == -1);<br />
if (value == 'w') {<br />
for (int i=0; i < 8*1024; i++) {<br />
while (Serial.available() == 0);<br />
value = Serial.read();<br />
writeByte(i, value);<br />
Serial.write(value);<br />
}<br />
} else {<br />
Serial.println("got something else!");<br />
}<br />
}<br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-14910311390450359752012-07-12T19:16:00.001-04:002012-07-12T19:16:23.436-04:00Social Work Android App<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-_PmP8o8hgpo/T_9ZJCDY0gI/AAAAAAAAAE4/ZH9aa8AIdB0/s1600/device-2012-07-12-153911.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-cjiYhO_vzN0/T_9ZJTSZD7I/AAAAAAAAAFA/kEFZoQXljk4/s1600/device-2012-07-12-154008.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-cjiYhO_vzN0/T_9ZJTSZD7I/AAAAAAAAAFA/kEFZoQXljk4/s320/device-2012-07-12-154008.png" width="179" /></a></div>
I've been working with some folks at the University at Buffalo <a href="http://www.socialwork.buffalo.edu/">School of Social Work</a> to develop a feed reader that's tailored to the needs of social work professionals. The app itself is built using a nice Android library called <a href="http://code.google.com/p/feedgoal/">FeedGoal</a>, and with a little tweaking we're adding channels that the school will manage to relate to various activities within the school and the disciplines. Still a work in progress, but the app is up on <a href="https://play.google.com/store/apps/details?id=org.csgeeks.socialwork">Google Play</a> for testing.<br />
<br />
I'm also working on my todo list of bug fixes and enhancements for TinyG for Android. In particular, I'd like to do a couple of behind the scenes things to make it more robust in the face of various status changes by moving the persistent objects into their own fragment. I don't know if that's going to work, but we'll see. I'm also planning to make it preserve the download filename between screen changes and app restarts, integrating a simplified file browser instead of using the openintents model, improving the throughput of the downloads, and a few other things.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-17517480239648681692012-06-18T12:37:00.001-04:002012-06-18T12:37:14.703-04:00Musical instrument CNC project<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Hm7Rdwz0cDo/T99W9Qc6bqI/AAAAAAAAAEY/dpJchlanq8s/s1600/IMG_20120614_194554.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="239" src="http://4.bp.blogspot.com/-Hm7Rdwz0cDo/T99W9Qc6bqI/AAAAAAAAAEY/dpJchlanq8s/s320/IMG_20120614_194554.jpg" width="320" /></a></div>
I'm taking a break from the Android app for a bit. It's now to the point where it is functional, and before I go back and fix some of the little bugs, I want to play with it. This will likely also identify a few more features I'll want to add.<br />
<br />
So now I'm working on different CAD/CAM options. The one that seems the most promising (but not the cheapest) is <a href="http://www.rhino3d.com/">Rhinoceros</a> and <a href="http://www.cambam.info/">CamBam</a>. Through educational discounts I can get Rhino for $195, but it's still a good chunk of change. CamBam and $149 isn't cheap either. As a software guy, I know I don't want to reimplement Rhino, but for the feature set I need, CamBam might not be necessary. Other options are PyCAM and HeeksCAM on the free end.<br />
<br />
To help make things clearer, I've been using Rhino in eval mode to develop 3D models of objects, and then exporting the profile information for use in the CAM systems. With CamBam, I find that unless I want to do a simple 3D profile, I end up redrawing some of the features (for example, to build a pocket or for a 2D profile). I suspect this is just my lack of experience. I'm spending most of my time in Rhino, since I'm pretty much sold on using it for CAD.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-M_OC5M4OF4U/T99W-xvPaMI/AAAAAAAAAEo/OAXifgUPBGM/s1600/IMG_20120614_200024.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-M_OC5M4OF4U/T99W-xvPaMI/AAAAAAAAAEo/OAXifgUPBGM/s320/IMG_20120614_200024.jpg" width="239" /></a></div>
For a simple test, I did a small layout similar to a cake with a domed top, with a small sphere centered on the apex. I dumped that as an STL, and then generated gcode for a full 3D profile. This picture is really early in the cycle, but you can see the top surface being cut out, and the small bump that will become the sphere. I terminated it after it got about 25k out of the 30k lines in the gcode, but if I left it to run it would have cut around the entire edge. CamBam supports the use of tabs in this case, but I didn't use it.<br />
<br />
Next I'm in the process of designing the solid body banjo and a neck. I have the body layout I want, and no I'm working on the neck heel profile that I want to fit it. I'm going to spend some more time with CamBam to see if there are clever ways to have it only do a profile cutout along the edge of the body, since the top surface is completely flat. Using a 3D profile requires a lot of traverses that are incredibly inefficient. I expect there's a way to do it.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-71315095140288595122012-06-07T13:01:00.003-04:002012-06-07T13:01:33.160-04:00TinyG for Android v1.3I've published a new version of both <a href="https://play.google.com/store/apps/details?id=org.csgeeks.TinyG">TinyG for Android</a> and <a href="https://play.google.com/store/apps/details?id=org.csgeeks.TinyG.USB">TinyG for Android USB Service</a>. This version cleans up the UI in a huge way, adds much better error checking/notification, and support for gcode downloads. I'll put up a new video when I have a few minutes, but I was able to use this version to do some real routing last week. It went through a small (660 line) gcode file without any troubles at all, and I expect it will work with arbitrarily large files since it operates a line at a time.<br />
<br />
Let me know if you have any suggestions for improvements. I have a few in the hopper (long press for a continuous jog for example), but I'm going to be working on CAD designs and bug fixes for a while. I'm starting to design my solid body banjo prototype. More on that soon too.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-75162391786851819502012-06-01T18:18:00.001-04:002012-06-01T18:18:27.271-04:00TinyG for Android updatesI'm making good progress on adding some new features, including support for gcode file downloads. I'm spending a fair amount of time changing the UI to make better use of a tablet-size display where available. To avoid a lot of duplicated code, this means expanding on the use of Fragments, and moving as much code as possible within them or related support libraries.<br />
<br />
I'm also continuing to look at gcode generation options. So far, CamBam seems to be the most reliable option, but I'm also still trying out HeeksCAM.<br />
<br />
Another video when I have time to put together a real demo.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-7420433084983008232012-05-21T23:23:00.002-04:002012-05-21T23:23:48.330-04:00New TinyG for Android app demoI worked out a few kinks in the app so that it's more robust in the face of bad data, and published a new demo up on youtube. This demo walks through all of the current features, including connecting through both the USB and network services and looking at the system configuration.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Ym3K71dbbVw?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
As I mentioned in an earlier post, I'm working on adding additional support for tablet-sized displays and file upload. In the meantime however, you can go over to <a href="https://github.com/mattstock">my github page</a> to pull down the latest source, and you can get the main app from <a href="https://play.google.com/store/apps/details?id=org.csgeeks.TinyG">Google Play</a>.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2517418942934592052.post-3720918249706145442012-05-19T23:08:00.001-04:002012-05-19T23:21:11.141-04:00USB is working!I spent some time digging through <a href="http://www.intra2net.com/en/developer/libftdi/">libftdi</a>, and was able to get USB serial IO to work! I had a problem sending gcode initially, but it turns out that I wasn't using the Message class correctly for inter-process IO. Instead of handing the String to the Message directly, I needed to add it as a bundle:<br />
<br />
<pre class="java" name="code">public void send_gcode(String gcode) {
if (messenger == null)
return;
Message msg = Message.obtain(null, TinyGDriver.GCODE, 0, 0, null);
Bundle b = new Bundle();
b.putString("gcode", gcode);
msg.setData(b);
try {
messenger.send(msg);
} catch (RemoteException e) {
e.printStackTrace();
}
}</pre>
<br />
So now all of the controls work via USB as well as through the network! If you're interested in trying these out but don't have an Android development environment, I've placed packages for both the <a href="https://github.com/mattstock/android-tinyg-usb/downloads">USB Service module</a> and the <a href="https://github.com/mattstock/android-tinyg/downloads">TinyG for Android app</a> up on my <a href="https://github.com/mattstock">github</a> site.<br />
<br />
I'm working out a few kinks still, but the packages do seem to be useable. The most important thing to note is that if you want to use the USB module, you need to select USB under Settings in the TinyG menu, but then exit the application. I need to find a way to signal to main Activity when a preference has changed so that I can reset the Service binding, and I haven't found it yet. Another point to be aware of is the USB permissions model on Android. When you try to connect to USB, it will prompt you to make sure it's ok that the app does so. It seems to be able to save this preference, but that doesn't seem to be reliable for me.<br />
<br />
Now that the framework is all set, I can spend some time adding additional features, such as tablet-friendly layouts, and a gcode uploader.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-15914179904059483282012-05-15T14:10:00.001-04:002012-05-15T23:14:59.444-04:00More TinyG Android app workI've been spending the past couple of weeks refactoring a lot of the existing code. The network driver worked, but it relied on the bound Android service running in the same process so that it could access member functions. While I can make that assumption for the network driver, my ultimate goal is to support USB host-connected devices, and that requires Android 3.1 or greater. I didn't want to limit the use of the app for that one feature, and so I chose to isolate the USB code to a separate app. The USB driver would have a service with the same API as the network driver, making it easy to change which was in use without a lot of code changes.<br />
<br />
I needed to find a better way to have the activities communicate with the service (either USB or network) that was connected to the TinyG. This communication needed to be bidirectional, and needed to work for multiple activities (screens). What I settled on was using a <a href="http://developer.android.com/guide/topics/fundamentals/bound-services.html#Messenger">Messenger</a> to send commands to the service (asking for data, connect, disconnect, etc), and using <a href="http://developer.android.com/guide/topics/intents/intents-filters.html">broadcast intents</a> to send messages from the service to one or more listening activities. This seems to give the most flexibility without a lot of effort. An alternative to the broadcasts would have been client messengers registered on the service end, but it seems like that's a lot of work for little gain.<br />
<br />
To make more of the code reusable, I now have three projects on Github. The main application is <a href="https://github.com/mattstock/android-tinyg">android-tinyg</a>, and it contains most of the activities and preference code for the application. <a href="https://github.com/mattstock/android-tinyg-usb">android-tinyg-usb</a> is a skeleton for the USB code, and requires API level 12 or higher. Both of these rely on code in <a href="https://github.com/mattstock/android-tinyg-support">android-tinyg-support</a>, which has the majority of the JSON parsing, messaging constants, and related items. The TinyGDriver class is an abstraction for both the network and USB drivers, which subclass it.<br />
<br />
I'm done with the refactoring, and it looks like the new code works as expected. I hope to have a longer demo from my tablet up soon using the new code, and to have a prepackaged apk up on the site and Google Play soon after.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-6425569540234958972012-04-27T19:08:00.001-04:002012-05-19T22:58:50.941-04:00Android CNC App<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/HGICVsXBy2w?feature=player_embedded' frameborder='0'></iframe>I got the whole toolchain working today! Android app to <a href="https://github.com/synthetos/tgFX">tgFX</a>, to <a href="http://www.synthetos.com/wiki/index.php?title=Projects:TinyG">TinyG</a>, to JGRO CNC. See the video for a sense of how it currently works. I hope to have the configuration settings exposed to the UI tonight, so that you don't have to edit the code to change the link to the server.<br />
<br />
While the current version relies on tgFX to talk to the hardware (TinyG), that isn't strictly necessary. I put together a simple serial to network java program which will serve a similar purpose. I may put that up on github soon too.<br />
<br />
Once I get the basics working fairly well, I'll move on to phase 2, which is using my ICS tablet to talk directly to the TinyG vis host USB support. That will be very nice, and will get me to my main goal - use of the CNC system without a PC being required.<br />
<br />
The write code is fairly pedestrian, but the read code from the network took a little work to sort out. I'm using an AsyncTask to do the blocking reads, and after each line it parses the JSON and updates the necessary state info.
<br />
<pre class="java" name="code">
private class ListenerTask extends AsyncTask<inputstream, string,="" void=""> {
@Override
protected Void doInBackground(InputStream... params) {
byte[] buffer = new byte[1024];
InputStream is = params[0];
int b;
int idx=0;
try {
while (!isCancelled()) {
if ((b = is.read()) == -1) {
break;
}
buffer[idx++] = (byte) b;
if (b == '\n') {
publishProgress(new String(buffer,0,idx));
idx = 0;
}
}
} catch (IOException e) {
Log.e(TAG, "listener read: " + e.getMessage());
}
return null;
}
@Override
protected void onProgressUpdate(String... values) {
if (values.length > 0) {
Log.i(TAG, "onProgressUpdate: " + values[0].length() + " bytes received.");
if (machine.processJSON(values[0])) {
((TextView)findViewById(R.id.xloc)).setText(Double.toString(machine.getX()));
((TextView)findViewById(R.id.yloc)).setText(Double.toString(machine.getY()));
((TextView)findViewById(R.id.zloc)).setText(Double.toString(machine.getZ()));
}
}
}
@Override
protected void onCancelled() {
Log.i(TAG, "ListenerTask cancelled");
mConnect.setVisibility(View.VISIBLE);
}
}
</inputstream,></pre>Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-33883147448356603132012-04-26T08:53:00.004-04:002012-04-26T08:54:22.853-04:00Android CNC code publishedI finally setup a github repo for my CNC jogger application. It's still very much a work in progress, but it's working! I'm going to be spending some time adding some configuration controls next, and hope to have some additional features and a better control layout by the end of the week.<br />
<br />
Code is in <a href="https://github.com/mattstock">Github</a>. Will post a video of the whole things working on Friday!<br />
<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-7220493536469506542012-04-12T13:11:00.001-04:002012-04-17T10:43:30.652-04:00Android CNC Controller ProgressI'm making progress.<br />
<br />
I've been discussing some of the controller options with the guys at <a href="http://www.synthetos.com/">Synthetos</a>, looking for smart ways to collaborate. Riley is working on a GUI called <a href="https://github.com/synthetos/tgFX">tgFX</a>, and while it doesn't meet my needs, I didn't want to duplicate a lot of work either. The outcome of that discussion means I've added one large new feature to the project, which is the ability to talk to TinyG via the network in addition to direct USB. tgFX has a network port that it is happy to use as a network to serial gateway, and I've written a simple java program which does the same job without all of the GUI-ness. What this means is that I've been able to spend more of my time recently working out the architecture in my app and less on the specifics of handling USB host on Android.<br />
<br />
At the moment, I have a basic jog interface on the Android, and it is able to connect, get status information from the network port, and send commands. Still left to do is to have the jog buttons actually send the right commands (easy enough now that I have the basic messaging working) and to have the status information from the device update the axis information/state on the device. Hopefully it will all be up and working in the next few days.<br />
<br />
I will have code posted up soon.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-87984944745048381402012-03-31T17:10:00.001-04:002012-04-17T10:43:15.479-04:00Android tablet as CNC controllerIt's been a while since my last post, and wanted to provide an update on my software exploits this month. Lots of trial and error, but only limited progress. I spent a couple of weeks trying to get the Chumby to work as a CNC controller. I actually got it talking with the TinyG unit, had status data, used the touchscreen, etc, but I decided that to move it further would be counterproductive.<br />
<br />
The first problem was the particular Chumby I was using - it seems to have a problem with the power regulator or the power connector, since it flakes out when the cable is moved around even a small amount. After trying a few different ways to try to feed the thing power, I decided it was going to be dicey. The other reason is the age of the Chumby internals - the ARM system it is using is old enough where many of the tools I wanted to use were simply not available. I could get a version of java for example, but the standard Oracle JRE wouldn't work because it was ARM v7. To top it all off, since the Chumby doesn't have any native framebuffer libraries, I ended up spending more time than I wanted simply developing methods to write to the raw framebuffer.<br />
<br />
It's been a LONG time since I've implemented a line drawing algorithm. Or writing out a bitmapped font one bit at a time. Or double buffering.<br />
<br />
So for all of these reasons, I've dropped the Chumby.<br />
<br />
I do have a backup plan however, and that's to use my <a href="http://www.viewsonic.com/gtablet/">Viewsonic Gtablet</a>. It's a great little Android-based unit. It's bigger than the Chumby, which for my purposes is fine. With the help of the clever people at <a href="http://teamdrh.com/">Team DRH</a>, I have Android "Ice Cream Sandwich" installed, and the kernel understands USB serial IO! While I have started to work on a UI and plan to use the Java RXTX serial communication classes, I may find a way to team up with the Synthetos folks with the UI system. It's JavaFX-based, which isn't available on Android so far as I can see. Hopefully I'll know more soon.<br />
<br />
If an Android-based CNC controller is of interest to you, please let me know!Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-12817216980743440542012-03-11T13:37:00.001-04:002012-04-14T23:12:46.939-04:00Chumby One as CNC controllerWell, after a fair bit of fussing to get a decent development environment setup, I finally have the start to my Chumby CNC controller. So far I only have the manual jog and status screens done, but I expect I'll soon put together a basic gcode streamer to go along with it. Since I know the audience for this particular mod is fairly small, I'm going to talk in general terms about what I did. If you want source or have additional questions, please comment.<br />
<br />
First, I selected the Chumby for a few reasons, not the least of which is because it was handy. It runs Linux and has a fairly complete development system. It also has a nice 3" LCD touchscreen that I wanted to take advantage of and wireless connectivity to the rest of my house. It runs off of 5v, so I plan to wire it directly to the same supply as the TinyG when I'm done.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-svNMK99BXzo/T1zgn7sh4lI/AAAAAAAAALw/ish8Exb6WeM/s1600/menu1.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://4.bp.blogspot.com/-svNMK99BXzo/T1zgn7sh4lI/AAAAAAAAALw/ish8Exb6WeM/s1600/menu1.png" /></a></div>
I generated a fairly simple control panel using Inkscape. I then took the coordinates for the various button boxes, and defined them in my program to spit out the button release when the touchscreen is pressed. The touchscreen is accessed via the Linux input event system, and so most of this is fairly standard and easily portable.<br />
<br />
Since the program has to pay attention to events from the TinyG as well as the touchscreen, I'm using select() to block until something is ready and then do the necessary read and parse. I'm using Perl since that's my programming language of choice after years of sysadmin work, and so I was also able to use the JSON parser module to read the status into from the TinyG. At the moment, the status output is just being written to standard out, but the next step is to write code to push text out to the yellow status info box. Since I have to drive the framebuffer directly, I wanted to wait until I had some of the basics working first.<br />
<br />
An issue I've run into with the TinyG is that it will happily take (and echo) input while it is in the process of moving and dumping out status info. That seems to make the parser pretty unhappy. I'm going to try to shut off character echo on the TinyG end and see if that addresses the issue.<br />
<br />
I'm also working to parse the output of ? on startup, so that I can initialize the program's understanding of the coordinates correctly. Still debugging that part.<br />
<br />
At the moment, the jog and update steps seems to be working fairly well, as long as you don't press the buttons too quickly in sequence. Hoping the echo takes care of that.<br />
<br />
I have a USB joystick... I wonder if I should try to make that a jog input as well...<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-27230992179485476852012-03-04T23:17:00.005-05:002012-04-14T23:12:46.942-04:00Success!Had some time today, and so I finished putting together the bed support and worked on tramming the bed and aligning all of the axis. I still need to work on the Z, however I was able to get the X and Y square to the bed within about .03" which isn't too bad. To do the alignment, I clamped a small bit of steel to my toolhead, and then attached a magnetic base dial indicator. As I moved the X and Y position, the dial indicator swept the bed, and I was able to watch for height fluctuations. Picture forthcoming.<br />
<br />
I'm going to write some test G code to help ensure that the X and Y are perpendicular later this week. it should be fairly easy to draw a couple of lines and measure with a square. For Z, I'm going to use a square relative to the tool frame. Since I know the bed is good, that should be a fairly simple solution.<br />
<br />
I'm working on a better loading solution for the G code. Since all TinyG needs is to have a streaming program that knows software flow control (Xon/Xoff), there's really no need to have a full-blown PC attached to the unit when milling. Since I'd rather not burn the workspace space (and power) if I don't have to, I've been thinking about other options. I've decided to take a Chumby One that I had lying around and use it as the serial link to the TinyG. At the moment, I have minicom running on the Chumby, and I'm feeding it instructions manually. My hope is to write a simple menu and status program to take advantage of the Chumby color LCD touchscreen, rotary encoder and button.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-58056743428001491262012-03-03T22:37:00.000-05:002012-04-14T23:13:36.894-04:00First test of CNC plotter<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-H76pU3XcVSM/T1LhCrrU7AI/AAAAAAAAALg/T9a1sZyKnRk/s1600/CIMG1199.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-H76pU3XcVSM/T1LhCrrU7AI/AAAAAAAAALg/T9a1sZyKnRk/s320/CIMG1199.JPG" width="320" /></a></div>
Pretty exciting today, since I was able to get the system functioning for the first time. Since I haven't decided what kind of cutting head I want to use, and I haven't finished all of the alignment steps, I wanted to start with a simple 2d plotter test. I mocked up a simple pen holder, and put a handy whiteboard grid I had on the bed to use as a worksurface.<br />
<br />
<a href="http://3.bp.blogspot.com/-up6eYSkR3GE/T1Lg3nz9YQI/AAAAAAAAALQ/Z63MzDXakWg/s1600/CIMG1197.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-up6eYSkR3GE/T1Lg3nz9YQI/AAAAAAAAALQ/Z63MzDXakWg/s320/CIMG1197.JPG" width="320" /></a>I decided to use <a href="http://inkscape.org/">Inkscape</a>, and to treat the plotter head as an engraver. Inkscape has a nice extension called <a href="http://cnc-club.ru/forum/viewtopic.php?f=33&t=35">Gcodetools</a> that will allow you to export paths to G-code. I used the text function to type a few simple words in, broke them down into paths, and exported the file. I used the serial terminal I had on my Ubuntu test system to send the file to the TinyG board. After a couple of issues tweaking the feed rates, homing the pen, and inverting the X axis, I was able to get a pretty nice first result!<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Hc-pT_DxsZw/T1Lg9ZNuVVI/AAAAAAAAALY/ZbIfUso7Z14/s1600/CIMG1198.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-Hc-pT_DxsZw/T1Lg9ZNuVVI/AAAAAAAAALY/ZbIfUso7Z14/s320/CIMG1198.JPG" width="320" /></a></div>
<br />
I still have several small tweaks to do to the system, including tramming, getting the bed support attached to the bed, routing the hold down channels, and bolting/screwing the base to the sides. Right now I'm just using a couple of pipe clamps to hold everything in alignment as I tweaked various things. I'm pretty surprised about the amount of parallelism I have even without tramming - the pen didn't really drift much.<br />
<br />
<a href="http://1.bp.blogspot.com/-6ttV3ctO8dQ/T1LhJSGwQMI/AAAAAAAAALo/8gHZxJ6Huxo/s1600/CIMG1200.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-6ttV3ctO8dQ/T1LhJSGwQMI/AAAAAAAAALo/8gHZxJ6Huxo/s320/CIMG1200.JPG" width="320" /></a><br />
I also don't seem to have any issues with backlash or overheating, at least for now. I rewired all of the steppers to be in parallel mode, which theoretically draws 2.8A, over the 2.5A the tinyG drivers can support. I should be able to manage that using the current pots on the board however, and even in my current configuration I see the benefit. I'm looking to get another power supply from Jameco, which I think will also allow me to run at higher seek rates - right now I'm running about 225 mm/min max.<br />
<br />
Before I move on, I'm going to play with this setup for a bit. I believe I can take a photo, run some edge detection, then have Inkscpae build me a vector path to plot the image.Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-55743795609609533082012-03-01T12:30:00.001-05:002012-04-14T23:13:56.032-04:00TinyG UpdateNow that I have a working TinyG and enough of a platform for some basic tests, I've started to think more about the software side of things. I chose the TinyG because I liked the idea of making the device smarter - a lot of designs rely on software packages on a PC like <a href="http://www.machsupport.com/">Mach 3</a> to do all of the low-level pulse timing, interacting with the hardware and stepper controllers using parallel port breakout boards, etc. I'm sure it works well and is quite modular, but it doesn't take into account the huge advances in microcontrollers over the past decade or so. Since I have a background in computing and electronics as well as a fully stocked machine shop, I don't feel bad about trying something a little out of the norm.<br />
<br />
The other reason I thought it would be nice to try TinyG is that, at some point, I want to convert my existing manual metal lathe to CNC. The spindle control capability that is being developed for TinyG looks like it could be useful.<br />
<br />
<a href="http://1.bp.blogspot.com/-BtyEQJfiYOM/T1A3342wHII/AAAAAAAAALA/KL-alNop_fo/s1600/CIMG1194.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-BtyEQJfiYOM/T1A3342wHII/AAAAAAAAALA/KL-alNop_fo/s320/CIMG1194.JPG" width="320" /></a>So I pulled enough parts out of the scrap bin to build a fairly nice Ubuntu CNC computer, which I've connected to TinyG via USB. The PC and TinyG are currently sharing a beefy PC power supply, however I think I'm going to split those up once I find another junk supply. It seems to work just fine, but I don't know how the supply will behave with "high" current motor loads - if it introduces ripple, it might annoy the CPU which also uses the 12V supply.<br />
<br />
For a toolchain, I'm thinking of using <a href="http://pycam.sourceforge.net/">PyCAM</a> and/or <a href="http://replicat.org/generators">Skeinforge</a> to generate G code, and <a href="http://inkscape.org/">Inkscape</a> and <a href="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Main_Page">FreeCAD</a> to generate the appropriate STL or other files. I'm going to give the free software a good shot before I start looking at commercial packages, but things like <a href="http://www.cambam.info/">CamBam</a> are viable alternatives if the free stuff doesn't suit my needs.<br />
<br />
Since there doesn't appear to be any really good software for talking to TinyG, handling status information and uploading G code, I might write something up. If you know of something, let me know in a comment. I saw someone who used the status info to graphically draw the tool path as output from TinyG, and that would be a great place to start - if I can find it again!<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-3124278234525265762012-03-01T12:12:00.001-05:002012-04-14T23:13:36.888-04:00JGRO CNC ProgressThe first unit I got from Synthetos was defective in some way - we couldn't figure out why. They were very gracious about sending me a replacement. The new unit is working well in my test config.<br />
<br />
I'm about 90% complete with my JGRO-based CNC router. I have the entire gantry setup done, the motors and leadscrews for the Z and X axes are complete, and the ends of the Y axis are built, etc. I needed to take a break for a bit to rearrange my shop so I had room for the completed unit, and I took the time to build a table for it to sit on. It's the details that take all the time!<br />
<br />
<br />
<a href="http://3.bp.blogspot.com/-CK-uLT3U6z0/T1A2Z-65YwI/AAAAAAAAAKg/MUFOp4gLNbQ/s1600/CIMG1190.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-CK-uLT3U6z0/T1A2Z-65YwI/AAAAAAAAAKg/MUFOp4gLNbQ/s320/CIMG1190.JPG" width="320" /></a><a href="http://1.bp.blogspot.com/-tPT7d9VYGGU/T1A2fx0LRMI/AAAAAAAAAKo/lBCPShv0x8g/s1600/CIMG1191.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-tPT7d9VYGGU/T1A2fx0LRMI/AAAAAAAAAKo/lBCPShv0x8g/s320/CIMG1191.JPG" width="320" /></a>So tonight I'm going to get the rough alignment of the Y axis going. My initial assessment indicates that there might be something wrong with my guides on the gantry, since there seems to be a significant gap on part of the bearing assembly. I took the time to level the table, and then used that to ensure that the Y axis pipes were level and fairly close to alignment, and since I have a fairly big gap I have to assume it's a goof somewhere else.<br />
<br />
<br />
Another thing I learned while working on this is that since I subbed out a lot of the MDF for birch plywood, that small fractional dimension difference is starting to matter in a few critical areas. 3/4" MDF is just that. 3/4" plywood is typically 1/32" or so thinner. In the case of the gantry width, the design has you stack 6 pieces together (bearing block, gantry side, corner block for each side), and so that small difference starts to add up. I suspect I'll want to redrill the Y axis pipe guide holes so that I have more alignment space.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-JVfdJPnz7f4/T1A3gJwKzUI/AAAAAAAAAK4/ksh23IlGriY/s1600/CIMG1165.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-JVfdJPnz7f4/T1A3gJwKzUI/AAAAAAAAAK4/ksh23IlGriY/s320/CIMG1165.JPG" width="320" /></a></div>
I've been taking pictures here and there, but I haven't been particularly good about uploading them, since at the moment I think this blog is mostly a diary for myself. Here are a couple of older shots as I was putting together the alignment blocks and bearing assemblies. You can see I was using layout fluid and taking advantage of the fact I have some decent layout and metalworking tools. <br />
<br />
<br />
<br />
<br />
I still need to figure out what kind of router I'm going to start with and build an appropriate mount. I think for my initial testing and tramming I'm going to build a pen mount, making this an extremely overdesigned plotter.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-10191923946471425472012-02-17T09:05:00.000-05:002012-04-14T23:13:56.029-04:00TinyGGot the TinyG, but I'm having some problems getting it to talk to all of the axis. Hopefully I'll be able to work it out with the guy who did the design. I also got the 3 steppers, and I'm in the process of building a wiring harness. I plan to make my own shaft couplers, and it looks like I'll need to space the motors off at least the Z axis for clearance with the axis trim bolts.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-69143988804207326412012-02-12T08:50:00.000-05:002012-04-14T23:13:36.897-04:00CNC Build StatusI've got all of the parts cut, and I'm in the process of building it from the Z axis out. Z axis is done with the exception of the lead screw, which I'm waiting on the motors to complete. I've got most of the carriage for the X axis complete as well, but need to do some final assembly. The X axis gantry is next. Pictures soon, really.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0tag:blogger.com,1999:blog-2517418942934592052.post-50267825119269254852012-02-12T08:48:00.000-05:002012-04-14T23:13:36.892-04:00CNC Router 2I think I mentioned in the last post that I'm building off of the JGRO CNC design. For my initial try, I'm replacing the alignment blocks with aluminum. I'm also looking at potentially replacing the lead screws, but that will likely wait until I've assembled things and tinkered with the design a bit more.<br />
<br />
The biggest changes are related to the electronics and software. I just got a <a href="http://www.synthetos.com/wiki/index.php?title=Projects:TinyG">Tiny G</a> and I'm waiting on some NEMA 23 motors from <a href="http://buildyourcnc.com/">http://buildyourcnc.com/</a>. I'm planning to drive these from an old PC power supply I've got - I may need to get a second one depending on the overall power requirements. Right now I'm looking at different CAM and CAD systems that will work well with GRBL.<br />
<br />Matt Stockhttp://www.blogger.com/profile/12074245606694215260noreply@blogger.com0