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 07-22-2012, 06:08 PM   #21 (permalink)
EcoModding Apprentice
 
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 138

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 46
Thanked 33 Times in 27 Posts
I altered main post a bit. I've marked changes done in red. Let me know if anything needs to change. My financial situation could change a bit, hehehe.

bat-amps-lim - Battery amp limit
Possible values: 0-511
If you want to limit amp draw from your batteries you can set this parameter. Setting value to 0 means there is no limit for maximum battery amps drawn. However there is a hardware amp limiter on control board. This hardware limit controls max motor amps which can't be lower than battery amps. So it essentially limits battery amps too. Hardware amp limiter is adjustable but not via software. Hardware amp limit defaults at around 500A.

pc-time - Pre-charge delay time (1/10th second)
Possible values: 0-999
Controller's pre-charge circuit starts outputting +12V to J1 connector pin #3 after this time passes. Setting this value to 20 will result in +12V coming out of pin #3 after 2 seconds. 30 means 3 seconds etc. Zero value means no +12V to pin #3 at all.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 07-22-2012, 06:58 PM   #22 (permalink)
EcoModding Lurker
 
Join Date: Jul 2010
Location: Philadelphia, PA
Posts: 23
Thanks: 7
Thanked 1 Time in 1 Post
Quote:
Originally Posted by mora View Post
I've had that self-revving happen once. This was because I set throttle limits (min & max) wrong way. Min throttle was max throttle and vice versa. Your throttle calibration parameters might not be correct. Seems like you never get full throttle.

Set max battery amps to 2 and floor the throttle. Note RT (raw throttle) value. Release pedal and note that same parameter again. One should be high number and other one low. Now set these parameters as your t-max-rc and t-min-rc. You might want to leave some "slack" to both values (set parameters few units higher & lower). This ensures you always get full throttle and avoid high pedal lockout on startup. If you set these parameters (t-min-rc and t-max-rc) backwards your motor will spin on its own but it won't spin fast because of battery amp limit. Battery amp limit is set to 2 for safety. Remember to change it back to whatever you had it before when throttle is calibrated correctly.

There is no factory reset command. Every setup is different. You need to set t-min-rc, t-max-rc and bat-amps-lim. And maybe pc-time. Kp and ki after that. T-pos-gain and t-pwm-gain default to 8 and 0 if I remember right. That's a good starting point. Everything else is fine-tuning.
YES. THANK YOU. I don't have an EE background nor a programming background, so when people mix lingo from both, I get lost real quick.
It's great when I get a response like yours.
Ok. I'll try the step by step and report back to the forum.
What should the Battery amp limit be set at normally, if not at "2"?
When I step on the throttle and I get a number, is that the number I put in the t-max-rc (plus 2)? And the number at NO throttle, is that the t-min-rc (minus 2)?
What the heck is "Kp" and "Ki"? What is the difference between them? I know they are "loop values" (whatever that means) and it sounds like they make the controller respond quicker to your throttle pedal input, but how do I know what to put in each one? Which one should be higher for a more response feel?
Thanks SO much!
  Reply With Quote
Old 07-23-2012, 12:37 AM   #23 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,746

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,335
Thanked 1,066 Times in 697 Posts
I would leave Kp to 1, and Ki to 160. I think that's the default at least. To have a snappier throttle, I would do the following:

t-pos-gain 16
t-pwm-gain 8
save

Or maybe

t-pos-gain 19
t-pwm-gain 11

or something like that.

You want t-min-rc to be about 10 or 20 MORE than the measurement that you get when you do the pedal to the floor. I think around 410 is the default.

I would do t-max-rc about 20 or 30 LESS than the measurement when you have zero throttle. 683 is the default for t-max-rc. Zero throttle would actually be around 710 or so. The more throttle, the lower your feedback.
__________________
Mathematical magic:
Add 1 to your age. Then, subtract 1 from the result. The result is your age...
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
type2teach (07-23-2012)
Old 09-06-2012, 09:47 AM   #24 (permalink)
EcoModding Lurker
 
Join Date: Jul 2010
Location: Philadelphia, PA
Posts: 23
Thanks: 7
Thanked 1 Time in 1 Post
Well... Shortly after I re-set the parameters, I had to go argue a ticket down at the DMV for another vehicle I owned concerning my inspection sticker. It was like talking to a brick wall. So I decided to stop driving my van until it had it's state inspection sticker to avoid another ticket. Then I went on vacation and now that I'm back, I took the van to inspection last week and it passed! Now I'm legal and putting some real miles on the van and have some more questions.
Here are the specs on the van: '79 vw bus, 20*6v golf cart batteries (sam's club), 9" ADC motor (of course, Revolt controler).
I hit a fairly steep hill yesterday and even in 1st I was barely getting up it. It felt like my amps were limited. A month ago when I set up my controler parameters that Paul suggested above, I *thought* I left my amps at the max, but now I'm doubting my memory. What should my amps be set at if I want it set at max?
Also, can anyone point me in the direction of an article on how to figure out State Of Charge and Depth Of Discharge on lead acids?
Thanks!
Joel in Philly
  Reply With Quote
