Featured image of post handy commands

handy commands

Handy commands and snippets


start a local Hugo server

hugo server -D

create a new documentation week in Hugo

hugo new --kind week-bundle week/week_08

convert all .png’s to jpg, reduce quality to 50% and resize to 800px width. save the result in the ‘converted’ folder \

mogrify -path converted -format jpg -resize 800 -quality 50 *png

convert a single image

convert -format jpg -resize 800 -quality 50 IMG_7589.png converted/IMG_7589.png


use edbg to flash binary

./edbg -ebpv -t samd11 -f sam_ba_SAMD11C14A.bin 

./edbg -b -t samd11 -F w,2:0,7

get an overview of the ports on my machine

ls /dev/tty.*

listen to a serial port

screen /dev/tty.usbmodem11301 9600

get the id of the screen process

lsof | grep usbmodem


PCB milling

Milling traces

Turn on the milling machine. If it starts in View mode, set it to Mill mode. Use the 0.39 bit for this. Carefully place it in the spindle, it breaks easily! Tighten the spindle.

  1. Turn on the machine
  2. Turn on Mods
  3. Before touching anything, scroll in Mods to the Socket connection module and close the socket. Close the port. Open the socket. Open the port. Now Mods and the machine should be aware of each other.
  4. Move the milling head to a place on the board where there is enough space to mill out your PCB. This is done with Mods, by guessing x and y positions and putting these values in the origin fields. Press “Move to origin” and keep adjusting until satisfied.
  5. Level the mill bit: untighten the screw in spindle untill the bit rests on the copper surface. Make sure the bit does not fall onto the surface, direct it with your fingers. Press the copper surface very lightly for the best milling results. Tighten the screw.
  6. Load the traces design into Mods. Check the resolution, it should be 1000dpi.
  7. Click the “Mill Traces” button in the “set PCB defaults (mm)” module in Mods. This copies the settings to the “Mill raster 2D” module
  8. Adjust the settings:
    • Use 0.0025 inches as cut depth (instead of 0.004 inches)
    • Set the speed to 4
  9. Press “Calculate” and inspect the traces outline file
  10. Press “Send File” in the Websocket Serial Module

Milling the outline

For the outline, the process is more or less the same, but with different parameters:

  1. Load the outline file into Mods. This is usually called “interior” even though it creates the outline
  2. Click the “Mill Outline” button in the “set PCB defaults(mm)”
  3. Adjust the settings:
    • Use 1.55mm as MAX depth (instead of 1.82mm) [important:do not change the CUT depth above it ]
  4. Change the bit to 0.8mm
  5. Press “Calculate” and inspect the traces outline file
  6. Press “Send File” in the Websocket Serial Module

KiCad clearance and netclasses settings


  • minimum clearance: 0.4mm
  • minimum track width: 0.3mm (or as low as 0.25mm)
  • copper to hole clearance: 0.4mm
  • copper to edge clearance: 0.4mm

Net Classes

  • clearance: 0.4mm
  • track width: 0.3mm (or as low as 0.25mm)

Using photoshop to post process the outline .svg for Mods

  1. Import the .svg into photoshop
  2. Set the resolution to 1000dpi under Image > Image Size
  3. Add a black background layer
  4. Invert the outline (so it is white)
  5. Fill the outline with white
  6. Optionally import also the traces .svg and invert that layer so the traces show up white against the black background


To start lasercutting, the following steps should be taken:

  1. Turn on the machine, with the switch marked 1 and the button marked 2. Leave the laserhead marked 3 off for now.
  2. Turn on the computer, so that the laserhead can be controlled.
  3. Place the material on the bed and position the laserhead above it
  4. z-level the laserhead. You do this by hand with the wooden z-level tool. Screw the dark ring around the laserhead loose and move it up/down untill it rests on the wooden tool
  5. Load the design into LightBurn, check the location of the start position and do a ‘dry run’
  6. When everything is set up correctly, it is time to turn on the vacuum extractor
  7. Then turn on the laserhead (marked with the number 3)
  8. Start the job

3d printing


The ShopBot at Waag has its X axis along the long side of the machine. This makes for some gotcha’s in setting up the job in for example VCarve.

Job Setup

  • Set the datum position to the bottom left, this corresponds with the corner on the ShopBot where the buttons are
  • Swap width and height as used in the design. So when in Fusion the width is 600mm and the height is 300mm, in VCarve, set it to height 600mm and width 300mm
  • Make sure the units are set to mm
  • Check the Z position. Use top when not milling trough, bottom when milling trough

importing design

  • uncheck the button “Discard data below zero plane”

roughing toolpath

  • If possible select raster over Y axis rather that over X axis, because the head will move over the bridge instead of moving the whole bridge. This is quieter and more steady

  • Machining allowance can be set to 0 when the rough job is going to be the only job

  • A stepover of about 80% is good for the roughing toolpath

finishing toolpath

  • A stepover of 20% or less is good for the finishing toolpath


Before turning on the machine

  • make sure that everything is clean
  • make sure that there is nothing preventing the bridge to move along the rails
  • make sure that there are no rogue / left over screws in the toolpath

steps to set up the machine

  • turn the machine on

    • The machine itself is turned on by the big red switch at the side of the machine.
    • The machine needs to be turned on for the software to communicate with it.
  • turn the shopbot software on

  • install the bit that you want to use

  • set the machine to its machine x,y

    • Use the button that says X/Y in the menubar

steps to set up the job

  • move the spindle head to the desired start position that you have set in VCarve

    • this is usually the lower right corner of the material, if you stand facing the horizontal bar
    • this is when you have set the job zero in VCarve to the lower left corner
  • make a photo of the x,y location in the shopbot software

  • set the x,y job zero to this position with the menu option Zero -> x,y zero

  • set the job z position

    • For this you need the metal plate. Test it first against the bit to see if it makes contact.
    • Position it under the bit
    • Press the button that says Z in the menu bar
  • load the toolpath

  • turn on the vacuum

    • turn it on in the back of the room with the big red button
    • turn it on on the front of the machine with the red squared button
  • turn on the spindle

  • set the spindle speed to the desired speed

  • start the job

urls and things that I keep forgetting

flashing with edbg or openocd overview of the fab programmers

Built with Hugo , based on Theme Stack designed by Jimmy , modified for personal use by Bente van Bourgondiën