ac motor – Hackaday https://hackaday.com Fresh hacks every day Mon, 20 Oct 2025 16:47:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 156670177 High Performance Motor Control With FOC From the Ground Up https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/ https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/#comments Mon, 20 Oct 2025 23:00:32 +0000 https://hackaday.com/?p=866810 Vector Control, also known as Field Oriented Control or FOC is an AC motor control scheme that enables fine-grained control over a connected motor, through the precise control of its …read more]]>
Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)
Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)

Vector Control, also known as Field Oriented Control or FOC is an AC motor control scheme that enables fine-grained control over a connected motor, through the precise control of its phases. In a recent video [Excessive Overkill] goes through the basics and then the finer details of how FOC works, as well as how to implement it. These controllers generally uses a proportional integral (PI) loop, capable of measuring and integrating the position of the connected motor, thus allowing for precise adjustments of the applied vector.

If this controller looks familiar, it is because we featured it previously in the context of reviving old industrial robotic arms. Whether you are driving the big motors on an industrial robot, or a much smaller permanent magnet AC (PMAC) motor, FOV is very likely the control mechanism that you want to use for the best results. Of note is that most BLDC motors are actually also PMACs with ESC to provide a DC interface.

The actual driving is done with two MOSFETs per phase, forming a half-bridge, switching between the two rails to create the requisite PWM signal for each phase. Picking the right type of MOSFET was somewhat hard, especially due to the high switching currents and the high frequency at 25 kHz. The latter was picked to prevent audible noise while driving a robot. Ultimately SiC MOSFETs were picked, specially the GeneSiC G3R30MT12K. Of note here are the four legs, with a fourth Kelvin Source pin added. This is to deal with potential gate drive issues that are explained in the video.

With the hardware in place, whether following the [Excessive Overkill] GitHub projects or not, what makes all of it work is the software. This is where the microcontroller aspect is essential, as it has to do all the heavy lifting of calculating the new optimal vector and thus the current levels per phase. In this controller an STM32F413 is used, which generates the PWM signals to drive the half-bridges, while reading the measurements from the motors with its ADC.

As can be seen in the resulting use of this controller with old industrial robots, the FOC controller works quite well, with quiet and smooth operation. This performance is why we’re likely to see FOC and PMAC motors used in applications like 3D printers in the future, though the rule of ‘good enough’ makes the cost of an FOC controller still a tough upsell over a simple open loop stepper-based system.

]]>
https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/feed/ 8 866810 vector_field_oriented_control_excessive_overkill_youtube Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)
Double Fed Induction Motors: Clever Motor Control Through Frequency https://hackaday.com/2024/02/18/double-fed-induction-motors-clever-motor-control-through-frequency/ https://hackaday.com/2024/02/18/double-fed-induction-motors-clever-motor-control-through-frequency/#comments Mon, 19 Feb 2024 06:00:45 +0000 https://hackaday.com/?p=664065 Somewhere in most engineering educations, there’s a class on induction motors. Students learn about shaded-pole motors, two-phase and three-phase motors, squirrel cage motors, and DC-excited motors. It’s a pre-requisite for …read more]]>

Somewhere in most engineering educations, there’s a class on induction motors. Students learn about shaded-pole motors, two-phase and three-phase motors, squirrel cage motors, and DC-excited motors. It’s a pre-requisite for then learning about motor controllers and so-called brushless DC motors. [Jim Pytel] takes this a step further in a series of videos, in which he introduces the doubly fed induction motor. If a conventional three-phase motor can have its coils in either rotor or stator, here’s a motor with both. The special tricks with this motor come in feeding both rotor and stator with separate frequencies, at which point their interactions have useful effects on the motor speed.

There are two videos, both of which we’ve put below the break. Understanding the complex interaction of the two sets of magnetic fields is enough to make anyone’s brain hurt, but the interesting part for us is that the motor can run faster than either of the two drive frequencies.

