Delve into the world of PCB motors and find out why wedge-shaped coils triumph over round coils with a detailed comparison, simulations, and analysis of their magnetic field generation and torque capabilities.

[0:00] We’ve been looking at making PCB motors. So far we’ve got some promising results,

[0:05] we can make a magnet jump around - and we can even make our motor turn.

[0:09] I can drive the motor by just powering the coils in the correct

[0:12] order and I also use the nice Arduino library SimpleFOC in open loop mode.

[0:18] We started off with two-layer boards but decided these were a bit too weak. So,

[0:23] we’ve switched up to a four-layer board and we’re also pushing the coils out a bit further.

[0:27] Going to a 4 layer board should give us double the force from the coils. It will

[0:32] increase the torque and it will also let us use larger magnets, so there are quite a few wins from doing this..

[0:38] Once again it’s taken a while to get this video out the door and PCBWay

[0:43] managed to manufacture and ship the new boards in record time. They are already

[0:46] here! We can now get the motor spinning pretty fast - it’s completely bonkers!

[0:51] Thanks once again to PCBWay for sponsoring the channel - have a

[0:54] look at the services they offer as they do quite a variety of things.

[0:57] However, we’re not really in it for the speed - even though it is

[1:01] quite fun to see how fast the motor will go, what we’re really after is torque.

[1:05] One of the questions that have come up from a few watchers is why people

[1:09] building these PCB motors tend to use wedge-shaped coils instead of round

[1:12] coils. It’s a pretty interesting question - let’s try and get to the bottom of it.

[1:17] There is a somewhat intuitive answer to the question, which is simply that you

[1:21] can fit a lot more copper on the board if you use a wedge shape instead of a

[1:24] coil - this is particularly true as you try and fit more coils around the circle.

[1:29] That’s the intuitive explanation, but let’s try and be a bit more scientific.

[1:34] There’s a warning here - I am not a physicist, and I gave up on electricity and magnetism in

[1:39] my first year of University - so if there is anyone out there who really knows this

[1:43] stuff well, please let me know in the comments how to do it properly.

[1:46] First off, let’s think about what we are trying to achieve. We want to generate

[1:50] a magnetic field that will create a force on a magnet to turn our rotor.

[1:54] This means that what we need is a force in the direction shown in this diagram.

[1:58] The first way to approach this analysis is to try and simulate the fields that are being

[2:03] generated by our coils. Googling around on how to do this took me to this pretty interesting

[2:08] video that explains something called the Biot Savart Law - this in turn led me to some nice

[2:13] Python code that will compute the magnetic field generated by an arbitrarily shaped coil.

[2:18] All you need to do is feed in the points of your coil along with a value for the

[2:22] current flowing through it and you’ll get a 3D space containing your magnetic field.

[2:26] If we simulate our simple spiral coil we can examine the magnetic field just above

[2:31] the coil. As you’d expect we have a very strong Z component pointing out from the coil giving us

[2:37] a north pole. Looking at the X component of the field we can see that our field is pointing out

[2:41] to the left and right of the coil. And similarly, for the Y component, it’s pointing up and down.

[2:46] This makes much more sense if we look side-on at the coil and take

[2:50] a cross-section through the centre of the coil.

[2:52] It’s a pretty interesting simulation. We can do the same for our wedge-shaped coil.

[2:56] Here we can see the Z component, so we can see that once again

[2:59] we are getting a strong magnetic field in the Z direction, the X component of the field is

[3:04] again pointing left and right and the Y component is pointing up and down.

[3:08] Again taking a slice through the middle of the

[3:10] coil we can see something that looks pretty sensible.

[3:12] What’s pretty clear from both our coils is that we can easily generate a strong

[3:16] magnetic field in the Z direction. This will either attract or repel the pole

[3:21] of a magnet - the problem is that this strong field is not going to help turn

[3:24] our motor. If anything it may make it more difficult as our bearing is going

[3:29] to be put under load as the magnets are either pulled or pushed towards the coil.

[3:34] The only field directions that we’re really interested in are the ones that

[3:38] will generate torque on our system and rotate our motor. These will be

[3:42] the components of the fields in the X direction pointing left and right.

[3:45] If we ignore the Z and Y components of the field and sum up the negative

[3:50] and positive X component values we can do a very simple comparison of our coil shapes.

[3:54] With the 6-coil version, there isn’t a huge amount of difference. This kind of makes sense as we can

[4:00] have quite large circular coils, so we’re not getting that much benefit from our wedge shape.

[4:06] However, if we move to the 12 coil versions there’s quite a dramatic difference. We’re

[4:11] able to fit a lot of radial long wires in, which gives us a really nice field in the X direction.

[4:17] So looking at the magnetic fields the coils are generating we have

[4:20] a pretty clear win for the wedge coils - particularly for the 12-coil version.

[4:24] Alternatively, we can approach this problem from the opposite direction,

[4:27] given a magnet, what force will be exerted on our coil?

[4:31] To calculate this we need to know the magnetic field strength and direction

[4:35] being generated by our magnet. Knowing this,

[4:38] we can simulate the force that would be applied to our coil for a given current.

[4:41] So our first challenge is to simulate the magnetic field from one of our magnets.

[4:46] The simplest approach to this would be to model our magnet as a simple dipole. The

[4:50] formula for the magnetic field for a dipole is this. This looks a little complicated,

[4:55] to begin with, but it’s actually pretty simple.

[4:57] The bold r is the vector from the magnet to a point in space,

[5:01] the bold m is the magnetic moment of our magnet, and r is the distance from our

[5:06] magnet. Splitting this formula into the X, Y and Z components and making the magnetic

[5:10] moment point in the Z direction we end up with these three very simple equations.

[5:14] Using these equations we can calculate the magnetic field at any point in 3D

[5:18] space. Here’s a slice of the field looking side-on at the magnet. It

[5:23] looks exactly as you’d expect from your high school physics experiments.

[5:26] And here’s a slice of the field looking up at the magnet from below.

[5:29] We can approximate the field from one of our disk magnets by combining multiple dipole magnets.

[5:35] Here’s a simulation where I’ve used 6 dipole magnets around the edge of our disk magnet.

[5:40] We could probably get away with just using the simple dipole for our simulations,

[5:43] but it’s interesting to try and make it a bit more accurate.

[5:46] To work out the total force acting on our coil from the magnetic flux we chop the

[5:51] coil into small segments and calculate the force on each individual segment.

[5:55] We can sum up all these small forces to get the total force acting on the coil.

[6:00] We’re trying to work out how well this force will rotate the system, so I thought

[6:04] it would be interesting to simulate the forces generated as a magnet sweeps around the stator.

[6:09] Here’s the result for the spiral coil from the 6-coil PCB,

[6:13] and the result from the wedge coil. As we’d expect from our

[6:16] previous simulations of the coil magnetic fields, we don’t see that much difference.

[6:20] But, if we do the same with the 12 coil PCBs we can see quite a dramatic difference.

[6:25] We’re getting a lot more force applied from our wedege-shaped coil compared to the spiral coil.

[6:30] One thing that is very interesting is just how quickly these forces disappear as we

[6:34] move the magnet away from the coils in the Z direction - this tells us that we need to keep

[6:38] our magnets very close to the surface of the PCB if we want to get a good amount of force.

[6:43] So, hopefully, this answers the question of why people go with wedge-shaped coils,

[6:47] you can simply fit more radial lines in and the radial lines are the most important parts

[6:52] of the coils as they generate the fields in the correct direction to create torque.

[6:56] Let me know in the comments what you think of this analysis.