New blog!

I have started a new blog over at things-in-motion.blogspot.com which focuses on all things related to electric motors, motor control and robotics. So come join me in a journey to try and understand the answers to such questions as:

  • What limits the torque density of an electric motor?
  • Whats the theoretical maximum in the specific power density of an electric motor and what are the practical limitations?
  • How efficient are hobby grade brushless motors and how might their efficiency be improved?

More to come.

Posted in Mendel Build | Leave a comment

DIY heated bed for a Cetus 3D printer

Last year I purchased a Cetus 3D printer which I have now been using off and on for 8 months. So far I have been very happy with the results.

Quick review of the printer

Positives:

  • ~10 min assembly time.
  • Extremely high print quality due to the use of linear rails and small nozzle sizes.
  • Simple user interface.
  • Can be modded for other uses such as a laser engraver.
  • Can print in Pet-G and ABS without a heated bed if you use a glue stick prior to the first layer.

Negatives:

  • Included software has limited slicing options. It does support 3rd party g-code but when doing so you no longer have a print time estimating.
  • If no heated bed is used then you are limited to PLA or using large rafts.
  • If you do purchase with a heated bed it is apparently quite slow to warm up and will only reach about 50C if your ambient temperature is low.

Overall I would highly recommend this printer to anyone needing a cheap high quality 3D printer in a small form factor.

After seeing this video by Marco Reps I have decided to upgrade my printer to include a heated bed. You can purchase an official heated bed for this printer but I want to roll my own more powerful version


DIY heated bed

Design objectives:

  • Ability to monitor and set the print bed temperature
  • Use a separate power supply to that  used by the 3D printer so as to not overload it.
  • Over-temperature protection independent of the temperature monitoring.

Parts list

Both the power supply and the switching MOSFET are overkill for this application but they are what I had on hand.

Modifying the heated bed

The power resistors were attached with two part epoxy as I did not have any thermal adhesive on hand. After many dozens of hours of printing this method appears to be working just fine. The resistors were wired up in a 4S-2P configuration so that the current draw from the power supply was around 4.2A for a total of 100W output.

In series with the input to the heated bed was placed the bi-metal switch so that in the even that it becomes stuck on full power it should still stay within a safe temperature range. Note that you can use a bi-metal switch as a method of temperature control on its own but that they tend to become stuck after a few thousand cycles. The MOSFET board was connected directly to the power-supply and switched with the relay output of the temperature controller. Note that the MOSFET board requires 12V to turn on and so I used a simple voltage divider to drop the 24V down to 12V.

The wires and the thermocouple were attached with capton tape. After remounting the bed I was pleased to see that it all just fits without needing to make any further changes.

IMG_20180710_211127.jpg

Building the enclosure

Naturally, I wanted to print the enclosure on the Cetus and so I put something together in F360 which can be found here. It just fits the power supply, temperature controller and the MOSFET board. Plenty of veneration was also included. The CAD models for all the Omron parts were supplied by Omron on their website.

The temperature controller can be powered off mains AC or 24V DC. I decided to separate the high voltage mains from the low voltage components via a dividing wall and power the temperature controller off 24V. This design is made so that the whole Cetus 3D printer can safely sit on top of the enclosure which keeps the foot print nice and small.

Ever square mm of the printing area was used to print the enclosure, something that could not have been done without a heated bed.

Note that I initially printed the red lid first using the default Cetus print settings (and then ran out of filament) and the final result was pretty bad. After looking around on the cetus forums it looks like there is a problem with the included slicer when printing without a raft. To solve this I switched over to the excellent Simplify 3D slicer. After a few hours of adjusting the settings I managed to get great results. If your interested you can find a copy of my final settings here.

And finally the end result.

IMG_20180804_130619.jpg

It takes around 4 minutes to reach 70C in an ambient temperature of 14C (it was cold in my garage where I timed it) which is a great improvement over the reported times of the stock heated bed.

If I was to repeat this whole exercise it would probably be a good idea to squeeze in a mains fuse some where just in case there was a fault with the power supply that its own internal protection didn’t catch. Also printing the enclosure in all one colour and including a cable drag chain would improve the overall look. Otherwise I’m quite happy with the end result

Posted in 3d printing | Tagged , , , , , , , | Leave a comment

