Arduino micro development shield


Description
A tiny and ultra low cost development board for Arduino projects

Features

  • Ultra low cost (~1000mm2 board area – fit as many as possible on a single fr4 substrate)
  • Arduino compatible pin spacing
  • Easy to build (even at home – single sided PCB)
  • Extra VCC and GND tracks
  • Pinout (printed pin names)
  • Does not block LEDs and reset key on the Arduino shield

Development

For my first Arduino projects I just used pin headers and soldered wires and components directly. This works ok for early development, but gets messy quite fast. It is also difficult to switch and store different projects using nothing but pin headers since they are fragile and it is not always obvious where each pin header goes. One option is to use a complete development shield, but they are often overkill for smaller hacks.

I decided to create a smaller development shield. The solution was to use Occam’s razor and cut away everything in the middle of a standard development shield. The downside is that you have two PCBs instead of one. The advantage is that you can make several of them using the same board space. Another advantage is that the development board does not block LEDs, ICSP, switches, etc on the Arduino.

Less than an hour was spent on making the 2D lines in Rhino. Then a few minutes to set up the mill to produce 10 boards, engraved, drilled, cut and ready to use! Read more details about the process here.

Specification
Dimensions [mm]: 44.5×27 (WxD)

Version tracker
0.1        First version
0.2        added VCC and GND
0.3        added text
0.4        added cutting paths (current version)
Future     No updates planned…

Caution
The CNC files below for controlling the mill is for reference only. It is very unlikely that your mill is configured exactly like mine. Position of zero, cutting speeds, position of tools etc is most likely different. Running unknown code on expensive and powerful machines is not recommended. I do not take any responsibility if the machine damage itself or worse, someone.


Documents
Rhino project file (2D lines)
2D export (.svg)
Neutral drill file (drill positions)
Neutral engrave file (engrave paths)
Neutral release file (3mm cutter paths)

See also (coming soon…)
Arduino development board

Licensing
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

CAM processing in HTML

Why do CAM processing in HTML and JavaScript?
– Good question, I see several advantages:

  • Works on almost all platforms
  • Can be stored local, on file server or internet (web server)
  • Easy to alter code (just using a text editor – no development platform needed)
  • Can be run directly (does not need to be compiled)
  • User interface and graphics is integrated
  • One single html file is all that is needed (but it looks better with the images)
  • Complete program with images is less then 150kB

The main disadvantage is that the program is quite slow on larger files. But for almost all my jobs it runs fast enough (using chrome).

What exactly does the program do?

– The program simply coverts a neutral polyline- or drill format to cnc code according to your specification. It is up to you to create good paths for the mill, there is no magic going on and you have full control. For 90% of my jobs this program is all I need and it is much faster to work with then full blown CAM programs.

This is a screenshot of the 2D single cut mode.

  1. Paste the polylines in the first text box (generated by this rhino script)
  2. Press sort to reduce travel time
  3. Enter cutting parameters
  4. Press generate
  5. Copy the generated CNC code and paste it in a file for the mill.

Try it here!

Caution

The program was written specifically for my equipment. It is very unlikely that your mill is configured exactly like mine. Position of zero, cutting speeds, position of tools etc is likely different. Test the code at very slow speed first to make sure it works with your equipment. Always keep one hand at the emergency switch :)

Please note that each program start by moving to x=0 first. This is to avoid cutting in the tool length sensor. In other equipment this move could easily cut in a clamping fixture or the mill itself. Remove it if you don’t need it!

Running untested code on expensive and powerful machines is always risky. I do not take any responsibility if the machine damage itself or worse, someone.

Interlocking wooden rings


Description

Two linked miniature rings from one piece of wood

Features

  • 8-sided 2D CNC mill
  • Custom built fixtures
  • Lots of manual sanding and polishing
  • Several layers of varnish

Development

As a wedding gift to my wife I wanted to make something special and unique. I thought that two linked miniature wooden rings carved from the same piece of wood was a suitable gift. The only problem was how to make them… Since I wanted perfect symmetry, creating them by hand was not an option. I was thinking about making fixtures to get an even size and shape. I even considered cheating, creating two rings and cut one open and glue them together invisibly. But I figured it was more special if they were made linked together from the same piece of wood. I decided to cut the basic shape with my CNC mill. The problem was that I did not have any proper CAM processing software at the time (for 3dD control of the tool) and the cutters I had was only rough PCB routers… By only using 2dD control, I realized that I had to cut the rings from 8 different sides to get the basic shape. To do this I needed a proper fixture.

This is how it was done:

1. Creating fixtures to clamp the work piece

2. Cutting mounting slots for the fixture in order to get a fixed position
3. Cutting out a block of oak to fit in the fixture (actually I cut out two blocks so I had one in spare)

4. Cutting the wooden block from 8 sides
The fixture holding the wooden block to be milled from eight sides
The fixture holding the wooden block to be milled from eight sides.