The Following User Says Thank You to type2teach For This Useful Post:
MPaulHolmes (05-29-2013)
Old 09-06-2012, 10:03 AM   #25 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,746

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,335
Thanked 1,066 Times in 697 Posts
Hi Joel!! Here's how you make sure there's no limit on battery amps:

bat-amps-lim 0
save

If it's 0, then the amps limit is just ignored. Are you sure you are getting the full throttle range? One way to check is to see the serial output at full throttle. Can you do that while driving? If you make sure the power section is disconnected, you could do it while parked.
__________________
Mathematical magic:
Add 1 to your age. Then, subtract 1 from the result. The result is your age...
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
type2teach (09-06-2012)
Old 09-06-2012, 12:18 PM   #26 (permalink)
EcoModding Lurker
 
Join Date: Jul 2010
Location: Philadelphia, PA
Posts: 23
Thanks: 7
Thanked 1 Time in 1 Post
Thanks Paul.
I'll check out both parameters and let you know.
  Reply With Quote
Old 09-07-2012, 05:47 PM   #27 (permalink)
EcoModding Lurker
 
Join Date: Jul 2010
Location: Philadelphia, PA
Posts: 23
Thanks: 7
Thanked 1 Time in 1 Post
I *did* set my parameters correctly. I guess it'll be <25mph up hills. I'm used to hypermiling in my Sprinter, so driving slow and using hills to my advantage are normal for me.
I just got back from the longest trip yet- 15 miles. 2/3 of my batteries are old, so I'm not expecting much from them. So far, they have exceeded my expectations!
Thanks
  Reply With Quote
Old 09-07-2012, 06:02 PM   #28 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,746

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,335
Thanked 1,066 Times in 697 Posts
How much does it weigh?
__________________
Mathematical magic:
Add 1 to your age. Then, subtract 1 from the result. The result is your age...
kits and boards
  Reply With Quote
Old 05-29-2013, 08:41 AM   #29 (permalink)
EcoModding Apprentice
 
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 138

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 46
Thanked 33 Times in 27 Posts
I didn't notice until now that latest code had a .pdf included in the same archive. All the parameters have default values and ranges and short description there. I'll add those missing to main post.

t-fault-rc (throttle fault raw counts) - Raw ADC counts for throttle fault. Time window is 200ms, so these counts must accumulate within 200ms for throttle fault to latch. Default value is 100. Range: 0-1023

c-rr (current ramp rate) - Current ramp rate in amps per millisecond. Default value is 6 (6000 amps/second?). Range: 0-100.

This ramping rate would need finetuning in my opinion. This should be something like amps per 100 millisecond. No wonder I didn't notice much difference when testing.

pwm_filter - Default value is 0. Sets the speed of the low pass filter used for PWM used by throttle_pwm_gain. 0 is slowest and 3 is fastest. Range: 0-3
  Reply With Quote
The Following User Says Thank You to mora For This Useful Post:
MPaulHolmes (05-29-2013)
Old 05-29-2013, 11:18 AM   #30 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,746

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,335
Thanked 1,066 Times in 697 Posts
The current was being updated in code at 1kHz I think, and the resolution was 1 tick per amp. It required fairly significant changes so that now it's 64 amps per second minimum. Unfortunately, the code change was done in AVR Studio, so it won't work with the bootloader, as far as I can tell. I did test it on a motor and it worked as expected though. Also, the pinouts were different since it was a different board. haha. But there were only a couple pins different, so it would be an easy fix.

I guess we just need someone to compile it at the command line of linux. I used to have a dual boot with linux and windows, but that computer crashed and took all the code with it. Each time I used Linux, before compiling things in linux, I used to have to type 3 random commands which made no sense to me. I don't remember what they were now, and there were several obscure changes to the default C build environment too. Some changes to "delay.c" that comes with linux, and other weird things. It took Fran all of a saturday to walk me through getting it ready. It's totally not repeatable by me.

__________________
Mathematical magic:
Add 1 to your age. Then, subtract 1 from the result. The result is your age...
kits and boards
  Reply With Quote
Reply  Post New Thread


Thread Tools




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