DIY Electric Car Forums banner

Inexpensive ASIC DC Series controller, no uC, DSP or programming

18830 Views 127 Replies 11 Participants Last post by  Tony Bogs
Inexpensive DC Series and ACIM ASIC controllers, no uC, DSP or programming

Hi everyone. I have noticed a trend towards the use of DC series traction motors in DIY EV projects.

In this thread I am going to design an inexpensive, very basic, easy to build
but also efficient DC series motor controller with modern ASICs,
based on PWM control of the applied DC voltage and hysteretic control of the maximum motor current.

Why? I'm going to buy an EV for daily use, building one is mainly for the fun of it.
I don't have a lot of spare time or money to spend on it, so a DC traction conversion is the best option for the next couple of years.
A drivetrain based on a DC series motor is by far the easiest and least expensive way to get traction (high start-up torque) from a DC power source.
As demonstrated in a recent video of a €1000 build and in every ICE car with a DC series starter motor.

DC series motors have been used for propulsion for ages and back in the pre-IGBT era,
torque and speed of DC series motors were controlled by shifting a tap on a huge, high power series resistor bank.
Very inefficient of course, but that is the way it was done when I was EE student in my first year.
At the core, the driver of the vehicle is the most important part of the control mechanism,
being both the feedback path and the input. A very elegant control solution because of its simplicity.

In the design in this thread the resistor bank will be replaced with modern silicon in ASICs.
Yes, application specific integrated circuits, so there's no time consuming complexity from microntrollers,
digital signal processors, unnecessary and potentially unstable controllers (PID) in software and the biggest issue: bugs and programming errors.
The electronics only kick in automatically when the response of the driver is too slow for the protection of the power electronics and the motor: overcurrent protection.
That is what "very basic" means, but it takes very little effort to dress up the controller with whatever (automated) (protection) feature is wanted.
Examples: cruise control, monitoring (warning lights, gauges), reduction of the maximum motor current when there's not enough air flow across the cooler.

The schematic shows the heart of the controller: only three SOT-23 devices, the lvc4066 and the lvc14 can be replaced with a single lvc3157 SPDT device.
Current sensing for overcurrent protection is done with a low cost LEM sensor.
Hysteretic control is implemented with a low cost comparator (MCP6561) and a LTC6992 has a suitable frequency response for the conversion of the throttle input into a PWM signal for the power stage.

EDIT: The all hardware ACIM controller is introduced later on. Thanks again, Damien!





See less See more
41 - 60 of 128 Posts
OK, naughty ideas about a hardware AC controller. Trying to focus and beam in on Ireland. Nope, not getting anything. :D

Well, I guess it's up to me then to fill in the huge blanks and gaps in the ideas for a hardware AC controller.

Thank goodness it is not as challenging as it was in the 70s.
We now have low cost switched capacitor filter devices available and in production. They are going to play an important role,
because the frequency and phase response can shift up and down as the output frequency of the controller varies.

Sine wave generation: SQUARE WAVE VCO with divider and high order SWcap low pass filter.
Phase shift for three phase operation: dual universal SWCAP filter device. Allpass?
Accurate triangle voltage based 3 phase PWM : quad comparator + inverter (SOT23) + integrator.
Dead time insertion: easy to implement RCD

V/F control input: LM1815 magnetic pickup, LM2907 F/V and a throttle pot.

Total parts cost of basic controller (excluding PCB, throttle pot, gate drivers and power stage): about €30.

My telepathic skills didn't get me very far :D , I guess I don't have any,
so is this anywhere close to what you had in mind, Jackbauer (Damien Maguire)?
I'm not so sure about the naughty element. Perhaps you can shed some light on it?

See less See more
Sorry Tony my mind is elsewhere these days:)

I'd came across the device in the picture when working on the Enova inverters. Dismissed it at the time (it is obsolete of course) but recently got me thinking about what would be needed to make a hardware 6 output pwm generator capable of running a power stage.


