Nissan Leaf Motor test with DIY controller
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Nissan Leaf Motor test with DIY controller
Hello, I finally got my Nissan Leaf motor working with my homemade controller:
https://www.youtube.com/watch?v=qzlLh8xxx1g
I'm just so happy I wanted to share. haha
The software is field oriented control. I can't wait to get this thing in a car.
https://www.youtube.com/watch?v=qzlLh8xxx1g
I'm just so happy I wanted to share. haha
The software is field oriented control. I can't wait to get this thing in a car.
Re: Nissan Leaf Motor test with DIY controller
What software? Your own code?MPaulHolmes wrote:Hello, I finally got my Nissan Leaf motor working with my homemade controller:
https://www.youtube.com/watch?v=qzlLh8xxx1g
I'm just so happy I wanted to share. haha
The software is field oriented control. I can't wait to get this thing in a car.
If so, can your code support an IPM motor properly?
"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
Re: Nissan Leaf Motor test with DIY controller
Cool and congrats.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
Re: Nissan Leaf Motor test with DIY controller
This is great, thanks for sharing!
-JD
-JD
Member 117 of 26,000+
153v DUNE BUGGY © 164v Vectrix E-Moto © 72v Norco A-line/x5403 © 60v Specialized Enduro Comp/BMC © 72v x5tracycle © 48v TF IO/BMC © 36v Kepler FrictionDrive © Spot-Welding a123 © Pelican Front Packs © Vectrix Battery Replacement © MORE !!
大鸡巴 Motors
Knowledge is acquired through experience, everything else is just information - Albert Einstein
"Cheater?" I'm not competing, I'm Commuting!
153v DUNE BUGGY © 164v Vectrix E-Moto © 72v Norco A-line/x5403 © 60v Specialized Enduro Comp/BMC © 72v x5tracycle © 48v TF IO/BMC © 36v Kepler FrictionDrive © Spot-Welding a123 © Pelican Front Packs © Vectrix Battery Replacement © MORE !!
Knowledge is acquired through experience, everything else is just information - Albert Einstein
"Cheater?" I'm not competing, I'm Commuting!
- liveforphysics 100 GW
- Posts: 14143
- Joined: Oct 29 2008 1:48am
- Location: Long Beach, CA, USA
Re: Nissan Leaf Motor test with DIY controller
Nice capacitor choice.
Do you have a design phase current?
Do you have a design phase current?
Each carcinogen vapor exposure includes a dice roll for cancer.
Each mutagen vapor exposure includes a dice roll for reproductive genetic defects in your children.
Each engine start sprays them into a shared atmosphere which includes beings not offered an opportunity to consent accepting these cancer experiences and defective genetics life experiences.
Every post is a free gift to the collective of minds composing the living bleeding edge of LEV development on our spaceship.
Each mutagen vapor exposure includes a dice roll for reproductive genetic defects in your children.
Each engine start sprays them into a shared atmosphere which includes beings not offered an opportunity to consent accepting these cancer experiences and defective genetics life experiences.
Every post is a free gift to the collective of minds composing the living bleeding edge of LEV development on our spaceship.
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
Ya, it's my own code. I did it from scratch. I was tempted to look at the microchip FOC code, but wanted a personal challenge just by starting with the formulas. I didn't know it was an interior permanent magnet motor until a few days ago. It's not a big deal to modify Id and Iq to account for that. I'll probably do it this weekend. I made a really fast square root based from Andre Lamothe's tricks of the game programming gurus, and is accurate to +/- 0.0001 or so, so it won't take very many extra cycles to do the IPM modification.
I'm hoping for short periods of 400ampRMS per phase with the 600v 600amp powerex IGBTs. I made my own liquid cooling, so hopefully this will be practical. I think it will be OK. I've done a DC controller with an identical power section, and one guy tested his with the peak motor amps set to 515 per IGBT (each IGBT had its own hardware overcurrent protection and desaturation detection and current monitoring. It would of course be about the same for all 3, but I was just being paranoid)
Here's AC the code:
https://github.com/MPaulHolmes/AC-Controller
Here's the instructable:
http://www.instructables.com/id/200kW-A ... ctric-Car/
Just yesterday I finally fixed case where you need the initial index pulse to know the absolute position of the motor. I haven't uploaded the update though. I'll do that tonight I think.
I'm hoping for short periods of 400ampRMS per phase with the 600v 600amp powerex IGBTs. I made my own liquid cooling, so hopefully this will be practical. I think it will be OK. I've done a DC controller with an identical power section, and one guy tested his with the peak motor amps set to 515 per IGBT (each IGBT had its own hardware overcurrent protection and desaturation detection and current monitoring. It would of course be about the same for all 3, but I was just being paranoid)
Here's AC the code:
https://github.com/MPaulHolmes/AC-Controller
Here's the instructable:
http://www.instructables.com/id/200kW-A ... ctric-Car/
Just yesterday I finally fixed case where you need the initial index pulse to know the absolute position of the motor. I haven't uploaded the update though. I'll do that tonight I think.
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
Here's a test of the controller on an AC induction motor. He has it doing battle against a DC motor. The DC motor spins the AC motor, and then you "regen" to fight against the DC spin. The phase current gets up to 360amp.
https://youtu.be/GR2rcev1Mlo
https://youtu.be/GR2rcev1Mlo
Re: Nissan Leaf Motor test with DIY controller
Did you test your IPM code yet on the Leaf motor? Notice any difference?MPaulHolmes wrote:Here's a test of the controller on an AC induction motor. He has it doing battle against a DC motor. The DC motor spins the AC motor, and then you "regen" to fight against the DC spin. The phase current gets up to 360amp.
https://youtu.be/GR2rcev1Mlo

