The ebike parts designing thread with CAD/CAM

General Discussion about electric bicycles.
LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Aug 20, 2017 8:18 am

This version of the OpenSCAD file eliminates the problem with the joint between the two hexes. It does that by defining a polygon of the shape and extruding it. That doubles the effort to remove the other material but it provides a better model without the troublesome joint in the middle.
18650_Hex_Top_V3.zip
(265.76 KiB) Downloaded 22 times
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

User avatar
spinningmagnets
100 GW
100 GW
Posts: 10917
Joined: Dec 21, 2007 10:27 pm
Location: Ft Riley, NE Kansas

Re: The ebike parts designing thread with CAD/CAM

Post by spinningmagnets » Aug 20, 2017 8:24 am

I am absolutely blown away, thank you very much to Lewtwo and Triketech!

As much as I am happy that this particular part is apparently closing in on actual production, I also want the readers to see that...whatever new part you can think up, there are resources all around you if you just start asking.

User avatar
Alan B
100 GW
100 GW
Posts: 7386
Joined: Sep 11, 2010 7:43 am
Location: San Francisco Bay Area, USA
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by Alan B » Aug 20, 2017 9:23 am

Great thread. When I have more time I want to do some of this.

Triketech
1 kW
1 kW
Posts: 309
Joined: Mar 31, 2015 6:50 pm

Re: The ebike parts designing thread with CAD/CAM

Post by Triketech » Aug 20, 2017 12:48 pm

LewTwo, anything I post here is public domain as I really have no commercial interest in electric assist.

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Aug 21, 2017 7:21 am

I have been working on parameterizing the OpenSCAD file. I have it to where you can use it for:
1) any size cell (i.e. 18650, 21770, DDLLL)
2) change the wall thickness (battery separation)
3) change the number of facets (smoothness of the circular cutouts)
4) size of the bus notches
5) thickness of insulator
6) size of hole
7) depth of battery recess

I wanted to parametrize the rows and columns of cells however I hit several limitations in the OpenSCAD language. Thinking that there is 'strength in number' and that 3D printing is basically a repetitive 'one shot' process (as opposed to something like injection molding) I started working on increasing the number cells in a cap. At 5Sx2P I exceeded the practical limit of OpenSCAD's rendering engine. Fortunately FreecCAD can load the program and is cable of rendering it. I had hoped to expand the matrix up to 13Sx4P (popular configuration for nominal 48 volt battery) but I am quickly coming to the conclusion that size project may require a professional level modeling program such as SolidWorks or BricsCAD. EDIT: Found my configuration problem with OpenSCAD
S5xP4.jpg
S5xP4.jpg (42.89 KiB) Viewed 1196 times
I am attaching the parameterised file for the 5x2 configuration for anyone that wishes to play with it.

REFINEMENTS:
Slightly larger battery cavity diameter: OpenSCAD use facets rather than real circular curves. In any case any program that generates and STL file is is going to use facets. The cells are not exactly 18.0000mm in diameter. In my experience they very from undersize to oversize and that does not include the insulating label attached around the cell. Thus I have increased the diameter by 0.25mm thinking that sanding the inside of the each battery cavity would be a royal pain in the most southern region.

Cell Separation: At first blush some would probably not thick an extra 1mm wall thickness would matter much. However for a 13S battery it will increase the length by one inch. I set the minimum wall thickness to 0.5mm which results in a airspace of 1mm between the cells.

Conductor (Buss) Notches: If the notches for the conductor could be made the same size then the individual modules could be rotated as need for optimum configurations. To illustrate this I have set the notches to 6mm widths.

Facets: For development work I have set the number of facets for the holes at 30. For producing a actual STL file for printing I would recommend using 60 or even 90 facets to produce and much smoother part. However I note that this resolution may be smaller than a particular 3D printer is capable of replicating --- something that needs to be verified. Increasing the number of Facets can greatly slow down the rendering engine but it is a one time job for the STL file.

Any of the previous items can be changed in the top of the parameterised SCAD program file.

Code: Select all

// cell diameter, slightly oversize
// od = 18.25;    // 18650 outside cell diameter
od = 21.25;       // 21700 outside cell diameter
dp = 5.0;         // depth of cell hole
id = 12.0;        // Inside opening diameter

// This gives 1mm seperation (air) between the cells
wt = 0.5;         // minimum wall thickness  

// buss notch sizes
ww = 6.0;         //  wide bus width, full length
nw = 6.0;         //  narrow bus width, across rows
bh = 2.5;         //  bus height, thickness
ih = 0.5;         //  insulator height, thickness

// -------------------------------------------------------
af = od+(2*wt);   //  Across Flats of Hex 