Sadly we’re not aware of any easily available motors using this configuration, so we don’t think it will be possible to easily experiment. But if you want to amaze your friends with an in-depth knowledge of motors, take a look at the videos below.

]]>
https://hackaday.com/2024/02/18/double-fed-induction-motors-clever-motor-control-through-frequency/feed/ 27 664065 double-induction-featured
How Far Can You Push A £500 Small Electric Car; Four Years Of The Hacky Racer https://hackaday.com/2022/06/22/how-far-can-you-push-a-500-small-electric-car-four-years-of-the-hacky-racer/ https://hackaday.com/2022/06/22/how-far-can-you-push-a-500-small-electric-car-four-years-of-the-hacky-racer/#comments Wed, 22 Jun 2022 14:00:26 +0000 https://hackaday.com/?p=540476 Four years ago when the idea of a pandemic was something which only worried a few epidemiologists, a group of British hardware hackers and robotic combat enthusiasts came up with …read more]]>

Four years ago when the idea of a pandemic was something which only worried a few epidemiologists, a group of British hardware hackers and robotic combat enthusiasts came up with an idea. They would take inspiration from the American Power Racing Series to create their own small electric racing formula. Hacky Racers became a rougher version of its transatlantic cousin racing on mixed surfaces rather than tarmac, and as an inaugural meeting that first group of racers convened on a cider farm in Somerset to give it a try. Last weekend they were back at the same farm after four years of Hacky Racer development with racing having been interrupted by the pandemic, and Hackaday came along once more to see how the cars had evolved.

Probably The Most Fun You Can Have With Five Hundred Quid

A busy Hacky Racer pit scene
A busy Hacky Racer pit scene

We’ve mentioned Hacky Racers and Power Racing enough that many readers may be familiar with them, but to recap, the rules governing the series specify a maximum length and width of 1500 mm and 900 mm, a 2-horsepower power limit enforced by appropriate fuses for the voltage employed, and a £500 (around $600) budget limit. In keeping with the Power Racing inspiration many of the vehicles sport creative bodywork designs, and the result is a field of cars with top speeds somewhere between 15 mph and 20 mph (around 30 km/h).

At those first Hacky Racer meetings back in 2018 there was a mixture of power plants. There were a few 24 V DC transaxles from mobility scooters, some DC power plants from golf buggies, and the faster vehicles featuring 2 hp brushless auto rickshaw motors. Most chassis designs were modified from donor machines, and motor controllers were commoditised Chinese modules. Thus it’s interesting to see how a few years of development has evolved the formula. Four years later the newer machines all have custom chassis designs, there were none of the mobility or golf-based DC motors on show, and the rickshaw motors have been joined by converted car alternators. It’s clear that it’s in these last power plants that the most development is proceeding, so it’s worth taking a closer look.

Pushing The Limits With The Cheapest Brushless Motor Of Them All

We covered the conversion of alternator to motor back in early 2020, and from that we know they require a DC bias for their field winding as well as the 3-phase AC from the motor controller. Experimentation has shown that this winding requires between about 2 A and 5 A depending on the alternator, but it’s in managing this figure that some of the most interesting technical developments lie.

Dropper resistors for the field widing can be seen behind this converted alternator.
Dropper resistors for the field widing can be seen behind this converted alternator. There seems to have been a bit of grass picked up during the previous race.

In a brushless motor the stator is a magnet, and it spins in a field created by a set of coils spaced around it. Like most smaller brushless motors the rickshaw motors have a permanent magnet as their rotor, which works well but is prone to overheating. The alternators have an electromagnet with a set of brushes as their stator, and this electromagnet forms the field coil. The more current in this coil the more magnetic field there is, and thus the more torque the motor can produce. More magnetic field also means more back EMF though, and since the motor controller must counteract this back EMF there’s a tradeoff in that the top speed is lower when the current is higher for more torque. The interesting developments with these motors therefore come with variable field current to select the desired combination of torque and top speed.

The simplest method for providing field current is to place a suitable resistor in series with the field coil and hook it up directly to the battery. This seems to be the preferred route of the moment, with one machine using a pair of relay-selected resistors for different motor torques switched in and out by means of a button on the steering wheel. This first-generation field control is being displaced by active electronics, with one racer using a small DC motor controller to power the coil and another experimenting with a buck converter that will eventually map the field current for the best torque at a particular speed.