"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
I won't have time to attempt it until the weekend. dang job!
Re: Nissan Leaf Motor test with DIY controller
I did get part way with my own code a few years back I am definitely interested in spending more time on the code now.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
Re: Nissan Leaf Motor test with DIY controller
Bumping for updates on this 200kw DIY controller & $500 Leaf motor
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
I'll hopefully get another video tomorrow. The software has been updated quite a bit, and now is a lot smoother when it hits zero. No more sudden jerky stops due to the magnets. I finished a controller and sent it to someone who has a Leaf motor. They are going to put it in a home made dune buggy sort of thing. He's the type that doesn't mind destructive tests, and will probably test some accelerations with the phase current set to around 550 or 600amp peak. It's liquid cooled, so it might not mind that for short periods.
I also finished a couple of the AC boards and sent them today to someone else who has some Tesla motors and battery packs that they are going to experiment with! I'll let him talk about that though if he wants to. I don't want to volunteer too much info.
I also just sent in some new boards including a resolver to encoder board that has a built in pot so you can quickly figure out the specs of an unknown resolver. The car companies are TERRIBLE about telling the necessary information. I couldn't get anything out of the company that makes the resolver for the Leaf. But now all their secrets have been laid bare. haha.
I also just sent in a new AC control/driver board that is (almost) all surface mount and one sided, so assembly will be a TON easier:
http://i419.photobucket.com/albums/pp28 ... roller.png
It also has the resolver to encoder on board so you can do any old motor interface type. I also added CANbus and voltage monitoring and a 2nd temperature monitor and a brake input, so you can regen without having to use the throttle in a wig wag configuration (wig wag: positive throttle is "go forward", negative throttle is regen, or go in reverse when you run out of regen).
I also finished a couple of the AC boards and sent them today to someone else who has some Tesla motors and battery packs that they are going to experiment with! I'll let him talk about that though if he wants to. I don't want to volunteer too much info.
I also just sent in some new boards including a resolver to encoder board that has a built in pot so you can quickly figure out the specs of an unknown resolver. The car companies are TERRIBLE about telling the necessary information. I couldn't get anything out of the company that makes the resolver for the Leaf. But now all their secrets have been laid bare. haha.
I also just sent in a new AC control/driver board that is (almost) all surface mount and one sided, so assembly will be a TON easier:
http://i419.photobucket.com/albums/pp28 ... roller.png
It also has the resolver to encoder on board so you can do any old motor interface type. I also added CANbus and voltage monitoring and a 2nd temperature monitor and a brake input, so you can regen without having to use the throttle in a wig wag configuration (wig wag: positive throttle is "go forward", negative throttle is regen, or go in reverse when you run out of regen).
Re: Nissan Leaf Motor test with DIY controller
Then also read about E-S member Arlo's inverter build:Bowser330 wrote:Bumping for updates on this 200kw DIY controller & $500 Leaf motor
viewtopic.php?f=30&t=63982
and:
viewtopic.php?f=30&t=76025
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
I just got the field oriented control "interior permanent magnet" correction working with the leaf motor. Basically, with a high "saliency" motor, you use Id = 0, Iq = current magnitude. But for buried magnets, , there's also some of the torque from reluctance torque. I guess that's the stator pulling toward the steel laminations between the magnets (I think that's how it works). At any rate, to get the best torque per amp, you start with a current magnitude, and break it up into Id and Iq, where Id is negative. The formula, found here
at around the 22 minute mark:
https://www.youtube.com/watch?v=bZwLFpXhFbI
But instead of all that crap I think you can just run through all Id from 0 down to -sqrt(currentMagnitude). The goal was to find the best torque for the fixed magnitude. To quantify best torque (because who the heck has a torque measuring thing), I started the motor at 0 rpm, and checked what caused the motor to accelerate until the motor ran out of voltage in the shortest time (so, during that whole time, currentMagnitude was constant).
Then, I tried again with a fixed magnitude of 23amp, and found that the ideal Id was about half of the ideal Id for 12amp. Here's a video:
https://www.youtube.com/watch?v=VTn4fKNVbGc
at around the 22 minute mark:
https://www.youtube.com/watch?v=bZwLFpXhFbI
But instead of all that crap I think you can just run through all Id from 0 down to -sqrt(currentMagnitude). The goal was to find the best torque for the fixed magnitude. To quantify best torque (because who the heck has a torque measuring thing), I started the motor at 0 rpm, and checked what caused the motor to accelerate until the motor ran out of voltage in the shortest time (so, during that whole time, currentMagnitude was constant).
Then, I tried again with a fixed magnitude of 23amp, and found that the ideal Id was about half of the ideal Id for 12amp. Here's a video:
https://www.youtube.com/watch?v=VTn4fKNVbGc
Re: Nissan Leaf Motor test with DIY controller
I think the terminology is NO saliency = Id = 0MPaulHolmes wrote:I just got the field oriented control "interior permanent magnet" correction working with the leaf motor. Basically, with a high "saliency" motor, you use Id = 0, Iq = current magnitude. But for buried magnets, , there's also some of the torque from reluctance torque. I guess that's the stator pulling toward the steel laminations between the magnets (I think that's how it works). At any rate, to get the best torque per amp, you start with a current magnitude, and break it up into Id and Iq, where Id is negative. The formula, found here
at around the 22 minute mark:
https://www.youtube.com/watch?v=bZwLFpXhFbI
But instead of all that crap I think you can just run through all Id from 0 down to -sqrt(currentMagnitude). The goal was to find the best torque for the fixed magnitude. To quantify best torque (because who the heck has a torque measuring thing), I started the motor at 0 rpm, and checked what caused the motor to accelerate until the motor ran out of voltage in the shortest time (so, during that whole time, currentMagnitude was constant).
Then, I tried again with a fixed magnitude of 23amp, and found that the ideal Id was about half of the ideal Id for 12amp. Here's a video:
https://www.youtube.com/watch?v=VTn4fKNVbGc
salieicy (ie IPM) then you have ID |=0
clearly you understand how it works , just poking at your vocabulary :-D
"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-
- Posts: 24
- Joined: Jan 16 2016 10:42am
Re: Nissan Leaf Motor test with DIY controller
haha! Oops. It's just that the K is super big when Id = 0, so I thought that meant "super duper saliency". I got a 1.2 gpa in high school, so I missed a lot of the vocabulary. LOL. I guess I could have googled saliency. Another way to look at it is, if I can hold the line and stay consistent with my wrong usage of the word, and it catches on, maybe in 500 years it really will mean what I thought.
Re: Nissan Leaf Motor test with DIY controller
Any updates Paul? Any feedback from the beta testers? How many Amps can be shoved into the leaf motor?
Re: Nissan Leaf Motor test with DIY controller
Lots.Bowser330 wrote: How many Amps can be shoved into the leaf motor?
My measurements show 10 mohm and ~230uH phase to phase.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
Re: Nissan Leaf Motor test with DIY controller
Did you post 0.0008 H before? That's what I had in my spreadsheet for cap sizing.Arlo1 wrote:Lots.Bowser330 wrote: How many Amps can be shoved into the leaf motor?
My measurements show 10 mohm and ~230uH phase to phase.
"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
Re: Nissan Leaf Motor test with DIY controller
Colossus is 8uH the leaf motor is 230-240uHokashira wrote:Did you post 0.0008 H before? That's what I had in my spreadsheet for cap sizing.Arlo1 wrote:Lots.Bowser330 wrote: How many Amps can be shoved into the leaf motor?
My measurements show 10 mohm and ~230uH phase to phase.
You might have mixed the 2 up.
Colossus is wound for 50v the leaf motor is wound for 360v
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
Re: Nissan Leaf Motor test with DIY controller
Damn, you made me go find it.
viewtopic.php?f=30&t=35387&p=863407&hil ... ce#p863407
I am sure you posted elsewhere it's 800 uH too
viewtopic.php?f=30&t=35387&p=863407&hil ... ce#p863407
I am sure you posted elsewhere it's 800 uH too
"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
Re: Nissan Leaf Motor test with DIY controller
Sorry post corrected. That was a bad measurement with the rusty phase wires attached that go to the inverter.okashira wrote:Damn, you made me go find it.
viewtopic.php?f=30&t=35387&p=863407&hil ... ce#p863407
I am sure you posted elsewhere it's 800 uH too
Look at the motor data spread sheet from miles. viewtopic.php?f=30&t=65757
I keep all info I can updated there.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
Re: Nissan Leaf Motor test with DIY controller
Cool, thanks.Arlo1 wrote:Sorry post corrected. That was a bad measurement with the rusty phase wires attached that go to the inverter.okashira wrote:Damn, you made me go find it.
viewtopic.php?f=30&t=35387&p=863407&hil ... ce#p863407
I am sure you posted elsewhere it's 800 uH too
Look at the motor data spread sheet from miles. viewtopic.php?f=30&t=65757
I keep all info I can updated there.
I need to get measuring the spark ev motor. I am afraid how low it might be
"Peace out - I'm done."
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
-- Bernhard Riemann, 1859
edisonmotors.net
Tesla Model S 18650 cells - like new - and custom packs from Tesla cells for sale. Any shape Any power Any capacity.
PM me or search my threads.
Re: Nissan Leaf Motor test with DIY controller
What voltage does it run?okashira wrote:
Cool, thanks.
I need to get measuring the spark ev motor. I am afraid how low it might be
I would not worry

Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/