From wiki
Jump to navigation Jump to search

Automotive alternators are widely available, very low cost (even free, reclaimed), and designed to operate for long lifetimes in aggressive engine-bay environments. Although not an obvious choice, and unsuitable for driving cars, they can be an interesting choice for low power applications (motorcycles, garden equipment, ancillaries).

There are a huge variety of alternators available, so the below is based only on the few types the author has experience of. Some experimentation is likely to be required!

They have a separate field current, and act as a Surface Permanent Magnet Synchronous Motor (SPMSM) which the OpenInverter firmware is currently not optimised for - they will run happily using the FOC firmware though, and it is only a very simple code edit required to get the best from them.


Alternators are, in fact, polyphase machines connected to a rectifier, together with a regulator which adjusts a field current to maintain the desired output. The field current is passed to a rotor winding via two slip rings to generate the magnetic field. These slip rings last much longer, and produce less electrical noise than, typical motor brushes, as there is no commutation. Currents and voltages are also low, typically reaching a couple of amps.

Clearly, trying to make an alternator spin by applying DC voltage to its external connections will not work, they are not DC machines.

Removing the regulator and rectifier (sometimes these are separate, but more often are one unit, often including the brush holders) is generally easy, as these parts are generally what causes an alternator to fail in normal service (the diodes etc are most affected by heat and vibration). Happily, removing the regulator and rectifier exposes the phase connections for us to use!

Some alternators have permanent magnet rotors, or even rotors with both field coils and permanent magnets. A permanent magnet rotor is slightly easier to drive (no field current to worry about) but is less flexible. An alternator with only a field coil and no permanent magnets is more 'adjustable' and can be driven very hot (you only have to worry about insulation temperature rating) without permanent damage. An alternator with both a wound rotor and permanent magnets will run without field current, and also generate a stronger field, but you have to watch the temperature so as not to demagnetise the magnets, and also field current polarity to work with, and not against, the magnets.

Alternator types

Focusing only on automotive alternators (alternators are of course available from the marine and aviation fields, but these tend to be much more expensive and difficult to find), units are commonly available in 12 or 24V applications, and with various current ratings, depending upon the vehicle they are specified for.


It may be tempting to chose a higher voltage alternator, to 'better match' your pack voltages. Some 24V alternators, however, are simply 'normal' 12V alternators with different regulator/rectifier modules fitted. Some may have different windings and a lower Kv, which may be useful - experimentation needed!

Current rating

An alternator with a higher current rating will likely handle higher phase currents better. Unfortunately, some newer higher output alternators are actually 6 phase, rather than 3 phase. Constructing a 6 phase inverter, or combining adjacent phases to make the alternator 3 phase, would be possible, but may be difficult to do successfully. It can be difficult to determine the number of phases in a particular alternator before beginning disassembly.

Max rpm

As with any motor, it is important not to exceed the maximum rpm (too much!), but this is rarely listed on the alternator specification. You can calculate it but finding the/a vehicle it is fitted to, find the engine redline rpm, crankshaft pulley diameter, and measure the alternator pulley diameter. You should then be able to calculate what rpm the alternator is turning at the engine redline. This would be a sensible limit!


Some modern alternators come fitted with a pulley that free-wheels in one direction (has a Spragg clutch) - this allows, for example, a car engine to rapidly decelerate while changing gears without loading the alternator and belt. Of course, that means you get either no drive, or no regen (depending on your vehicle and drivetrain)! Look for an alternator with a solid pulley - the one-way pulleys have what looks like a bearing visible from the front (sometimes covered with a plastic cap), solid pulleys should be fairly obvious.

Driving the alternator

Once the rectifier is removed and you have access to the phase windings, you may need to connect them into star or delta configuration (it seems the the stator coils tend to be generic, exposing all 6 connections, and the rectifier 'chooses' how to connect them up), and then wire the three phases to the inverter. In addition (for alternators with a field coil), you will also need to provide power to the rotor through the brushes. Use a current-regulated supply - 5A is plenty to drive the rotor into saturation, start with ~1.5 - 2A.

Position feedback

Alternators don't need position feedback in their intended service, so we'll have to add our own. Any device suitable for the FOC firmware will work, but some will be easier to mount than others. The Melexis sin/cos encoder ICs are simple to interface with, and simply require accurate axial mounting ~5mm above the end of the shaft, to which a small diametrically magnetised (across the diameter) circular magnet is affixed. Using the slip ring end of the shaft is likely to be the simplest. You may need to adjust the axial alignment of the IC later while the motor is running to minimise offset/vibration.

Inverter configuration

Flash the FOC firmware and do the normal checks. Connect your current regulated supply to two of the phase connections and the field, the motor should 'snap' to a position. Turn the rotor by hand over 360°, counting the 'cogs' - this is your polepairs. Set the position feedback (encoder/resolver) to suit your hardware, and wire everything up. Complete syncoffset calibration, and your alternator should now be a motor!


As previously noted, the OpenInverter FOC code is optimised for IPMSMs (Interior permanent magnet synchronous motors), which require some Id. SPMSMs like the alternator require no Id. Here is a github commit to a fork of the standard OpenInverter code that adds a parameter to chose between IPMSM and SPMSM, and sets Id to 0 for the latter. (this may need adjusting to suit other parameters added to the main code)

You will not need field weakening! Set fwkp = 0.

Field control

With the motor spinning at a fixed but reasonably low throttle/speed, adjust the your field current. You should find that motor rpm increases as field current decreases and visa versa. Likewise, peak torque will increase with field current, up until the rotor saturates (usually by ~5A). You can calculate the Kv and Ki for different field currents by driving the rotor at a set speed (with a battery drill perhaps) and measuring (peak) phase voltage and frequency/rpm. This may be useful later when driving something to get the best out of the motor at different speeds.