GithubHelp home page GithubHelp logo

kellyegan / openscad-arduino-mounting-library Goto Github PK

View Code? Open in Web Editor NEW
114.0 20.0 61.0 511 KB

Modules for helping to add Arduino enclosures and mounts to OpenSCAD projects.

OpenSCAD 100.00%

openscad-arduino-mounting-library's Introduction

OpenSCAD Arduino Mounting library

The library has a variety of modules for creating Arduinos and Arduino mounts. Here is a basic description of the included modules. It includes all official boards through the Due. For examples see the included example SCAD.

openscadarduinomounting

##Dependencies

Using the library location instructions, checkout the pin_connectors library in the libraries folder, e.g on OSX this is done as follows:

$ cd ~/Documents/OpenSCAD/libraries
$ git clone https://github.com/tbuser/pin_connectors.git

This makes the pin_connectors/pins.scad dependency available.

If the libraries folder does not, exist, it will need to be created first. In the case of OSX:

$ cd ~/Documents/OpenSCAD/
$ mkdir -p libraries
$ cd libraries
$ git clone https://github.com/tbuser/pin_connectors.git

Follow the instructions for your platform.

Arduino Mounting Library Functions

arduino(boardType)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

This module creates an Arduino board with USB connector, power supply and headers.

bumper(boardType, mountingHoles)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

mountingHoles - (OPTIONAL) True or false for external mounting holes for bumper.

Create a simple bumper style encloser for a particular board

enclosure(boardType, wall, offset, heightExtension, cornerRadius, mountType)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

wall - Thickness of enclosure walls. Default is 3.

offset - Distance of PCB from walls.

heightExtension - Additional space at the top of the box.

cornerRadius - Corner radius for outside of box.

mountType - TAPHOLE, PIN - How the standoffs attach to the board either using tap holes for screws or pins.

Creates a box enclosure with a snap-on lid for a particular board

enclosureLid(boardType, wall, offset, cornerRadius, ventHoles)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

wall - Thickness of enclosure walls. Default is 3.

offset - Distance of PCB from walls.

cornerRadius - Corner radius for outside of box.

ventHoles - true, false for holes in the lid.

Creates a lid for the box enclosure

standoffs(boardType, height, topRadius, bottomRadius, holeRadius, mountType)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

height - height of standoffs

topRadius - Radius of top of standoff cylinder.

bottomRadius - Radius of bottom of standoff cylinder.

holeRadius - Radius of tap hole in the standoff.

mountType - TAPHOLE, PIN

This creates standoffs for mounting holes. These are simple cylinders that can be tapered. For custom standoffs use the holePlacement() module.

boardShape( boardType, offset, height )

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

offset - creates the shape offset from actual board size. Negative values create an inset shape.

height - default is pcb height but can be any value needed.

This creates the shape of the PCB with no holes. The default create a basic Uno PCB.

boundingBox(boardType, offset, height, cornerRadius, include)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

offset - creates the shape offset from actual board size. Negative values create an inset shape.

height - default is board height (including components) but can be any value needed.

cornerRadius -

include - BOARD, PCB, COMPONENTS What to include in bounding box, just the PCB, just the components or both (BOARD)

This creates a box whos dimensions are the extremes of the board.

holePlacement(boardType)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

This is used for placing holes and is the basis of the standoff module. holePlacement takes a child element and places it at each of the mounting hole centers for a given board.

components(boardType, component, extension, offset)

boardType - UNO, LEONARDO, DUEMILANOVE, DIECIMILA, DUE, MEGA, MEGA 2560, ETHERNET

component - ALL, HEADER_F, HEADER_M, USB, POWER, RJ45

extension - Extention off the board in direction of connector. The default is the standard dimension of the connector, but can be set to an arbitrary value.

offset - Offsets the connector cube in the other two dimensions.

Creates the components( headers, power and usb jacks) for a given board. Also used for creating punchout, by using the extension and offset values.

openscad-arduino-mounting-library's People

Contributors

ashatch avatar frodeanonsen avatar ghps avatar kellyegan avatar kjellmorgenstern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openscad-arduino-mounting-library's Issues

Problems with components under pcb like sdcard in dimension calculation

I am trying to adapt your library for a different pcb layout

so I created a rpiplusComponent list.
The problem with this is that it has an underneath sdcard and in the calculation of the componentsDimensions it effects the overall height.
The SDcard space (negative z value) is already compensated by the standoffheight.

if there a simple way to exclude or not to accept negative z values in the componentsDimensions function .

New Features: Nano, MKR WIFI, additional hole sizes and mount types

Adding support for Arduino Nano and MKR WIFI 1010. The later was tested with an FDM printer.

Please consider pull request #12, it introduces:

Variable hole sizes, since some boards have smaller mounting holes
Dual headers (HEADER_F on top, HEADER_M on the bottom) as used on the MKR WIFI 1010
Small pin (=NOTCH) that can be FDM printed, to fit the small holes from Nano and MKR boards
Spacing parameter for enclosures, so that boards that need more than 5mm can fit.

New features are added to the documentation and shown in the example.scad

Problem with Uno bumper/mounting holes

Using this, it puts one of the mounting holes outside the base plate.
bumper(UNO, mountType=PIN, mountingHoles = true);

I fixed it with this updated bumper code (line 65 for me):

//Bumper mounting holes (exterior)
if( mountingHoles ) {
difference() {
hull() {
translate([-6, (dimensions[1] - 6) / 2, 0])
cylinder( r = 6, h = pcbHeight + 2, $fn = 32 );
translate([ -0.5, dimensions[1] / 2 - 9, 0])
cube([0.5, 12, bumperHeight]);
}
translate([-6, (dimensions[1] - 6) / 2, 0])
mountingHole(holeDepth = bumperHeight);
}
difference() {
hull() {
translate([dimensions[0] + 6, (dimensions[1] - 6) / 2,0])
cylinder( r = 6, h = pcbHeight + 2, $fn = 32 );
translate([ dimensions[0], dimensions[1] / 2 - 9, 0])
cube([0.5, 12, bumperHeight]);
}
translate([dimensions[0] + 6, (dimensions[1] - 6) / 2,0])
mountingHole(holeDepth = bumperHeight);
}
}

Y was referencing dimensions[0] instead of dimensions[1] for the first tab.

Thank you for the library! This will really come in handy.

Pins.scad

Looks like you updated the library to include pins.scad, but I don't see it as part of your project. Can you provide a link for it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.