A residence made PCB stepper motor

A residence made PCB stepper motor

← Attend to Kevin’s homepagePrinted: 2021 Dec 24

I saw this sweet video of cramped magnets entertaining around a PCB:

YouTube video

and determined to copy.

The SRI system includes two main strategies:

  1. Generation of magnetic fields thru PCB traces; concentrate on “unrolled bipolar stepper motor”.
  2. Diamagnetic (passive) levitation of magnets thru a graphite layer between the PCB and magnets.

The main realizing is attention-grabbing since it blueprint low-note, precision-manufactured PCBs is also simply remodeled into low-note, true cramped motors.

The 2d realizing is attention-grabbing since it removes “stiction” / mechanical hysteresis from the system; this permits the authors to suppose:

  • ~1 um delivery-loop trajectory repeatability at some level of levitation (when in contrast with 15 um at some level of sliding)
  • 100 nm rms snarl repeatability
  • the utilization of a describe-sensor to weigh a 140 ug grain of salt whereas a robotic is entertaining at 1.5 cm/s

Seems somewhat cold to me.

Prior art

Right here’s all of the prior art I’ve stumbled on about these kinds of programs:

Ron Pelrine looks to were investigating the broader topic since after all his 1988 PhD Magnetically levitated micro-robotics and looks to bask in led the SRI work:

  • 2012 Diamagnetically Levitated Robots: An Advance to Massively Parallel Robotic Systems with Abnormal Scuttle Properties introduces the magnets + PCBs + levitation graphite formula.
  • 2013 patent on the technology.
  • 2015 video exhibits extra detailed robotic motion alongside flex-PCBs.
  • 2016 video exhibits self-assembly.
  • 2016 Software of micro-robots for constructing carbon fiber trusses describes discontinuance-effectors constructed thru chemically etching and bending 0.005 mosey stainless metallic; a 0.75 um sheet of pyrolytic graphite is feeble to decrease sliding friction, nonetheless isn’t sufficient to entirely levitate the 5-magnet, ~10 mm robotic.
  • 2016 Optimum Shield a watch on of Diamagnetically Levitated Milli Robots Utilizing Automated Search Patterns describes buying for ideal control currents to decrease over/under-shoot when entertaining robots
    • “In one test reported here, 150-μm strikes were demonstrated at 90-nm rms error with 15-ms breeze times.”
    • “currents for the four ticket layers are [X1,X2,Y1,Y2] = [0.24, 0.28, 0.352, 0.4] A”
  • 2017 Multi-Agent Systems Utilizing Diamagnetic Micro Manipulation – From Floating Swarms to Cellular Sensors mostly overviews past work and describes how floating robots are cooler than masses of kinds of bearings
    • “modulating the absolute magnitude of the traces will increase or decreases the out-of-airplane force between the board and the robotic offering ~40–70 um Z-motion”
  • 2019 Recommendations and Results for Rotation of Diamagnetic Robots Utilizing Translational Designs describes programs for rotating robots.
  • 2019 Nanoliter Fluid Coping with for Microbiology By blueprint of Levitated Magnetic Microrobots describes the utilization of robots to stab hydrogel with pipettes; strangely it also has potentially the most comprehensive mathematical treatment of the magnetic forces of any of the SRI papers.
    • The circuit described uses PA74 op-amps ($90 twin equipment) on +/- 12V rails to convert a DAC input into true contemporary output
  • 2020 Magnetic Milli-Robot Swarm Platform: A Safety Barrier Certificates Enabled, Low-Rate Take a look at Bed describes a 12 x 12 matrix of self sustaining zones driven by stacked H-bridges and 4 self sustaining LM2673 buck converters acting as contemporary sources (0.25 A, 0.3 A, 0.5 A, 0.7 A; presumably with elevated currents for traces further from the surface); robots are a 5×5 array of 1.4 mm x 1.4 mm x 0.4mm N52 magnets; zone coordination and collision avoidance algorithms are also discussed.