How to sketch equation curves in Fusion 360

The ability to sketch an equation curve is available in Autodesk’s more professional (and expensive) CAD product, Autodesk Inventor, but is missing from Fusion360’s. This tutorial details how you can get similar functionality using the Fusion 360 API.

The Fusion 360 API (Application Programming Interface) allows you to control the functionality of Fusion 360 by wiring code rather than directly through the graphical interface. This is a powerful tool which is useful for automating repetitive tasks and writing add-ins like those you will find on the Autodesk app-store.

In this tutorial we will be using the API in Fusion 360 to sketch a curve using an equation in both 2D and 3D. This is useful when you need to produce a specific, mathematically correct curve that can not be formed easily from primitive geometric shapes. For example, how would you sketch a line along the following equation

29.jpg

which when plotted over range 0 to 6.3 (2pi) (spreadsheet here) looks like the following:

33.jpg

To do so we can follow a few simple steps:

  1. Get acquainted with the basics of how to use the API by watching the following short video from the Autodesk Design Academy channel.

2. Refer to the following example python script to suit your need which can be found here.

import adsk.core, adsk.fusion, adsk.cam, traceback, math

def run(context):

ui = None

try:

app = adsk.core.Application.get()

ui = app.userInterface

design = app.activeProduct

# Get the root component of the active design.

rootComp = design.rootComponent

# Create a new sketch on the xy plane.

sketches = rootComp.sketches

xyPlane = rootComp.xYConstructionPlane

sketch = sketches.add(xyPlane)

points = adsk.core.ObjectCollection.create() # Create an object collection for the points.

# Enter variables here. E.g. E = 50

startRange = 0 # Start of range to be evaluated.

endRange = 2*math.pi # End of range to be evaluated.

splinePoints = 100 # Number of points that splines are generated.

# WARMING: Using more than a few hundred points may cause your system to hang.

i = 0

while i <= splinePoints:

t = startRange + ((endRange – startRange)/splinePoints)*i

xCoord = (math.sin(2*t))

yCoord = (math.sin(3*t))

points.add(adsk.core.Point3D.create(xCoord,yCoord,0))

i = i + 1

#Generates the spline curve

sketch.sketchCurves.sketchFittedSplines.add(points)

# Error handeling

except:

if ui:

ui.messageBox(‘Failed:\n{}’.format(traceback.format_exc()))

3. Either hit run from Anaconda (The python compiler installed by Fusion 360) or save the script and run it in Fusion 360 directly using the ‘Add-ins’ dialog box. The above script generates the following curve.

34

To extrude the shape you can select the curve and use the ‘Open/Close Spline Curve’ function to form a closed sketch.

36.jpg

Increasing the ‘splinePoints’ variable will increase the number of spline points generated and in-turn will produce a curve that more accurately fits the equation used. Below is a the same curve with 500 spline points.

35

However, using a large number of spline points (approx. >500) may cause a considerable delay in generating your sketch or may even crash Fusion 360 completely.

Also note that the API exclusively works in the units of cm for length, radians for angles (radians = degrees * pi/180) and kg for mass. If you prefer to work in different units see this section of the Fusion 360 API manual.

To extend this concept into 3D space we only need to add another coordinate Z and include that in the points object.

while i <= splinePoints:

t = startRange + ((endRange – startRange)/splinePoints)*i

xCoord = (math.sin(2*t))

yCoord = (math.sin(3*t))

zCoord = 2**t

points.add(adsk.core.Point3D.create(xCoord,yCoord,zCoord))

i = i + 1

#Generates the spline curve

sketch.sketchCurves.sketchFittedSplines.add(points)

Below is how this sketch looks when viewed face on and at an angle.

2018-07-02 21-38-53.gif

That’s it for this post. For a more in-depth understanding of the API be sure to take a look at the Fusion 360 API User manual, sample scripts and the API training series playlist on YouTube.

Big thanks to Macaba on the Odrive discord channel for showing me his cycloidal script  which I modified to use as the example in this post.

Posted in 3D Design | Tagged , , , , | 3 Comments

CAD design of a DIY Strain Wave (harmonic drive) Reduction in Fusion 360

Strain wave gearing is known for its near zero backlash, compact design and axial construction. However it is not known for being cheap. This is why Simon Merrett created waves (pun fully intended) with his DIY 3D printed strain wave gear reduction first shown on hackaday in 2017.

