# EV conversion using Prius Transaxle



## dimitri (May 16, 2008)

Have you seen this thread on PriusChat forum?

http://priuschat.com/forums/prius-phev-plug-in-modifications/85924-all-electric-prius.html

My understanding is that DC-DC voltage booster is the weakest link in Prius's electric drivetrain, requiring ICE assistance when peak power is required. This is why Prius in pure EV mode is anemic.


----------



## Coulomb (Apr 22, 2009)

jddcircuit said:


> I have a plan on how I want to configure the drive system that I haven’t quite seen yet so I thought I should get some feedback.



Sounds interesting. I've mused over this a bit.
 



> My plan is to add a disc brake or clutch plate to the planet carrier output shaft where the ICE connected. By holding the shaft stationary and driving MG1 in the opposite direction of MG2 I should be able to produce a wheel torque of ( 4.1 X ( MG2 +( 3 X MG1))).


That would appear right to me, from the equations I've seen, except that the 3 is actually 2.6 according to a web site I checked. (That's for the Generation II prius; the Gen I may be different).

However, these things are easy to get wrong, and I'm suspicious since MG2 is supposed to be the "torque" motor and MG1 is supposed to be the "speed" motor. But maybe that's only because MG1 can add to the speed of the ICE (by spinning backwards).

With the speed reduction (and therefore torque multiplication) of 2.6, the 10,000 RPM maximum of MG1 would run out at about 3800 RPM (at MG2), which is about 64 mph (Gen II). If MG1 is limited to 6500 RPM (as it is by default when the ICE is not running), then this limit becomes 2500 RPM at MG2, or 42 mph.



> I am trying to preserve the torque multiplying of MG1 through the planetary gear during low speeds. If this is correct I should be able to accelerate very quickly. At around 40mph, MG1 will be spinning at its max speed and I will release the brake holding the planet carrier. This should allow me to continue to accelerate using MG2 only driving the ring gear and to cruise. I will then set the MG1 speed to whatever speed is appropriate to drive the planet carrier shaft which is connected to the oil pump and to any other pump system (ie air conditioning) that I might attach to it.


Interesting. One problem is that you would not have air conditioning or other mechanical loads running during low speed operation (or if you did, you'd miss out on most (?) of MG1's additional torque).

To do this with the existing Prius inverter, you'd probably have to have a 500 VDC pack (Gen II; 273 V for Gen I) to bypass the 20 kW limit of the DC-DC boost converter.



> This configuration would also allow me the option of still using MG1 coupled with a small ICE to charge my batteries while the car is parked if needed.


Err, where would the ICE go then? Connected to the same place as on a regular Prius (ICE input of transaxle), but with the clutch across the ICE output?


----------



## jddcircuit (Mar 18, 2010)

Thank you for the replies.

I will plan on a higher voltage battery pack than the 200 volt pack in the prius. Could it be that the 20kw rating on the boost circuit is due to the current limit of 100amps. If this is the case then 300V gives me 30kw and so on. If I realize that I can't produce enough torque to reach higher speeds then more batteries to the rescue I would think.

I probably won't invest in batteries or a donor car until I get control of the inverter that should be here in a few days. Hopefully by then I will have learned more details about the inverter and it's control interface.


----------



## jddcircuit (Mar 18, 2010)

Coulomb said:


> Sounds interesting. I've mused over this a bit.
> 
> That would appear right to me, from the equations I've seen, except that the 3 is actually 2.6 according to a web site I checked. (That's for the Generation II prius; the Gen I may be different).
> 
> ...


I think 2.6 is correct. I was approximating. This thing is still a bit conceptual.

I plan on having the shaft spinning in a positive direction during low speeds and even when MG2 is fully stopped. What I picture happening is that during high command torque situations MG1 will spin negative more quickly than MG2 will spin positive due to less load. This will cause the planet carrier shaft to slow to zero speed and then go negative unless something stops it. I can apply a brake to hold it at zero speed or use some type of screw in screw out brake plate that will apply itself with a few negative rotations and then release with a few positive rotations. With the shaft being held then MG1 torque will be available at the wheel providing a boost torque.

However The screw in screw out approach will not allow the MG1 to participate in regen braking I think.

The items that may also be connected to the shaft like airconditioning, hydrolics, external ICE would be done with belts and pulleys. These could coexist with the shaft braking mechanism in theory.


----------



## Coulomb (Apr 22, 2009)

jddcircuit said:


> I will plan on a higher voltage battery pack than the 200 volt pack in the prius. Could it be that the 20kw rating on the boost circuit is due to the current limit of 100amps. If this is the case then 300V gives me 30kw and so on.


Well, there is a current limit certainly, but a voltage limit as well. Above a certain input voltage, the boost converter will just go phut.