Peter Misenko (Bobricus) utilized a lot of variations; seeing his Hackaday writeup made the project appear extra achievable for me as a hobbyist than the DARPA-funded SRI evaluate papers:

  • 2D stepper driver version the utilization of a L293 driver and a pair of mm magnet, pushing 500 mA at 3V.
  • MOSFET version 3 sets of unipolar-driven coils per dimension rather than 2 sets of bipolar (H-bridge) driven coils.

Miniatur Wunderland has been creating the technology for six years to be succesful of supply a 21 m long scale mannequin of a Monaco System 1 flee:

  • 6-layer boards, traces 0.7mm apart
  • vehicles bask in a 4-by-4 Halbach array
  • hall-make sensors are feeble to trace automobile positions

Teeny Trains.com has their head in the identical attach of abode.

SpritesMods.com became as soon as also inspired by the SRI video and constructed a straightforward board; on the opposite hand, they didn’t provide worthy component in regards to the scorching they vital to efficiently breeze their magnets.

Jiří Vlček’s 2018 master thesis discusses simulations for diversified magnet, wire, and wire hole sizes and implements a lot of PCB platforms:

  • experimental currents are never reported, only the input voltage (~17 V) into their LN298P drivers (which will tumble 3–5 V and breeze into thermal shutdown at elevated currents).
    • they attain anecdote the resistance of their coil traces, even when; suppose 15 V after LN298’s tumble; 45 Ohm coil would salvage about 330 mA and 5 Ohm coil would salvage regardless of the LN298 can attain at its thermal limit.
  • potentially the most PCB component supplied is “three layers format” with 0.1 mm “layer hole top”; this would presumably be achievable with a conventional 4-layer board, the utilization of the discontinuance two layers for coil traces.
  • Vlček’s supervisor is later excited about:
    • 2020 Collective Planar Actuation of Puny Magnetic Robots In direction of Particular particular person Robot Operation mentions 200 mA and 500 mA required to actuate a 1 mm x 0.5 mm disk magnet.
    • 2020 Substitute-off between resolution and frame rate of visible monitoring of mini-robots on an experimental planar platform

Carl Bugeja’s YouTube channel has masses of celebrated experiments with (mostly rotary) PCB motors.

Planar Motors Inc. (primarily based 2017) has a if fact be told impressive industrial field topic coping with system in preserving with electronics-free, permanent magnet levitating platforms:

  • evaluate demo movies
  • over-produced Acopos 6D presentation
  • +/- 5 um positioning repeatability, 2 m/s bustle, 0.5 – 4mm controllable levitation top, skill to weigh +/- 1 g
  • “shuttle energy consumption is ready 15 to 50 W”
  • The one patent utility I might well presumably presumably ranking relates to the utilization of the platforms in snatch-and-snarl functions


The fundamental realizing is to bask in two sets of serpentine coils and selectively lag contemporary thru them to generate a entertaining magnetic field that drags alongside the permanent magnet “robotic”.
Deem into anecdote this map from Vlček’s thesis; the robotic includes 4 permanent magnets glued to a square:

Diagram of coil arrangement

When contemporary is lag thru the first coil (blue), the leftmost pair of magnets are aligned with a magnetic field that’s going into the internet page.
Stopping the scorching on the first coil and beginning it on the 2d (dotted, inexperienced) shifts the magnetic field to the final notice and the robotic follows.
(Cry out to HyperPhysics for the final notice-hand-rule map, as neatly as serving to me thru undergrad.)

When designing a PCB song, we can control:

  • contemporary
  • coil width
  • vertical distance between the coil airplane and PCB surface

How attain these factors portray the motion forces?
We are in a position to estimate the force because the adaptation in energy between when the magnet is un-aligned with a coil (correct away above a touch, snarl 1) and aligned (between two traces, snarl 2):

Furthermore, since the disk magnet is polarized thru its axis, only the vertical component of the magnetic field contributes to the energy.

