SCADBoard Library 0.0.13

SCADBoard Library 0.0.13
A Simple 3D Print OpenSCAD Library for Producing Circuit Boards and a 3D Printed Breadboard Arduino as the Proof-of-Concept Design

By: J. Pagliaccio and B. Reidy March 2014

Abstract
The application of 3D modeling and 3D printing techniques to electronic circuit design and prototyping is a new and exciting method to create custom circuit boards.

Breadboard Arduino in OpenSCAD IDE

Breadboard Arduino in OpenSCAD IDE

This project is the development of a 3D modeling library for OpenSCAD to easily produce 3D printable breadboards. For this project, the classic “Breadboard Arduino” (“SCADuino”) was created as the reference design.

SCADBoard is a Library
SCADBoard is a library for OpenSCAD to make prototype circuit boards. It is for companies, hobbyists, and students to make 3D models which can then be exported and produced using a 3D printer. SCADBoard is open source and fully customizable.

SCADuino ready for STL export

The Need
Designing and producing custom printed circuit boards (PCB) is time consuming and expensive. Being able to rapidly design and produce prototype boards specific to your needs has advantages over outsourcing PCB production. This new method is faster and more user friendly, as it could be used through trial and error. If the first board is not perfect, it costs pennies and takes little time to fix the design and print a new board.

Limitations
SCADBoard is only for prototyping thru-hole PCBs. It is for creating prototype boards only. Due to the low melting temperature of PLA and ABS, SCADBoards are for low heat applications only.

Safety
SCADBoard is without warrantee. DO NOT leave a SCADBoard project running unattended. SCADBoard is for low-voltage, low-heat prototyping only. Use at your own risk. We recommend keeping a smoke detector and fire extinguisher handy.

Going Farther
There are a number of enhancements in the library and printing process that are possible. Additional functions and components to new printing materials have been considered, including:

  • Shaped boards, 3D boards
  • Other parts like a base, cover, or battery holder
  • New print materials
  • Fritzing export to OpenSCAD
  • A redo of SCADBoard in Python for Blender
  • Using solder paste in place of wire
  • Two sided geometry, other shapes

Getting started
Download and install the latest version of OpenSCAD from http://www.openscad.org/.

Run OpenSCAD and click File, Show Libraries Folder…
This will create a working folder and a libraries folder in your documents directory. For example: …\My Documents\OpenSCAD\libraries. In the libraries folder place the SCADBoard library file: scadboard_lib.scad. In your OpenSCAD models, insert the include statement:

include <SCADBoard_lib_v1.scad>

These libraries have been tested on OpenSCAD 2013.06 and 2014.03 on Windows and Fedora Linux.

To test, open the SCADuino_0_0_13.scad file and press F5 to see the model.

Design Your Circuit Board

Breadboard Arduino Fritzing

Breadboard Arduino Fritzing

Using a solderless breadboard as a reference, design your circuit board in OpenSCAD using the functions (called modules) below. We recommend using Fritzing or graph paper when documenting and designing your project. Plan out exactly where each component of your board will go, and a sketch or Fritzing can serve as an important reference model when designing the board in OpenSCAD. Use the SCADBoard Hole, Wire, LED, Createboard, IC modules to create your board.

Some of the required variables include:

holeDiam = 1.25; // The hole diameter in mm
holeSpace = 2.54; // The spacing of the holes in mm
materialThick = 1.5; // The thickness of the material in mm

A complete list of required variables are in the header of the library file and sample SCADuino file.

When creating geometry, specify object locations by using standard breadboard nomenclature of rows and columns, as follows:

  • Specify rows as numbers 1, 2, 3…
  • Specify columns with lower case letters like a standard breadboard a, b, c …
  • Valid column names include: blp, bln, a, b, c, d, e, 8, 9, f, g, h, i, j, brp, brn.
  • blp, bln stand for bus left positive and bus left negative.
  • brp, brn stand for bus right positive and bus right negative.
  • Columns 8 and 9 are also valid columns.

To create a thru-hole at row 3 column c with the hole function use:

hole(3, b, “Yellow”);

