Main Content RSS FeedLatest Entry

Boardtools v0.8 (FINALLY!)

I have finally gotten around to cleaning up the script I use to generate gcode from Kicad and engraving files. (Since someone finally commented on it and asked for the new version)
I have completely re-written it and added a bunch of new settings. It is now one huge script instead of several smaller ones and has grown nearly 3 time the size (over 3600 lines!)
There is a quick README and crude INSTRUCTIONS included to help explain the changes and how it works.
It is not fully tested by any means, I still keep finding, changing, and correcting things, but I ‘think’ it is user friendly enough for others to find useful.
Many of the changes and setting were done so it would work with the new mill I have and are a bit specific to it, but they may be useful in other ways as well and generally made it more flexible and capable.
If you are one of the silent few who used the first version, your config files will probably not work as there are new setting that will be missing and a few renamed. You can open them in a text editor and figure out what your old settings were.
There are a lot of things it can do that I haven’t documented well, but the basic instructions should get you going. If one of the settings is not clear, please ask and I will try to explain what it is for. Some may simply not make sense for your application.
Please, if you give it a try and find it useful, or not, or find a bug, PLEASE let me know. If it is a ‘bug’ and not a ‘feature’ :) I may try and fix it. If you have a reasonable request I think would be useful, I may try to add it in. I wrote this for my own use, and it does what I want, but you may think of something I would like it to do in the future.

Download: boardtools-08.tar.gz

Number of View :24289

Recent Entries

Tick, tick, tick…

My, how time flies.

I need to catch up on a bunch of stuff soon.

  • First, I have started building custom K-Cup holders called the Kupousel. Please check them out.
  • I have spent a lot of time with my “new” CNC’ed X2 Mini-Mill. Lots of mods and stuff I hope to post about.
  • Sill making Tonal Insanity effects pedals. The mill is helping with them. Started using surface mounted components.
  • Got my hands on some Arduino knock-offs and been using them to develop other AVR stuff.
  • Built an SMD reflow oven from a toaster oven and a ATmega for a PID control.
  • Built (cobbled together) a new spindle for my old router when the Roto-Zip started to give out. It also has less run out so I can route PC board directly now, even SMD stuff.
  • Completely re-written my Board Tools program with even more options, partly to take advantage of the new spindle and mill.
  • Will be re-re-re-building the rain barrel yet again this year. Last year I tested a control using a pico-power ATtiny13a AVR. Worked well, needs a bit of fine tuning. Main reason for rebuild is the barrel cracked, I moved the garden, and I dropped the solar panel at the end of last year and broke it. :(
  • Building my daughter a loft bed – out of an old desk.
  • Rebuilt my MythTV system and got in a fight with the stupid cable box that uses XMP IR protocol. (on going)
  • Oh! It has been so long I never mentioned my new main computer: 8-core! AMD “Bulldozer” FX-8120, liquid cooled,  msi 970A-G46, 16GB RAM, 1TB HD, Bu-ray burner, 23″ wide screen monitor, running Fedora 19 (20 soon). It F…’IN SCREAMS! Built Android (for A10) complete from source in a few hours! That  was why I got it thrown in on a job to modify a Mele A2000 STB into a network/web based, Scent Palette controller. Builds MythTV in about 10 minutes.

Hopefully I will add more info in less than the next 2 years! :)

Number of View :7438

Blast from the past: PPLOG mods

I formerly used PPLOG for my BLOG. It was small, fast and fun, but was a bit buggy and I wanted to try some thing more “professional”.

Funny thing is it is still accessible and someone just asked for the changes I made in it, so here is the hacked up version:  (Use Save As)

Number of View :4847

Testing a New Blog! – WordPress

Testing out a new blog.

Number of View :6286

PC Board Tools

Here are the scripts I use to convert PC boards from Kicad to G-code.
This is the README included for information.

README 03/28/20012

Tested with LinuxCNC 2.6.0~pre and KiCad (2012-01-19 BZR3256)-stable and
    pcb2gcode 1.1.4


Files included in boardtools directory:                    GUI front end for pcbbatch                 Batch file to run all programs using config file              Default config file     Modified command line version            Modified command line version              For optimizing drill files               For optimizing paths
demo                        Directory with sample Kicad layout, gerbers, and
                            sample for testing

pcb2gcode installed on system
EMC2/LinuxCNC 2.5+

opti  (from Etch_Z_adjust)  Untested, I have not used it, not included

-Quick and dirty:
For GUI, from boardtools directory run:


    You will probably need to run at least once to verify default
    file paths. Save defaults to in installed directory.