We are in a position to estimate the utilization of the equation for the magnetic field around limitless wire, the attach the sector $B$ is proportional to the scorching $I$ over the radial distance $r$.

For snarl 1, first and third traces abolish each and each masses of out and the 2d ticket contributes no vertical field component, which leaves factual (in our approximation, anyway) the contribution of the fourth ticket:

B &= I frac{1}{sqrt{t^2 + (2d)^2}} newline
B_mbox{vertical} &= I frac{2d}{t^2 + (2d)^2}.

For the magnet on the identical airplane because the traces (t = 0), this agrees with the authentic equation, which capability that I did my geometry precisely: B = I / 2d.

For snarl 2, the first two wires give us vertical fields

B_{mbox{vertical} 12} &= I left( frac{-3d/2}{t^2 + (3d/2)^2} + frac{d/2}{t^2 + (d/2)^2} appropriate)

and by symmetry the third and fourth traces will contribute the identical vertical field because the first two, giving:

B_mbox{vertical} &= I left( frac{-3d}{t^2 + (3d/2)^2} + frac{d}{t^2 + (d/2)^2} appropriate)

At t = 0 this reduces to:

&= I left( frac{-4}{3d} + frac{4}{d} appropriate) newline
&= I frac{8}{3d} newline
&= I left( frac{2}{d/2} – frac{2}{3d/2} appropriate)

which all as soon as more agrees with the authentic equation.
(I’m awful at algebra, so I gotta abet re-checking…)

So in our 4-ticket approximation, the energy disagreement — and therefore the force — between the unaligned and aligned field positions is:

Delta U &= I left( frac{2d}{t^2 + (2d)^2} – frac{-3d}{t^2 + (3d/2)^2} – frac{d}{t^2 + (d/2)^2} appropriate)

I don’t bask in an intuition about this putrid formula, nonetheless if we calculate some values across the size of a 1 mm thick 4-layer PCB:

we salvage transition energies:

I became as soon as surprised to discover about that the transition energies change into obvious (i.e., the universe finds distasteful) at 0.6 and 1.2 mm for the 1 and a pair of mm coil widths, respectively, suggesting that past those thicknesses we received’t be in a plot to breeze magnets the utilization of coils on the reverse aspect of the PCB.

Deem all these predictions with a grain of salt, and undoubtedly tumble me a line whereas you’ve got got got an realizing of easy mannequin this with extra constancy than my high-college-algebra, 4-wire approximation =D

Initial proof of realizing

Sooner than designing a custom PCB I wished to hasty attach viability, so I 3D-printed a template and hand-injure two serpentine coils (3 mm coil width / 1.5 mm ticket-to-ticket) of 30 AWG enameled magnet wire, covered with polyimide tape (for a smoother surface and to abet the wires from popping out), and drove with a tmc2209 stepper driver I had laying around at a 1.6 A recent limit:

Right here I’m the utilization of a 2 mm unrated neodymium magnet and triggering the steps manually.
Later I received some 1 mm disk magnets from EBay the attach the vendor after all listed them as N52, injure one other template with 2 mm huge coils, and drove that programmatically:

I wasn’t in a plot to force these coils with drv8825 stepper drivers, even with the scorching-limiting potentiometer cranked entirely delivery.
I suspect that the low resistance and inductance of the coil meant that it seemed as a transient and precipitated fault shutdown common sense.
(Though I wasn’t in a plot to ranking anything in the datasheet about minimum motor coil inductance; after I received it working with the TMC driver I stopped taking a quiz.)

PCB v1 salvage

After the a success proof of realizing, I space about designing a PCB.
The necessities were:

  • substances obtainable for assembly in JLCPCB’s catalog
  • 5 V, 500mA max contemporary target (appropriate for riding thru USB)
  • separate zones to envision 1 mm and a pair of mm coil widths (0.5 mm and 1 mm step sizes, respectively).
  • controllable thru stm32f401 breakout boards
  • a dozen or so phases of contemporary control (something like 50 mA increments), only ample to play with micro-stepping and salvage a approach for energy necessities