To create a wire from row 2, column C to row 2, column H with the wire function use:

wire(2, c, 2, h, “Red”);

The SCADboard functions or methods are described below.

Print It

SCADBoard ready to print in MakerWare

SCADBoard ready to print in MakerWare

After finishing the 3D model in OpenSCAD, press F6 to generate the model. Click Design, and Export as STL… to create a 3D printable STL file. Use MakerWare or similar slicer to print your model. If you don’t have access to a 3D printer, contact your local public school or library. If all else fails, companies such as Shapeways will print your 3D model for you for a fee.

Solder or Twist
Maximize your hole placement so that most of the wires can be simply twisted together to complete your circuit. If you choose to solder your components under your board be cautious of melting the board. Plastic such as PLA has a relatively low melting point (about 230 degrees Celsius) so the average soldering iron will melt your board if you are not cautious.
List of Function Modules

Module: createboard(toty, colorx)
Description: Used to create the board. Adds a mounting hole in each of the four corners.
Parameters: rows, colorx
Example: createboard(25, “YellowGreen”);
Rows allows you to alter the number of rows of the SCADBoard measured in breadboard rows (.1”). Rows of 30 is size of a standard half size breadboard.

Module: hole(row, col, colorx)
Description: Used to create a hole. Use the variable holeLenY to adjust the hole side for 1-lead support and 2-lead support (eg: 1 wire or two wires per hole).
Parameters: (row, col, colorx)
Example: hole(3,h,“Grey”);
This would create a hole at the point(h,3) based on the grid system of a breadboard.

Module: wire(row1, col1, row2, col2, colorx)
Description: Used to create a trough with holes at either end to support a wire.
Parameters: (row1, col1, row2, col2, colorx)
Example: wire(21, c, 20, d, neg);
This would create a negative wire from (c, 21) to (d, 20).

Module: pushbutton(row1, col1, row2, col2, colorx)
Description: Used to create a standard 4-lead pushbutton on your SCADBoard. It creates 4 holes and an indentation so that the push button sits lower to let you more easily work with its leads.
Parameters: row1, col1, row2, col2, colorx
Example: pushbutton(8, e, 10, f, “Silver”);
row1, col1 is the upper left lead, row2, col2 is the lower right lead.
colorx is the color of the indentation.

Module: ic(row1, col1, row2, col2, colorx)
Description: Used to create any type of IC, with any range of numbers of pins. It creates an indentation so that the IC becomes imbedded in the board and lets you more easily work with the leads.
Parameters: row1, col1, row2, col2, colorx
Example: ic(11, e, 25, f, “Red”);
row1, col1 is the upper left lead, row2, col2 is the lower right lead.
Black is the color of the indentation.
This example will create an IC indentation colored red with 14 holes on both the left and right column to support all the holes needed for the leads of the IC. For example an ATmega328.

Module: led(row1, col1, row2, col2, colorx)
Description: This module is used to implement two-lead LEDs into your SCADBoard. It creates a round indentation in your board so that the LED becomes flush with the board.
Parameters: (row1, col1, row2, col2, colorx)
Example: led(1,8,1,9, “Yellow”);
Yellow is the color of the indentation in OpenSCAD simply for organizational purposes
This will create a circle indentation with 2 holes at (8,1) and(9,1)
Note: columns 8 and 9 are used instead of the breadboard letters to put components in the center bus area.

The entire library

/*
  SCADBoard Library & SCADuino 
  -------------------------------------------
  3D Printable Breadboard Library in OpenSCAD.

  File: SCADBoard_Lib_0_0_13.scad

  Copyright (c) 2014,  J. Pagliaccio, B. Reidy. All rights reserved.
 
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:
 
   * Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
 
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  By: J. Pagliaccio, B. Reidy
 
  Version History
  -------------------------------
  v0.0.1 First printed prototype.
  v0.0.2 Wider center line fix.
  v0.0.3 Added ic module.
  v0.0.4 Underwire.
  v0.0.5 LED Module.    
  v0.0.6 Better base and cleanup.    
  v0.0.7 Parameters for all values.
  v0.0.9 Separate x and y values for each hole for 2-wires-in-a-hole.
  v0.0.10 SCADuino with 2-wire.
  v0.0.11 SCADuino with 2-wire April 2014.
  v0.0.12 SCADuino with 2-wire cleanup 1/2 deep May 2014.
  v0.0.13 Added license and library file.

*/


