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 05-12-2011, 10:42 AM   #11 (permalink)
ReVolt Enthusiast
 
Join Date: Jun 2009
Location: Michigan, USA
Posts: 239
Thanks: 97
Thanked 47 Times in 40 Posts
Wiki document - ReVolt Controller Parameters

I added a wiki document for this subject.

I placed it under the "Open ReVolt Controller Settings - ReVolt Control Parameters" Open ReVolt - EcoModder.

It is a "MS Word" document that can be edited. If any changes are made to the document, PM me and I will upload corrected document to the wiki.

- Mark

  Reply With Quote
The Following User Says Thank You to sawickm For This Useful Post:
mrbigh (05-12-2011)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-12-2011, 10:45 AM   #12 (permalink)
EcoModding Apprentice
 
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 143

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 44
Thanked 35 Times in 28 Posts
Simply type save and hit enter to save settings.

I have an issue with rtd period parameter not saving the value. It stays for a session but doesn't want to stay in memory even if I save settings.

I calibrated my throttle by setting maximum allowable amps to 10 and checking that potentiometer was at resting position. Noted value from RTD explorer. Then I floored the pedal and noted value for throttle max counts.

Note the correct parameter for setting throttle raw counts (an example below):

t-max-rc 500
t-min-rc 800
  Reply With Quote
The Following User Says Thank You to mora For This Useful Post:
mrbigh (05-12-2011)
Old 05-12-2011, 09:11 PM   #13 (permalink)
Master EcoModder
 
Join Date: Apr 2009
Location: Charlton MA, USA
Posts: 463

EVVette - '71 Chevy Corvette Coupe
Thanks: 31
Thanked 183 Times in 94 Posts
Posted for Fran.

-------------
Very short PWM pulses to the MOSFET gates provide minimal motor current and just generate heat. Older IGBTs are even worse, taking a long time to fully turn on. Plus the Cougar uses an optoisolator, which both delays and shortens the gate drive signal.
-------------

If you look at the HCPL-4504 datasheet, you will see that turn on of the opto is _faster_ than turn off. So while opto does delay the the gate drive signal, it _lengthens_ it (not shortens)
Also notice that as temperature of the opto increases, the turn on remains relatively constant, but turn off slows down. So with higher temperature minimum high pulse (on) to the FETs stretches.

A PI loop controls current by controlling pulse width. This loop will set the correct PWM to make the requested current. You can make the current reference jump from zero (foot of gas) to 10A minimum or so. This approach would be far less sensitive to motor resistance and battery pack voltage than a minimum PWM type parameter.

In any case we wanted to avoid the behavior of the Curtis. There minimum pulse width (on time) is enforced. That resulted in jerky starts (particularly with low resistance motors) where initial current was high until some RPM was built up and the motor would generate counter EMF. The solution was to drop the switching frequency when first applying pulses. The side effect is the well known Curtis whine. This is something we wanted to avoid.

---------------
The Cougar firmware might also do a better job with minimum off time. If the motor controller is estimating 98%+ PWM, it should just turn on 100%. It should specifically not clamp at 510! Switching off for a few cycles is just generating heat without adding control.
---------------

The PWM unit of the AVR is run in phase correct PWM mode.
From the AVR spec:

TCNT1 counts up from 0 to 511 then back to 0. The output is cleared (low) when TCNT1 = OCR1A (PWM value) when counting up. The output is set (set) when TCNT1 = OCR1A (PWM value) when counting down. If OCR1A is outside this range, the PWM output will not work and will be stuck in either a high or low state (undefined). So if you want the output not to flip, you need to program a special case - take away control from the PWM unit. This can become messy unless you are very careful and understand the PWM unit and chip very well.