It’s clear then that the Hacky Racers are pushing the development of their formula, and that they’re doing so while retaining the have-a-go character of the event is to their credit. Motorsport is blighted by so-called chequebook racers, and in this respect Hacky Racers join lawnmower racing as the antidote to formulas which take themselves too seriously. Meanwhile the development of car alternators as brushless motors has huge value for anybody experimenting with small-scale electric traction, so we look forward to more refinement of those techniques.

As we close this piece it’s worth mentioning the venue that hosted the Hacky Racers as they let their hair down. North Down Orchard is a working Somerset cider farm with camping facilities and an excellent cider barn. Some of us here at Hackaday are connoisseurs of good quality real cider, and we wholeheartedly enjoyed North Down’s cider as a particularly welly-crafted example of the art. We hope the Hacky Racers convene there again, and we look forward to bringing you whatever new technical advancements they’ve made in the intervening time.

]]>
https://hackaday.com/2022/06/22/how-far-can-you-push-a-500-small-electric-car-four-years-of-the-hacky-racer/feed/ 31 540476 dav A busy Hacky Racer pit scene Dropper resistors for the field widing can be seen behind this converted alternator.
Rotating Magnetic Fields, Explained https://hackaday.com/2020/11/12/rotating-magnetic-fields-explained/ https://hackaday.com/2020/11/12/rotating-magnetic-fields-explained/#comments Fri, 13 Nov 2020 03:00:53 +0000 https://hackaday.com/?p=446160 If you made a motor out of a magnet, a wire coil, and some needles, you probably remember that motors and generators depend on a rotating magnetic field. Once you …read more]]>

If you made a motor out of a magnet, a wire coil, and some needles, you probably remember that motors and generators depend on a rotating magnetic field. Once you know how it works, the concept is pretty simple, but did you ever wonder who worked it all out to start with? Tesla figures into it, unsurprisingly. But what about Michael Dobrowolsky or Walter Bailey? Not common names to most people. [Learn Engineering] has a slick video covering the history and theory of rotating magnetic field machines, and you can watch it below.

Motors operated on direct current were not very practical at the time and caused a jerky motion. However, Tesla and another inventor named Ferraris realized that AC current could cause a rotating magnetic field without a moving commutator.

Tesla’s motor used two AC currents with a 90-degree phase difference produced by his two-phase generator. Ferraris used a single phase along with an inductor to create the phase difference. However, two-phase motors have limitations and Dobrowolsky’s three-phase design quickly replaced two-phase designs.

The video has many animations to help understand how motors work. It also explains why the magnetic poles of a motor winding appear opposite of the poles in a permanent magnet. Will you be ready to design the next super-efficient electric motor after watching this video? No. But you will have a better understanding of what really goes on inside an AC motor.

If you send electricity to a coil near a magnet, you can make a shaft rotate. If that shaft rotates a magnet and a coil, you get electricity. So, while not ideal, many generators can work as motors and vice versa. If you think the whole world runs on three-phase AC, you should read about the stubborn persistence of two-phase.

]]>
https://hackaday.com/2020/11/12/rotating-magnetic-fields-explained/feed/ 11 446160 mag
Car Alternators Make Great Electric Motors; Here’s How https://hackaday.com/2020/01/16/car-alternators-make-great-electric-motors-heres-how/ https://hackaday.com/2020/01/16/car-alternators-make-great-electric-motors-heres-how/#comments Thu, 16 Jan 2020 15:01:47 +0000 https://hackaday.com/?p=392668 The humble automotive alternator hides an interesting secret. Known as the part that converts power from internal combustion into the electricity needed to run everything else, they can also themselves …read more]]>

The humble automotive alternator hides an interesting secret. Known as the part that converts power from internal combustion into the electricity needed to run everything else, they can also themselves be used as an electric motor.

The schematic of a simple automotive alternator, from US patent 3329841A filed in 1963 for Robert Bosch GmbH .
The schematic of a simple automotive alternator, from US patent 3329841A filed in 1963 for Robert Bosch GmbH.

