Hey makers and fabbers out there!
Have you ever dreamed of making your own advanced micro-controller board at home and using smd components?
That's the right instructable for you and for the brain of your next project :)
And when I mean at home, I mean that you could purchase all the equipment to make all these PCBs for few hundred of dollars (see next steps) and put it in just one desk space!
Everything started from my Fab Academy journey I did in 2015. With the objective of making a fabbed drone, I decided to release the prototype of the flight controller, as the first satshakit board. Just after one week the board got replicated by Jason Wang from Fab Lab Taipei. This gave me an incredible feeling of seeing somebody replicating and successfully using my project, that I never stopped since then to make other open source fabbed electronics.
The boards then got replicated and modified few hundred times from the worldwide Fab Lab community, as a learning experience about how to make PCBs and to give life to a lot of Fab Lab projects. Nowadays several other satshakits boards have been released on github:
If you wonder what Fab Academy is, just think about a learning experience on "how to make (almost) anything" that will change your life, as did for me :)!
More info here: http://www.fabacademy.org/
Many thanks to the amazing Fab Labs that supported me in creating the satshakit boards:
Fab Lab Kamp-Lintfort
Hochschule Rhein-Waal Friedrich-Heinrich-Allee 25, 47475 Kamp-Lintfort, Germany
Via Tertulliano N70, 20137, Milan, Italy +39.02.36519890
Step 1: Decide Which Satshakit Make or Modify
Before making one of the satshakit boards you should think about what you'd like to do it with it.
You can say for fun and to learn :D!
And that's right, as well as their specific usage.
In the images some projects that used the satshakit boards.
Clicking on the board name on the below list, will bring you to the github repositories with all the information you need to produce and/or modify them:
- Eagle schematics and boards for making it with the CNC/Laser
- Optionally the Eagle files to produce them in China, I use PcbWay
- Bill of Materials (BOM)
- PNG Images ready for the CAM
- Images and videos of the board working
The files of the board are also zipped as attachment in this step.
Here is an overview of the functionalities and features of each of the boards:
- atmega328p based general purpose board
- dual layer version of the satshakit, with 2 x atmega328p one for each side
- stackable multi-board design, with the 328p connected via I2C
- useful for multi-mcu systems (eg. every board manages a different set of sensors)
- programmable using an USB-to-Serial converter
- example projects using it: Bluetooth trilateration, satshakit IoT system
- smaller version of the satshakit flight controller, also atmega328p based
- suitable for mini DIY drones (like 150mm ones), compatible with Multiwii
- supports up to 4 motors and 4 channels receiver
- integrated power distribution board
- example projects using it: satshacopter-150X
- atmega2560p based, general purpose board, somewhat like a fabbed Arduino Mega
- onboard USB-to-Serial converter and USB connector
- 8K ram, 256K flash, 4 hardware serials
- example projects using it: LaserDuo
- STM32F765 based general purpose board
- integrated on-chip USB controller, USB connector
- 216Mhz, 512K ram, 2MB flash
- tons of features, can also run FREE-RTOS
- project using it: my next drone and robotics platforms (not published yet)
All the boards are released under the CC BY-NC-SA 4.0.
You are very welcome in modifying the original designs to make them fitting your projects ;)!
Step 2: Equipment and Preparations
First of all let's talk about the processes used to produce these pcbs:
- CNC Milling
- Fiber/Yag Laser engraving (basically the ones with 1064nm)
As you can notice there's no etching between these. And the reason is that me (and as well the Fab Lab community), don't like much to use acids both for pollution and dangerous reasons.
Also, all the boards can be made by just using a desktop/small cnc machine, and/or laser engraving without specific limitations with one or the other technique.
By the way a Fiber/Yag Laser machine can cost several thousands $ easily, so I guess that for many of you a small CNC machine would be better!
If somebody is curios about the laser engraving process, I recommend to have a look to the following tutorial:
Here is a list of recommended small format cnc machines you could use:
- FabPCBMaker, open source fabbed cnc from one of my students Ahmed Abdellatif, less than 100$ needs some minor improvements, will be updated soon
- 3810, minimalist small cnc, never tried but looks like it could do
- Eleks Mill, super-cheap mini cnc, personally milled 0.5mm pitch packages (LQFP100) with some fine tuning
- Roland MDX-20, small but super-reliable solution from Roland
- Roland SRM-20, newer substitute version of the MDX-20
- Othermill, now BantamTools, reliable and precise small format CNC
- Roland MDX-40, bigger desktop cnc, can also be used for bigger things
I recommend to use the following end mills for engraving the traces:
- 0.4mm 1/64 for most of the pcbs, example
- 0.2mm chamfered for middle-difficulty jobs, example (make sure the bed is flat!)
- 0.1mm chamfered for super-precise jobs, example1, example2 (make sure the bed is flat!)
And the following bits for cutting out the pcb:
Beware of the chinese ones, will last really few cuts!
The fiberglass in the FR4 would easily wear out the end mills and as well its dust can be quite dangerous for your health.
Following are the tools you should have in your soldering bench:
Step 3: Prepare You Files for Milling
Feel free to use any CAM you like, especially if this comes with your machine and feel comfortable with it.
In this tutorial, I will show you how to use the Fab Modules, an open source web-based CAM from prof Neil Gershenfeld and his collaborators.
The Fab Modules are available as standalone installation on your PC, or online:
- Fab Modules repository and installation instructions: https://github.com/FabModules/fabmodules-html5
- Fab Modules online version: http://fabmodules.org/
For simplicity I will show you how to use the online version.
First of all, the Fab Modules take as input a black and white PNG image to generate the GCode for your PCBs.
If you want to make an existing satshakit board without modifications, all you have to do is to download the PNGs (sometimes SVGs) I prepared for milling. We usually make the holes by hand (with a small proxxon drill), but I will show how to create a PNG for the holes in case you want the milling machine to drill them for you.
You can find the PNGs below or in the repositories:
In case you want to modify an existing satshakit design, you must do two other steps:
- use Autodesk Eagle to modify the board according to your needs
- use a raster image editor to prepare the PNG images, in this case I will show it using Gimp
Once you have done the modifications you need, use the following steps to export a PNG image from Eagle (see attached pictures):
- Open the board layout
- Press the layer button
- Select only top and pads (also VIAs in case the PCB is dual layer like the satstep6600)
- Make sure that signal names will not be shown in the image by going to Set->Misc and uncheck
- signal names on pad
- signal names on traces
- display pad names
- check monochrome
- select Area->window
- type a resolution of at least 1500 DPI
- Select the file saving location (Browse)
After this you should have a black and white PNG (see attached picture). Repeat the process for the bottom layer in case you have a double sided board.
Now is time to open the image with Gimp and to execute the following steps (see attached pictures):
- in case the image has large black margins, crop it by using the Tools->Selection Tools->rectangle select tool then select Image->crop to selection (still keep some black margin around, like 3-4mm)
- export the current image as traces.png
- use again the Tools->Selection Tools->rectangle select tool and select all the traces (leave still a black margin around it, like 1mm)
- optionally create some fillet in the rectangle selection by clicking on Select->Rounded Rectangle->and put a value of 15
- now right click inside the selected area and Edit->Fill in with BG Color (make sure is white, usually default)
- export this image as cutout.png
- now open the traces.png file you saved before
- using the Tools->paint tools->bucket fill, fill all the black areas that are not holes with white
- export this image as holes.png
After you have the PNGs files, you are ready to generate the GCode for milling.
You have to do generate the GCode for each single PNG you have, traces.png , cutout.png and eventually the holes.png.
For the traces.png file those are the steps with the Fab Modules:
- go to http://fabmodules.org/
- open the traces.png file
- select your machine:
- gcodes will work for the GRBL based machines (usually also the small chinese cnc are based on it)
- Roland RML for Roland
- speed, I recommend 3mm/s with the 0.4mm and the 0.2mm chamfered tools, 2mm/s for the 0.1mm
- X0, Y0 and Z0, put all of them to 0
- cut depth can be 0.1mm with the cylindrical tools 0.4mm, 0mm with the chamfered ones
- tools diameter must be the one you have (if some traces are impossible to make, trick it by putting slightly less diameter of the one you have, until the traces will be shown after pressing calculate)
For the holes.png and the cutout.png the steps are the same, except:
- load the holes.png or the cutout.png
- select process 1/32
- edit the following settings:
- reduce the speed, I recommend 1-2mm/s
- check and put in (a little more than) the thickness of your PCB copper sheet
- check and put in the tool diameter for the cut out (usually 0.8 or 1mm)
Keep the files you saved with you as we are going to need them to make the PCB with the CNC milling machine.
Step 4: PCB Milling
One simple rule to successfully cnc mill your PCBs is to well prepare the machine bed with the copper sheet.
In this task you should try to be very calm and as much precise as possible. The more you invest in these two things, the better results you will have.
The objective is to make the copper surface as much parallel (flat) as possible with the machine bed.
The flatness of the copper sheet will be especially critical if you will mill high precision PCBs, requiring chamfered tools like the ones with 0.2mm or 0.1mm end.
Consider that after engraving the PCB traces, you still need to cut the PCB out, and for this is needed to have what we call sacrificial layer.
The sacrificial layer will be slightly penetrated by the cutout end mill, to make sure the cut is going completely trough the copper sheet.
It is recommended to use a thin double side tape to stick the copper sheet to the sacrificial layer, and to avoid any folds that the tape could have.
Here some basic steps to make a quite flat bed (see attached pictures):
- find a flat piece of material for the sacrificial layer, that is already produced quite flat (eg a piece of MDF or extruded acrylic); make sure the cutout tool can penetrate it and will not break because it is too hard
- cut the sacrificial layer by the bed size of your cnc
- attach strips of the double side tape onto the sacrificial layer, make sure to tension it just before attaching it, to make sure no folds or air bubble will appear; the double side tape should cover most of the surface in equal distributed way
- attach the copper sheet to double side tape; try to push in an equal way all its surface
- attach the sacrificial layer to the bed of your cnc machine, preferably with something that is easy to remove afterwards but solid, like clamps, screws
After setting up the bed is time to prepare the cnc machine for milling. Also this operation requires attention and precision. Depending on the kind of CNC you have these steps can be slightly different but not really much.
To prepare the cnc machine for milling follow the steps below:
- install the proper tool in the collet (or tool holder)
- make sure to move up a bit the Z axis from the bed before moving the X and Y axis, to avoid crashing the end mill
- move the X and Y axis to the relative origin point, in case you used the Fab Modules this is the bottom left of the PNG
- before zeroing the X and Y in the machine control software, check if there is enough space to mill the board
- set as X and Y zero point the current machine position
- slowly go down with the Z axis, placing the end mills close the copper surface
- there are different techniques that you could use use to take the zero point of the Z axis, the objective of this step is to make sure the tools slightly touches the copper surface:
- one technique works by starting the spindle and by going down by using the minimum step size of the machine; when you hear a different sound caused by the end mill slightly penetrating the surface, that is your Z zero point
- you can try to check the electric connectivity from the tool to the copper surface with a multimeter; attach the multimeter probes to the end mill and to the copper sheet, then try to go down with the Z axis at the minimum step; when the multimeter beeps that is your Z zero point
- go close with the tool to the surface leaving some mm in between (like 2-3mm), then open the collet and let the end mill go down to touch the copper surface; then close the end mills into the collet and set this as the Z zero point
- use a sensor provided by the machine, in this case when the end mill will touch the sensor, the machine will automatically take the Z origin point
And finally now you are ready to launch your PCB engraving job :)
It is recommended to stay close to the machine to carefully observe if you made any mistake to the above steps, and maybe stop and relaunch the job with the required fixes and/of adjustments.
Some quick hints on problems:
- if your PCB has been engraved in some areas and not in some others, then your copper sheet is not flat
- if your tools has a cylindrical end, you can just take a slightly deeper Z axis and relaunch the job in the same position; the same applies with chamfered tools and if the difference in engraving depth is not much
- if your traces have sharp edges could be better to decrease the cutting feed rate
- if you broke a (quite new) end mill, then decrease the speed by a consistent amount
- if your traces are destroyed or too thin, you are maybe too deep, also check the trace thickness in Eagle, or check your CAM settings, especially if the diameter of the end mills is correct
When is time to do the cutout, remember to change the end mill tool and to open the cutout or the holes file. After doing this remember to take again ONLY the Z axis zero point, this time you don't need to be so much precise in touching the surface of the copper sheet.
When is time to remove your PCB from the sacrificial layer, try to slowly pull it off with a thin screwdriver. Do this again very carefully to avoid crack the board.
At the end of this step you should have an amazing engraved PCB in your hands :)!!
Step 5: Soldering and Testing
Before soldering one of the boards I recommend to practice a bit smd soldering on some scrap PCBs.
Some soldering recommendations are:
- warm up some seconds components and pads before putting the soldering wire
- the soldering should always look shiny after becoming solid
- try to use as horizontal as possible the soldering iron, to transfer as much heat as possible to quickly melt the soldering wire
- don't be shy in soldering, you must be doing it without thinking too much after a while you try
- if the board is moving, keep the it fixed with the helping hands or a piece of tape
- don't use violence on milled PCBs, the traces can be easily peeled off
- test the connection (diode function multimeter beeps) after making every single soldering, especially if you are a newbie
- don't use too high temperature (I usually use 320C with a medium sized soldering iron tip)
- don't stay too much time with the soldering iron touching the pins of the chip
- if you are making more mistakes than right things go to rest and try again later :)
- come to the nearest Fab Lab to quickly learn how to solder :)
Everybody has his own way of soldering.
I will expose below the steps I usually do in my way, hoping that will be effective also for you.
- first make sure the PCB does not have shorts, by quickly checking the most important points (example between VCC and GND)
- if there are shorts try to wash the board, or eventually before washing gently pass some thin sand paper onto it
- first try to solder the microcontroller:
- put the microcontroller in the correct orientation (check the chip notch, both physically and in Eagle)
- make sure the pads are aligned to the traces in all the directions
- solder some pins to fix the microcontroller to the board
- solder the rest of the sides; for this I use the technique to put soldering everywhere around the chip, and to then clean it with the desoldering braid
- put some soldering on an empty pad of the PCB
- take the component with the tweezer
- warm up the soldering you placed before and keep it warm
- place the component on the pad with the soldering
- solder the other side of the component
And now, after all the components have been soldered, double check if there are short in the connections, especially between VCC and GND.
If nothing beeps, then you're almost done with your PCB :)!
Step 6: Programming and Using Your Board
If you arrived to this step, this means your board is almost ready to be used :)!
Before doing anything with your board, it is highly recommended to first power it with an external power supply, or an USB hub for a smoke test and to eventually avoid damage to the USB port of your PC.
In case you have made a board without a microcontroller, you can just connect it by following the pinout found in the attached images. Make sure to use the proper wire size in case the connection is a power one, for example supply power for the stepper driver satstep6600.
For the boards hosting a microcontroller, they can be programmed in three different ways:
- using an In System Programmer (ISP), this will work always, those are the used ISPs:
If you have microcontroller onboard then you must at first set the fuses.
You can do it in multiple ways, using different tools and programs, depending on the microcontroller:
- for Atmel/Microchip AVR based microcontroller you can:
- for the STM32 microcontroller you can use the STM32CubeMX and the ST-Link Utility
For example, for all the satshakit based on the atmega328p, you can follow the steps below:
- open the Arduino IDE
- connect an Arduino UNO to your PC
- upload to the Arduino the File->example sketch->ArduinoISP
- disconnect the Arduino
- connect the satshakit to the Arduino (see attached pictures for connections)
- reconnect the Arduino
- select Arduino as ISP as programmer
- select Arduino UNO/or the proper board as board
- click on Tools->Burn Bootloader
The process can be also done with the FabISP:
- make sure your FabISP is working and correctly recognized in your computer
- connect the satshakit with the FabISP (see attached pictures for connections)
- leave unconnected the VCC between the FabISP and the satshakit
- connect the satshakit to an external 5V power supply
- connect the FabISP to your computer
- select USBtinyISP as programmer
- select Arduino UNO/or the proper board as board
- click on Tools->Burn Bootloader
Once you have set the proper fuses you can now finally program your board.
If you have installed the Bootloader, you can also use an USB-to-Serial converter to upload the code for the boards that support it. In this case you can select the proper serial port in tools and directly push the upload button from the Arduino IDE. Remember to do this just after you burned the Bootloader, if you try to upload any other code by using again an ISP, the Bootloader will be deleted and you will not be able to program the chip anymore by using an USB-to-Serial converter. The sasthakit GRBL has an integrated USB-to-Serial converter and can therefore be programmed directly using an USB cable (after burning the bootloader).
For the boards that does not support programming via an USB-to-Serial converter, or if you don't have the Bootloader installed, you must use an ISP. For the Arduino IDE this means the code has to be uploaded by clicking on Sketch->Upload using programmer.
In case avrdude or the Arduino IDE gives you an uploading error, do not despair!
Some hints about debugging your boards:
- usually the error is about a wrong connection, or a poor soldered one
- carefully check the connections used for programming and for powering the board; try to check them from the pins of the programmer chip, to the pins of the chip of the satshakit
- execute a visual inspection of the board and see if you soldered everything in the proper position and direction/polarity
- make sure that there are no small pieces of copper floating around
- make sure you burned the proper fuses, according to the oscillator/crystal you use and the wanted features
- make sure your programmer is working properly
...and finally enjoy your fabbed satshakit board, I hope you'll make amazing projects with it :)!!!!