/* //Start of required variables 
//
// THESE VARIABLES ARE REQUIRED
// and are here for reference.
// put them in your main sacd file. 
// 
 
drillHoleRad = 2; 
holeDiam = 1.25; // thru hole diameter in mm
holeLenX = holeDiam;
holeLenY = holeDiam;

// if two Wires in One Hole
holeLenY = holeDiam + .9;

holeSpace=2.54; // thru hole spacing in mm
// Nore: .1 inch = .0254 centimeters
 
// thickness of the board 
materialThick = 1.5; //2.54; // mm

// depth of the troughs 
inset = materialThick *.5; 
deepInset = materialThick *.5; 

// End of required variables 
*/

 
//Start of SCADBoard Library 

pos = "Red";
neg = "Black";
trace = "Orange";
thru = "Gray";
yellowled = "Yellow";
resistor = "Purple";
cap = "Cyan";
led = "Tomato";

blp=1; // Bus Left Pos
bln=2; // Bus Left Neg
a=3;
b=4;
c=5;
d=6;
e=7;
//----- columns 8 9 are the IC centerline
//----- remember columns 8 and 9 are usable  
f=10;
g=11;
h=12;
i=13;
j=14;
brp=15; // Bus Right pos
brn=16; // Bus Right neg


//----------------------------------------------------------------------------
// Push Button 
//----------------------------------------------------------------------------
module pushbutton(row1, col1, row2, col2, colorx)
{	
	hole(row1,col1,thru);
	hole(row1,col2,thru); 
	hole(row2,col1,thru);
	hole(row2,col2,thru); 

	translate([row1*holeSpace,col1*holeSpace,materialThick-deepInset])
	color(colorx) cube([holeSpace*(row2-row1)+holeLenX,
	(col2-col1)*holeSpace+holeLenY,5]);
}

//----------------------------------------------------------------------------
// IC - Integrated Circuit 
//----------------------------------------------------------------------------
module ic(row1, col1, row2, col2, colorx)
{
	for(n=[row1:1:row2-1])
	{
   		hole(n,e,thru); // ATMEL
   		hole(n,f,thru); // ATMEL  
	}
	translate([row1*holeSpace-holeSpace/4,col1*holeSpace,materialThick-inset])
	color("grey") cube([holeSpace*(row2-row1)+holeLenX,
	(col2-col1)*holeSpace+holeLenY,5]);

}	

// ---------------------------------------------------------------------------
// LED - Specifiy the positive hole first 
// ---------------------------------------------------------------------------
module led(row1, col1, row2, col2, colorx)
{
	hole(row1,col1,pos);
	hole(row2,col2,neg); 
 
	translate([row1*holeSpace+(row2-row1)*holeSpace/2+holeLenX/2,
	col1*holeSpace+((col2-col1)*holeSpace)/2+holeLenY/2, materialThick-inset])
	color(colorx) cylinder(h = materialThick*2, r = 6/2);
}

// ---------------------------------------------------------------------------
// HOLE - Thru pin hole for a trace
// ---------------------------------------------------------------------------
module hole(row, col, colorx)
{
	translate([row*holeSpace,col*holeSpace,-materialThick/2])
	color(colorx) cube([holeLenX,holeLenY,materialThick*2]);
}
 
// ---------------------------------------------------------------------------
// HULLHOLE - This is a hole at the end of the wire inset 
// This is used for making the wires with the hull module. 
//----------------------------------------------------------------------------
module hullhole(row, col, colorx)
{
	translate([row*holeSpace,col*holeSpace,materialThick/1.5])
	color(colorx)cube([holeLenX,holeLenY,materialThick]);
}