See less See more
No wonder, I can imagine that Elon keeps you quite busy with frequent revisions of hardware and possibly software. ;)

And now you've got me thinking. IXYS IXDP630, is that the one?
Pretty small if it is a re-packaged microntroller with some preloaded software.

Yeah, it think it might be the more efficient solution to go with hardware if you take (development) time as a scarse resource into account.

I picked the LTC 1060 as a dual universal tracking filter for the 3 phase sine waveform generation.

Hardware does have its limitations when time is critical. So no overmodulation, saddle wave or advanced vector schemes. :D
See less See more
So the LTC1060 creates the sine waves and use them to modulate the pwm duty?

I'm thinking the simplest possible way to drive a 3 phase acim. Take an analog throttle input, two current sensors and pump out some pwm. Feed that into 3 IR2214 drivers for a simple power stage.

Some form of current limiting would be required (don't ask me how I know:D) otherwise it will just push too many amps at low rotor speed, saturate and blow.
In the third version of the schematic the voltage comparator reading the LEM current sensor has been changed to an LM2904 op amp, and it appears to be used as a non-inverting amplifier to provide the hysteresis.

i'm wondering about the function of the summing junction on the (-) input? Could the desired cutoff voltage from the current sensor just be set with a single voltage reference instead of summing 3 input voltages? Just curious about if you had a special reason that i'm overlooking or missed...

Also which LEM current sensor are you using?
@Jackbauer, :D you really do need phase shifted AC to get an ACIM to work.
And overcurrent protection, but that is too easy in a discussion about a hardware AC controller.
Sorry to hear that you've had some bad experiences in a real world setup.

And that's why the LTC1060 is such a good pick. It is hardware and it is in the LTSPICE library.
Unlike software solutions, hardware is very easy to simulate when the models are there. Another reason why it is so efficient to go for full hardware.

As soon as SW is introduced, tests are very often run in a real world setup. And that can lead to very expensive mishaps.
I'm all for the simplest solution and the LTC1060 is very simple, though it is a filter in the discrete time domain.

@kennybobby: I'm using opamps as comparators. Fast enough, low cost. And they're automotive grade.
"Kind" of important in an overcurrent circuit for increased reliabililty (ask Jack, sorry, Jack ;)).
And the hysteresis is now indepedent of the threshold with only a minor change.

I'm not going to change the title of the thread yet to include AC.
I will post a circuit diagram and run a LTSPICE simulation if, and this is a big if, I can find the time for it :D,
Only a few parts as models in a computer memory.:)
See less See more
I've found the time to do the first simulation. :D

With a LTC1068. It has 4 filters on chip. Meaning that we probably can do with just one IC for all filtering in the AC generation section.
In the diagram all four filters are configured as 1st order allpass.
In the final circuit, two will be configured as low pass for the square wave to sine conversion.
The resulting 4th order elliptic should have a steep enough amplitude drop to effectively filter out 3rd and higher harmonics.

As can be seen in the driagram, the AC input frequency is 200 Hz and the clock for the LTC1068 is at 12.8KHz.
That gives a very easy to implement division factor of 64. Great!
Now we only have to do a minor adjustment of R3 and R11 and we've got the 120 degree shifts. Pretty close already though.
Resistor value(s) determined by repeated simulation: R3,R11 900 Ohm.
I'm going to use three allpass filters to make sure that there's no difference in characteristics of the signals that are fed to the output comparators.

LT has a - no external components needed - solution for the square wave to sine conversion: the LTC1064-1.
Why not just use it and save a lot time? Yeah, so it is a bit expensive, but an hour of my life is also very valuable.:D

Next are the triangle waveform generator, the comparators and the VCO.
Very straightforward, nothing fancy and almost too easy to simulate.

Although this thread is about keeping it inexpensive, basic and easy to develop and build,
it is possible and not too difficult to make the controller a bit more advanced by adding 3rd harmonics of the square wave to the AC signals (uitilize bus voltage to the max).
See less See more
Triangle generator and 1 output comparator added. We have sine wave modulated PWM.:)