I've just realised that if your inverter is for the Gen I, then it won't have a boost converter anyway; the battery and motors run at the same voltage (nominally 273 V, but it will take well over 300 V I'm sure).

If your inverter is for the Gen II but the motors are for Gen I, then the inverter may be capable of higher voltage than the motors can withstand. What might work OK is about a 312 V pack, the Gen II inverter, and Gen I motors, and you somehow disable or ignore the boost converter. With a larger pack than the stock Prius, hopefully the voltage swings will be lower, so you can get away with a higher average voltage to the inverter.


----------



## jddcircuit (Mar 18, 2010)

http://www.youtube.com/watch?v=2olyxIhN_HE

Based on the speed of the differential output using a 24VDC supply (see video) I calculate that my car could have a top speed of 68mph with a 240VDC battery pack and a 24inch tire.

The motors inside the prius transaxle are 3 phase brushless dc type and their back emf limits their speed. In order to go faster I would need to supply a higher voltage. This should be fine for my first grocery getter prototype.

I can't wait to start hacking the prius inverter I ordered. I will also start looking for a higher DC power source.

Cheers


----------



## Coulomb (Apr 22, 2009)

jddcircuit said:


> The motors inside the prius transaxle are 3 phase brushless dc type and their back emf limits their speed. In order to go faster I would need to supply a higher voltage.


Not necessarily true; I post about that here on your other thread.


----------



## jddcircuit (Mar 18, 2010)

My donor car has been selected. I am very excited.


----------



## jddcircuit (Mar 18, 2010)

Here is my motor and high voltage inverter from a Prius that I plan to use.


----------



## nimblemotors (Oct 1, 2010)

Jeff, this is a very exciting project!

Are you planning to use the prius transaxle in the rear and eliminate the VW transaxle?

I also have a junkyard genI prius transaxle and inverter. I haven't had time to mess with it yet, actually wanted to use it as an ICE engine dyno as my first use of it. Might get on that project soon, and would love to have someone else to work with on it. 

I have built a BLDC controller for the 16hp Mars motor, that powered my Electric Jetski (project not finished). I could pull out that controller and try to get it working with the MG, but it needs bigger power switches (inverter) to handle more than 16hp. That is what I hope the prius inverter would allow. Seems the worse case is just to use the IGBT's in it, or really my thought is even just the water-cooling technology is worth the $75 I paid for the inverter. 

For an EV, I think you want the MG1 and MG2 tied together so it operates as a single electric motor. It would be very complicated to do anything. KISS. I wouldn't weld the planetary, but pin or spline the planetary gears so they don't spin. 

I'm not sure what effect it has if MG1 windings are different so it spins faster at the same voltage than MG2. This might be a problem with tying them together?


----------



## Mike D EV (Sep 11, 2007)

Hi guys,
Happy to see that someone is finally getting this concept to the operating stage.
I put this up over three years ago.
http://99mpg.com/Projectcars/evinsight/

I will be getting back into this very soon, as I have finally cleared the decks in my workshop.
While using the unmodified Synergy drive would allow many interesting possibilities, it seems to me that combining of the motors via the welded planetary may be the most efficient way to use the drive.
I have two second gen drives, so I will try it both ways.
The ICE shaft also runs the transmission oil pump, so from a lubrication standpoint, it is better for that shaft to always be turning to fully lube all the internal bearings.

This combined motor system also allows removing all the final drive gearing, to drop over 100 lbs of weight and the use of the ICE input shaft as an output shaft to drive any transmission, thus allowing this to power large vehicles. 
The combined motors should be able to push my light weight Insight with no other transmission to well over 80 MPH.
You mention using an analog devices resolver decoder evaluation board for feedback?
What board did you use?
Mike


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> Jeff, this is a very exciting project!
> 
> Are you planning to use the prius transaxle in the rear and eliminate the VW transaxle?
> 
> ...


Thanks for the interest. I am very excited. My plan is to not use the vw transmission. My donor car suspension needs some modification so it can accept a CV joint. It is a 66 which has a swing axle arrangement that I need to change. Then I need to make a Prius to VW axle. I am learning as I go but I think it might work.

I am not going to weld the planetary gear together yet. I want to get car rolling using MG2 first. I can keep the carrier shaft spinning using MG1 at any speed I want to keep lubrication pump going.

I then have some crazy ideas about how to use MG1. If I hold the carrier shaft stationary with a brake or gear then it will transfer 2.6X MG1 torque to the wheel through the planetary gear. I can use this for a low speed acceleration. I can then release the shaft to spin under the control of MG1 to lubricate and to run an air condition compressor or such during cruising. I could also use MG1 as a generator for my batteries when the car is parked with a small ICE and some type of pulley arrangement on the shaft if I am camping out somewhere. It would also be a cool campsite generator.


----------



## jddcircuit (Mar 18, 2010)

I used the AD2S1210 resolver to digital eval board. I plan to layout my own board with the motor control, resolver and current sensing integrated together eventually. The two eval boards I had were for me to learn how the commutation works. I still have quite a bit of work ahead of me to get a well syncronized commutation at high motor speeds.


----------



## Mike D EV (Sep 11, 2007)

thanks for the AD2S1210 info.
I was looking into the resolver interface chipset that is used in the prius, but this looks easier.
It was great to see the video of the unit actually running off the eval board.
Gets me motivated to get back on the project.

Have you tried running the motor open loop?

The dev board I purchaced for the task:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en537020
Good luck


----------



## jddcircuit (Mar 18, 2010)

Mike D EV said:


> thanks for the AD2S1210 info.
> I was looking into the resolver interface chipset that is used in the prius, but this looks easier.
> It was great to see the video of the unit actually running off the eval board.
> Gets me motivated to get back on the project.
> ...


 I got it spinning open loop first before I got the resolver board. I don't have a lot of current capacity so it was tough to get any torque during start up.

I need to build a high voltage dc supply to test out the prius inverter that I got. I want to see how fast I can get it spinning.


----------



## Mike D EV (Sep 11, 2007)

You can get a prius battery pack with BCM and contractors for $400-$600 from most junkyards as well as e-bay.
We plan on using them for another project:
http://99mpg.com/Projectcars/phevinsightiigetti/

A simple HV CC charger can be built from off the shelf switching supplies to charge it up.
http://99mpg.com/Data/resources/downloads/relateddocuments/dual_stage_grid_charger1.pdf

Of course it will not get us far in an actual car but it is a good test power source capable of > 100A.


----------



## jddcircuit (Mar 18, 2010)

Mike D EV said:


> You can get a prius battery pack with BCM and contractors for $400-$600 from most junkyards as well as e-bay.
> We plan on using them for another project:
> http://99mpg.com/Projectcars/phevinsightiigetti/
> 
> ...


Thanks Mike
I will seriously consider these options. I definitely want to try and capitalize on junkyard parts as much as possible. Junkyard EV is the theme of my project. I am willing to try buck and boost type of arrangements in order to make existing battery packs compatible with my system.


----------



## jddcircuit (Mar 18, 2010)

I got the engine out. If I am going to use the entire prius transaxle inplace of the VW transaxle then I am going to have to convert my swing axle suspension over to Indepenent Rear Suspension. I didn't know what this was until I started taking things apart. It turns out that if I bought a model later than 1973 it would already have the suspension I wanted.


----------



## jddcircuit (Mar 18, 2010)

I removed the swing axle transmission and torsion spring frame. I got a later model suspension frame and trailing arms from various different make and models. I painted and assembled the new suspension.


----------



## jddcircuit (Mar 18, 2010)

I installed the new suspension and fabricated some motor mounts that suspend the transaxle from the load floor of the wagon. The motor is offset because originally it would have the ICE of the prius on the other side. I will fill the empty space with batteries. My next step is fabricating drive axles that connect the prius CV joint to the VW CV joint.


----------



## jddcircuit (Mar 18, 2010)

Another problem I ran into is that the direction of the transmission oil pump will be spinning in the opposite direction in the mounting configuration that I am using in the rear of the car instead of the front. I didn't have enough space to flip it around without cutting into the back seat. I am going to have to figure out an alternative way of circulating the oil. I have some ideas but nothing for sure yet.


----------



## jddcircuit (Mar 18, 2010)

On this first attempt I am only going to install the larger of the two electric motors (MG2) into the transaxle. I will leave out MG1 and the Power Split planetary gears and carrier which will reduce some weight in the transaxle and simplify my control system quite a bit. After I get the car performing with MG2 only I will have a better idea of what needs to be added.


----------



## gor (Nov 25, 2009)

jddcircuit said:


> I acquired a 2001 Prius transaxle for $0 some time ago. I finally got some time to work on it. I completely took it apart and can’t find anything wrong with it. I don’t know what error code it produced to make the transmission shop swap it out.
> ...
> My plan is to add a disc brake or clutch plate to the planet carrier output shaft where the ICE connected. By holding the shaft stationary and driving MG1 in the opposite direction of MG2 I should be able to produce a wheel torque of ( 4.1 X ( MG2 +( 3 X MG1))). I am trying to preserve the torque multiplying of MG1 through the planetary gear during low speeds. If this is correct I should be able to accelerate very quickly. At around 40mph, MG1 will be spinning at it’s max speed and I will release the brake holding the planet carrier. This should allow me to continue to accelerate using MG2 only driving the ring gear and to cruise. I will then set the MG1 speed to whatever speed is appropriate to drive the planet carrier shaft which is connected to the oil pump and to any other pump system (ie air conditioning) that I might attach to it. This configuration would also allow me the option of still using MG1 coupled with a small ICE to charge my batteries while the car is parked if needed.
> 
> ...


Jeff, did you had a chance to check actual torque and actual power output (distribution) depending on inputs (E, mg1, mg2) - rpm, torque, power in/out? 
there are numerous types of trannys - like constant torque/variable rpm and constant hp (var torque/rpm, torque for speed (rpm) trade-off: regular car gearbox tranny, cvt, etc)

on Prius site we can see rpm distribution - not torque http://eahart.com/prius/psd/
if mg1 and mg2 geared differently - what happens when load on wheels exceed max torque of weaker (low-torque) motor? high-torque motor would spin weaker motor in opposite direction... applying motor breaks would leave us with one motor not used or like tranny with overrunning clutch (one motor - high speed /low torque freewheeling over low speed/high torque input)

can we see schematically how torque distributes in this tranny? (make sense replace planetary gears with bevel gears (like in regular differential) for better visualization)
thank you


----------



## nimblemotors (Oct 1, 2010)

Do you mean you rotated it upside down to place the motors to the rear,
and now the oil pump won't pick up the oil?
I haven't looked at mine recently.

Quite a bit of confidence to build this transaxle into the car before you can demonstrate it will work sufficiently. I know it is fun to do that, but I'd recommend to fully get the motor and controller working before investing the time and energy and expense to mount it in the car.
It isn't like there is a "plan b" to buy an off-the-shelf controller (AFAIK) for it.



jddcircuit said:


> Another problem I ran into is that the direction of the transmission oil pump will be spinning in the opposite direction in the mounting configuration that I am using in the rear of the car instead of the front. I didn't have enough space to flip it around without cutting into the back seat. I am going to have to figure out an alternative way of circulating the oil. I have some ideas but nothing for sure yet.


----------



## IamIan (Mar 29, 2009)

gor said:


> Jeff, did you had a chance to check actual torque and actual power output (distribution) depending on inputs (E, mg1, mg2) - rpm, torque, power in/out?
> there are numerous types of trannys - like constant torque/variable rpm and constant hp (var torque/rpm, torque for speed (rpm) trade-off: regular car gearbox tranny, cvt, etc)
> 
> on Prius site we can see rpm distribution - not torque http://eahart.com/prius/psd/
> ...


Am I missing something? ... Don't we already know the gear ratios between the 3 points of Input1 , Input2 , and output? ... and we know the RPMs of each ... Doesn't this already tell us the power split / ratio ? ... knowing the power and RPMs of each tells us the torque of each.

Unless I am missing something??


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> Do you mean you rotated it upside down to place the motors to the rear,
> and now the oil pump won't pick up the oil?
> I haven't looked at mine recently.
> 
> ...


No it is not upside down, just rotated. So if you pinned or welded the planetary gear, the oil pump would rotate counter to what it would be if mounted with differential toward the driver in a front wheel drive like the prius. The oil pan is still on the bottom but I need to spin the pump in the right direction to suck the oil up. It is not a show stopper just a work around that I wasn't planning on.

I agree that it might be more sane to get the controller fully working before mounting it into the car but if sanity was part of my project than I probably would just go buy an electric car. I am keeping my $ to a minimum and learning every step of the way so it is a win no matter what.

I am pretty confident that I can get control of the high voltage prius inverter given enough time based on what I have read so far and what I learned using my low voltage inverter and control unit. Buying an off the shelf contoller is not a plan B for me. I am expecting it to be a challenge with several stages of optimization so nothing is ever really fully working.


----------



## jddcircuit (Mar 18, 2010)

gor said:


> Jeff, did you had a chance to check actual torque and actual power output (distribution) depending on inputs (E, mg1, mg2) - rpm, torque, power in/out?
> there are numerous types of trannys - like constant torque/variable rpm and constant hp (var torque/rpm, torque for speed (rpm) trade-off: regular car gearbox tranny, cvt, etc)
> 
> on Prius site we can see rpm distribution - not torque http://eahart.com/prius/psd/
> ...


I have options on how to use MG1. If I mechanically hold the ICE shaft stationary then torque from MG1 will be multiplied (x2.6) and added to MG2. This would help my low end torque but I may run into a problem at highway speeds with MG1 spinning too fast to control and possibly negatively effecting my top end speed. My other option is to weld the planetary gear rigid so both motors spin at the same speed. However this would not allow MG1 to operate at max power since its speed would be limited by MG2. If MG1 isn't operating at max power than I might be better off without its extra weight. So since I don't know what way is best, I am going to see what I can get out of MG2 only which drives the wheels through a 4.11 differential. If I need more low end or more high end torque then I will consider adding MG1 at that time.


----------



## gor (Nov 25, 2009)

jddcircuit said:


> I have options on how to use MG1. If I mechanically hold the ICE shaft stationary then torque from MG1 will be multiplied (x2.6) and added to MG2. This would help my low end torque but I may run into a problem at highway speeds with MG1 spinning too fast to control and possibly negatively effecting my top end speed. My other option is to weld the planetary gear rigid so both motors spin at the same speed. However this would not allow MG1 to operate at max power since its speed would be limited by MG2. If MG1 isn't operating at max power than I might be better off without its extra weight. So since I don't know what way is best, I am going to see what I can get out of MG2 only which drives the wheels through a 4.11 differential. If I need more low end or more high end torque then I will consider adding MG1 at that time.


if to add another motor on ice input - we'll have PSD which acts as open diff and plays tag-of-war with gen (mg1)
ice input locked basically gearing-up mg1 and mg2 directly - seems best option
if apply numbers on http://eahart.com/prius/psd/ to our tranny:"MG1 has a maximum rate of 10,000rpm in either direction (positive or negative) with a software limit of 6500 RPM if ICE is off" - we have mg1 6500rpm at42 mph; 10,000 max at 65 and 1150 rpm (relatively "safe" 15% over spec) at 75 mph;
also mg1 can be shut-off (or no-load) after 6-7k rpm or even completely removed if proves to be more effective to use more juice on mg2 instead


----------



## jddcircuit (Mar 18, 2010)

gor said:


> if to add another motor on ice input - we'll have PSD which acts as open diff and plays tag-of-war with gen (mg1)
> ice input locked basically gearing-up mg1 and mg2 directly - seems best option
> if apply numbers on http://eahart.com/prius/psd/ to our tranny:"MG1 has a maximum rate of 10,000rpm in either direction (positive or negative) with a software limit of 6500 RPM if ICE is off" - we have mg1 6500rpm at42 mph; 10,000 max at 65 and 1150 rpm (relatively "safe" 15% over spec) at 75 mph;
> also mg1 can be shut-off (or no-load) after 6-7k rpm or even completely removed if proves to be more effective to use more juice on mg2 instead
> ...


This is good. I have the transaxle disassembled right now. It was easier to make the motor mounts with the shell only. My plan right now is to only install MG2 and leave out the MG1 stator, rotor and the planetary gears to reduce weight.

In the next couple of weeks I am going to be working on getting the Prius inverter and my homemade controller working to drive MG2 at higher voltages and speeds. We will see what kind of performance I can get before adding MG1 back in.


----------



## jddcircuit (Mar 18, 2010)

Battery charging?

My inverter is designed to drive two motors but since I am only using it to drive one I was considering the possibility of using the empty side as part of a battery charging solution.

I am wondering if it would be possible or make sense to apply a dc power source through a series inductance to the unused MG1 motor phases and use the inverter switches as a boost circuit to charge my batteries. I would think that this is similar in function as to what is happening during regenerative braking. I will need to start learning about battery charging current and voltage profiles.

I guess I will start with acquiring a rectifier circuit that I can use to source my MG2 motor control bench testing and eventually be used as my part of my battery charging circuit if this idea works out.


----------



## jddcircuit (Mar 18, 2010)

I realized that I have a lot to learn about different motor control modulation schemes but last night I was able to get something working that I'm satisfied with. I attached a video.
http://www.youtube.com/watch?v=dFGa9jngbx4

I had the motor spinning before using a six-step commutation that only modulated 2 of the 3 phase at any given time and used the floating phase to sense the back emf of the motor to syncronize the magnetic field alignment. I needed to change this in order to get it to work with the high voltage prius inverter. This inverter appears to only have 3 control lines for modulating the phases which did not allow me to have one phase floating. I was directed to a Space Vector Modulation technique that seems like it will work.
I've listed the pinout on the ECU connector silk screen. Out to the side are my notes on what I think the signals are for. If anyone has experience with this inverter please let me know. I am not sure about anything until I power it up. I assume that the current sense are some sort of differential signal that will be proportional to the phase current. I am not sure what type of interface to use for these signals yet.
Thanks Jeff


----------



## bart_dood (Sep 2, 2010)

jddcircuit said:


> I realized that I have a lot to learn about different motor control modulation schemes but last night I was able to get something working that I'm satisfied with. I attached a video.
> http://www.youtube.com/watch?v=dFGa9jngbx4
> 
> I had the motor spinning before using a six-step commutation that only modulated 2 of the 3 phase at any given time and used the floating phase to sense the back emf of the motor to syncronize the magnetic field alignment. I needed to change this in order to get it to work with the high voltage prius inverter. This inverter appears to only have 3 control lines for modulating the phases which did not allow me to have one phase floating. I was directed to a Space Vector Modulation technique that seems like it will work.
> ...


Hi Jeff,

I read your post above with interest as I am working on writing my own field orientated control for a honda brushless PM motor. I started trying to modify a microchip demo board dsp to do what I want but found it quite complex with little online support, most of the motor apps are based off a ramp up then a constant speed closed loop rather than torque control which is what you need for a vehicle.
So I switched over to using an open source microcontroller from this website:

www.leaflabs.com

Its the maple device which is an ARM cpu running at 72mhz with about 90mips of computing power. It should be plenty to run this kind of code, the compiler is free and open source and very similar to the arduino.
I am writing my motor control app from scratch and am about half way through, perhaps we should pool resources a little and it help both of us?

If you're interested drop me a PM and give me your e-mail address.

Chris


----------



## nimblemotors (Oct 1, 2010)

Jeff is using a Zilog board. I use a MSP430 for my brushless controller.
There are so many micros aren't there? even within PICs. I'm moving to using the PICs myself, why do you say there is not a lot of support?

As these are perm magnet motors, I don't understand how you can do field control, isn't the field is fixed by the magnets?

Does the transaxle have hall-effect position sensors on it?
That is what I need for my controller. 

A big deal is being able to use the prius inverter, because the real hard part of a car motor controller is the high voltage and current switching, the control part seems rather simple IMO, at least for my controller, that I did initially at 9vdc for a 1/10th scale R/C car motor, and then 48v/100amp for the Mars brushless. Going to 300v/100amp is no simple task.




bart_dood said:


> Hi Jeff,
> 
> I read your post above with interest as I am working on writing my own field orientated control for a honda brushless PM motor. I started trying to modify a microchip demo board dsp to do what I want but found it quite complex with little online support, most of the motor apps are based off a ramp up then a constant speed closed loop rather than torque control which is what you need for a vehicle.
> So I switched over to using an open source microcontroller from this website:
> ...


----------



## jddcircuit (Mar 18, 2010)

I am using the Zilog board for now only because I got it for free some years ago. I won't be surprised if I end up changing micro controller some time.

My motor has a resolver for angular position and I am using the Analog Devices resolver to digital eval board which gives me 10bits of angular position resolution. I am using this position error for phase locking my commutation steps using a PI loop. I would have to do something different if I had hall effect sensors to align my commutation switching.

I am not completely sure my modulation scheme is ideal but it is satisfactory for now. I am using a complementary switching pair scheme which should be compatible with the prius inverter. I have 6 zones that modulate the polarity of my PWM signals and another 6 zones shifted by 30degrees that will set one of the phases to half PWM duty cycle according to the zone that matches it back emf crossing. This is my attempt to better ressemble a sine wave. This seems to create the smoothest running so far.

I am sampling a pot for the PWM magnitude right now. I have example code that I will use for either closed loop speed or closed loop current once I am ready to. It is pretty straight forward and will just require a little tuning of the PI response. I first need to figure out the current sense interface on the Prius inverter before I can consider current feedback for torque control mode including reverse torque for braking.

I wanted to get the software working on my low voltage inverter first so that when I apply the same control signals to the Prius inverter I can compare the performance and better isolate any differences between inverter power stages.

Jeff


----------



## bart_dood (Sep 2, 2010)

nimblemotors said:


> Jeff is using a Zilog board. I use a MSP430 for my brushless controller.
> There are so many micros aren't there? even within PICs. I'm moving to using the PICs myself, why do you say there is not a lot of support?
> 
> As these are perm magnet motors, I don't understand how you can do field control, isn't the field is fixed by the magnets?
> ...


Hi, if you go to the PIC forums you'll see many many questions asked but not many answered, I find the dsp code difficult to follow and quite low level, I went around in circles for 3-4 weeks on it and made little progress. You might have more experience than me, my background is simple arduino projects.
I am adding hall sensors in my motor as I decided this was the simplest way to make it work and I'm designing my code around having them. 
I'll attach a diagram for the motor control, based off the microchip application AN1078, look the number up on google and read through the PDF.
The control part is NOT simple by any means!! a real automotive controller is much more complex than a simple trapezoidal controller that commutates based off hall sensors etc. Read AN1078.

As far as microcontrollers yes there are a lot out there, but as far as programming its a whole lot easier to start with a system that has lots of computing power which allows you to write higher level code, if you use something with marginal performance you'll be endlessly going lower and lower level to squeeze enough performance out of it.
For example the zilog cpu that Jeff is using has 20mips at 20mhz, I ran some tests on an arduino for some chunks of my code, the arduino is 16mips and it took 200microseconds just to do a sin and cos on floating point numbers if you are using for example a PWM frequency of 10khz you need to do all FOV computations in less than 100 microseconds, in the case of the microchip it does them in 27 microseconds (you need time to spare). I am not using back EMF to compute the rotor position in my app so I save some computing cycles over the microchip app.

I can't see how a 20mips zilog could do all the floating point math in 50 microseconds or so considering it takes a 16mip arduino 200 microseconds just to do the sin/cos functions? It could use lookup tables instead but that involves more complexity and still would be a squeeze.


----------



## bart_dood (Sep 2, 2010)

For some reason the attachment didn't come through.


----------



## jddcircuit (Mar 18, 2010)

I would agree that the Zilog is underpowered for floating point math. I am only using it temporarily since it is what I had. I guess what I am doing is a modified trapezoidal since I am using 12 distinct commutation steps. The extra steps are allowing me to chop up the trapezoid a little more. I really don't know how much performance difference there will be going to a higher resolution sine wave generation. This is my first real exposure to motor control. I was impressed with how some of the Zilog example code is structured to compensate for its computation limitations. Everything is done using lots of "if" statements since it is all unsigned arithmetic.

I think I figured I had around 4000 clock cycles (20MHz clock) between my 12 commutation events if my 8 pole motor is spinning at 6000 rpm. I don't think that this is going to be enough to do all the control I will want to do so I will be interested in upgrading to more processing power.


----------



## nimblemotors (Oct 1, 2010)

I'm not sure I agree that a simple trapozoid control is not sufficient.
Cars are controlled by the driver's foot, more pedal, more power.
I adhere to a strict KISS principle. Make it as simple as possible, but not any simpler. I know many work long and hard and complicate things for minor improvements..that is what experts do.. I'm no expert.
Sin waves can be approximated without actual sin computations and floating point. The MSP430 is a 16bit 1mip device and is fast enough.
As I've said, without a functioning 300vdc/100amp power switching, all the fancy control in the world is moot!

I'll try to get it to run the Prius motor sooner or later, maybe sooner, I want to use the Prius motor as an ICE engine dyno to tune my 3-cyl engine for maximum MPG, so basically it will do all braking and RPM control in this application. The prius inverter is powerful enough for this job, the 3-cyl is rated at 55hp.
I need to get the instrumentation software finished first though.
I haven't looked at it recently, is the resolver outputing some kind of analog signal for rotor position?



bart_dood said:


> Hi, if you go to the PIC forums you'll see many many questions asked but not many answered, I find the dsp code difficult to follow and quite low level, I went around in circles for 3-4 weeks on it and made little progress. You might have more experience than me, my background is simple arduino projects.
> I am adding hall sensors in my motor as I decided this was the simplest way to make it work and I'm designing my code around having them.
> I'll attach a diagram for the motor control, based off the microchip application AN1078, look the number up on google and read through the PDF.
> The control part is NOT simple by any means!! a real automotive controller is much more complex than a simple trapezoidal controller that commutates based off hall sensors etc. Read AN1078.
> ...


----------



## Coulomb (Apr 22, 2009)

nimblemotors said:


> As these are perm magnet motors, I don't understand how you can do field control, isn't the field is fixed by the magnets?


Ah. I believe that the "field control" (may not be the right term here) is by flux weakening, as opposed to field weakening. I don't know much about this, but found enough clues to convince myself that the Prius must be using flux weakening to get enough speed out of MG2 (and probably MG1 as well). Flux weakening allows a wide almost-constant-power region, which is pretty much essential if you don't have a gearbox. After all, the Prius motors pretty much replace the gearbox, as well as provide mechanical power from the battery.

My understanding is that flux weakening works much the same as field weakening, except that you have to factor in a large, fixed field from the magnets that you oppose when you need to go faster (i.e. require less field). So you should be able to use the same low level software, and just tweak the higher level software a little to account for the fixed field.

To get started, you could ignore field weakening, and just make sure there is no direct (some call it quadrature; the conventions aren't standard) current to induce a field. This should allow you to spin the motor up to a certain speed, perhaps 1500 or 2000 RPM or so. Once this is working, add the flux weakening, so that you can go beyond the nominal speed of the motor.


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> I haven't looked at it recently, is the resolver outputing some kind of analog signal for rotor position?


I view the resolver as a transformer with a primary winding (green and white wire in my case) and two secondary windings. The amount of voltage transfer from primary to secondary is proportional to the angular position of the core that is connected to the motor shaft and spins within the magnetic field of these windings. In theory I guess you could use only one of the secondary signals to determine shaft angle but having two signals that are 90 mechanical degrees out of phase with each other is much more robust. The relative peak magnitudes of the two secondary windings can be used to calculate rotor angle. The absolute magnitude and frequency of the signal on the two secondary windings will be related to the excitation signal you supply to the primary winding.

I was going to make my own excitation signal and phase tracking routine but it was easier to buy the eval board that already had that covered. The eval board handles all the analog to digital conversion and I just query the position via the SPI port.

At some point if I move to a more powerful processor I will be able to integrate that processing but for now I just want to move a car around the block as soon as possible.


----------



## jddcircuit (Mar 18, 2010)

Coulomb said:


> Ah. I believe that the "field control" (may not be the right term here) is by flux weakening, as opposed to field weakening. I don't know much about this, but found enough clues to convince myself that the Prius must be using flux weakening to get enough speed out of MG2 (and probably MG1 as well). Flux weakening allows a wide almost-constant-power region, which is pretty much essential if you don't have a gearbox. After all, the Prius motors pretty much replace the gearbox, as well as provide mechanical power from the battery.
> 
> My understanding is that flux weakening works much the same as field weakening, except that you have to factor in a large, fixed field from the magnets that you oppose when you need to go faster (i.e. require less field). So you should be able to use the same low level software, and just tweak the higher level software a little to account for the fixed field.
> 
> To get started, you could ignore field weakening, and just make sure there is no direct (some call it quadrature; the conventions aren't standard) current to induce a field. This should allow you to spin the motor up to a certain speed, perhaps 1500 or 2000 RPM or so. Once this is working, add the flux weakening, so that you can go beyond the nominal speed of the motor.


I am not so sure that I will need to consider flux weakening. I don't know much about this technique but my understanding is that it allows the motor to spin beyond the voltage saturation point. I assume that this is when the back emf of the motor equals the supply voltage. In my case my motor is spinning approximately 400rpm at 24 volts so it would spin 4000rpm at 240 volts without the need for flux weakening.

This is making me think that maybe I am already doing some flux weakening without knowing it. As I was experimenting (trial and error) with different modulation schemes my top end speed did change. I will investigate.

Maybe I should also compare the low end torque between my different attempts.


----------



## SimonRafferty (Apr 13, 2009)

Great project!

Have you considered a Parallax Propeller microcontroller? It has 8 parallel, concurrent processors to which you can assign different tasks.

I built a 3 phase vector controller using one using one processor per phase to produce the PWM in the background with other processors managing other parts of the problem. Because they all work concurrently it lessens the timing problems a great deal.

As the RPM increases, the resolution of the sine wave generation is reduced. At low rpm, the sine wave is split into 255 time slices, each with a different PWM value. At maximum speed, there are only 8 slices. Again, this reduces the processing overhead.

The important parts - the PWM mainly - were written in Assembler and the rest in it's native high level language - 'SPIN'.

For traction use, I found the most effective control, most similar to an ICE gas pedal, was to control only the slip angle between the generated field and the resolver output which is equivalent to controlling the torque.

Keep up the good work!

Si


----------



## bart_dood (Sep 2, 2010)

SimonRafferty said:


> Great project!
> 
> Have you considered a Parallax Propeller microcontroller? It has 8 parallel, concurrent processors to which you can assign different tasks.
> 
> ...


Hi Simon,

I didn't know you could get away with such low resolution of the change in PWM? I am aiming my firmware to have be able to set each PWM duty cycle on every duty cycle period. I did consider doing half instead, so the PWM frequency would still be 10khz but the update rate would be 5khz, this would give me 200 microseconds time in between rather than 100 microseconds.


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> I've listed the pinout on the ECU connector silk screen. Out to the side are my notes on what I think the signals are for. If anyone has experience with this inverter please let me know. I am not sure about anything until I power it up. I assume that the current sense are some sort of differential signal that will be proportional to the phase current. I am not sure what type of interface to use for these signals yet.
> Thanks Jeff


Looks like your signal names are the same as the GEN 2 I am using. Your notes look correct except the phase control signal. My notes are sketchy, but I believe the phase control signal is low for upper switch on in the GEN 2 and are pulled up to 12 volts. The switch point going low is around 6.8 volts and going high is 8 volts. 

I just hooked 12 volts between IGCT and GINV. I have a 12 volt on/off push button panic switch to MSDN. 

I don’t recommend it due to possible noise and other possible issues, but I have been driving the phase signals from the microchip motor tail directly through 5.2 zeners. 

The current sense outputs go plus and minus voltage and are centered at zero. Its not clear except for redundancy why there are two current sensor outputs on the phase. I plan to use these sensors if I stick with the Prius Inverter. 

For my prototype efforts I am using external current sensors that are centered at 2.5 volts which made it easier to interface to the microchip board. It turned out one of my recent major issues was that the external current sensors were saturating at 200 amps messing up the current loops. Last run Nov 26, I was still having significant control issues when coming to a stop and I think still requires far too much magnetization current to move the car causing overcurrent trips.


----------



## nimblemotors (Oct 1, 2010)

Please excuse my basic questions. If I understand, you are getting the prius inverter to work by just powering it up 12v, and then turning on/off the gate drive inputs
with 12v/5v ? Will it work with just 12v DC bus inputs or does it need 200+vdc ? 
Okay, so pulled out mine (1st Gen, no DC-DC) I have the wiring diagrams for the prius, but it can't find the pinout of the white connecter, which I assume is the one Jeff described, as shown the picture below, but this connector has 30 pins (32 connector, 2 blank)










Shouldn't I be able to just turn on one of the high gates and see the DC voltage on the motor output?

Here is the full inverter shot, I gather the main MG2 output is the one in back, the orange connector is the MG1, and there is the AC motor connections inside?













zaxxon said:


> Looks like your signal names are the same as the GEN 2 I am using. Your notes look correct except the phase control signal. My notes are sketchy, but I believe the phase control signal is low for upper switch on in the GEN 2 and are pulled up to 12 volts. The switch point going low is around 6.8 volts and going high is 8 volts.
> 
> I just hooked 12 volts between IGCT and GINV. I have a 12 volt on/off push button panic switch to MSDN.
> 
> ...


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> Looks like your signal names are the same as the GEN 2 I am using. Your notes look correct except the phase control signal. My notes are sketchy, but I believe the phase control signal is low for upper switch on in the GEN 2 and are pulled up to 12 volts. The switch point going low is around 6.8 volts and going high is 8 volts.
> 
> I just hooked 12 volts between IGCT and GINV. I have a 12 volt on/off push button panic switch to MSDN.
> 
> ...


 This helps me alot. I hope to have it wired up this weekend. Thank you very much.


----------



## jddcircuit (Mar 18, 2010)

My inverter does not look like nimblemotors.

I think mine is from a 2002 prius. I doesn't look to me like I have a DC boost circuit. I think it is considered a gen 1.

I think nimblemotors's inverter does have the DC boost circuit if that is the little black box that the battery mains are going to before the phase switches. So it would be a gen 2 not a gen 1. Just a guess.


----------



## nimblemotors (Oct 1, 2010)

yes you are right, it was supposed to be out of a 2001 prius when I bought it, but having looked at the pictures from hobbits teardown,
http://techno-fandom.org/~hobbit/cars/ginv/
it is the same and has the DC-DC of the genII. Not sure if this is good or bad! So the DC-DC also have some controls?
At least now I can try to find the right pinouts. I don't work for ALLDATA any longer, so don't have access to the online manuals anymore. 
Maybe zaxxon can show the pinouts for the genII ?

In Hobbits analysis, 
"When GUU is low,
the lower transistor of the pair is turned on; when GUU goes high, it turns
off and the upper transistor turns on. There is NO both-off state, except
for when the overall "gate" lead goes low and then all the transistors turn
off [i.e. the definition of "neutral" in the car].

This switching works down to DC and has a little hysteresis, changing state
as the input rises above 8 volts and again as it falls below 6.8 or so. No
IGBT gate output appears until "xSDN" is brought high, and then the next
rising or falling edge at the "xyU" lead starts producing output.
"




jddcircuit said:


> My inverter does not look like nimblemotors.
> 
> I think mine is from a 2002 prius. I doesn't look to me like I have a DC boost circuit. I think it is considered a gen 1.
> 
> I think nimblemotors's inverter does have the DC boost circuit if that is the little black box that the battery mains are going to before the phase switches. So it would be a gen 2 not a gen 1. Just a guess.


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> yes you are right, it was supposed to be out of a 2001 prius when I bought it, but having looked at the pictures from hobbits teardown,
> http://techno-fandom.org/~hobbit/cars/ginv/
> it is the same and has the DC-DC of the genII. Not sure if this is good or bad! So the DC-DC also have some controls?
> At least now I can try to find the right pinouts. I don't work for ALLDATA any longer, so don't have access to the online manuals anymore.
> ...


I just went home at lunch and did a quick test. I applied 24V to the battery terminals and applied 12V between IGCT and GINV,GND. Applied 12V to M-SDOWN to enable the inverter. Pulling M-WU low I measured 24V at the W motor phase. When I let M-WU float I measured 0V. So this means that the high side switch turns on when the control signal is pulled low like Zaxxon said.

So all I have to do is solder up a few transistors in open collector and drive them with my 3.3V high side switching signals that drive my low voltage inverter. The only software change I will probably need to make is to remove the deadband I had programmed in since it is built into the Prius inverter.

My next step will be to characterize the current sensor so I can get some control over that before I go to higher voltages.


----------



## jddcircuit (Mar 18, 2010)

After I get reasonable performance out of this gen1 setup, I plan to do the same with the gen 2 transaxle with the higher wattage MG2. I was reading about the different magnet configurations that produce more torque at lower currents. The trade off is that it takes higher voltage to spin it up to the same speed as the gen 1. I plan to remove the DC boost circuit altogether and go with a 500 battery pack and approach the 50kW rating. We will see how this works out.

Jeff


----------



## nimblemotors (Oct 1, 2010)

awesome! can it really be this easy? 
I'll try it on mine since it looks like it won't blow up.
I'll try to spin up a Mars BLDC motor with it using my controller and the inverter for the switches. my other stuff can wait..




jddcircuit said:


> I just went home at lunch and did a quick test. I applied 24V to the battery terminals and applied 12V between IGCT and GINV,GND. Applied 12V to M-SDOWN to enable the inverter. Pulling M-WU low I measured 24V at the W motor phase. When I let M-WU float I measured 0V. So this means that the high side switch turns on when the control signal is pulled low like Zaxxon said.
> 
> So all I have to do is solder up a few transistors in open collector and drive them with my 3.3V high side switching signals that drive my low voltage inverter. The only software change I will probably need to make is to remove the deadband I had programmed in since it is built into the Prius inverter.
> 
> My next step will be to characterize the current sensor so I can get some control over that before I go to higher voltages.


----------



## zaxxon (Jul 11, 2009)

nimblemotors said:


> Please excuse my basic questions. If I understand, you are getting the prius inverter to work by just powering it up 12v, and then turning on/off the gate drive inputs
> with 12v/5v ? Will it work with just 12v DC bus inputs or does it need 200+vdc ?


You need to supply the higher voltage to IGBT inverter side or use the boost circuit and battery terminals in addition to the lower 12 volts. The 12 volts drives the control logic and isolated IGBT drivers. 

Unless you plan to use the boost circuit you should remove or bypass it. I removed it to make room for future control circuits. If you want the use the boost circuit you will need a separate external PWM controller to drive it. If I have time I will try to put up some picture on my build page.


----------



## nimblemotors (Oct 1, 2010)

I probably don't need a DC-DC for a dyno load, but I'd rather not remove it. The extra pins on the connector in the GenII inverter are for the DC-DC control. Do you know what/how they are used? 












zaxxon said:


> You need to supply the higher voltage to IGBT inverter side or use the boost circuit and battery terminals in addition to the lower 12 volts. The 12 volts drives the control logic and isolated IGBT drivers.
> 
> Unless you plan to use the boost circuit you should remove or bypass it. I removed it to make room for future control circuits. If you want the use the boost circuit you will need a separate external PWM controller to drive it. If I have time I will try to put up some picture on my build page.


----------



## jddcircuit (Mar 18, 2010)

Here is my guess

OVL is some type of overvoltage signal
FCV is a fault signal
VL is for monitoring boost voltage output
CPWM is the converter PWM ( higher duty cycle = higher boost voltage)
CSDN is the converter shutdown ( high to enable )
CT might be logic high reference
GCNV might be logic low reference

If I had a gen 2 inverter I would consider wiring the boost converter in reverse and use it to boost my line power for a battery charging solution. I would not use it the way it is used in the Prius.


----------



## nimblemotors (Oct 1, 2010)

Sounds like a good guess, I've seen enough magic smoke to be careful.

As I understand it the boost converter does work in reverse to charge the 200v pack. I guess it just downconverts the voltage when the current goes the otherway?

Are you talking about charging your 500v pack
from a 240vac/120vac wall socket using the dc/dc?
I'd be concerned using a 500vdc pack, that's a lot of voltage, I think over 480v puts it into another safety class? 
Contactors and stuff may be expensive at that voltage.



jddcircuit said:


> Here is my guess
> 
> OVL is some type of overvoltage signal
> FCV is a fault signal
> ...


----------



## zaxxon (Jul 11, 2009)

nimblemotors said:


> I probably don't need a DC-DC for a dyno load, but I'd rather not remove it. The extra pins on the connector in the GenII inverter are for the DC-DC control. Do you know what/how they are used?


I have not investigated the operation of the DC to DC converter side. I wanted to, but have not purchase a second inverter so if I messed up I would still have a good one and some spare parts.


----------



## jddcircuit (Mar 18, 2010)

My inverter is finally alive. Not bad for a $100. I guess since it had a couple of dents in it.

I got my motor to spin via the Prius inverter which is a milestone for me. Since I am not current limited right now it has lots of torque. My trapezoidal modulation scheme seems to be working fine for this motor as far as I can tell.

My next step is to characterize the current sensors and figure out how I am going to interface with them and work out some torque control.

I also seem to have some noise causing some interruptions in the commutation and random motor jerks. I think the excitation signal that I am using for the position resolver is marginal and the problem comes and goes. I will try and amplify it.

Things are not quite stable enough yet to move to a higher voltage (higher Power) source for high speed testing.


----------



## nimblemotors (Oct 1, 2010)

Here is the diagnostic info on the pins, so Jeff was pretty much on target.












zaxxon said:


> I have not investigated the operation of the DC to DC converter side. I wanted to, but have not purchase a second inverter so if I messed up I would still have a good one and some spare parts.


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> My inverter is finally alive. Not bad for a $100. I guess since it had a couple of dents in it.


Good to hear it works. It is amazing what you get in those shiny boxes.


----------



## nimblemotors (Oct 1, 2010)

It really is quite exciting, because you can buy a Prius transaxle brand-new for about $3,000 retail, and the inverters for about the same, so basically for $6k, you can have a brand-new EV AC drivetrain that is robust and proven. I knew it could be done, I'm glad you guys have finally made it happen!

I found another inverter today for $140 that is a GenI, so I can test it without the DC-DC. These seem a fair amount lighter than the GenII, they are rather heavy units.



zaxxon said:


> Good to hear it works. It is amazing what you get in those shiny boxes.


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> It really is quite exciting, because you can buy a Prius transaxle brand-new for about $3,000 retail, and the inverters for about the same, so basically for $6k, you can have a brand-new EV AC drivetrain that is robust and proven. I knew it could be done, I'm glad you guys have finally made it happen!
> 
> I found another inverter today for $140 that is a GenI, so I can test it without the DC-DC. These seem a fair amount lighter than the GenII, they are rather heavy units.


I'm not into buying new. My theme is salvage and recycle. I hope to have a motor, inverter, charging, and control for less than $1k.

Target Budget:
Electric Transaxle $600
Inverter $200 (modified to do charging also)
Control $200


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> It really is quite exciting, because you can buy a Prius transaxle brand-new for about $3,000 retail, and the inverters for about the same, so basically for $6k, you can have a brand-new EV AC drivetrain that is robust and proven. I knew it could be done, I'm glad you guys have finally made it happen!
> 
> I found another inverter today for $140 that is a GenI, so I can test it without the DC-DC. These seem a fair amount lighter than the GenII, they are rather heavy units.


NimbleMotors,
If you have any information on how to enable the 12V DCtoDC converter on the backside of the gen 1 inverter cooling plate please let me know. I don't have a clue yet. I want to use it for running accessories.

Thanks
Jeff


----------



## Coulomb (Apr 22, 2009)

nimblemotors said:


> These [Gen I inverters] seem a fair amount lighter than the GenII, they are rather heavy units.


I suspect that the inductor for the 20 kW DC/DC converter weighs a fair bit. If you don't need this, just taking out the inductor might save a bit of weight.


----------



## nimblemotors (Oct 1, 2010)

jddcircuit said:


> NimbleMotors,
> If you have any information on how to enable the 12V DCtoDC converter on the backside of the gen 1 inverter cooling plate please let me know. I don't have a clue yet. I want to use it for running accessories.
> 
> Thanks
> Jeff


Hi Jeff, the 12v dc-dc is yet another great feature of the inverter. 
Looking at the wiring diagram, it appears there is just a single control line to/from the HV ecu, it is labled NODD. 
In the GenII diagnostics, it shows that its value is 5-7vdc when its in normal operation, this seems a status output, not a control input.
I would guess that it will turn on if given a 12v connection to the "S" (labeled 5A) which go to the fuse box and to the 12v battery, and has the AMD connection that is a 100A output to power accessories?
The GenII also have a VLO input which tells it to output 13.5 or 14v, but I don't see this on the GenI.

I just bought another GenI prius and need to fix/bleed the brakes, which apparently is a mysterious issue (Chilton says dealer service only) (why I got it so cheap, previous owner repairing it gave up), so it looks like I'm gonna have to spring for the toyota online repair manuals, and can see what else I can find about the 12vdcdc, their online wiring diagrams are great.


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> Hi Jeff, the 12v dc-dc is yet another great feature of the inverter.
> Looking at the wiring diagram, it appears there is just a single control line to/from the HV ecu, it is labled NODD.
> In the GenII diagnostics, it shows that its value is 5-7vdc when its in normal operation, this seems a status output, not a control input.
> I would guess that it will turn on if given a 12v connection to the "S" (labeled 5A) which go to the fuse box and to the 12v battery, and has the AMD connection that is a 100A output to power accessories?
> ...


You bought the whole car? You mention that it is another one so you have multiple cars? Wow. I need to get my hands on a couple of prius drive axles for the CV joints. I need to somehow fabricate an axle with a prius CV joint on one side and the VW on the wheel side. I am going to be working on remounting my motor in the car this weekend and have a better idea of my axle dimensions.


I am not getting any output on the 12V DCtoDC yet but I haven't done a whole lot of investigation.

Thanks
Jeff


----------



## nimblemotors (Oct 1, 2010)

I have three of the GenI, I am working on converting them to pure-EVs (but haven't been able to make a lot of progress as yet with all the other stuff I'm doing) this last one was only $1200, but needs all the front body panels. I might try making them in fiberglass from my good panels, as I've done with my 3-cyl MG Midget project.

When I did my hybrid prototype, I fabricated a half shaft from a Ford FWD trans to a Geo Metro front hub, basically just cut them and made a sleeve that connected the two and welded them back together. this was just a prototype, so wasn't too concerned about it being perfect. If you take apart the CV joints, you'll see they have an axle with splines in them, and you can have a custom axle made with different splines on each end, or better if you can have one shortened and resplined just one end, and is isn't that expensive (although for your project a couple/few hundred bucks might seem a lot) then just reassemble the CV joints.












jddcircuit said:


> You bought the whole car? You mention that it is another one so you have multiple cars? Wow. I need to get my hands on a couple of prius drive axles for the CV joints. I need to somehow fabricate an axle with a prius CV joint on one side and the VW on the wheel side. I am going to be working on remounting my motor in the car this weekend and have a better idea of my axle dimensions.
> 
> 
> I am not getting any output on the 12V DCtoDC yet but I haven't done a whole lot of investigation.
> ...


----------



## jddcircuit (Mar 18, 2010)

I have had some good success with getting my motor spinning at faster speeds (upto 1500rpm) with a mix match of batteries that I have around. At 4000 rpm my car should exceed 60mph with the 4.11 differential I have. I don't see any obstacles in my motor control circuit software that would prevent this from happening yet. I was able to make some needed software improvements to my commutation control on the bench.

My motor mounting is coming together nicely and I don't see any major problems with my plans for making the drive axles. I am just a little ways from moving the car under its own power.

With the hardware and software coming together, I need to seriously start making arrangements for batteries. This is the big ticket item and can have a long lead time from my understanding so I want to get some feedback to help me make a decision.

I need around 300Volts for my top end speed goal and approximately 18kwh for my 60 mile range target, so hence 60Ah cells.

Please share your latest battery experiences with me or point me to some good threads on this subject. Specifically which ones do you recommend buying?

Thank you
Jeff


----------



## jddcircuit (Mar 18, 2010)

I worked on a new motor and inverter mounting configuration. I am sure that this will be easier the next time if there is ever a next time.

I am now working on my drive axles. I got some good direction from Nimblemotors.

I hope to have this thing moving soon to see want kind of acceleration I can get. I have some mix match batteries that I will probably use for testing before I pull the trigger on buying the batteries I want.

In parallel I am researching battery management techniques. I am considering trying to build my own BMS and use the extra motor inverter and current sensors ( unused MG1) for a DC to DC switching to charge batteries. I have a lot to learn.


----------



## jddcircuit (Mar 18, 2010)

http://www.youtube.com/watch?v=6ztRLxulThY

I made it around the block under my own power. It wasn't pretty but I was determined to do it. I got a long list of things to do but this was a milestone for me.


----------



## Mike D EV (Sep 11, 2007)

A trip around the block is a great first step. What was limiting your speed?


----------



## jddcircuit (Mar 18, 2010)

Mike D EV said:


> A trip around the block is a great first step. What was limiting your speed?


I am not quite sure. I had many things not secured and rattling around. Sometimes I could go faster but usually it was not stable. On the jack stand the wheel spins up nicely with Four 12v lead batteries. Under a load I am getting some erratic oscillation in my motor control.

Things I am going to try. Larger battery cable to reduce resistance and inductance. If I showed you how small of wire I used you would laugh. I am also going to write some test software that doesn’t use a PI loop for commutation. I will just poll the angular position and force the phase state accordingly. This method won’t work at high speeds but if it works at low speeds it tells me I need to tune my PI coefficients for commutation sync. I may also be having a problem with my angular position sensor reading. I have a very marginal signal coming from the resolver. I think I can track it down but I couldn’t wait to at least watch it roll. The car I’m converting hasn’t moved under its own power in 20 years.


----------



## Mike D EV (Sep 11, 2007)

Keep at it, 
48V is a long way from the 288V that the first gen prius inverter was designed to run with. I suspect that the units ability to put out a lot of torque is being limited by the voltage. Have you tapped the current sensors to see what kind of current you were drawing?

A journey of 1000 miles, starts with the first trip around the block.


----------



## jddcircuit (Mar 18, 2010)

Mike D EV said:


> Keep at it,
> 48V is a long way from the 288V that the first gen prius inverter was designed to run with. I suspect that the units ability to put out a lot of torque is being limited by the voltage. Have you tapped the current sensors to see what kind of current you were drawing?
> 
> A journey of 1000 miles, starts with the first trip around the block.


48V is a long way from 288V. 
I am resisting the urge to pull the trigger on making the big battery purchase until I smooth everything else out. I don't want to get in over my head and lose motivation with the project.

I saw something on the bench before I put the motor in the car that I haven't quited figured out. I had the scope on the motor current output signal on one of the phases and it would shoot up (not as expected) and the motor would start to buck when I tried to accelerate hard even without a load. I never figured out exactly why this was happening. I just assumed that my commutation was out of sync with my rotor field. Now that I have a load I seem to be able to reproduce this rather easily which should help he track it down. There are some fault signals coming fromt the inverter that I might need to try and understand and an enable/disable line to the inverter that I might need to take control of. I might also be able to use the current sensing circuit from the unused inverter portion to get some visibility into my battery current switching.

If you hear of anyone using the Prius inverter and/or motor that may have already gone through some of the discovery let me know. I know Zaxxon is using this inverter and he has eluded to a overcurrent protection limit in the inverter causing him a problem so this is another thing that I am considering.

I also have to keep in mind that I got this motor for free since it was being thrown away as defective. Nobody new what the fault was that made them swap it out in the first place.

Thanks
Jeff


----------



## zaxxon (Jul 11, 2009)

Nice to see your rolling. The Gen II current limit is above the 200 amps. My original current sensors were saturating at that level. I did not capture the actual trip value with the new sensor before we put the car up for winter.


----------



## jddcircuit (Mar 18, 2010)

I wrote some new code that just polled the angular position and applied the phase voltages accordingly to the rotor position. The motor spins very nicely under a load now and is able to produce steady torque at low speeds. My problem seems to be when my algorithm tries to go from position based commutating to speed based commutating. The speed based commutation sync tries to predict the next commutation point at high speeds as opposed to reacting to the position like I have time to do at low speeds. I will need to experiment with different control methods but first I need to make my drive train a little more road worthy.

I was jumping the gun a bit on making the car move before I had things like axles, motor mounts, brakes, throttle, and a front seat fully secured and fitted. Now that I have seen it move I have an appreciation for the amount of torque and forces involved.


----------



## jddcircuit (Mar 18, 2010)

I've got the drive train more secured now and moving. However, I am having some problems generating the continuous torque that would expect.

The Prius motor I am using is a 8 pole 3 phase brushless DC type. It uses a resolver for angular position feedback. I am attempting to use a trapezoidal type commutation scheme which I am now thinking is part of my problem. When I quickly increase my PWM duty cycle or under higher loads I get a severe shudder or vibration. Things are smooth without a load. I am also only using 48V for this testing and the motor/inverter combo that I have typically sees about 280V in the Prius. Maybe this low of voltage is magnifying the symptom by limiting the rate of change in phase current. Which is only a guess since I don't have experience.

There are so many things that I could be doing wrong but I wanted to get some feedback on if this type of "stepping like" vibration is to be expect if only having the discrete trapezoidal steps on this type of motor and loads and low voltage source.

My problem is very noticeable going up the driveway incline. It sounds like it is ratcheting itself up the hill. This ratcheting appears to be the same whether I am going forward or reverse so I think I have my phase alignment right.

I guess I will start investigating more sinusoidal control methods. I will probably have to switch to a more powerful processor to do this.

Thanks
Jeff


----------



## SimonRafferty (Apr 13, 2009)

My suspicion would be that the motor is 'cogging'.

I presume you have built your own vector phase controller where you are using the resolver to determine the slip angle between the power input and the rotor position?

Cogging occurs when either the speed of the input or output are different - so the slip angle is going from 0 deg (where torque is zero) through 180 deg (max torque) back to zero. Each time this happens you get a judder!

While it's cogging, you are only averaging a fraction of the peak 180 deg torque.

It generally occurs with polyphase motors which are just being fed with polyphase AC when the torque gets too high. The idea of a vector controller is that regardless of the speed of the rotor, you can control the torque generated. In many circumstances (an EV being one), having the throttle control the torque rather than the speed gives a more similar experience to an IC engine.

If you are already running a vector controller, I would look at the position of the resolver with respect to the motor rotor as it could be that the 0 deg slip position is not where the resolver thinks it is!

Si


----------



## SimonRafferty (Apr 13, 2009)

I've just read a bit more of the thread!

You are obviously running some sort of vector control algorithm - but my suspicion is the same.

I imagine that it's the algorithm that is continuing to rotate the phase ahead of the resolver.

You mention that at high speeds, you do not have time to run the motor in a phase controlled way? Do you mean that you cannot generate the PWM fast enough to produce a meaningful sine wave or that you cannot read the resolver?

What type of resolver is it - digital or analogue? If it's digital, then you are only using a timer to determine the slip angle. If it's analogue, what about turning it into digital by timing the zero crossings?

If you have 8 poles and say you want 10,000 rpm, that gives you 0.7ms between pole crossings. 

I built a 3 phase controller a while back based on a Propeller uController which has 8 independent concurrent processors. Being able to give three of them the task of generating PWM for the three phases, Three to produce the sine wave values that the PWM generators are going to use, one of them to read the resolver and spit out a measured slip angle and the final one to run an algorithm which just worried about the relationship between the frequency and phase of the sine waves and the resolver position. The result was that all of the processors had a reasonable idle time even at high RPM.

The processor which looked at the resolver looked at the phase of the sine waves being fed in to the motor and just spat out a mean slip angle as a byte value. The control algorithm looked at the demand torque and the slip angle and just used the sign of the difference to increase and decrease the output phase gradually. Thus, it was not looking at position, but the mean measured phase difference and adjusting this iteratively.

One final trick is that the resolution of the sine waves I generated, reduced as the speed increased. At low RPM, there were 256 samples over 360 deg. At 10,000 there were only about 8. Low resolution at low speed made the motor noisy and efficiency was poor. At high speed, the harmonics generated were too high for the motor to react to - so it didn't. 

Many 'grown-up' controllers use the same trick!

Si


----------



## jddcircuit (Mar 18, 2010)

SimonRafferty said:


> I've just read a bit more of the thread!
> 
> You are obviously running some sort of vector control algorithm - but my suspicion is the same.
> 
> ...


 
Thanks Simon
This helps me. The fact that you mention low resolution at low speed made the motor noisy sounds like something I am experiencing. I will study your response a little. It takes me a while to digest since I don't speak all the motor control jargon yet. I am only using 12 samples per electrical revolution at all speeds. I guess this is not enough to expect smooth rotation at low speeds.

I like the idea of parallel processing. I will get back to you if I want to persue that avenue.

I am reading a Zilog app note right now for Vector contol of 3 phase induction motor to see what I can learn. It is for the same processor that I have and they are using a 90 degree 128 sample lookup table. I started with their sensorless BLDC app note and software and then modified (hacked) it into what I have now. I am going to see if I can merge the two app notes and see what I can get.

Thanks for sharing your experience with me. It helps me keep motivated.


----------



## icec0o1 (Sep 3, 2009)

From my experience with RC BLDC motors/controllers is that voltage is very important. I was using 4s to experiment with a large motor and it was doing terrible under load. Switched to 8s and it ran without problems. I'd add a few more leadies before putting more effort into reconfiguring controller/etc.


----------



## bart_dood (Sep 2, 2010)

jddcircuit said:


> I've got the drive train more secured now and moving. However, I am having some problems generating the continuous torque that would expect.
> 
> The Prius motor I am using is a 8 pole 3 phase brushless DC type. It uses a resolver for angular position feedback. I am attempting to use a trapezoidal type commutation scheme which I am now thinking is part of my problem. When I quickly increase my PWM duty cycle or under higher loads I get a severe shudder or vibration. Things are smooth without a load. I am also only using 48V for this testing and the motor/inverter combo that I have typically sees about 280V in the Prius. Maybe this low of voltage is magnifying the symptom by limiting the rate of change in phase current. Which is only a guess since I don't have experience.
> 
> ...


Hi Jeff,

From my understanding simple trapezoidal commutation is not suitable for dynamic systems such as car drives, they suffer from torque/current ripple and also there are problems with the ability of the system to cope with rapid changes in load/torque.

I do have a question regarding your control method/code though. The controller I am working on uses trapezoidal for the first couple of electrical phases from a standstill (zero rpm) as there is no position information available until the rotor starts moving. My code then switches to field orientated vector control (IE sinusoidal currents).

During your trapezoidal control, do you always have one phase leg disabled, IE only driving a single upper and a single lower IGBT/MOSFET during a phase before switching to the next phase?

Incidentally someone in the know suggested to me to use this chip:

http://ixdev.ixys.com/DataSheet/98568.pdf

To simplify code and output electronics, it generates dead time etc and is a good way of driving an inverter. I'm using one in my electronics.

chris


----------



## jddcircuit (Mar 18, 2010)

icec0o1 said:


> From my experience with RC BLDC motors/controllers is that voltage is very important. I was using 4s to experiment with a large motor and it was doing terrible under load. Switched to 8s and it ran without problems. I'd add a few more leadies before putting more effort into reconfiguring controller/etc.


I suspect that the low voltage is magnifying my problem. I am scrounging up some more batteries for testing. If more voltage does help with the same modulation scheme that will be good experience to get.

Thanks


----------



## jddcircuit (Mar 18, 2010)

bart_dood said:


> Hi Jeff,
> 
> From my understanding simple trapezoidal commutation is not suitable for dynamic systems such as car drives, they suffer from torque/current ripple and also there are problems with the ability of the system to cope with rapid changes in load/torque.
> 
> ...


My prius inverter does not allow me to have one phase leg floating like I had going on with my sensorless control board. What I am doing presently is chopping the 360 electrical degrees into 12 zones of 30 degrees. So the ability to represent a sine wave is a rather crude stair step. In each 60 degree region (which is 2 adjacent 30 degree regions) one of the 3 phases is either full high or full low side and serves as my reference. Then I PWM the other two phases away from the reference either 100% or 75% of the command PWM depending on the 30 degree region my rotor position feedback gives me. I have a resolver that tells me rotor position.

If I increase the duty cycle I want to have nothing but a positive effect on torque which is not what's happening at the moment. It seems like the motor is fighting against itself when I increase the PWM duty cycle rapidly. 

I suspect that only having 30 degree sine wave resolution and a poor sine wave representation may be creating a significant current ripple (if that is the correct term).

Hopefully once I smooth out my commutation resolution problem and wire in my phase current sensors, I will be able to control the PWM duty cycle to maintain a desired command torque for the driving experience.


----------



## jddcircuit (Mar 18, 2010)

Now we're zipping around. I think I can even spill your coffee with the new acceleration. Although golf cart like speeds using 48v it is still fun.

I changed many things in my control algorithm some of which were a shot in the dark and I don't fully understand why it is working the way it is yet because I was doing things counter to what I thought I should.

I am now using a sine wave lookup to modulate my phases but it might not be the main reason for the improvement. I think I actually had two of the phases reversed along with being out of alignment with the rotor magnet poles by 45 degrees. It appears that I can make a motor spin without running on all cylinders. Eventhough it is running many times better I am likely a ways from optimized.

One thing that has me puzzled is that in order to reverse direction I am shifting my phase alignment by what I think is 90 electrical degrees. I thought that this should be 180 degrees but I tried what I think is 180 and it didn't work. Maybe I am misinterpretting what I am doing or maybe this will become apparent when I start using a phase current vector???

I don't have any brakes on the car yet but the regen braking seems to work pretty good and I can even switch it into reverse if I need to at slow speeds.

This weekend I will try to better explain what is going on but I needed to post now. I am very excited. I was getting frustrated with the poor performance and without having done this before I didn't know if I was reaching a limit.


----------



## jddcircuit (Mar 18, 2010)

Here is another test drive video. The weather is not bad here today.

http://www.youtube.com/watch?v=nHhl_GIXgtE


----------



## nimblemotors (Oct 1, 2010)

whoo hoo! faster than the jogger, congrats on the progress!



jddcircuit said:


> Here is another test drive video. The weather is not bad here today.
> 
> http://www.youtube.com/watch?v=nHhl_GIXgtE


----------



## aeroscott (Jan 5, 2008)

" It's alive " great work!


----------



## Picasso (Sep 28, 2010)

Major grats on getting the rolling now.


----------



## jddcircuit (Mar 18, 2010)

I think I figured something out today. I couldn't fully explain why my car was running so much better after making the changes to my control software.

First off, It does appear that the trapezoidal commutation method was causing me problems with high load currents but did not show up as a problem on the bench with no load.

The second item that I discovered by accident was that by advancing the phase of the stator current my car ran faster. I just read that this is the typical way to do field weakening for a BLDC motor like mine which allows the motor to run higher than base speed. (if I only knew). I thought there was something wrong with my inverter.

So apparently with such a low battery voltage the car was not going to go very fast without some form of field weakening.

I would approximate that I was doing about 15mph with the 48V batteries but it is only a guess. maybe faster.

I am now going to pull the transaxle back apart to put the other smaller motor (MG1) back inside. I am going to try and fix the planetary gear between the two motors rigid. This should allow me to optimize the traction motor control efficiency using the second motor/generator as a load during testing.


----------



## steven4601 (Nov 11, 2010)

Very good progress. Keep posting your results!


----------



## nimblemotors (Oct 1, 2010)

Jeff, I was wanting to try running my Mars BLDC from the Prius inverter, but I not sure how it can be done. The prius inverter input does not have a floating state for its motor connections, its either connected to + or -. 
How can that be used with a normal BLDC motor? It seems you must do one positive, the other two negative(ground), and this won't be right for the motor? Am I missing something?


----------



## Coulomb (Apr 22, 2009)

nimblemotors said:


> The prius inverter input does not have a floating state for its motor connections, its either connected to + or -.
> How can that be used with a normal BLDC motor?


Huh? The inverter has 3 outputs U,V,W and the motor presumably has 3 inputs. If there is a star point connection, just leave it open.

I don't see a problem.

Edit: Oops! My apologies. I realise now you're talking a bit higher level than that; whether the phases are ever floating for position sensing. Is that it?


----------



## Coulomb (Apr 22, 2009)

That is, with the motor terminals (stator). If you need a position encoder, that could be a challenge.


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> Jeff, I was wanting to try running my Mars BLDC from the Prius inverter, but I not sure how it can be done. The prius inverter input does not have a floating state for its motor connections, its either connected to + or -.
> How can that be used with a normal BLDC motor? It seems you must do one positive, the other two negative(ground), and this won't be right for the motor? Am I missing something?


I also ran into this problem when I got the Prius inverter and realized that I could not make one of the phases float with the three wire interface they use. One of the guys ( I think Zaxxon) turned me onto reading about other modulation schemes (ie Space Vector) that did not use the floating phase like I was doing. I am learning as I go so I may be misinterpretting some things.

I am far from optimized but here is what I have done so far. I had to figure out the BEMF relationship to the built in resolver position sensor. I tried to find the magnetic alignment points of the motor by powering one phase pair at time like a stepper motor. I also tried spinning the motor mechanically and borrowded an oscilloscope to see the BEMF. I think I got it close enough.

I then attempted to create phase voltages that would align to the sinusoidal BEMF of the motor. I use a sine look up table to calculate and apply the duty cycle and polarity relative to the rotor position.

Right now I am only scaling the magnitude of the duty cycle that follows my sine wave lookup table with my potentiometer input (throttle). I realized that since I only had 48v of test batteries that my motor would not spin very fast under a load with my voltage control aligned to the BEMF. I also think that my phase current is lagging the applied phase voltage quite a bit. I just advanced my look up table by 30,45, 60 degrees and the motor ran much better under a load.

I expect that these problems will go away when I finish implementing my phase current control loop. In this mode I will let my control loop apply the necessary duty cycle (phase voltage) that produces the desired phase current at each angular position. Then my phase current will follow my sine lookup table relative to rotor position and my throttle position will provide torque command which is what I want for an EV.

I haven't worked on it in a couple of weeks. My plan is to pull it back out of the car and do some better bench testing. I am going to put MG1 (motor-generator 1) back inside and use it as a load to optimize MG2 control.

Good luck. I don't keep very good notes but I will try and help.


----------



## nimblemotors (Oct 1, 2010)

okay, thanks Jeff, found this. seems a lot more complicated,
not sure my 1mhz processor can keep up. 

http://www.atmel.com/dyn/resources/prod_documents/doc32094.pdf


----------



## jddcircuit (Mar 18, 2010)

nimblemotors said:


> okay, thanks Jeff, found this. seems a lot more complicated,
> not sure my 1mhz processor can keep up.
> 
> http://www.atmel.com/dyn/resources/prod_documents/doc32094.pdf


 
I think the end result of this method is equivalent to what I am doing. I am using a sine lookup table based on rotor position instead of calculating it to reduce my processing overhead. We also don't have the sector determination problem at start up since we have the absolute position resolver instead of hall effect sensors which makes it a little easier.

I am going to experiment with some different control methods once I'm on the bench. It is pretty cool that the Prius transaxle has two motor-generators mechanically connected to each other. This is almost like a built in dyno test with some minor modifications.

A control board that is rich in features that is compatible with the Prius inverter and motor looks very doable so far. I know I can get something to work but it will probably take more than me alone to find the best solution.

Jeff


----------



## jddcircuit (Mar 18, 2010)

A little off topic but I was very very surprised to see an EV charging station at my work with a Tesla parked in it this morning. The charging station wasn't there yesterday. I was joking with my coworkers that the only reason I was building an EV was to maybe get a better parking space at work. This might really get the whole EV buzz going around work. There are some design guys here with much more experience than me that would be great to have involved with building.

This guy must work up in the offices with a window. His budget is a little different than mine. I'm struggling coming up with a few grand to buy my first set of batteries.


----------



## jddcircuit (Mar 18, 2010)

I am trying to get the DC to DC converter for supplying the 12 volts for my accessories to turn on. The circuit is on the underside of my Gen 1 Prius inverter cooling plate. Here is a picture of silk screen labeling for 4 control signals at a connector. This does not include the 12V terminals. I assume this is where I will turn it on and off with my ignition switch.

S
IGST
NODD
IDH

My guess is that I need to connect two of these together or to a common point but not sure what. If anyone is familar with this prius circuit or has any guesses I would appreciate them.


----------



## Picasso (Sep 28, 2010)

Just keep saving! I like to tell my self the cheaper I wait the cheaper it gets. I'm still saving up for my batts as well. And also hunting cheap Prius parts still. All that I have found the miles are sooo high. And I never see them in the easy and cheap pick and pull lots.


----------



## sparkswb6nov (Mar 17, 2011)

igct= gets 12v+ with key on 
S= gets 12+ all the time
NODD = is output ? 5-7 volts converter is in normal
2-4 volts converter is improper
0.1- 0.5 when converter is required to stop

IDH = comes from a/c amp (for now would worry about it)

might try 20 12 volt pd dept cycle bat at $70 a each.

keep going you get it.


----------



## jddcircuit (Mar 18, 2010)

sparkswb6nov said:


> igct= gets 12v+ with key on
> S= gets 12+ all the time
> NODD = is output ? 5-7 volts converter is in normal
> 2-4 volts converter is improper
> ...


Thanks for the info.

I went by my local Toyota dealer and met a tech that was very helpful. I applied the 12volts to S and IGST and there was some voltage on the converter output but not 12 volts. I only had 36 volts going in so maybe it wasn't enough for the converter to work.

I just got 50 lithium cells delivered which is half of my final pack.
I am in the process of wiring them up and see if the converter works with 160volts instead of 36v battery pack.

I am also working on a battery charging and monitoring solution. I think it is going to work. So far so good.


----------



## sparkswb6nov (Mar 17, 2011)

you can get 320 v or 160 V out an old computer power supply 500 watt worth.
or about 1.5 to 3 amps. the power supply should be fused at that amperage.
but its without any Isolation, remember one side of the 110 line goes to earth grd .. the 110 ~ 220 switch well sel. where you get out 160V or 320V when plug into 120 , voltage doubler or not..it well be off to large cap. rated 
at 200 v or more ..watch out that voltage can kill.gen 1 Prius should handle 
360v . gen 2 some what less..the dc to dc with no current dray on it should be less then 1 1/2 at 300 volt so it should be enough to try it..just remember one side of ac is at earth grd ,grd , common and dc to dc wants to floating dc , so be careful don't touch to grd,,


----------



## sparkswb6nov (Mar 17, 2011)

with 50 lith. that about 50 x 3.4 = 180 you might try a boost converter out of gen 2 and get 360 ,180 x 2 = 360 .. you should get up too 450 volt out..


----------



## jddcircuit (Mar 18, 2010)

sparkswb6nov said:


> with 50 lith. that about 50 x 3.4 = 180 you might try a boost converter out of gen 2 and get 360 ,180 x 2 = 360 .. you should get up too 450 volt out..


I am starting with 50 cells. Once I get everything working the way I want it I will add another 40 cells in series. Then after that I might move to the Gen 2 inverter, remove the boost circuit and add another 40 cells for a total of 130 in series. I'm using 40ah cells so with 130 I figure I will have around 17kwh pack.

Starting with 50 is keeping my costs down and keeping me busy at the same time.

Thanks
Jeff


----------



## JRoque (Mar 9, 2010)

Hello Jeff,

I read somewhere those boost converters are in the upper 90% of efficiency. I can guess reliability, power output and bit extra efficiency are good reasons to replace it with actual cells. Any other reason for wanting to do that?

JR


----------



## DawidvC (Feb 14, 2010)

JRoque said:


> Hello Jeff,
> 
> Any other reason for wanting to do that?
> 
> JR


For real power they are a bottleneck. Running enough cells allow you to run both motors at peak amps, using the boost convertor means you are limited to the peak amps of the convertor.

Regards
Dawid


----------



## Tesseract (Sep 27, 2008)

Don't know if you guys are aware of this, but the Prius uses "interior permanent magnet" motors which don't exactly behave like either an induction or surface PM synchronous machine. The reason for the boost converter is to be able to overcome the high BEMF presented by the magnets buried in the rotor (which also contribute some "saliency" to the rotor's field, giving it some reluctance motor characteristics) without resorting to impractically short pulse widths at low RPM/torque.

That is to say, without the boost converter dynamically adjusting the bus voltage to the inverter, the Prius motors must either be crippled at the high end or the low end of the speed range. There are supposedly ways around this with better software control of the motor but that's above my pay grade...


----------



## DawidvC (Feb 14, 2010)

I could have it totally wrong, but I seem to remember that Field-orientated control (FOC) with mods for synchronous motors, is supposed to work with these motors. Unfortunately I am still at work - the info is on my home computer. These are quite interesting motors - I have a research paper from an American research institute where they modified these motors - they could pretty much only weaken it, and their best efforts only gave a slight improvement.

I will look into these control schemes again when I get home

Regards
Dawid


----------



## jddcircuit (Mar 18, 2010)

Tesseract said:


> Don't know if you guys are aware of this, but the Prius uses "interior permanent magnet" motors which don't exactly behave like either an induction or surface PM synchronous machine. The reason for the boost converter is to be able to overcome the high BEMF presented by the magnets buried in the rotor (which also contribute some "saliency" to the rotor's field, giving it some reluctance motor characteristics) without resorting to impractically short pulse widths at low RPM/torque.
> 
> That is to say, without the boost converter dynamically adjusting the bus voltage to the inverter, the Prius motors must either be crippled at the high end or the low end of the speed range. There are supposedly ways around this with better software control of the motor but that's above my pay grade...


Jeff
Are you saying that with a higher bus voltage I should expect to have some challenges with torque control at low speeds? Varying the bus voltage is not out of the question if that is what is needed.

I did see some interesting behavior even at low bus voltages. When I say interesting I mean from my limited experience. With and without a load was very different. Any heads up I can get helps.

Please elaborate on how this motor will differ from a surface PM motor and in general the pros and cons of the mixture of motor characteristics that it has.

I also have now mechanically coupled the traction motor (MG2) and the generator (MG1). My plan is to do some control optimization by driving the motors against each other to learn more about their behavior.

What would be cool is if these two motors end up having complementary characteristics at opposite ends of the rpm range.

Thanks
JDD


----------



## jddcircuit (Mar 18, 2010)

JRoque said:


> Hello Jeff,
> 
> I read somewhere those boost converters are in the upper 90% of efficiency. I can guess reliability, power output and bit extra efficiency are good reasons to replace it with actual cells. Any other reason for wanting to do that?
> 
> JR


I was viewing the boost circuit as a bottleneck for power.

However I am considering using the boost circuit for charging my battery pack since I wont be using it for motor drive. It should be able to boost rectified wall voltage nicely for charging the high voltage battery pack. I haven't worked through the details on this yet.

Thanks


----------



## Tesseract (Sep 27, 2008)

DawidvC said:


> I could have it totally wrong, but I seem to remember that Field-orientated control (FOC) with mods for synchronous motors, is supposed to work with these motors. ...


Hey Dawid... no, you aren't totally wrong, but you aren't quite right, either. You *can* drive this motor with regular old FOC code with some loss of potential torque/power below base speed, but above base speed - in the field-weakened region, that is - my understanding is that this motor can be particularly unforgiving to inverters and itself if Id and Iq aren't managed just right.

One of the biggest benefits of the IPM design over SPM or induction motor designs is that the saliency of the rotor can be exploited to get additional torque from reluctance (once again, if Id and Iq are managed just right).



jddcircuit said:


> Please elaborate on how this motor will differ from a surface PM motor and in general the pros and cons of the mixture of motor characteristics that it has.


The above is just about the limit of my knowledge about these motors, so I can't really do justice to your question about pros and cons!

There just happens to be an expert on IPM motors in St. Petersburg, Keith Klontz (Advanced MotorTech, LLC.), btw. Consulting is this guy's business so I wouldn't expect him to give away much info for free, but if you are serious about making a proper inverter for this motor it might be worth the money to talk with him for a couple of hourse. Blowing up IGBT modules and demagnetizing the PMs in these motors gets to be pretty expensive after awhile


----------



## jddcircuit (Mar 18, 2010)

Tesseract said:


> Hey Dawid... no, you aren't totally wrong, but you aren't quite right, either. You *can* drive this motor with regular old FOC code with some loss of potential torque/power below base speed, but above base speed - in the field-weakened region, that is - my understanding is that this motor can be particularly unforgiving to inverters and itself if Id and Iq aren't managed just right.
> 
> One of the biggest benefits of the IPM design over SPM or induction motor designs is that the saliency of the rotor can be exploited to get additional torque from reluctance (once again, if Id and Iq are managed just right).
> 
> ...


This helps me to at least consider the difference between the internal magnets and surface magnets and that rotor reluctance factors in by design. I will research on this subject. I also appreciate the heads up on the real possibility of damaging the hardware if not operated properly.

My goal is to eventually have a controller that exploits all of the benefits of prius motor and inverter technology that will allow for its reuse in other machines. However I'm only as serious as a hobby can be right now but I am very excited about the possibilities.

I will consider contacting the expert especially if I hit a wall which may be just around the corner. I will not be satisfied with only having something working. I will continue to optimize the performance as I learn.


----------



## Spider-man (May 9, 2011)

I am new here so I will start with a simple question that I couldn't get the tech guys at Toyota to answer for me. 

1: would it not be possible to just buy a motor controller for ac motors and run the prius motor with that 1?

2: I know you said that you might use the power amplifier on the controller to charge the batteries. Could you emphasize on that a bit? I see the idea of raising the voltage to be compatible, but would you need a separate charger to be hooked up into that assembly?

3: assuming the answer to number 1 is yes... what would the detrimental effects be of running at a lower voltage but with more amps? Surely the motor can handle enough if it will move a prius along on it's lonesome. Prius' aren't light are they?

4: just out of curiosity (you may have answered this already) how is your expense sheet looking so far? I know you said that you wanted to stay with a cheap budget so I was just curious how that was coming along so far.

-Again, you can see my total number of posts that I'm new to this, (and young and inexperienced) so go easy on me if I'm dead wrong on something.


----------



## jddcircuit (Mar 18, 2010)

Spider-man said:


> I am new here so I will start with a simple question that I couldn't get the tech guys at Toyota to answer for me.
> 
> 1: would it not be possible to just buy a motor controller for ac motors and run the prius motor with that 1?
> 
> ...


I've learned that Prius electric motors are "Interior Permanent Magnet Synchronous Motors" and I am researching more now on that subject.

I started with the assumption that they could be controlled in the same manner as brushless dc motors but that was not exactly correct. They require sinusoidal phase currents to acheive smooth torque. I modified some control software on a couple of evaluation boards to do this. I got the car to drive around the block at about 15mph using only 48volt battery pack. I was doing what is called flux weakening by trial and error to increase speed and didn't no it at the time. It is not that difficult but I had a lot to learn and a ways to go.

I got my transaxle for free from a local transmission shop that swapped it out as bad. The deal was that if I get my electric car working I had to put one of their bumper stickers on it. I havent found the defect yet and they didn't have any clues. I also see them on ebay for $200 to $700.

I am using a Zilog motor control evaluation board and an Analog Devices resolver to digital eval board as my controller. I think these two boards are about $100 each but I got one for free from a guy at work.

I bought the prius 3 phase inverter for $100 on ebay. It had dents in it from an accident but it seems to work fine.

Total so far $200 since I got some for free

I could probably reproduce it for less than $1200 with used items.

These motors are similar to permanent magnet dc motors in the fact that their speed is limited by the applied voltage so lower voltage will mean lower top speed.

The battery charging is a seperate problem but there are some possibilities to use some of the unused drivers and high voltage switches in the prius inverter to pump current into the battery. This might save me more money by building my own battery charger from these parts. I don't have this prototyped yet. 

The big bucks for me is in the batteries. I just bought a portion of my lithium batteries to get me going for $2700. I will buy more once I make more progress.

I think this motor will push my car around very nicely when or if I ever finish.

This is my first attempt at a project like this but when I am done I hope to be able outline a very cost effective conversion method using junk yard prius parts.

Check out the rest of the thread. There are some pictures and some youtube videos you can search for.


----------



## Spider-man (May 9, 2011)

cool. thanks for the info! I am a college student so I am looking for the most efficient way to do this money wise. (i would prefer not to use a fork lift because it seems like such a heavy motor for 48v. that seems silly to me)

What range are you shooting for?


----------



## jddcircuit (Mar 18, 2010)

Spider-man said:


> cool. thanks for the info! I am a college student so I am looking for the most efficient way to do this money wise. (i would prefer not to use a fork lift because it seems like such a heavy motor for 48v. that seems silly to me)
> 
> What range are you shooting for?


Trying to find the least expensive way to do something is part of the game. There are hidden costs with doing things yourself like time, tools, and do over scrap but the experience gained far out weighs these things for me.

You might want to research the fork lift motor projects. These guys are not running them at 48Volts.

I don't really have a range target or performance target. I will be happy with 40miles. However I would like to minimize my wattHours per mile. This means a smaller battery pack which again saves money.

This is my first project and it is not finished so I wouldn't want to recommend it for a first project on a budget. However I wish more people were attempting using these motors so we could share information.

Jeff


----------



## Spider-man (May 9, 2011)

i understand where you are coming from. That's the fun part about research. I actually have seen a few people/groups that have successfully converted cars with prius motors, but if I remember correctly, there were few helpful details... I will see if I can find that info again. 

I know the guys don't run them on 48 volts, but at the most it's only 72 volts. As you know all to well, the high speed is in direct relation to the operating voltage. (or it seems to be) I would just like to be able to drive it 70 mph if need be. (and not be stressing it at that) I live 10 miles from work, however, there is an interstate road on the way. (probably 9.5 miles of the trip itself)

if this was not the case, I would probably be ok with just 72 or 96 volts. (48 is far too low in my opinion)


----------



## jddcircuit (Mar 18, 2010)

After all the EVCCON hype I am remotivated to work on my conversion. I have some parallel projects going on.

On the hardware side of things I decided to modify the floor plan of the car to allow me to put the batteries under the seats. The floor was rusted through anyways and was going to need replacing.

I only have fifty 40Ah cells at the moment but I am building the fiberglass battery boxes in the floor to accept 96 on each side.

I need to do this in phases to keep my costs down. I have 6kwh now, once the car is moving again I will buy more to double the voltage (96 in series) and then down the road buddy them up to double the Ahs which will give me a 24kwh pack in the end.


----------



## bart_dood (Sep 2, 2010)

jddcircuit said:


> After all the EVCCON hype I am remotivated to work on my conversion. I have some parallel projects going on.
> 
> On the hardware side of things I decided to modify the floor plan of the car to allow me to put the batteries under the seats. The floor was rusted through anyways and was going to need replacing.
> 
> ...


Hey there, I took a vacation from my project to, I didn't work on it for about 4 months. Distracted on family stuff etc.
I've been working on it again though. To summarize I have a completely home made ECU finished now which incorporates an Arduino for high level control and LCD display with miles/watts/watt-hours/battery capacity/speed/rpm etc.
It also has the maple ARM microcontroller for the motor control. The box is complete, the ECU firmware is finished enough to work but will require further development to tweak it.
All that is left is the motor firmware. To sum up it is at the point where I have all the field orientation functions running at a time of 64 microseconds, just about good enough for my 10khz PWM frequency (I'll still work on getting it faster, be nice to be around 50microseconds so 50% cpu time). The next part I have left is to fix the timer problems I have. Some timers don't work inside interrupts so I have to find a workout for my firmware, I have a brushless DC 3 phase bicycle motor as a test piece to develop everything and when its all working I'll finish my vehicle EV motor off.


----------



## jddcircuit (Mar 18, 2010)

bart_dood said:


> Hey there, I took a vacation from my project to, I didn't work on it for about 4 months. Distracted on family stuff etc.
> I've been working on it again though. To summarize I have a completely home made ECU finished now which incorporates an Arduino for high level control and LCD display with miles/watts/watt-hours/battery capacity/speed/rpm etc.
> It also has the maple ARM microcontroller for the motor control. The box is complete, the ECU firmware is finished enough to work but will require further development to tweak it.
> All that is left is the motor firmware. To sum up it is at the point where I have all the field orientation functions running at a time of 64 microseconds, just about good enough for my 10khz PWM frequency (I'll still work on getting it faster, be nice to be around 50microseconds so 50% cpu time). The next part I have left is to fix the timer problems I have. Some timers don't work inside interrupts so I have to find a workout for my firmware, I have a brushless DC 3 phase bicycle motor as a test piece to develop everything and when its all working I'll finish my vehicle EV motor off.


 
Very cool. I am definitely going to check out your blog. I also just ordered an Arduino board today that I plan on using for higher level control and display of the same types of status. I have never used one of these before. Lots of similarities in our projects it sounds like. I have also been working on a battery monitoring circuit thats looks like it will give me the voltage of every cell while charging and driving.

I will keep up to date on your progress with the motor firmware also. I am learning as I go and when it comes to debugging timers and interrupt conflicts I eventually work through it but usually not in a straight forward manner.

And yes my vacation from my project is over also. I hope I can remember where I left my motor control source code files. I just read a document that might help me with my motor control. The Prius motor has an interaction between the permanent magnet field and a reluctance field that makes it different from smaller BLDC motors that I have used before. I think I observed this interaction in my last test drive. I should be able to characterize what they are talking about. My control method was a most basic approach but got things to move. Lots of tweaking ahead I expect.

Before I get back on my motor control I think I am going to continue with my battery management portion. I want to use my inverter and possibly the inductance of one of my motors as a battery charging solution. This is going to be my first Arduino project and then I will integrate the motor control onto the same platform if it can handle it.

Jeff


----------



## sparkswb6nov (Mar 17, 2011)

there is some differences between Gen1(2001-2003) and (2004-2009) prius's MG 2 ..
in Gen2 the mag. are located differently. on Gen2 they use more of a square wave at high RPMs ,, the boost converter controls is where it get its PWM from some what. and running upwards of 400 to 500 volt to over come Counter EMF generator by motor..
you might have use CPU that works better for PMSM .. ABB makes controls that well control PMSM ACS-800 and ACS-850 but they cost ..I think Micochip has DSP CPU with some source code for PMSM too..

I do not think the DC to DC converter will with low voltage of 48 -96 like you trying to use for it uses a step down transformer ,, think it wrong ratio . gen1 273.6 nom up to 290 ~ 324 volt in running ..273.6 /12 ...gen2 201.6 nom. up to 240 volt running 201.6 /12 so with 22~23/1 step don't think get enough volt out of DC to Dc converter..

If you have move then 150 volt of batter you boost by 2 -2.5 and them go into DC to DC conv..but i think be easier just 96 volt dc to dc conv.. when time comes..

I have have done some work with a Gen2 boost conv. and it work down to about 120 volts or so ..not heavily load it was better 90+ eff. 

I was thinking of using for PHEV conv for Gen1 with about add battery pack of about 160VDC or so,, and boosting to lose 300 ~ 324 or so to keep OEM charged up in all EV mode..

Thanks for update post keep up the good work, you doing most difficult thing.. you get it some so stick to it.. k

If you so of info about Microchip web site or other info, if it well help..

let me know 

thanks 

ken
Good luck


----------



## jddcircuit (Mar 18, 2010)

sparkswb6nov said:


> there is some differences between Gen1(2001-2003) and (2004-2009) prius's MG 2 ..
> in Gen2 the mag. are located differently. on Gen2 they use more of a square wave at high RPMs ,, the boost converter controls is where it get its PWM from some what. and running upwards of 400 to 500 volt to over come Counter EMF generator by motor..
> you might have use CPU that works better for PMSM .. ABB makes controls that well control PMSM ACS-800 and ACS-850 but they cost ..I think Micochip has DSP CPU with some source code for PMSM too..
> 
> ...


Thanks

I am using a GenI transaxle right now. I am aware that the magnets are arranged differently and also that one of them is wound in series and another in parallel which makes a difference in the torque/current and rpm/voltage relationships.

GenI MG2 spins at a higher speed for the same voltage than GenII motors but with less torque at the same current. I think I will have plenty of torque at low speeds even with the GenI motor. I also mechanically connected MG1 and MG2. I think MG1 will provide some valuable torque at the high end speed on the freeway since it's counter emf is much lower at the same speed than MG2.

I don't have a GenII inverter but if I did I would consider using the boost converter that you mentioned as a battery charger.


Regards
Jeff


----------



## sparkswb6nov (Mar 17, 2011)

Using it for a Battery charger , I think it would a wast you use an other PC power supply for charger or use step-up transformer , a 120v to 240v or 120v to 380v would very well 240 X 1.414 = 339v peak no load, 380 X 1.414 = 537v peak no load 380 X .9 = 371v with a load ..1to 10 amp would charge a full voltage prius battery pack well.. by controlling the primary wiring of the step-up you regulate easy too. Some high Voltage , high current power supply do that way too..
A pc power well put out about 320 volts DC at eighter 120 or 240 it has a voltage doubler in it.. using the switching trans. just be the step-down transformer , could be used as the pass reg. .. not useing any of low volt stuff( 5v , 12v, -12v, 3.3v ect). most have opsol. that sense off the 5v line , with v-div. you use it for for High voltage sense..

Just remember it would have High Voltage isol. with AC plug unless you used Isol. trans..

Thanks 

ken


----------



## Coulomb (Apr 22, 2009)

sparkswb6nov said:


> Using it for a Battery charger , I think it would a waste...


I think maybe you two are talking about different DC/DC converters.

I assume that all models have a DC/DC to charge the auxiliary (12 V) battery from the hybrid pack. Though on the Gen2 it probably works from ~ 200 V input; it might not handle your new pack voltage if you used a 500+ volt pack. BTW, I don't consider 500+ V to be too high; EV200 contactors handle up to 1800 V. Fuses are expensive though.

The other DC/DC converter, let's call it the boost converter, is what the Gen2 has but the Gen 1 does not. It boosts from ~ 200-240 V to anywhere between 200 - 240 V (low loss pass-through) to 500 V. On the 2010 model, it boosts to around 650 V. If using a Gen2 inverter, I think this one would make a good charger *for the high voltage pack*, boosting about 170 V (peak of rectified 120 V) to 340 V (peak of rectified 240 V) to the 500 V or so of the high voltage pack.

It would be nice if the converter worked right down to almost zero volts input, since then it could do power factor correction as well (don't filter the mains much, just a few tens of microfarads, and control such that the mains current is basically sinusoidal). But someone suggested that it stops working at around 120 VDC input. So from -20 to +20 degrees of the 240 V mains (22% of a half cycle), it could not draw any current. Well, the power factor would be a lot better than a typical uncorrected power supply, which draws current only at the peaks of each half-cycle.


----------



## Coulomb (Apr 22, 2009)

sparkswb6nov said:


> Just remember it would have High Voltage isol. with AC plug unless you used Isol. trans..


Yes, if using the dc/dc boost converter, the pack would not be isolated from the mains. But the pack should be fully floating from chassis, I believe, so this should not be a particular problem, unless high speed pulses get capacitively coupled to chassis (e.g. through the winding to chassis capacitance). Just grounding the chassis to mains earth should solve that, though it might throw some GFCI breakers.

Now that I reread your post, Ken, I think I was misunderstanding it, and you were talking about the dc/dc boost converter after all. My apologies.


----------



## bart_dood (Sep 2, 2010)

Hi Folks,

I haven't bee here a while as I've been working away on electronics and firmware. I finally have everything hooked up to my test motor and I ran it for the first time at the weekend. I couldn't get it to run in the full FOV closed loop mode yet, I need to work on finding the bug. 

I have some photos and a vid on my blog below:


----------



## petebarchetta (May 15, 2014)

Hello all,

I've been watching this forum post from the shadows...... I'm interested to in utilising the prius transaxle for a conversion, however mine has a twist.....
Basically "a la prius" my project looks to keep the engine, but "assist" the car with the EV bits from a wrecked prius. The project car in question is a R53 Mini Cooper s, i wish to remove the mini getrag gearbox and sub with a prius box, i'm aware the ratio’s will be shot to hell and i might lose a gear (mini 6, prius 5) i'm looking to retreive as many parts from a prius to make this happen, the mechanicals i have figured out, its the electricals i'm confused on. any pointers would be great.


----------



## petebarchetta (May 15, 2014)

to test my theory, or shoot it down at the least. What is the dimension for the prius transaxle from gearbox mounting face to the other end. I've measured up my project car and looking to see if a prius box will swap out for the BMW getrag box. also looking to understand what the Prius manual boxes had in terms of gear selection?
The auto boxes i'm not fond of and plus there is more to go wrong.


----------



## samwichse (Jan 28, 2012)

Priuses never had a manual transmission.


----------



## asimor (Nov 14, 2012)

Jeff, I am waiting for any update.


----------