// facetts, controls how "circular" the hole is 
// at least 60 recomended for production
// increasing this slows computer -- a bunch
//ff = 30;        // for testing and development
ff = 60;          // for production
//ff = 90;        // not recommended
5x2.jpg
5x2.jpg (30.3 KiB) Viewed 1196 times
EDIT:
FYI this part is about $14 if done by Shapeways in white plastic
Maybe not the most economical but I wanted some kind of guess ...
https://www.shapeways.com/about

Questions:
Assuming that 5 long and 4 wide is the practical limit as this point, what are the optimum size modules under that (each one being a separate program file).
Hex Cell Caps - 5Sx2P.scad.zip
(1.71 KiB) Downloaded 13 times
EDIT: I also now have the 13Sx4P design file (aprox 10 x 2.9 inches)... if anyone wants/needs it then PM me.
I made some changes for cost reduction and now have the price down to: $33.50 (you would need two for a pack)

Code: Select all

od = 18.00;    // 18650 outside cell diameter
dp = 3.3;         // depth of cell hole
id = 12.0;        // Inside opening diameter

// This gives 1mm separation (air) between the cells
// *** *** may have to increase to 0.7 *** ***
wt = 0.5;         // minimum wall thickness  

// buss notch sizes
ww = 8.0;         //  wide bus width, full length
nw = 4.0;         //  narrow bus width, across rows
bh = 2.0;         //  bus height, thickness
ih = 0.7;         //  insulator height, thickness
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

Addy
100 W
100 W
Posts: 111
Joined: Aug 11, 2017 11:15 am
Location: BC, Canada

Re: The ebike parts designing thread with CAD/CAM

Post by Addy » Sep 25, 2017 8:23 pm

Thanks everyone for your contributions. I have created my own OpenSCAD script to generate packs of any cell configuration.

Features:
-Specify cell size, tab slot sizes, height, etc
-Specify how many rows/columns the pack will have
-Specify pack shape, rectangular or rhombus
-Can generate mirrored version to create matching top/bottom pieces


Here are some examples for a 4S5P pack:
4s5p top.png
4S5P top rectangular style
4s5p top.png (28.96 KiB) Viewed 787 times
4s5p bottom.png
4S5P bottom view
4s5p bottom.png (28.32 KiB) Viewed 1146 times
4s5p top mirrored.png
4S5P top mirrored
4s5p top mirrored.png (22.21 KiB) Viewed 1146 times
4s5p top rhombus.png
4s5p top rhombus style
4s5p top rhombus.png (21.74 KiB) Viewed 787 times
Lastly, here is the OpenSCAD script:
hex_cell V1.2.zip
(1.46 KiB) Downloaded 11 times
https://github.com/Addy771/Hex-Cell-Hol ... _cell.scad
Last edited by Addy on Sep 28, 2017 10:05 am, edited 3 times in total.

Addy
100 W
100 W
Posts: 111
Joined: Aug 11, 2017 11:15 am
Location: BC, Canada

Re: The ebike parts designing thread with CAD/CAM

Post by Addy » Sep 26, 2017 12:30 pm

Oops! Custom heights weren't working, I forgot to use a variable in one spot. I've corrected this and it should work fine now.

I also made the script display the holder's total width and height in the console.
Last edited by Addy on Sep 28, 2017 10:04 am, edited 1 time in total.

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 26, 2017 3:02 pm