See less See more
You'll have this design done by the time I get home:D
Yep, :) I was going to add something along the same lines in my previous post, but then applied to a build in a couple of weeks.
But unfortunately, I can't get the parts within that timeframe. And I don't have a scrap model III yet to strip down for a SiC inverter stage.:D

I'm pretty sure you like this kind of approach, but I'm not going to resort to solutions like hugh milk bottle sized caps as series impedances. :D

Oh yeah, back to the design and simulation stage.

VCO: the good old 74HC4046. I think I'm going to utilize the built-in phase comparator as part of the slip control.
The 8 stage DFF as divider is straightforward. Just pick one from the HC/AC lines.

V/f : simple multivibrator , two opamps and a SPDT analog switch.

And that's the basic HW controller design. Enjoy!
See less See more
Time for some design choices and some background info concerning the HW AC controller.

1. Slip control. With slip control the stator frequency (output from the controller) is a fixed percentage higher (motor mode) or lower (regen mode) than the rotor frequency (at the output shaft of the motor).
The percentage can be selected. The first is very close to the optimum percentage for high efficiency (ECO mode), but the maximum torque is lower than at the second percentage.
At the higher second percentage the maximum motor torque can be achieved, but the efficiency is worse. Great selection for overtaking a car, for example.

The third percentage is for regen mode. The mode selection is done manually by the driver (for safety reasons).

2. The driver controls the excitation of the stator field via the throttle.
There's no direct link between throttle position, torque an speed.
The driver closes the control loop for torque (acceleration) and velocity and generates the necessary error signal with his foot.:D

3. Operation above the nominal speed of the motor is not supported.
The controller is designed for conversions of existing ICE cars (with AT).
Need to go fast? Choose another gear in the transmission.
See less See more
The slip control PLL section.

HITORQUE/ECO and MOTOR/REGEN select the mode of the slip control.

*Should* also work OK in the region above nominal speed.

And it looks like a simple SPDT analog switch between two phase outputs of the filter is enough to add support for a fixed gear ratio transmission.:)
OK, the design is ready.

Really, for some this may come as a surprise, but we've designed most of what is needed for a ACIM-no-uC, all hardware controller.

Sure, it needs an opamp for the throttle and a tacho sync/multivibrator circuit, probably some optocouplers and there are almost certainly going to be revisions,
but there's no doubt anymore about the basic functionality (confirmed by simulation).

Next: enter the shematic in KiCAD and build a prototype. Can be done in about 4 weeks.
Some parts have a longer lead time than the usual on to three days.
Now filling in the details for the number of polepairs, tacho pulses per rev, 50 or 60 Hz machine etc.

I think that a stator frequency that's about 28% higher than the rotor frequency is about right for most ACIMs in high torque mode.
*Should* be enough to be able to push the operating point a little bit beyond the peak in the torque/ slip curve.

Any ideas on this?
The result of the LTC1068 simulation and LTC1064 square wave to sine in a KiCAD schematic. :)

Bypass caps still have to be added.


See less See more
In this design iteration (revision of the pll circuit pole selection has been added (jumpers), division facttors were reviewed,
the circuit was simplified and the ugly frequency doubler was dropped.

The PLL locks on to the tacho signal from the motor and division factors (counter circuits) set the slip.
At startup, when there are no tacho pulses, the PLL output frequency is at a minimum value (can be set by a resistor) for motor spin-up.
Basic throttle circuit. Controls the excitaion of the stator field.

The usual V/Hz characteristic curve sets the maximum at a given speed.


See less See more
And finally, the pwm output stage. That's it, folks, we have a controller design for ACIMs.
Just a few more details to fill, for instance the opamp selection.

Now let's build it. Starting with the PLL. All parts readily available.
I'll be on it as soon as my feet touch the ground:)
41 - 60 of 128 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.