These devices almost always take the form of a 3-phase alternator with the magnetic component supplied by an electromagnet on the rotor, and come with a rectifier and regulator pack to convert the higher AC voltage to 12V for the car electrical systems. Internally they have three connections to the stator coils which appear to be universally wired in a delta configuration, and a pair of connections to a set of brushes supplying the rotor coils through a set of slip rings. They have a surprisingly high capacity, and estimates put their capabilities as motors in the several horsepower. Best of all they are readily available second-hand and also surprisingly cheap, the Ford Focus unit shown here came from an eBay car breaker and cost only £15 (about $20).

We already hear you shouting “Why?!” at your magical internet device as you read this. Let’s jump into that.

These People Think Building Their Own Electric Vehicles is Fun!

One of the interesting facets of watching the UK Hacky Racer series grow from a bunch of friends making silly electric vehicles to something approaching a formal race series has been seeing the evolution of the art of building a Hacky Racer.  As the slightly grubbier cousin of the US Power Racing series it has benefited somewhat from inheriting some of their evolutionary experience, but that hasn’t stopped the Hacky Racers coming up with their own vehicle developments. They’ve moved from salvaged mobility and golf buggy motors to Chinese electric bicycle and tricycle motors, and now the more adventurous constructors are starting to look further afield for motive power. One promising source for an inexpensive decently-powered motor comes in the form of the car alternator.

Our Ford Focus alternator
Our Ford Focus alternator

Searching for car alternator conversions reveals a variety of pages, HOWTOs, and guides, many of which can be extremely confusing and overcomplex. In particular there are suggestions concerning the three stator connections, with advice to break out the individual windings and apply special wiring configurations to them. Based upon the experience of converting quite a few alternators this appears surprising, as all the various models we’ve converted have had the same ready-to-go delta configuration that needed no rewiring at all. Perhaps it’s time to present a Hackaday guide with a real alternator, and explode any remaining myths while we’re at it.

So, fired up by the prospect of a cheap brushless motor by the passage above, you’ve got a Ford Focus alternator on the bench before you. How does one go about converting it?

Wanton Destruction Of An Innocent Car Part

Removing the regulator/brush assembly
Removing the regulator/brush assembly

On the back of a modern alternator is universally a plastic dust cover secured by a set of bolts. These devices are designed to be refurbished so (perhaps surprisingly for a modern automotive component) they are usually very easy indeed to dismantle. If you take off the dust cover you’ll see the regulator, rectifiers, and brushes, sometimes integrated into a single unit, but more usually as in the case of the Focus alternator with the regulator and brushes as a separate assembly to the rectifier.

There is often a copious quantity of silicone sealant which needs to be cut away, but any nuts or bolts that secure the regulator should be able to be undone, and with care not to damage the brushes themselves it can be lifted clear in one piece. Then the rectifier unit can be removed, a process in which it is sometimes simpler to attack it with side cutters rather than try to remove it in one piece.

The rear plate of the alternator with the regulator and rectifier removed, showing the stator winding connections.
The rear plate of the alternator with the regulator and rectifier removed, showing the stator winding connections.

You should be able to identify the three bundles of thick enameled copper wires coming from the stator coils, and detach the rectifier straps from them. In some alternators they’re soldered, but some other particularly annoying designs they’re spot-welded. At the end of the dismantling process you should have a bare alternator with three sets of stator wires protruding and a bare shaft with two slip rings, whatever remains of the rectifier pack, and the regulator/brush pack.

The next step is to remove the regulator circuitry while preserving the shape of the regulator/brush assembly, and to locate and preserve the brush connections where they meet the regulator. Yet again there will be copious quantities of silicone potting compound to hack away, but eventually the regulator should be exposed. These are universally some form of hybrid circuit on a ceramic or metal substrate, with connections emerging from the moulded plastic surrounding them being soldered to pads on their edges. It should be relatively straightforward to identify the pair of connections for the brushes, carefully unsolder them, and push out the regulator circuit.

The completed motor.
The completed motor.

Finally, you should have a bare alternator, a brush pack with a missing regulator circuit, and the plastic dust cover. Simply solder three suitably large-gauge wires to the three sets of stator wires and cover them in heat-shrink, solder a pair of lighter wires to the brush connections, and reassemble the brush pack to the alternator. You may need to put some form of strain relief on the wires to the brushes. The rectifier pack doesn’t need reassembling, so on some models you may need to make a spacer to replace it in supporting one side of the brush pack.

