Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 03-20-2009, 05:21 PM   #591 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Hi Matt! I tried to email you the whole file, but it was limited to 5000 characters, and the program was 13000.

I think I misspoke earlier. (actually I didn't know how to describe what it does. hehe. but here it is!)

Let's say current % of max current is less than or equal to the throttle position. Then PWM duty just follows whatever the throttle is.

Now let's say current % is larger than throttle position. Then PWM duty keeps falling until current is less than or equal to throttle position. Now PWM duty just goes back to following throttle position, until current gets bigger than throttle position.

__________________
kits and boards

Last edited by MPaulHolmes; 03-20-2009 at 08:50 PM..
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 03-20-2009, 05:22 PM   #592 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Sorry Matt, it wouldn't let me send the whole thing by PM.

Basically, here's the important part:

if (pwmDuty > throttlePos) {
pwmDuty = throttlePos;
}

else if (current > throttlePos) { // The poor man's PI loop! hahaha!
if (pwmDuty)
pwmDuty--;
}

else if (pwmDuty < throttlePos) {
pwmDuty++;
}


OCR1A = pwmDuty;
__________________
kits and boards
  Reply With Quote
Old 03-20-2009, 10:37 PM   #593 (permalink)
EcoModder Student
 
esoneson's Avatar
 
Join Date: Nov 2008
Location: Youngsville, NC
Posts: 117
Thanks: 11
Thanked 14 Times in 13 Posts
Throttle vs PWMDuty vs Current

Paul,

There may be another variable that you will want to incorporate into this algorithm. You will probably want to be able to limit the rate of change of speed (or pwmDuty or Current). I.e. limit accelleration. Or have an acceleration curve (when speed is very slow keep acceleration low, when higher allow higher rates of acceleration to keep from jerking the car right from the git-go. Also if in reverse, then acceleration should also be tamed.

For the future: selectable acceleration curves from granny to grandprix

EDIT: Also, for deceleration you might want to be more aggressive about the adjustment. If you see the cop in your rear view mirror and take your foot off the accelerator, you want instant response, no?

Eric
__________________
1995 BMW 318i EV in the making

Last edited by esoneson; 03-20-2009 at 10:43 PM..
  Reply With Quote
Old 03-20-2009, 10:41 PM   #594 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Oh man, you are right Eric! I forgot about that. I had it in there before on the bike version, and messed around, then changed a bunch of stuff and forgot about it. That's a really good idea. I think I'll test it out ON THE ROAD HAHAHAHA with different acceleration ramps and see how it feels. I like the idea of granny mode to drag race.

Thanks, Eric!
__________________
kits and boards
  Reply With Quote
Old 03-21-2009, 01:59 AM   #595 (permalink)
2004 Prius Owner
 
lectruck's Avatar
 
Join Date: Oct 2008
Location: Hendersonville, Tn
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
This is great. Granny mode to drag race, you all are doing great.

What does it take to adopt a poor little moffet, this is such a worth while project I can't bear to think that they haven't all been taken care of yet.
  Reply With Quote
Old 03-21-2009, 02:13 AM   #596 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Actually there are a few mosfets that are still homeless. hehe. You can make a donation here:

Green Cars: Videos and More!

On the right side it says "Support the 144v Open Source Motor Controller!"

It's Ben's site. He graciously set that up for me! Thanks Ben!
__________________
kits and boards
  Reply With Quote
Old 03-21-2009, 05:14 AM   #597 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Graham NC
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Read this all in one sitting. This is great. Eyes are bleeding.
Thanks for the chance to be involved and adopt a FET.
When I was coming up all we had were glass FETs.

So, can you all point me in the direction of motor specs.- vs- vehicle weight and other beginner stuff?

Thanks Paul for the hard work!
  Reply With Quote
Old 03-21-2009, 10:14 AM   #598 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Hi Dave! A great place for every question you could ever come up with about building your own EV is EVDL Archive / Forum Interface - Electric Vehicle Discussion List.

What I would do when Sabrina and I made our conversion is write questions on there each day, and like 10 or 20 world experts with 40 years of EV experience would give their advice! hehe. and it's free!
__________________
kits and boards
  Reply With Quote
Old 03-21-2009, 04:07 PM   #599 (permalink)
EcoModder Student
 
esoneson's Avatar
 
Join Date: Nov 2008
Location: Youngsville, NC
Posts: 117
Thanks: 11
Thanked 14 Times in 13 Posts
Another very userfull site is:
DIY Electric Car Forums - Electric Vehicle Build and Conversion Community

There are some very knowledgeable people there including some folks building a really beefy DC Controller (but out of my economic sphere).

Eric
__________________
1995 BMW 318i EV in the making
  Reply With Quote
Old 03-21-2009, 07:15 PM   #600 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
First Test Drive a Success!


Here it is where the curtis used to be.

I took it for a short drive around the neighborhood, not going too fast, and accelerating gently. It was sort of stressful and scary, not knowing if something was going to catch on fire or something. I still have a headache from it. I

I need to fine tune the delay after the hardware shuts off the mosfets. I had put in a really long one earlier and forgot to change it back to something more reasonable, and when I was at a standstill on the driveway, trying to go up, I hit the current limit and the delay was so long (like 1 millisecond or something) that the current dropped all the way to like 0 by the time it turned on again, causing the average current to be very small on very steep hills at near 0 rpm.

So, I need to reduce the delay so that the current doesn't fall that much below the 500 amp limit before being turned on again. People may actually need all 500 amps at start up (going up a really steep hill!) Geeze!

Now is the super annoying part. I don't have a laptop, so I get to unbolt everything, and drag that dang thing into our bedroom to re-program it with a shorter delay, and then re-bolt in everything! Dang it! I need to get a nice cheap laptop.

I'm too stressed to feel happy right now. It was scary having it in the car, and imagining all the fire explosion scenarios! I'm glad it works, though!

__________________
kits and boards
  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control MPaulHolmes Fossil Fuel Free 3480 05-04-2022 05:43 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 04:10 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com