Side view of the fixture, showing ring orientation. 


Altering three different cuts from eight sides creates the basic shape for the rings

5. Manual filing, sanding and polishing
6. Several layers of varnish

Specification

Outer diameter of the rings [mm]: 11.6
Thickness of the rings [mm]: 1.6
Width of the rings [mm]: 2.6

Version tracker

1.0 First rings
2.0 Second rings (after the first set was lost)
Future No updates planned (I really don’t want to do it again :)

Caution

The CNC files below for controlling the mill is for reference only. It is very unlikely that your mill is configured exactly like mine. Position of zero, cutting speeds, position of tools etc is most likely different. Running unknown code on expensive and powerful machines is not recommended. I do not take any responsibility if the machine damage itself or worse,, someone else….

Documents

Rhino project file (2D and 3D)
2D export (.svg)
Neutral polyline file (mill paths)

See also

Licensing
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Designing a PCB


I usually design a PCBs in a different way than most people do. The “normal” way is to use dedicated PCB cad software, like Eagle or gEDA. This has several advantages like schematic editors, auto routing, net lists etc. However, when I work on a project, it is usually a PCB that shall fit inside some casing or mechanical structure. I then need to export and import the PCB shape, component placement, housing etc between the 3D cad and the PCB cad. I think this limits the design freedom and it is quite annoying to spend a lot of time trying to synchronize the same design in two programs.

My solution is to use the 3D cad for everything, including PCB design. There are several advantages with this method:

  • Everything in one place (one file), both the PCB and the mechanics
  • No need to spend any time synchronizing files between programs
  • Very easy to tweak and optimize the complete project
  • Complete control over every single line
  • It is easy to export milling and drilling paths to produce the PCB
  • I work extremely fast in Rhino. The best programs are the ones that you know well and have access to…

The biggest downside is that you have to route the board manually, but personally, I think this is an advantage. If you are good at it – manual routing out ways the auto routing routines that exists in free software (especially on single sided boards). It is also a quite fun and challenging task. Try it and let me know if you agree ;)

Step by step:

  1. Place the components
    I start with creating an outline for the PCB and then reuse components from other projects. A component means a 2D vector image with component outline, pad outline and hole positions. I use different layers to separate the different parts of a component.
  2. Create components that are missing
    if a component is missing I just build a new. Using a caliper or datasheet this is done in just a matter of minutes.
  3. Route the traces
    It is now time to route the PCB. First I try to imagine the best position and rotation for the different components, and then I add traces to connect all the pins on the component. I have separate layers for VCC and GND which gives the traces a different colors. Routing is an iterative process and it usually takes a few iterations until I get a result that I am satisfied with.
  4. Optimize the board
    It is now time to optimize the board. This means that I tweak the positions of components and traces. I also add chamfers on traces and makes sure that the PCB is as dense optimized as possible.

Done – I have now designed a PCB! Usually I produce the board by milling (see this post), but I can also print a vector mask that can be used for direct toner transfer or UV exposure. If so I export the 2d vector to illustrator or inkscape and fill areas like traces and pads. Then the black and white image can be printed on toner transfer paper or OH sheet.

Milling a PCB


Using a CNC-mill to create a PCB has several advantages:

  • Fast
  • High accuracy
  • Holes are drilled for you directly
  • No chemicals
  • No need for UV exposure or direct toner transfer

This is how it is done:

When the PCB is designed (see this post) it’s time to prepare the board for manufacturing. I start by creating new layers for the mill paths.
1. Create mill paths

  1. Offset pads and traces to create closed loops for the PCB. These loops are used to control the engraving tool to cut out the copper areas to save.
  2. When the loops are done I offset them in order to create paths for removing excess copper outside the traces. This is not always necessary, but it is easier to solder a PCB without any excess copper. Don’t forget to make sure that you trim away offsets that intersect other copper traces.
  3. Make sure I have points in each hole that needs to be drilled. (used by CAM to define drill positions)
  4. Offset the contour of the PCB in order to create the release path for the PCB. I usually use a router with 3mm diameter for this -> the path is 1.5mm outside the PCB contour.
  5. Export all mill data. As preparation I convert all paths to polylines and make sure that they are connected. I have written two Rrhino scripts for the export. The first one exports each control point on the polylines into a comma separated file. This file is then used to create the engraving and cutting paths as CNC code for the mill. The second script exports each point to another comma separated file, this time to create the CNC code for the drilling operations.

2. Create CNC code
The comma separated files does not contain any information about for spindle speed or federate so they need a little more preparation before they can be uploaded to the mill. What is needed is a program that parses the data and converts it to standard G-code. The program also needs a user interface that would allows you to select cutting method, add data about federate and cutting depth etc. I wrote the whole script as an html file with embedded JavaScript. The good thing with JavaScript and html is that it runs on all platforms, does not need to be compiled, html it gives you the a user interface and it is fast enough, even for bigger jobs. This is what you need to do:

  1. Select cutting operation (2D cut for the PCB engraving)
  2. Paste the comma separated data in one text field and press sort to reduce travel distance
  3. Adjust the cutting values and press convert to generate the G-code
  4. Copy the generated code from the text field and paste it in a text document.