Paul initially set the clamp value to 510 (I don't know why not 511, perhaps he had problems with the PWM unit if he allowed 511). In any case, the shortest pulse width is:

509 up - nothing
510 up - output low
511 nothing (low 1 cycle)
510 down - output high (was low 2 cycles)

So we have 2/16us low. That is 125ns.

This is shorter than the delay times of the opto. I think the pulse won't even make its way to the gates of the FETs. Even if it did, the RC constant of the gate capacitances and gate resistors would not bring the gate voltages down to anywhere near the gate threshold voltage. In short, it won't switch the FETs and the output will be pure DC.

Fran
__________________
www.EVVette.com - 1971 Corvette Coupe Conversion to all Electric!
www.AdamBrunette.com - Machining, CNC, Robotics and Electronics.

You can download RTD Explorer for the Cougar controllers at www.EVVette.com
  Reply With Quote
The Following 2 Users Say Thank You to adamj12b For This Useful Post:
mrbigh (05-12-2011), Nevyn (05-13-2011)
Old 05-16-2011, 04:04 PM   #14 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2010
Location: Annapolis
Posts: 159
Thanks: 0
Thanked 32 Times in 27 Posts
Quote:
Originally Posted by adamj12b View Post
If you look at the HCPL-4504 datasheet, you will see that turn on of the opto is _faster_ than turn off. So while opto does delay the the gate drive signal, it _lengthens_ it (not shortens)
The datasheet shows a gentler turn-off slope, but the effect in the circuit can go either way. The bias (in this case actual "bias resistors") is to not mistakenly turn on the MOSFET from noise. That means some (many?) designs will shorten the pulse rather than lengthen it. It just depends on how far up/down the slope you turn on/off.

We have used several different optoisolators. We started out with the cheap 2701 types, which worked fine, first time, in our initial design. We didn't really care about its performance because we knew the feedback would handle it.

Our challenge started when we upgraded to faster parts in preparation for trying a SR design. We saw both shortening and lengthening of pulses as we tried to get noise-safe, stable operation, and predictable symmetrical latency. We tried the same optoisolator that Cougar used, and didn't see any improvement. (It was actually initially worse because of a lower CTR, we needed to increase the drive and decrease the pull-up current.)

Quote:
Originally Posted by adamj12b View Post
A PI loop controls current by controlling pulse width. This loop will set the correct PWM to make the requested current. You can make the current reference jump from zero (foot of gas) to 10A minimum or so. This approach would be far less sensitive to motor resistance and battery pack voltage than a minimum PWM type parameter.
Which is why it's fine to eliminate narrow pulses, either on or off. The error will accumulate and be corrected.

Quote:
Originally Posted by adamj12b View Post
In any case we wanted to avoid the behavior of the Curtis. There minimum pulse width (on time) is enforced. That resulted in jerky starts (particularly with low resistance motors) where initial current was high until some RPM was built up and the motor would generate counter EMF. The solution was to drop the switching frequency when first applying pulses. The side effect is the well known Curtis whine. This is something we wanted to avoid.
From looking at an old analog golf cart controller, I believe that they simply halve the frequency for the low range. The result is an audible-frequency whine and poor low-speed control. It has become an endearing, familiar and comforting sound to many golfers. Perhaps not so much for us.

Once you have digital control it's easy to avoid that fixed-frequency whine. A little bit of A/D or control rounding noise is enough to make spread out the audible frequencies.


Quote:
Originally Posted by adamj12b View Post
The PWM unit of the AVR is run in phase correct PWM mode.
From the AVR spec:
... If OCR1A is outside this range, the PWM output will not work and will be stuck in either a high or low state (undefined).
Our controller is also using the AVR (although we are switching to the STM32), initially in mode 3 and later in mode 10.

I'll need to re-read the datasheet to see if I missed something, but we never encountered a problem. I don't believe this problem occurs if you follow the datasheet closely,

.... I just did a quick scan and found this text:

-----

The extreme values for the OCR2A Register represent special cases when generating a PWM
waveform output in the phase correct PWM mode. If the OCR2A is set equal to BOTTOM, the
output will be continuously low and if set equal to MAX the output will be continuously high for
non-inverted PWM mode. For inverted PWM the output will have the opposite logic values.

----

I had actually been thinking that we didn't have a problem because we always initialized to off at zero, and approached saturation from a non-zero value. Apparently there is explicit logic in the timer circuit to handle this case.


Quote:
Originally Posted by adamj12b View Post
So we have 2/16us low. That is 125ns.

This is shorter than the delay times of the opto. I think the pulse won't even make its way to the gates of the FETs. Even if it did, the RC constant of the gate capacitances and gate resistors would not bring the gate voltages down to anywhere near the gate threshold voltage. In short, it won't switch the FETs and the output will be pure DC.
Ah, but it does in some cases. In some of our power stages we are using 10 ohm gate resistors with low gate charge MOSFETs. A 125ns pulse is easily enough to hit the threshold and "ring the bell". (Yes, that power stage was ring prone anyway. We added 33 ohm resistors in series with the permanent gate resistors to calm it down.)

If your isolation circuit and gate drive is slower, there will still be a point where you have a short pulse that does a half switch.

The point is the same in either case. Either the short pulse doesn't get through, and you can get rid of it. Or it just generates heat, and you should get rid of it.
  Reply With Quote
Old 03-21-2012, 08:00 PM   #15 (permalink)
EcoModding Lurker
 
SEBART PL's Avatar
 
Join Date: Dec 2009
Location: Poland
Posts: 21
Thanks: 7
Thanked 1 Time in 1 Post
[QUOTE=t-max-rc - Throttle max count (pedal all the way up)
Possible values: 0-1023

t-min-rc - Throttle min count (pedal all the way down)
Possible values: 0-1023
These adjust the throttle position limits in case you have a weird pot that doesn't close or open all the way. Mine worked with the default settings...
[/QUOTE]

I am going to use Coguar controler,
I have 1kohm-2kohm throtle -this is the oryginal throtle position from car donor so I should get around 2.5-5V , can I adjust =t-max- and min to use this throtle or I suposed to change resistor?

what values
t-max- 0t-min-rc- 1023x50%= 511 ?

Thank you for any reply.
Sebastian
  Reply With Quote
Old 03-22-2012, 01:06 AM   #16 (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,362
Thanked 1,202 Times in 765 Posts
Hello Sebart! I would remove R8 and just add a wire, and change R10 to 1k. It will give you a lot more resolution with a 1k-2k throttle. Then set t-min-rc to 341, and t-max-rc or whatever it's called to 480. Really it should be 512, but 480 will allow for a little dead zone.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
SEBART PL (03-24-2012)
Old 03-30-2012, 06:51 PM   #17 (permalink)
EcoModding Lurker
 
SEBART PL's Avatar
 
Join Date: Dec 2009
Location: Poland
Posts: 21
Thanks: 7
Thanked 1 Time in 1 Post
Quote:
Originally Posted by MPaulHolmes View Post
Hello Sebart! I would remove R8 and just add a wire, and change R10 to 1k. It will give you a lot more resolution with a 1k-2k throttle. Then set t-min-rc to 341, and t-max-rc or whatever it's called to 480. Really it should be 512, but 480 will allow for a little dead zone.
Dygresion about this 1k-2kohm throtle.
I have chcecked with my bro who is an electronic guy he says:
"when pedal are absent = voltage is 0 when the pedal is max,=0V Sensor TCP -throtle resistor 1-2kohm and rezistor R10 conected do - give 5V dividing factor. I am not fully convince to remove R8 in a case short circiuit there is no safty feuture,- cause dangerous posibilities. Instead changing R8 I will put something which protect from direct short circuit 5V with ground - That could be the resistor which will be like fuse for some high currents during increase. And this R8 propably is designed to work like that.

By the way on exit J3 for sesor halla it could be given the same. Designer of this controler could think about situation - what happend if some wire will cut and will touche ground - if could be exactly 5V will turn of microprocessor.

I have read somwhere with C3 capacitor for 7 pin processor it is possible and good to give small choke series and close to 7805 legs two small capacitorsabout 100n.

Ask as well if there no dangerous for U9 when short circuit could possible happen from contacor coil becouse there is no diode reverse polarization (polarized)? "

Paul if you could comment above.
Thank you for your reply in advance.

Last edited by SEBART PL; 03-30-2012 at 07:36 PM..
  Reply With Quote
Old 03-30-2012, 10:19 PM   #18 (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,362
Thanked 1,202 Times in 765 Posts
Those are all good suggestions. The software takes care of some of the issues:

Infinite resistance (a cut throttle) would flag a fault in the software. The pwm would be disabled. If the current sensor output suddenly lost power, the microcontroller would set the pwm to zero in about 0.000025 seconds also.

I expected the contactor coil diode to be included if the person wanted to, but right at the contactor. The EV200 with the economizer recommends not having it, although I used a diode right at my ev200 contactor and it didn't seem to affect operation. I agree that it wouldn't be a bad idea to have a spot for a diode, and leave it up to people to put it in or not. I've just heard that it's best to have the diode right next to the contactor, so the voltage spike never makes it to the control board at all.

I think you are right about the output of the 7805. I haven't heard of a small choke for Vcc. It sounds like a good idea though.

Edit: I was reading today about MLCC caps, and they have some really cheap 10uF MLCCs that I think could replace both the 0.1uF and 10uF Aluminum cap.
__________________
kits and boards

Last edited by MPaulHolmes; 03-30-2012 at 11:32 PM..
  Reply With Quote
Old 07-22-2012, 06:35 PM   #19 (permalink)
EcoModding Lurker
 
Join Date: Jul 2010
Location: Philadelphia, PA
Posts: 23
Thanks: 7
Thanked 1 Time in 1 Post
I'm still a little lost here, guys. I figured out how to input data into the controller parameters and change them and save them, but things aren't doing what I wanted them to do. For example, I set the throttle max count to 1000 and as soon as I hit enter, the motor started revving on it's own! I hit the pack disconnect safety switch and saved my motor! Why would it do this?
The instructions say "throttle max count is with the pedal all the way up" does this mean physically with the pedal off the floor (IE, NO acceleration), or does it mean max input from the throttle?
I dropped it back down to 700, but now my van is so sluggish, like it's got NO pep at all. I can barely make it to 10mph.
I want to reset everything to how it came programmed, but I don't see a command for that. No, I tried "reset", but I don't think the parameters changed, and I typed "save" after every change I made.
Can I get back to "stock" with a command? Or do I need to manually input the data? If I need to manually input the data, can someone give me the specs?
Thanks!
Joel in Philly
  Reply With Quote
Old 07-22-2012, 06:55 PM   #20 (permalink)
EcoModding Apprentice
 
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 143

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 44
Thanked 35 Times in 28 Posts
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.

  Reply With Quote
The Following User Says Thank You to mora For This Useful Post:
type2teach (07-22-2012)
Reply  Post New Thread






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