To try demo:
    Click "Load boardcfg"
    Open the demo directory and choose
    Click "Default Paths" and set to the correct locations.
    Click on "Browse" under "Board back" and reselect "demo-Back.gbl"
        to make sure the path is working directory is correct.
        This will automatically set the other files correctly.
    Click "Run boardcfg" (it will automatically ask you to save)
    Check out the generated files!

To run a config file from a project directory:


-The idea:
Generate ready to run g-code files from KiCad for LinuxCNC using one interface.

-The method (how I do it):
Schematic and board layout with KiCad.
    I use the Comment layer for text and draw board outline using actual tool
    path based on the bit I will be using so I can leave gaps to keep boards
    paneled together. (there is an option to use pcb2gcode for outline instead)
Generate gerbers and drill files (4). *Back.gbl, *PCB_Edges.gbr, *Comments.gbr,
    and *.drl
Use pcb2gcode to generate back and drill g-code files.
    * the paths are very "stair-steppy" which I did not like
Use gerber2emc2cl to generate text and outline g-code files.
Join the paths and text together in one file.
Use p2gpathopt to reduce "stair-step", smooth paths, and reduce moves.
    Due crude optimizing.
Use p2gdrillopt to due crude optimizing and optionally use only one drill bit.
Use Etch_Z_adjust (*modified) to do auto-leveling.