3. Check the g-code
It is a good habit to briefly go thru the g-code before you execute it. Make sure the right tool is selected, that all coordinates are positive and that the cutting depth is correct.

4. Load the mill
Insert an empty fr4 substrate into the mill. My current mill does not have a vacuum plate, so I use double sided adhesive to attach the PCB to the plate. It it very important that the top surface is completely flat and in level with the mill x-y axis. If you planar the area first with a router the result will be better.

5. Press play to continue
Upload the g-code to the mill, press “start” and watch the mill produce a the PCB. If the mill does not have an automated tool change, you need to run each operation separately and manually switch tool and measure the tool length. If tool change is automatic you can create a single file with all the operations and just lean back and enjoy.

Scripts

Rhinoscript for polyline export (control points):

 _-NoEcho
 _-RunScript (
	'Export all control points at curves as neutral file format
	Dim strObject, arrObjects, lineCount, pointCount
	lineCount=0
	pointCount=0
	strText = ""
	arrObjects = Rhino.GetObjects("Select lines to export")
	If IsArray(arrObjects) Then
		For Each strObject In arrObjects
			lineCount = lineCount+1	

			' Get the curve's control points
			Dim arrPoints
			arrPoints = Rhino.CurvePoints(strObject)

			' Write each point as text to the file
			Dim strPoint, strText
			For Each strPoint In arrPoints
				pointCount = pointCount+1
				strText = strText + Rhino.Pt2Str(strPoint) + ";"
			Next
			strText=Left(strText,Len(strText)-1)
			strText = strText & vbCr & vbLf
		Next
		Rhino.ClipboardText(strText)
		If Not IsNull(strText) Then
			MsgBox CStr(lineCount) + " paths, " + CStr(pointCount) +" points copied to clipboard", 0, "Clipboard Text"
		End If
	End If
}

Rhinoscript for point export:

 _-NoEcho
 _-RunScript (
	'Export all points as neutral file format
	Dim pt, strObject, arrObjects, pointCount
	pointCount = 0
	strText = ""
	arrObjects = Rhino.GetObjects("Select points to export")
	If IsArray(arrObjects) Then
		For Each strObject In arrObjects
			' Write point as text to the file
			pointCount = pointCount+1
			pt = Rhino.PointCoordinates(strObject)
			strText = strText + Rhino.Pt2Str(pt) + ";"
			strText = Left(strText,Len(strText)-1)
			strText = strText & vbCr & vbLf
		Next
		Rhino.ClipboardText(strText)
		If Not IsNull(strText) Then
			MsgBox CStr(pointCount) +" points copied to clipboard", 0, "Clipboard Text"
		End If
	End If
}

 See also

CAM processing in HTML

 

Lego Stormtrooper

Description
A 3D printable model of a Lego Stormtrooper

Features

  • Moveable arms and legs
  • Removable head, helmet, hands, torso and legs
  • 99% Lego compatible (there are some minor differences)
[youtube type=object controls=no info=no related=no annotation=no link=no cc=no theme=light ]oKrrOiaMRc8[/youtube]

Development
When we got the 3D printer at work, my boss asked me as a joke if it could print Lego Stormtrooper figures for his children. I saw it as a challenge and an opportunity to learn what the printer could do. I measured a standard Lego figure with a caliper and built a 3D model in Rhino (NURBS model). I added some Stormtrooper details on the torso. On the web I found a polygon Stormtrooper model, from which I took the helmet, cleaned it up, scaled it and joined it with the Lego head. After a few hours I had a functioning model with moveable arms, legs, hands and a removable helmet. 3D printing is quite impressive!

Cross section of 3D model showing design of moveable joints

Specification
Dimensions: 25x16x44mm (wxdxh)

Caution
The model is intended for private use only. It is Lego compatible, but not a 100% copy. See it as a 3D printer demo. Please note that a 3D print will cost more than the real figure and is not as accurate. The model is not suitable for mass production (draft angles, wall thickness etc)

Version tracker
0.5        First version
0.6        Moveable arms and legs
0.7        Detachable torso and legs
0.75       Removable helmet
0.8        Stormtrooper details on torso
0.9        Current version
Future     No updates planned…

exploded parts for 3d printDocuments
Rhino project file (*.3dm – NURBS and polygon)
Polygon file of assembly (*.stl – for render)
Polygon file of parts next to each other (*.stl – for 3D print)

See also (coming soon…)
Lego Android
Darth Vader
Lego Mini figure
Lego Buzz
Lego Bricks
etc… 

Licensing
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.