Holes can be made in the dust cover for all the various wires, and the dust cover fitted with all the wires poking through. At this point you’ve converted your alternator, and all that remains is to drive it with something. Fortunately that is a surprisingly simple process with off-the-shelf parts.

Driving Your New Motor

Motor and controller, on the bench.
Motor and controller, on the bench.

A so-called brushless DC motor is simply an AC motor with a bundle of electronics that turns a DC supply into an AC one to run it. They have the advantage over brushed DC motors in reliability, efficiency, and ease of speed control, but at the expense of more complexity.

The good news for people converting automotive alternators into electric motors is that a whole range of brushless motor controllers can be had for not a lot of money, in the form of electronic speed controllers (ESC) intended for those Chinese electric bicycles and tricycles. They take a battery DC supply and produce a three-phase AC suitable to drive a delta-connected motor, and they work well with converted alternators.

ESCs have two modes, one for motors with Hall-effect feedback sensors, and one for motors without such as our alternator. Usually a wire link needs to be made to enable this, consult the instructions for your controller. We’ve found that an alternator drives well as a motor from a 36V or a 48V supply, and as long as a controller with enough power is used then they do so reliably. A quick AliExpress search for “brushless motor controller 1500W” turns up plenty of choice.

Given a controller, there is one more requirement for our alternator to become a motor, it must have a DC supply to its rotor winding. It needs to have about 2 or 3A flowing through it, for which a current-limited PSU module performs the task admirably. Having to use that power makes the motor a bit less efficient than a permanent magnet one, but the cost of a scrap alternator is hard to beat.

The motor featured in our pictures is destined to be one of a pair providing traction in a new car for an assault on this year’s races. Personal experience with SMIDSY the Robot Wars robot would lead me to give them forced-air cooling, but unlike the electric tricycle motors these do seem to cope well with getting hot. An alternator motor might not be the one-stop solution to whatever your small-scale traction needs could be, but even so it’s worth being aware that they are an option without unexpected wiring rituals. If you convert one for a project, please make sure to write it up and send it to our tips line!

]]>
https://hackaday.com/2020/01/16/car-alternators-make-great-electric-motors-heres-how/feed/ 197 392668 alternator-motor-featured The schematic of a simple automotive alternator, from US patent 3329841A filed in 1963 for Robert Bosch GmbH . Our Ford Focus alternator Removing the regulator/brush assembly The rear plate of the alternator with the regulator and rectifier removed, showing the stator winding connections. The completed motor. Motor and controller, on the bench.
Reusing Motors From Washing Machines https://hackaday.com/2017/12/20/reusing-motors-from-washing-machines/ https://hackaday.com/2017/12/20/reusing-motors-from-washing-machines/#comments Wed, 20 Dec 2017 19:30:00 +0000 http://hackaday.com/?p=286505 Big ol’ motors are great when you need to get a big job done, but they can be expensive or hard to source new. However, there’s a source of big, …read more]]>

Big ol’ motors are great when you need to get a big job done, but they can be expensive or hard to source new. However, there’s a source of big, fat, juicy motors right at home for most people – the garden variety washing machine. These motors would usually require a special controller, however [Jerry] is here to show us how to hack the controller that comes with the machine.

The hack begins as [Jerry] decides to gut a Maytag MAH7500 Neptune front loader. Many projects exist that borrow the motor but rely on a seperately sourced variable frequency drive, so the goal was to see if the machine’s original controller was usable. The machine was first troubleshooted using a factory service mode, which spins the drum at a set speed if everything is working correctly.

From there, it was a relatively simple job to source the machine schematics to identify the pinouts of the various connectors.  After some experimentation with a scope and a function generator, [Jerry] was able to get the motor spinning with the original controller doing the hard work.

It’s a simple hack, and one that relies on the availability of documentation to get the job done, but it’s a great inspiration for anyone else looking to drive similar motors in their own projects. The benefit is that by using the original motor controller, you can be confident that it’s properly rated for the motor on hand.

Perhaps instead of an induction motor, you’d rather drive a high powered brushless DC motor? This project can help.

]]>
https://hackaday.com/2017/12/20/reusing-motors-from-washing-machines/feed/ 57 286505 main450