damn i missed that thread. would have been happy to contribute. but as i see now, all the work has been done :(. i would like to try the .stl file and print it here, but there both, the .step and .stl file link both redirect to the .step file. maybe this can be corrected?
anything left to do for me?

Addy
100 W
100 W
Posts: 111
Joined: Aug 11, 2017 11:15 am
Location: BC, Canada

Re: The ebike parts designing thread with CAD/CAM

Post by Addy » Sep 26, 2017 3:08 pm

izeman wrote:damn i missed that thread. would have been happy to contribute. but as i see now, all the work has been done :(. i would like to try the .stl file and print it here, but there both, the .step and .stl file link both redirect to the .step file. maybe this can be corrected?
anything left to do for me?
If you have a 3D printer, would you be willing to try my OpenSCAD design? You can use it to generate STL files.

I plan to print out a small test piece later, but it would be great if other people could try it too.

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 27, 2017 3:18 am

sure. i can print it, and i will do it. i have openscan installed on my ubuntu notebook, but never got used to it.

edit: just printing the 5s2p file. what may be a "problem" are too high/long bridges depending on your 3d printer. i'm now printing with support, but removing that afterwards can be a pita, depending on how much it is.
i'll post my results in 1.5h. :)

edit: update of the printing process
2017-09-27 at 15.58.20.JPG
2017-09-27 at 15.58.20.JPG (170.81 KiB) Viewed 1105 times

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 27, 2017 12:27 pm

this is the final outcome. as i thought, removing support WAS a pita. it took 5-10min with a sharp cutter knife. a bit dangerous ;)
the result is quite okay. i didn't check dimensions before i printed, so this will fit 20.3mm wide cells instead of 18.5mm. no big deal, but you need to check before printing.
i would need to play with overlap and other things, but it could work as is.
2017-09-27 at 19.07.29.resized.JPG
2017-09-27 at 19.07.29.resized.JPG (157.98 KiB) Viewed 1099 times
2017-09-27 at 19.07.42.resized.JPG
2017-09-27 at 19.07.42.resized.JPG (154.64 KiB) Viewed 1099 times
2017-09-27 at 19.20.22.resized.JPG
2017-09-27 at 19.20.22.resized.JPG (113.42 KiB) Viewed 1099 times
2017-09-27 at 19.20.45.resized.JPG
2017-09-27 at 19.20.45.resized.JPG (113.77 KiB) Viewed 1099 times

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Sep 28, 2017 5:03 am

I am afraid I have to take responsibility for the failures with regards for the "Hex Cell Caps - 5Sx2P.scad" model file. I was targeting a different 3D printing system that did not have that particular limitation. Addy and I take a different approach to building the part. His approach is MUCH better from a programing perspective but I was unhappy with the DXF export I got with that method. That is something that no one else may care about. I chose to do the entire exterior shape as a single polygon.

I believe that for a 3D printer where you need to support material in a mid-plane that a it might be better to make each endcap as two pieces that are joined together after they are printed. To that end I have prepared two OpenScad model files (Part 'A' and Part 'B'). I will admit that they are terrible kludges with regard to the code but they do seem to work. The 3rd picture shows what part 'B' should look like on the printing platform.
5Sx2P Part A.png
5Sx2P Part A.png (69.73 KiB) Viewed 1085 times
5Sx2P Part B.png
5Sx2P Part B.png (54.71 KiB) Viewed 1085 times
5Sx2P Part B (print view).png
5Sx2P Part B (print view).png (75.28 KiB) Viewed 1085 times
I do not know what the "thickness limitation" is for 3D printers of this type. These files in this zip archive are set up 0.5mm thickness.
2 Piece mode 5Sx2Pl.zip
(3.86 KiB) Downloaded 10 times
Last edited by LewTwo on Sep 28, 2017 5:55 am, edited 1 time in total.
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 28, 2017 5:16 am

looks much easier/cleaner to print an with much less hassle.
i don't know what you mean by "minimum thickness". sub $500 printers have a resolution of 0.1mm per slice. so the minimum is 0.1mm thick. strength depends on material used. i use PLA which is pretty good to print and quite solid.

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Sep 28, 2017 5:18 am

While I am at it:
I have the model for a 14Sx4P battery. After looking at Addy's code I realize that even number series batteries need a mirror image (opposite hand) cap for the top vs. bottom (or left vs right). Shamefully I do not have convenient way of doing that .... yet. Working with this large a model in OpenSCAD reliably crashes my computer's graphic system requiring me to power down and reboot.
14Sx4P.png
14Sx4P.png (147.02 KiB) Viewed 1085 times
Hex Cell Caps - 14Sx4P V4.scad.zip
(1.95 KiB) Downloaded 12 times
Last edited by LewTwo on Sep 28, 2017 6:00 am, edited 1 time in total.
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Sep 28, 2017 5:46 am

izeman wrote:looks much easier/cleaner to print an with much less hassle.
i don't know what you mean by "minimum thickness". sub $500 printers have a resolution of 0.1mm per slice. so the minimum is 0.1mm thick. strength depends on material used. i use PLA which is pretty good to print and quite solid.
The commercial printer systems I was looking at had a minimum web thickness of 0.7mm. Just to clarify, the thickness I was referring to is:
Thickness.png
Thickness.png (27.07 KiB) Viewed 1080 times
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 28, 2017 6:49 am

interesting. i could do that at 0.1mm height. not that it would be practible, and i couldn't remove the part from the printer in one piece. ;)
i'd say 0.5-1mm thickness is ok for stability. i will print it, and we'll see.

Addy
100 W
100 W
Posts: 111
Joined: Aug 11, 2017 11:15 am
Location: BC, Canada

Re: The ebike parts designing thread with CAD/CAM

Post by Addy » Sep 28, 2017 10:01 am

I printed out a couple of test pieces using my script.

First I tried printing with the support on the side where the cells go:
3s3p cell support bottom.jpg
3s3p cell support top.jpg
I also tried printing with support on the side with the slots:
3s3p slot support.jpg
With my current printer and slicer setup, I didn't have much trouble removing the support. I just had to pop off the support with a flathead screwdriver. I think I prefer having the support on the cell side.

With the two test pieces I was able to try the holder out with some cells:
3s3p pack.jpg
3s3p pack.jpg (210.33 KiB) Viewed 789 times
With the cell size set to 18.5mm these cells all fit snugly in the holder.

I had to update my OpenSCAD script along the way because the separation between the cell side and the slots was too high. I updated the script so this can be specified. The latest version of my script is available here:
https://github.com/Addy771/Hex-Cell-Hol ... _cell.scad

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Sep 28, 2017 10:13 am

looking at the first picture it seems you should increase retraction and increase outline overlap. first on will reduce stringing and second one will close the open gaps you have between outlines and infill.

User avatar
parabellum
10 MW
10 MW
Posts: 2008
Joined: Nov 19, 2010 9:55 am
Location: Dominican Republic, north.

Re: The ebike parts designing thread with CAD/CAM

Post by parabellum » Sep 29, 2017 10:45 am

LewTwo wrote: I realize that even number series batteries need a mirror image (opposite hand
Do not worry about that, 3D printing software does this at mouse click, at least Cura has mirroring option.

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Oct 02, 2017 9:41 am

izeman wrote:looks much easier/cleaner to print an with much less hassle.
i don't know what you mean by "minimum thickness". sub $500 printers have a resolution of 0.1mm per slice. so the minimum is 0.1mm thick. strength depends on material used. i use PLA which is pretty good to print and quite solid.
I have not been keeping up with that market. It seems prices have really come down in the last two years. There are what appear to be some very capable small volume printers available for under $200. This is getting more interesting ....

Robotic Industries BuildOne Ultimate, $175: https://www.robotic.industries/preorder/
MonoPrice Select Mini 3D Printer V2, Black (Open Box), $179: https://www.monoprice.com/product?p_id= ... gKYv_D_BwE
MonoPrice Mini Delta 3D Printer, was $170 on indiegogo: https://mpminidelta.monoprice.com/
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

User avatar
parabellum
10 MW
10 MW
Posts: 2008
Joined: Nov 19, 2010 9:55 am
Location: Dominican Republic, north.

Re: The ebike parts designing thread with CAD/CAM

Post by parabellum » Oct 02, 2017 12:46 pm

LewTwo wrote: small volume printers available for under $200.
Why go small volume?
Anet A8 230x230x240mm build volume 160USD: http://www.ebay.com/itm/Anet-A8-2017-Up ... OSw6YtZWbn~

LewTwo
100 kW
100 kW
Posts: 1057
Joined: Apr 08, 2014 4:46 pm
Location: Houston, Texas
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by LewTwo » Oct 02, 2017 1:52 pm

parabellum wrote:
LewTwo wrote: small volume printers available for under $200.
Why go small volume?
Anet A8 230x230x240mm build volume 160USD: http://www.ebay.com/itm/Anet-A8-2017-Up ... OSw6YtZWbn~

Some of us live in smaller residences that are already overcrowded with too much junk.

The three printers listed above are pre-built (vs DIY). Two of them are self leveling. Much depends on what one is looking for.
The smaller printers would be adequate for my requirements, not require as much power and space. I am on the notify list for the Mini-Delta.
If I was looking for large then I would likely look at the Creality CR-10 ($399).
The more I learn the more obvious the immensity of my ignorance becomes.
Weight Wennie E-Bike https://endless-sphere.com/forums/viewt ... 3#p1173723
Shaft Drive Grocery Getter https://endless-sphere.com/forums/viewt ... =6&t=90718
...and thanks to Justin!

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Oct 03, 2017 3:10 am

the a8 is a BIT too cheap to my findings. though an prusa clone will work fine. i have the wanhao duplicator i3plus and love it. did a lot of tuning (can't resist taking working parts apart).
the MonoPrice Select Mini 3D Printer V2 is among the best "smaller" ones. they are excellent and ready to go.

Addy
100 W
100 W
Posts: 111
Joined: Aug 11, 2017 11:15 am
Location: BC, Canada

Re: The ebike parts designing thread with CAD/CAM

Post by Addy » Oct 06, 2017 3:36 pm

I've started printing out 4x2 cell holders for the battery pack I'm working on. I've tweaked the cell diameter to 18.2mm to provide a snug fit for the cells I'm using.

Here's the first two cell groups stacked together:
20171005_165122.jpg
The battery will be a 10s8p arrangement, so I have a lot of work to do still, but I'm happy with the cell holders so far.

User avatar
izeman
10 GW
10 GW
Posts: 4634
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: The ebike parts designing thread with CAD/CAM

Post by izeman » Oct 06, 2017 4:16 pm

looking good! how rigid are they?

Post Reply