The tough realizing became as soon as to modulate the scorching drift thru PWM input to an H-bridge driver working the coil.
Cry out to the of us on the EEVBlog dialogue board who helped me resolve a few of the factors with my initial formula.
In negate, that the coils vital extra inductance to late contemporary adjustments such that the contemporary contemporary might well be modulated by a ~250 kHz signal, the max switching bustle of the H-bridge.

(Judge a flipping a steady-weight change: If the lights come on correct away, the room will constantly be entirely sparkling or entirely darkish; nonetheless if the lights shadowy up/down at a rate worthy slower than it’s doubtless you’ll presumably presumably presumably also flip the change, it’s doubtless you’ll presumably presumably presumably also alter the room brightness to any stage by flipping the change backward and ahead.)

I wasn’t sure easy snatch the negate values of the inductor and capacitors, so I modeled the circuit in Micro-Cap, a long-time industrial simulation instrument recently released as free. (Thanks, hope you are playing your retirement!)

This map exhibits the scorching for pulse widths from 0.5 us to 4 us for a 250 kHz PWM signal; level to that 4 us is the length of a 250 kHz signal, so the topmost contemporary corresponds to a truly delivery change and settles at the utmost genuine snarl contemporary of 5 V / 8 Ω = 625 mA.

There’s one H-bridge per coil, two coils per dimension, and two zones, so a total of 8 drivers.
(Cry out to Mitja Nemec for their sweet replicate format KiCAD plugin!)

For the coil patterns themselves I feeble KiCAD pcbnew’s Python API to generate straightforward traces and related them manually to the respective drivers.
This felt like a hack — the coils weren’t assigned to nets and would salvage eradicated by the “cleanup tracks and vias” tool — nonetheless I’m undecided what the “appropriate” solution is here; presumably generating each and each zone (one aspect? both aspect?) as a footprint and drawing the traces in there?
I’m delivery to strategies if anyone has strategies!

Anyway, I’m attempting to avoid my tendency to salvage too treasured with instrument, so I had a few drinks and factual reproduction-pasted masses of garbage Python loops, cleaned up manually, and put in my JLCPCB repeat on Dec 9 at 23: 39.
Five entirely assembled, 0.8 mm thick, 2-layer PCBs were dropped at me in Seattle lower than a week later, Dec 15 at 16: 02; implausible.

PCB v1 analysis

I received the PCB working:

which I constantly ranking to be a sexy shock =D

The 1 mm coils measure to about 8–9 Ω, which is somewhat shut to the 7 Ω estimate from KiCAD’s calculator for a 2.8 m, 0.2 mm huge 1 oz.copper ticket.
(Deem that quantity with a grain of salt; my $20 multimeter reports 0.3 Ω when its leads are shorted and 3.4 Ω for the three 1 Ω ± 1% series sense resistors.)
This presents us a max theoretical contemporary of about 5 V / 12 Ω = 416 mA.

The 2 mm coils measure to three.5 Ω so max contemporary will be nearer to 700 mA (or regardless of Apple’s USB port decides to present past the spec’s 500 mA).

Nonetheless, switching frequencies anyplace shut 250 kHz gave worthy lower currents than predicted.
A 99% accountability cycle gave for the 1 mm coil:

freq (kHz) contemporary (mA)
260 56
100 86
50 160
10 340
5 360

(Currents measured over sense resistors thru the stm32f4’s ADC, readings taken 100x and averaged since the scorching is anticipated to be somewhat choppy.)

I’m undecided easy level to this:

  • H-bridge driver switching losses change into gigantic long earlier than the rated 250 kHz PWM maximum?
  • I setup the Micro-Cap simulation incorrectly by, e.g., failing to mannequin MOSFETS and factual assuming a terrific PWM voltage source?