//----------------------------------------------------------------------------
// UNDER HULL HOLE - this should be replaced with hullhole and a new
// depth argument
//----------------------------------------------------------------------------
module underhullhole(row, col, colorx)
{
	translate([row*holeSpace,col*holeSpace,-.5*(materialThick)])
	color(colorx)cube([holeLenX,holeLenY,materialThick/1.25]);
}
 
//----------------------------------------------------------------------------
// WIRE - A trace form point A to point B
//----------------------------------------------------------------------------
module wire(row1, col1, row2, col2, colorx)
{
	hole(row1,col1,colorx);
	hole(row2,col2,colorx);
	color(colorx)
	hull()
	{
		hullhole(row1,col1,colorx);
		hullhole(row2,col2,colorx);
	}
}

//----------------------------------------------------------------------------
// UNDER WIRE - A trace form point A to point B
//----------------------------------------------------------------------------
module underwire(row1, col1, row2, col2, colorx)
{
	hole(row1,col1,colorx);
	hole(row2,col2,colorx);
	color(colorx)
	hull()
	{
		underhullhole(row1,col1,colorx);
		underhullhole(row2,col2,colorx);
	}
}
 
//----------------------------------------------------------------------------
// CREATE BASE BOARD
//----------------------------------------------------------------------------
module createboard(rows, colorx){
 
	pad = 2; // holeSpaces
	x=rows + pad; // rows + 1 + padding 
	y=17 + pad; // columns + 1 + padding 
   hoff = 1.2; // hole inset from corners  

	color(colorx, 1)
 
	difference() {
		// the base 
		translate([-holeSpace*pad/2,-holeSpace*pad/2,0])
		cube([x*holeSpace+holeLenX,y*holeSpace+holeLenY,materialThick]);

		union() {
			// holes lower left  
			translate([hoff,hoff,materialThick])
			cylinder (h = materialThick*2.5, r=drillHoleRad, center = true, $fn=20);
			// lower right 
 			translate([holeSpace*x-drillHoleRad*2-hoff,hoff,materialThick])
			cylinder (h = materialThick*2.5, r=drillHoleRad, center = true, $fn=20);
			// upper left 
			translate([hoff,holeSpace*y-drillHoleRad*2-hoff,materialThick])
			cylinder (h = materialThick*2.5, r=drillHoleRad, center = true, $fn=20);
			// upper right 
			translate([holeSpace*x-drillHoleRad*2-hoff,holeSpace*y-drillHoleRad*2-hoff,materialThick])
			cylinder (h = materialThick*2.5, r=drillHoleRad, center = true, $fn=20);
		} 
	}
}
 

//----------------------------------------------------------------------------
// Standard Breadboard eg: All Holes 
//----------------------------------------------------------------------------
module standardBreadboard(x, y)
{
	for(n=[0:1:x])
	{
		for(ii=[0:1:y]) { hole(n,ii); }
	}
}
//End of SCADBoard Library 

Software Used

SCADBoard and SCADuino source code is available at https://scadboard.wordpress.com/

Thank you to:

  • OpenSCAD for their software.
  • Arduino for all their inspirational microcontroller designs.
  • Adafruit and Sparkfun for being reliable sources of electronics microcontroller components and all of the Adafruit tutorials.
  • Mr.Hoppner and the LVCSD for supporting our various projects.

Special thanks to our friends – the Engineers and Land Surveyors at Bladykas & Panetta for the generous donation of computers for this project. They are at http://www.panettasurveying.com.

All product and service names mentioned are the trademarks of their respective companies.
Copyright (c) 2014, J. Pagliaccio, B. Reidy. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this condition and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 thoughts on “SCADBoard Library 0.0.13

  1. David C

    Absolutely brilliant. Not only is it brilliant in its own right but it is so well put together it became my “openscad” tutorial and gave me a greater understanding of openscad. I’m now starting to customise other scad files. Would love the fritzing import. Fantastic. Thanks.

    Reply
    1. J P Post author

      David, Thanks so much for your comments. We have used Blender for years, and use it as our primary modeling tool for 3D printing projects. But OpenSCAD is a great tool too, when you need precision and have repeated elements. We use Scad on Windows and Linux (Fedora) with good results. Regarding next steps, we have been experimenting with boards that are also part of the physical structure they control.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s