In this post I show how to recreate this design in Fusion 360 along with a few improvements like the use of a proper flex spline cup. Such a design could be idea for robotics applications or things like a 4th axis on a milling machine.

The belt I have chosen for the flex spline is a 50T HTD 5M (5mm pitch) belt turned inside out. As discussed in a previous post this belt has the following parameters:

  • Thickness of 3.81 mm
  • Tooth height of 2.08 mm
  • 5mm pitch
  • 3.05 mm radius on the teeth and 1.49 mm radius on the base of the teeth.

The pitch diameter of a belt is the diameter of the belt as measured at the reinforcing steel wire. To estimate the pitch diameter of this belt you just calculate the circumference (50 teeth * 5 mm pitch = 250 mm) and divide by pi (250mm / pi = 79.58 mm). When we turn the belt inside out (invert it) this length should remain the same due to the steel wire. The rest of the belt however will become compressed/stretched to accommodate the new shape. Thanks to this this handy timing pulley diameter calculator created by droftarts on his parametric pulley page we can see that the pitch line offset for a HTD 5M belt is 0.5715 mm. That is the distance from the pitch diameter to the base of the tooth. This distance will be the same when the belt is inverted and so we now know the distance to the base of the tooth will be:

Diameter for base of tooth for an inverted belt = pitch diameter + 2 * pitch offset

Diameter for base of tooth for an inverted belt = 79.58 + 2 * 0.5715 = 80.723 mm

With that piece of key information we can now model the inverted belt in the same way as you would a normal pulley

16.jpg

One assumption that I made with this belt is that the majority of the flex occurs in the valleys rather than the teeth and so I have modelled the belt accordingly. This involved generating 3.05 mm teeth diameter spaced 7.2 degrees apart with the valley distance increased to make up the gap. For comparison the image below is of a the same belt but not inverted. Notice that the valleys are slightly different in size.

With the inverse belt design its time to move onto the circular spline. The construction of the circular spline is exactly the same as the inverse belt discussed above with the exception that the grooves are concave and facing inwards. For the circular spline I have selected 54 grooves for a gear ration of 12.5:1 (50 / (54 – 50) = 12.5 : 1).

22.jpg

Its clear from the image above that the inner inverted belt (flexible spline) and the outer ring (circular spline) are not touching. This is because the flexible spline has not been deformed by a wave generator.

To determine the correct shape of the wave generator and thus the scaling of our flex spline in two dimensions we can consult this ellipse calculator. I used the base of the teeth for reference of the starting circle and the matching base in the outer ring for the widest diameter after deforming. The spreadsheet just estimates the minor axis of an ellipse that maintains the same area as the starting circle and displays the required scaling for the flexible spline. Once applied to the flexible spline it now meshes with the circular spline.

23.jpg

Moving on to the flex spline cup. This component will need to be attached to the flex spline belt by some means, possibly a flexible glue. The flex spline cup acts to hold the flex spline belt in place and stop it from rotating and thereby allowing it to do usable work to the circular spline. This cup was generated by creating a circle a desired distance below the deformed flex spline belt and then using the loft feature to generate the geometry. Note that you will need to loft a solid body first then create an offset top and bottom to loft cut out the middle.

This cup would be the trickiest thing to make for a DIY construction. If possible, an off the shelf cup (a literal drinking cup) made of stainless steel or similar could work well. Shout-out to the Dexter guys for that idea which they use on their robot arm.

Finally we come to the wave generator. The is the component that is connected to your motor and that deforms the flex spline. Rather than bearings in a cage like the commercial design I have oped for for the easier to construct ball bearing approach.

686ZZ Bearings are attached to a plate by M6 bolts and lock nuts. These bearings are arranged so that they maintain the correct ellipse shape of the spline. The position of the bearings was estimated by just offsetting the inner section of the ellipse by the diameter of the bearings plus the thickness of the flex spline cup wall.

Lastly we need a bearing surface with pre-load to hold the output circular spline. Large 6820 sized bearings could work well that regards but I have yet to include them in the model.

IMG_20180624_180131

More to come.

Posted in 3D Design | Tagged , , , , , , , , , , | Leave a comment