-The Solution:
Have a config / batch script to do all this automatically.
    In reality there is a script that is placed in the drawing directory
    that holds the configs ( and calls another script (pcbbatch)
    that does all the hard work. This way boardcfg can be run in place when
    a board is modified without copying main script to each drawing directory.
    All needed settings needed to run are saved in the file.
A GUI to select all the various setting and generate the config file and
    optionally run it.
Config file default name is This can be modified by hand "at own
    risk" if desired, but may break compatibility with GUI. Undocumented.

-What does the work:
    Modified command line version. Added ability to re-run file without
    re-probing. Modified to use a separate probe instead of tool bit, and to
    set tool height automatically.(Must use EMC2/LinuxCNC 2.5+!!!!!! uses G10)
    Modified command line version. Added ability to mirror and offset.
    For optimizing drill files. Allows using only one drill and does crude
    optimizing using Morton number.
    For optimizing paths. Smooths out pcb2gcode paths by finding the midpoint
    of each stair-step, eliminates redundant points creating straight lines
    within a set tolerance. (difference in slope < .001 or about .057 degrees)
    Adds very slight deviations from original, but gives much smoother result.
    You decide.
    Also optimizes based on Morton number.

-Credit where credit is due:
While thoroughly hacked and mangled, my work is based on these previous works.
Both have no copyright/left restrictions in the files.
I likewise put no restrictions other than ask for credit if you use it.
(Please visit

Etch_Z_adjust from michael_m at

gerber2emc2 from SAMMEL Lothar on the LinuxCNC wiki

-Other software:



-Why my settings / method seems weird:
I actually use a coated board and a drag bit to scribe the coating, then drill
    it without removing it from the machine, then etch in FeCl. The scribe
    only needs to be offset .001. The scribe and probe mount off to the side
    of my spindle, that is the reason for the offsets. I also use
    Etch_Z_adjust for engraving other things using a normal engraving bit and
    separate probe which was the original reason for modifying it.
I used the Morton number optimizing method because it was fast and simple and
    better than nothing. I may rewrite the optimizing method later.
This is my first major attempt at Python programming, so it is ugly. It
    started simple, and 1100+ lines of code later.... So don't ask why I did
    something the way I did, the answer you will likely get is
    "Because it worked!"
More info on this and other stuff at
All comments are welcome, but I reserve the right to ignore them!

I can be contacted though

Screen shot of GUI:

Number of View :21544

PC Boards, My Way

I have found a new way of making PC boards.
I start with a bare board.
Place a thin layer of “secret” resistant coating on it.(on a spin coater)
Use my CNC router to “engrave” it with a drag scribe.
With out moving it, drill it and route outline.
Last etch it in ferric chloride.

Now this may seem odd at first. Why not just route the board with the CNC?
Let me try to explain. I have always used the photo resist method with laser transparencies and pre-sensitized boards, etched then drilled. When all goes well, the results are great. The biggest problem has always been getting a good 1 to 1 print from the laser printer. Next problem is lining the board up to drill it, which gets worse if the print was not square or to scale to begin with.
Now, my main reason is I am sorta cheep. I have never bought the right bits to do direct PCB routing. My router does pretty good, but I am just not sure how it would do, and hate to spend money just to break bits. I like the photo method, but bare boards are cheaper. There is also the fact I already have a bubble tank of etchant.
When I first started experimenting with my method I used an old photo board I had. It was a bit old, so I just tossed it in developer with out exposing it to fix the resist first. This worked, but still expensive board and the coating is very fragile and gets scratched during drilling. More on the coating later. Read More..

Number of View :6894

Updates, updates, todo

Now that I got the last post off my chest, I will finally give some updates on what I have been doing.
I will touch on a bunch of stuff here, and give more detailed posts on some later, mostly so I can use this to assemble my thoughts. I will try and be as chronological as I can remember.
-Added a page on the controller used in the rain barrel. (CRAP!!! I just found out it is missing!!! Glitch in PPLOG.* Thank goodness for Google cache.)
-Started designing guitar effects pedals with another guy and going to start selling them.
-Did a bunch of updates to my CNC machine. Updated LinuxCNC (formerly EMC2) and added a camera.
-Repaired an OMIS II digital comparer. Sorta cool.

Read More..

Number of View :4542

In Memory

I have been putting this off for way too long, and the longer I wait, the harder it gets.
A lot of things have happened since the last entry. At the top of the list are some family issues that I have had a hard time dealing with and just not wanted to write about, but need to, to move forward.
In September my sister passed away. Two weeks latter, my mother suddenly passed away as well.
My sister had been fighting cancer for several years and was passed the point of making another come back. While there is nothing good about any of this, we had all tried to prepared for the eventual out come.
My mother as very unexpected. She had Parkinson’s and other age related issues, but was still very active, not much could slow her down for long. She would take an occasional fall as I noted in an earlier post about my wedding, but most were relatively minor with some bad bruises. In fact just before my sisters funeral, she had taken a tumble and banged up her elbow pretty bad. Rather than waiting for someone else, she was trying to carry a play pen upstairs for us to use when we came home. She was then on blood thinners to prevent blood clots from the bruising. About a week and a half latter she got a bad nose bleed that would not stop, so she was taken to the hospital. They got it stopped and took her off the blood thinners while they kept her in the hospital for observation. All seemed fine when she suddenly passed away at night, officially from a heart attach, while still in the hospital. She had everything already planned, for when the day came, she wanted everything donated, then cremated, and simple memorial at the church, no flowers – but donations to cancer or Parkinson’s research, or the church. Apparently, they used everything they could for transplant, even skin. Of course this has to happen quickly, and with living 300 miles away I did not have a chance to see her one last time. When we went home, my other sisters were already dealing with the few necessary arrangements that were left, so I ended up throwing myself into going through decades of photos to put together something to display at the memorial service. Being the youngest of 4, there were a lot of old pictures I had never seen, that showed me my mother as young person I never knew. It was hard, but in ways it seemed like someone else, probably the only thing that kept me from going bat shit and curling up in the corner a blubbering mess. We all were a bit worried about my dad for a while, but he seems to be doing OK, in fact he and my brother-in-law have gotten much closer supporting each other.
I am so glad Mom got to know Zoe for at least a short while, and while she may not remember her Grandma, at least Zoe will have pictures with her to look back at one day and see the joy in her face.
Since then we made it though Christmas and all trying to keep moving forward. With spring coming things all start anew and since Mom loved her flowers and garden, I will be putting more effort into finishing the rain barrel system in her memory.

Number of View :3843

Rain Barrel Controler Design

This is the (current) controller design.

It is very crude and has not been truly “engineered”, but I kept adding bits and trying values until it did what I wanted. Most of the values were chosen from what I had on hand and drove the design.
The circuit accomplishes 3 main functions.
First: Charge the battery with the solar cell.
Second: Turn on the pump at night, run to a set level of water, turn off and not run again until the next night.
Third: Use a moisture probe to prevent running if the ground is wet enough.
The solar cell is used as a light sensor as well as a power source.
Power from the solar cell is fed to a LM317 in a current source mode to supply approximately 125 mA to the 9.6V 1600mAH NiMH battery pack. This provides slightly less than a 10% charge rate based on 10 hours of full sun a day. According to most sources I found, this reasonable charge rate without over charging, since it is time limited by the amount of sun each day and not constant. R19 provides power to supply the electronics while the sun is out, and D10 when dark and running solely from battery.

Read More..

Number of View :8829

More Barrel Progress

It has been sitting for a while and seems to be happy!
Had quite a bit of rain, so the moisture probe has not gotten a real good workout yet, but seems to be working. Somebody flipped a switch and today it is near 90 with chance of rain tonight. Same for the next few days, so it may get a few good cycles. Been running on the NiMH battery as well and seems to be holding a charge.
Of course, now I need to tear it down and move it to the garden since I need to put a fence up where it is being tested at to keep the little one in. Planning on rebuilding the barrel and reservoir at the same time to be more appealing and sturdy.
Now I just need to plant the garden!

Number of View :4939