It’s laborious to suppose without taking a quiz at some waveforms, nonetheless my scope is still in Taiwan =(

For the “robots” I tested both single 1 mm diameter, 1 mm thickness N52 disk magnets and arrays of 5 such magnets press-fit correct into a resin-printed carrier, with the heart magnet’s polarity reverse the out of doors four.
This array might well be reliably actuated at lower currents than the one magnet; the minimum became as soon as about 170 mA when in contrast with 200 mA for the one free 1 mm disk magnet.

As for actuating thru wait on-aspect coils, idea did if fact be told correspond to use!
I couldn’t salvage both single magnets nor the array to breeze on the 1 mm coil, nonetheless I became as soon as in a plot to breeze a single magnet on the 2 mm coil.

For the 1 mm coil I even related a elevated voltage motor driver (drv8833, 10.5 V max motor voltage) and external energy provide to push 1.1 A thru the coils.
I also dominated out the probability the wait on-aspect coils were broken by flipping the board over; they work beautiful after they’re on the surface.

(Paunchy disclosure: I designed the PCB and burned up a motor driver pushing contemporary thru the wait on-aspect coils earlier than ever sitting all the formula down to attain this writeup and the theoretical calculations above, so my algebra might well be biased.)

The wait on-aspect 2 mm coils required corpulent contemporary to breeze the magnet reliably; about 600 mA when in contrast with the 150 mA required by the discontinuance-aspect coils.

Subsequent steps

With the predominant hardware established, I discover about three instructions for future work:

  1. Levitation / sliding enhancements: I sold pyrolytic graphite from two sources, nonetheless neither clearly levitates my magnets.
    I’m undecided if my samples are considerably masses of than what SRI feeble; I if fact be told bask in crystalline blocks and they they give the affect of being to make use of versatile sheet — presumably like these intended for thermal functions?
    Every SRI and Miniatur Wunderland use Halbach arrays of thin square magnets rather than the disk magnets I’m the utilization of; presumably that extra 4/π worth of magnet or the lack of free attach of abode between magnets makes your entire disagreement to levitation?

    I might well presumably presumably also try enhancing sliding efficiency by treating the PCB surface with dry lubricant or drilling delivery vias / thru holes and including pressurized air to bear a originate of air-hockey table (even when I compose no longer bask in any realizing if the millimeter size scale skews extra or much less stable than the centimeter scale of an air-hockey puck).

    I’d also must resolve out a protocol for measuring sliding friction — many repetitions of gently tilting a surface and measuring the attitude when issues scurry off?

  2. Shield a watch on instrument: G-code interpreter, closed-loop computer-vision strategies system, zone synchronization (i.e., for a robotic to traverse two v1 PCBs aspect-by-aspect, the coil phases must match up).
    There’s loads to ranking in negate if I salvage levitation working, as this now-expried Nikon patent notes:

    As will be most neatly-liked by those expert in the art, many masses of commutations will be utilized to the coils to compose force and motion in the x, y, and z instructions and torque and rotation in regards to the x, y, and z axes.

  3. Applications: Strive to attain something with the platform — kind grains of sand, self-entertaining cramped chess space, flight or ship tracker table top mannequin, low-note precision x/y stage for spacious-resolution microscopy, some extra or much less clock/test pleasing concerns, and a great deal of others.
    To boot to refining the platform positioning and tempo accuracy, some functions might well presumably presumably also entail designing and manufacturing discontinuance-effectors like cute lil’ robotic palms or cramped cow catchers.

All of those instructions will sing the next PCB salvage, which I count on will can bask in to be 4-layers so the two coil layers are nearer to the surface.
It will most likely presumably presumably also bear sense in some cases to make use of additional costly 0.1 mm thick 2-layer flex circuits.

NOW WITH OVER +8500 USERS. of us can Be half of Knowasiak totally free. Take a look at in on Knowasiak.com
Read More



“Simplicity, patience, compassion.
These three are your greatest treasures.
Simple in actions and thoughts, you return to the source of being.
Patient with both friends and enemies,
you accord with the way things are.
Compassionate toward yourself,
you reconcile all beings in the world.”
― Lao Tzu, Tao Te Ching