Parametric solenoid spool

by caru, published

Parametric solenoid spool by caru Feb 3, 2011

Thing Info

3490Views 1242Downloads
Report Thing


This is a spool, developed in OpenSCAD, that can be used to build a solenoid (aka electromagnet) with enameled copper wire. It has two holes on each base, used to insert the wire and to hook it once the solenoid has been rolled. The wire can also help to keep the two pieces together, but I am not sure if that will be enough. Probably gluing them together is safer.

Of course, it can also be used as a generic spool for any kind of wire.

You can modify the following parameters:
i_diameter: the internal (core) diameter
o_diameter: the outer diameter, on which the solenoid will be twisted
i_height: the internal height between bases
base_diameter: the bases diameter
base_thickness: the thickness of the bases
in_hole_offset: the offset of the first hole, where the wire will enter
out_hole_offset: the offset of the second hole, where the wire will exit
hole_diameter: the holes diameter
wedge_height: the height of the wedge
wedge_thickness: the thickness of the wedge

solenoid(14, 18, 50, 50, 4, 12, 20, 4);
translate([51, 0, 0]) base_only(50, 4, 14, 18, 13, 20, 4, 8, 4);

Thanks to all the guys in #reprap IRC for their suggestions!


  1. Print printable.stl (or generate a custom one like in the example above)
  2. Assemble the two pieces (and optionally glue)
  3. Roll the wire(s).
  4. (optional) Fill the core with metal rods and glue
  5. Give it current.

Thing Info

3490Views 1242Downloads
Report Thing

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Cura did the trick!

hey bloopl,
I don't know why that happens... maybe try with a different slicer?

I've used your wonderful spool scad file. But I have given the outer diameter hole a minus variable.
In scad this works out great but in makerbot this backfires and gives me 2 holes crossing each other.

Do you know how I can prevent this?

Oh man! I was going to wait to publish my stuff, but this triggered it. :)

caru - in reply to hoeken

Hey Zach! You are the first person I saw talking about a 3D printer! Glad to know you find this stimulating :)