AEVA Homepage
Forum Home Forum Home > General > Members Machines
  New Posts New Posts RSS Feed - Weber and Coulomb's MX-5
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Weber and Coulomb's MX-5

 Post Reply Post Reply Page  <1 656667
Author
Message
offgridQLD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 July 2013
Location: Brisbane
Status: Offline
Points: 2018
Post Options Post Options   Thanks (0) Thanks(0)   Quote offgridQLD Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2016 at 5:35am
Weber sounds like the controller relies very heavily on the water cooling for it to be a big multiple stop limping struggle over that short distance. I guess all water cooled controllers would be the same.

At least you know the temp monitoring and current limiting work on the controller.

It has to be the pump, power or dead. unless it's a blockage or air bubble.


kurt

Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2016 at 12:01pm
Yeah. The pump's dead. It seems water has been into its electronics. Not via a shaft seal, since there is no shaft -- the impeller is magnetically coupled. It seems water has run down the outside of the reservoir and followed the power cable into the electronics. Not designed for outdoor use (or for coolant overflows). We'll put some silicone around the cable entry this time.

You can see what it looked like when new, here:
http://forums.aeva.asn.au/weber-and-coulombs-mx5_topic980_post25775.html#25775
http://forums.aeva.asn.au/topic980_post26035.html#26035

Replacement is out of stock, sigh. But hopefully not for long.
http://koolance.com/pmp-400-pump-id-10mm-3-8in

Edited by weber - 28 February 2016 at 12:05pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
TooQik View Drop Down
Groupie
Groupie


Joined: 17 June 2012
Location: Pakenham
Status: Offline
Points: 195
Post Options Post Options   Thanks (0) Thanks(0)   Quote TooQik Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2016 at 1:11pm
They're in stock here: PC Case Gear
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2016 at 2:09pm
Thanks heaps TooQik! And in Oz too, so I'll get it quicker. Although I went for this one with the 10 mm barbs.
https://www.pccasegear.com/products/29238/ek-ddc-3-2-pwm-12v-pump
Got some more red koolant too.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2016 at 7:09pm
Here's an improvement I made to Mexy back in December 2015, with help from Bladecar.

Because I swore I would never buy another lead-acid battery, I drove around with an essentially dead lead-acid auxiliary battery for months -- if you tried to wind the windows up while the brake-lights were on, the car would die -- before I finally got around to replacing it with the 40 Ah LiFePO4 you see here.



One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (1) Thanks(1)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2016 at 7:54pm
And with the auxiliary battery fixed, it became worthwhile to fix the power steering, again with help from Bladecar.

The problem was poor design of the 12 V motor that drove the hydraulic pump. The motor first went intermittent and then stop working altogether. It turned out there were two problems.

1. Poor construction of the brush mounting inside the motor. The brushes were hanging over the end of the commutator. So eventually they wore until an unworn overhanging "tongue" was riding on a steel part of the rotor and shorting out. Fortunately, the speed controller driving the motor has current limiting.

I filed off these tongues, and at Bladecar's suggestion I used two layers of veroboard to move the brushes futher along the commutator by packing their insulated mountings.



I also learned that brushes wear much faster if they have too little current as well as too much. That's because with too little current they do not form the brown conductive copper oxide layer that acts as a lubricant. So, since I'm running it at a significantly lower voltage and current than it was designed for. I left one pair of brushes tied back off the commutator (using steel wire) in the hope that the current through the remaining pair will then be something like they were designed for.

This has the added bonus that when the first pair of brushes wear out, I can then release the unused pair.



2. Hydraulic fluid was slowly leaking past the shaft seal and into the motor, and eventually making its way to the far end where the brushes and commutator are. We fixed this by cleaning it all out, then drilling a drain hole in the bottom of the motor casing at the end where it leaks in.

One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2016 at 8:48pm
Mexy lives! Water cooling system pump arrived today. Thanks again for finding it, TooQik. I did the same mod as last time, with the added 27k resistor. It was still required.
http://forums.aeva.asn.au/weber-and-coulombs-mx5_topic980_post26023.html#26023
And this time I sealed up the case around the electronics with silicone. Bolted it back in, hooked up the power and the hoses, ran it for ages to get the bubbles out, then gave it the ultimate test ...

Took the wife for a drive with the top down, up to the Mt Coot-tha kiosk for a chai ... The dreaded jinx test!

She passed!
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
g4qber View Drop Down
AEVA Member
AEVA Member


Joined: 30 July 2010
Location: Perth
Status: Offline
Points: 2144
Post Options Post Options   Thanks (0) Thanks(0)   Quote g4qber Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2016 at 8:34am
Speeding
$200 4 demerits 94 in 80 zone Wokalup
Holy Saturday
Cops are out in all weather
Ignored my vibe of red flashing light in distance.

New tyres 60k kms now with nitrogen. 2nd set since I got bmw
Green caps.
42 psi all Round.

Edited by g4qber - 28 March 2016 at 8:37am
2011 i-MiEV - 86k kms
2014 i3 REx 90k kms
Back to Top
jonescg View Drop Down
Senior Member
Senior Member
Avatar

Joined: 21 January 2010
Location: Albany, WA.
Status: Offline
Points: 2242
Post Options Post Options   Thanks (0) Thanks(0)   Quote jonescg Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2016 at 2:43pm
While I was in Brisbane for round two of the eFXC, I got to catch up with Weber and take Mexy for a spin up Mount Nebo.

Beautiful car to drive - you would have no idea it was heavier than the original. I've never driven an MX5 before, but this one sure held its ground more strongly than my abilities could push. The route from Bardon to Chappel Hill, Mt Nebo, Bardon, Chappel Hill and back to Bardon would have been something close to 80 km, so there was plenty of range to go around.

Congratulations Dave and Mike, you've done a great job!
I challenge you to come up with a better invention than the bicycle
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2016 at 12:01am
The No-Switches Cruise Control

It's been a while since I've posted in this thread. I haven't been doing anything to Mexy for some time now. Just enjoying driving her. And yes, being on good behaviour speedwise. I get my jollies now by not slowing down for the corners.

But the very need not to speed accidentally, got me to thinking about adding cruise control. However, I like the fact that all the controls and displays are stock standard -- no one would know she was electric by looking at the dash. Not to mention the fact that I'm a lazy bastard who doesn't want to fiddle around, mounting and wiring switches. And as a wise man once said, laziness is the mother of invention.

So, over many drives, I thought about various solutions, gradually whittling the number of switches down to zero -- a purely software solution -- and then further simplifying even that. And today, I finally implemented it.

When I say "zero switches" I really mean zero added switches. Clearly there has to be some way for the driver to interact with it.

The Tritium WaveSculptor motor controller can be commanded, via CAN bus, to maintain constant rpm. All that's required is suitable software in the open-source Tritium Driver Controls unit, to send those commands. And, for a software-only solution, I can only use controls that are already connected to the Driver Controls unit.

My plan is to use the momentary-on START position of the ignition switch, when we're already in Drive mode, to toggle cruise mode (constant-rpm mode) on and off. The set rpm will be whatever the motor is doing when cruise is turned on.

Cruise mode can be turned off by touching the brake pedal, or the clutch pedal, or putting the gear-shift in neutral, or pushing the accelerator pedal to where the requested rpm is significantly higher than the set rpm. And if all else fails, you can turn the ignition key to OFF.

Some of you may remember that we're presently using the ignition-switch START position, when in Drive mode, to cycle around 6 different quantities that we can display on the tacho. That function will still be available, but now only when in neutral or when the clutch pedal is depressed.

I have to tell you that testing brand new code designed to take over control of the speed and torque of your small car's 120 kW motor, is somewhat scary. As Coulomb facetiously said, when I told him what I was doing, "What could possibly go wrong".

This is something you want to test on a straight road with few other cars. So off I went, in the suburbs, at peak hour.

Actually, on the first test, I didn't go anywhere. It turned out I had initialised cruise mode to ON. And since the rpm at the time was zero, zero rpm was dutifully locked in. Constant zero rpm is pretty much the definition of a brick.

So I fixed that and off I went to a quiet road near Mt Coot-tha. The first time I flipped the ignition switch to START, to go to cruise mode, and took my foot off the accelerator, she kept on accelerating! It was like a demon had taken control. In other words it was just as if I was driving ... before I got the good behaviour bond.

So I flipped the key again, which turned cruise off, and gave me full regen braking, because of course my foot was off the accelerator.

The next time I tried it, she slowly decelerated. So clearly something was still wrong. But I was pleased that all the different methods of dropping out of cruise mode worked.

So, back home to eyeball the code, and I found I was taking the set rpm as the rpm being requested by the pedal rather than the actual motor rpm. So I've fixed that now, and will test again tomorrow.

Edited by weber - 25 November 2016 at 12:07am
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2016 at 5:40pm
After about 5 stops to change the code, recompile and reflash I declare the no-switches cruise control a success. Hoorah!

It's a funny feeling recompiling your car by the side of the road.

Most of the changes were just tweaking constants, but there was one serious gotcha. Unless you're going downhill when you set cruise, the pedal will be requesting a higher rpm than the motor is doing, so cruise immediately goes off again. So I made it so the accelerator had to first be released, before pushing it past the set position would drop us out of cruise mode.

I also made the requested rpm in cruise mode equal to the maximum of the pedal rpm and the set rpm. I note that with this modification, it isn't really necessary to drop out of cruise mode when the accelerator is pressed, except that one might then forget that cruise mode is active, and be surprised later when intending to decelerate below the cruise setting.

But no sooner had I got this working than I received an email from Newton with a well argued case for driver-settable speed limiting rather than cruise control. And giving a detailed description of how it could work.

Unfortunately he loses me when he writes "My recommendation is to locate a switch ...".

He agrees that I could make it work using only the START position of the ignition switch, but doesn't say how.

So now I'm working on code for the "No-Switches Speed Limiter".

Edited by weber - 25 November 2016 at 8:14pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
PlanB View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 January 2010
Location: Freemans reach
Status: Offline
Points: 527
Post Options Post Options   Thanks (0) Thanks(0)   Quote PlanB Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2016 at 7:59pm
'Recompiling your car by the side of the road', now there's an interesting turn of phrase. Living in the future we are. Some things from the past still persist though, like 12-0-2 alarms http://newatlas.com/esa-schiaparelli-mars-lander-crash-cause/46614/
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 6:26am
Good to hear from you Mr B. Yes, I was thinking yesterday, by the side of the road, as I added yet another floating-point divide to the accelerator pedal routine, which is called 25 times a second, on a processor with no floating-point hardware, "What happens when this routine, plus all the other things the processor is doing, takes longer than 40 ms?".

The answer is, "Since this routine is called whenever a new motor rpm feedback packet arrives; if you don't finish processing it in time, then every second packet just gets dropped on the road, and the routine only gets called 12.5 times a second." I might just barely notice the increased delay in responding to the pedal.

The processor that's doing this has similar specs to the one in the LEM, in terms of word size (16 bits), and amounts of RAM and ROM (4 KiB and 32 KiB). The difference is that this one is the size of your fingernail (instead of four shoe-boxes), costs about five dollars, runs 8 times faster, and runs on the smell of an oily electron. There's absolutely no excuse these days, for losing a multi-million dollar space-craft due to not having enough processing power. That's just ridiculous.

I just asked my wife what she thought the equivalent was to, "Runs on the smell of an oily rag", for an electric car. She thought for about a second before coming back with "Runs on the static from its carpet".

Yes sir-ee. Mah EV is so efficient, if the battery runs flat, ah jus' shuffles mah shoes on the carpet an' off we go.

Edited by weber - 28 November 2016 at 6:48am
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 10:43am
The No-Switches Speed Limiter

As Wikipedia explains,
https://en.wikipedia.org/wiki/Speed_limiter#Programmable
driver-controlled speed limiting is the inverse of cruise control. Cruise control sets a minimum speed. When it's active, you can go faster than the set speed by pressing the accelerator past the set point, but you can't go slower. Speed limiting sets a maximum speed. When it's active you can go slower by backing off the accelerator, but you can't go faster.

However, automatic deactivation in an emergency is not exactly inverse between the two, because the brake is not the exact inverse of the accelerator. Cruise control is deactivated in an emergency by the slightest push on the brake. Speed limiting is deactivated in an emergency by pushing the accelerator fully.

As Newton points out in his email, you don't want emergency deactivation to be confused with the kind of "spirited" driving where you push hard on the pedal in order to request maximum torque for the purpose of getting up to the speed limit as quickly as possible. Hence his inelegant suggestion of an added button on the steering wheel instead of emergency deactivation by accelerator.

But if it requires some practice to stop just short of the floor, in order to enjoy spirited driving without deactivating the speed limiter, then so be it. It is important that no finesse (or remembering of steering-wheel buttons) should be required in an emergency. Mindless panic should suffice.

Newton also suggested that I might have both Cruise-Control and Speed-Limiting as options.

That poor old ignition-key start-position is getting seriously overloaded with functions. Did I mention that in addition to its conventional function of "starting the motor", although in this case without any "rrr rrr broom" noises, it also cycles through 3 different AC currents drawn by the chargers when in charge mode: 10 A, 15 A and 20 A (displayed on the tacho).

And in Drive mode, if you flip the key to START while pressing the clutch, brake and accelerator, and patting your head and rubbing your tummy at the same time, the helicopter blades pop out of the roof and off you go.

But seriously, I thought of a semi-intuitive way of setting cruise control versus setting speed limiting. If, when you flip the key, the accelerator is requesting fewer revs than the motor is doing, in other words if you're in regen, then you get speed limiting. Otherwise you get cruise control.

Another excellent suggestion from Newton is that I could have a table of rpm values corresponding to the various statutory speed limits, i.e. the multiples of 10 km/h from 40 to 110, and the computer could round to the nearest whenever speed limiting is activated. [Edit: I earlier mistakenly wrote "round up"].

The problem with this, as he knew, is that the computer only knows motor rpm, not road speed, and it doesn't know what gear we're in.

Edited by weber - 26 November 2016 at 2:51pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
offgridQLD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 July 2013
Location: Brisbane
Status: Offline
Points: 2018
Post Options Post Options   Thanks (0) Thanks(0)   Quote offgridQLD Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 2:09pm
One limitation of conventional cruise control is that you set a fixed speed and that all works great on a flat road or even ok going up a hill (if the engine has enough power). Though has little control on a long downhill run as it doesn't apply the brake. (well some fancy modern ICE cars could activate the friction brakes but I have never driven one) All the cars I have used often overshoot your fixed speed on downhill runs as they just give you zero throttle.

Any way to improve on this with a EV so that just enough Regen braking is applied on long downhill runs to maintain the fixed speed?

I know your not setting it up to be a fixed speed control but a max speed limiter.

Kurt.

Edited by offgridQLD - 26 November 2016 at 2:10pm
Back to Top
Jeff Owen View Drop Down
Groupie
Groupie
Avatar

Joined: 13 November 2008
Location: Brisbane
Status: Offline
Points: 144
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jeff Owen Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 2:19pm

Originally posted by weber weber wrote:

Hence his inelegant suggestion of an added button on the steering wheel

"Inelegant suggestion", we are talking about an EV conversion that has 222 cells, each with a custom monitoring/balancing module that continues to scream in agony after it is removed from it's cell, hundreds of very high voltage connections, at least as many battery boxes as my car has batteries, a fibre optic communication system, two chargers, two dc converters, so many contractors and relays that you need two DC converters, two high voltage ceramic heater elements, a liquid cooled controller, adjustable power steering, air conditioning, adjustable suspension, a bigger diff, bracing to stiffen the chassis, a TARDIS on the dashboard and a plasma ball up the exhaust pipe, and you are worried about one little button on the steering wheel. I even explained how to install the button so nobody could see it.

I think the button is a much more intuitive and elegant solution that allows the cruise control/speed limiter to be controlled without the hands leaving the wheel. I certainly think it is more elegant than blindly reaching around behind the steering wheel and and fumbling with the ignition switch, a switch that also has the added functionality of being able to disable the power steering, lock the steering and disable the brake booster while travelling at high speed.

I also believe I suggested that you could use a table of values for the speed limiting function, but round up OR down to the nearest value. For example, if you are going from 100 km/h into a 80 km/h zone, pushing the hidden button after dropping below 85 km/h would set limiting to 80 km/h. For cruise control, I would have it hold the speed at the time of engagement as traffic doesn't always travel at the speed limit.

To get more functions on the key switch, you could look at Morse code for inputs.
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 3:34pm
Originally posted by offgridQLD offgridQLD wrote:

One limitation of conventional cruise control is ... often overshoot your fixed speed on downhill runs as they just give you zero throttle.

Any way to improve on this with a EV so that just enough Regen braking is applied on long downhill runs to maintain the fixed speed?

Definitely! With the WaveSculptor it just happens automatically. I only have to allow it to use enough torque to maintain the speed going up hills and it will automatically use up to the same torque in regenerative braking to maintain the speed when going down hills.

So I'm completely mystified by the fact that my wife's Nissan Leaf, in cruise mode, overspeeds down hills, forcing you to use the brake pedal which then deactivates cruise mode. I can understand this on ICE cars where servo braking requires extra mechanisms, but not on any EV that uses an AC motor and so gets regen for free. Very annoying.

Quote I know your not setting it up to be a fixed speed control but a max speed limiter.

Ah. I need to clarify. I am setting it up to be a fixed speed control. Both my cruise control and my speed limiting will maintain a fixed speed (within narrow limits). The difference is that in cruise mode you mostly have your foot off the accelerator but can temporarily increase the set speed by pushing the accelerator. Whereas in speed limiting mode, you mostly have your foot well down on the accelerator but can temporarily decrease the set speed by backing your foot off.

The tricky part will be in setting the torque limit appropriately at each stage, so this all happens smoothly and not jerkily.

I'm not planning to drop out of cruise mode on accelerator pushes any more. Brake will drop it out of cruise control, and full throttle will drop it out of speed limiting. Flipping the key to the start position, or pushing the clutch, or going to neutral, will drop it out of both modes.

Edited by weber - 26 November 2016 at 3:39pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 4:50pm
Hi Jeff. I briefly considered "uncouth suggestion".

I think I made it clear that, for me, an elegant solution to this problem is one where I don't have to do anything (except think, and type). I guess one man's elegant is another man's kludge.

Originally posted by Jeff Owen Jeff Owen wrote:

"Inelegant suggestion", we are talking about an EV conversion that has 222 cells, each with a custom monitoring/balancing module that continues to scream in agony after it is removed from it's cell, ...

Nah. We fixed that -- with a software-only solution.

Quote I certainly think [a hidden button on the steering wheel] is more elegant than blindly reaching around behind the steering wheel and and fumbling with the ignition switch, a switch that also has the added functionality of being able to disable the power steering, lock the steering and disable the brake booster while travelling at high speed.

Ha. The key is quite visible and easy to reach at the side of the steering column. Power steering isn't needed at high speed. To lock the steering you'd have to turn the key two clicks (90 degrees) in the wrong direction and then remove it. And due to our large vacuum reservoir, the brake booster keeps working for many brake-applications after the pump is turned off.

Quote I also believe I suggested for the speed limiting function ... round ... to the nearest value.

Corrected. Thanks.

Quote For cruise control, I would have it hold the speed at the time of engagement as traffic doesn't always travel at the speed limit.

Good point.

Quote To get more functions on the key switch, you could look at Morse code for inputs.

Hee hee. If I can't overcome speed limiting by flooring the accelerator, I might have to send ... - - - ...
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2016 at 8:13pm
It turns out that it is just barely possible to choose a set of rpms that are close enough to all the statutory speed limits in all the gears (except first), without being too close to each other. Those that correspond to speed limits are shown in bold and underlined below. However some of them will be difficult to hit. For example, to limit to 50 or 60 km/h in second gear (very common cases) I will need to be within +- 1.5 km/h when activating the speed limiter.

These rpm numbers are theoretical, as yet untested. They are based on published gear ratios, diff ratios and wheel dimensions.

     km/h in               
rpm     2nd     3rd     4th     5th gear
2540     40     57     76     93
2738     43     61     81     100
3027     48     68     90     111
3175     50     71     94
3363     53     75     100
3578     56     80     106
3809     60     85     113
4025     63     90
4473     70     100
5079     80     114

See page 18 of this Renault handbook for the instructions for using its combination cruise control and speed limiter.
http://www.renaulteurodrive.com.au/resources/handbooks/modus.pdf

Edited by weber - 27 November 2016 at 3:39pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2016 at 8:52pm
It works! I now have both cruise control and speed limiting, with no added switches. I just tested it on the usual Sunday evening trip to visit the in-laws. 20 minutes each way. Used cruise control at 90 km/h on the freeway and speed limiting at 40, 50, 60 and 70 km/h elsewhere.

Jeff, thanks so much for telling me about speed limiting, and encouraging me to implement it. The idea of rounding to standard values works a treat too. The calculated rpms in the previous message are spot on. The WaveSculptor maintains the chosen speeds to within +- 1 km/h most of the time, with occasional deviations of +- 2 km/h.

Cruise control works flawlessly, but there is still some room for improvement in the speed limiting.
1. It's a little jerky as the pedal passes thru the position corresponding to the set speed, in either direction. Needs some thinking.
2. It sometimes stops limiting for no apparent reason. All I can think of is that noise spikes on the accelerator pedal input may be occasionally registering as a fully-pressed pedal.
3. I want to be able to floor the pedal to request maximum torque, without exiting speed-limiting mode. So I think I'll add a pedal velocity test as well. Only if the pedal is going fast when it hits the floor will it stop limiting.

Here's the code I was running this evening.

// Make rising edges of IGN_START toggle cruise control or speed limiting.
if (!bDCUb && (switches & switches_diff & SW_IGN_START)) {
     // If either of them is on, turn them off
     if (command.cruise_control || command.speed_limiting) {
          command.cruise_control = false;
          command.speed_limiting = false;
     }
     // else they're off, so turn one of them on
     else {
          // If we're not in regen, choose cruise control
          if (command.rpm > motor_rpm) {
               command.cruise_control = true;
               command.rpm_limit = motor_rpm; // Snapshot the present motor rpm
          }
          // else we're in regen, so choose speed limiting
          else {
               command.speed_limiting = true;
               // Round the motor rpm to the nearest rpm in the array below.
               // These are standard rpms for various multiples of 10 km/h in gears 2 thru 5.
               const unsigned int nx10km_rpm[10] = {2540,2738,3027,3175,3363,3578,3809,4025,4473,5079};
               // These are the boundaries between the bins for the above.
               const unsigned int nx10km_upr_bound[9] = {2625,2878,3060,3297,3454,3673,3935,4198,4760};
               unsigned int rpm = motor_rpm;     // Convert float to integer
               // Determine which bin the present motor rpm falls into
               unsigned int i;     
               for ( i = 0; i < 10; i++ ) {
                    if (rpm < nx10km_upr_bound[i]) break;
               }
               // Use the standard rpm for that bin
               command.rpm_limit = nx10km_rpm[i];
          }
     }
}
// Drop out of cruise control if the brake pedal is pushed even slightly.
// or the clutch pedal is pushed, or we're in neutral.
if ((switches & SW_BRAKE) || (switches & SW_NEUT_OR_CLCH))
     command.cruise_control = false;

// Drop out of speed limiting if the accelerator pedal has been pushed all the way,
// or the clutch pedal is pushed, or we're in neutral.
if ((pedal >= 1.0) || (switches & SW_NEUT_OR_CLCH))
     command.speed_limiting = false;

// For cruise control, apply a lower limit on requested rpm.
// For speed limiting, apply an upper limit on requested rpm.
if (((command.cruise_control) && (command.rpm < command.rpm_limit))
|| ((command.speed_limiting) && (command.rpm > command.rpm_limit))) {
     command.rpm = command.rpm_limit;
     // Ensure enough torque to maintain speed up hills and prevent overspeed down hills
     command.current = max(command.current, regen * command.rpm_limit * (1.0 / RPM_FWD_MAX));
}

[Edit: When first posted, the array indexing "[i]" in the above code disappeared, because it was interpreted as the BBcode for italic. So I used the trick of enclosing the first square bracket between the tags of another BBcode -- one that has no visible effect -- namely [size=2]...[/size]. So I changed "[i]" to "[size=2][[/size]i]". This is also useful if you want to talk about BBcodes in a post, without having them interpreted ... as I have just done.]

Edited by weber - 28 November 2016 at 10:09am
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
Johny View Drop Down
AEVA Member
AEVA Member
Avatar

Joined: 23 June 2008
Location: Melbourne
Status: Offline
Points: 3979
Post Options Post Options   Thanks (0) Thanks(0)   Quote Johny Quote  Post ReplyReply Direct Link To This Post Posted: 28 November 2016 at 7:31am
I've been accused of driving a mobile tinker toy but you've exceeded that by far weber.
I have a speed warning that you engage by pressing the only button on the dash that interacts with my controller. One of it's four functions is: If you have the accelerator in "coast" (or near) and press the button, you get a warning about 1-2 kph over the speed you were going when the button was pressed. I seldom use it though. Wife hates it.
Fun messing around with programmable cars though.
Back to Top
weber View Drop Down
Admin Group
Admin Group
Avatar

Joined: 23 January 2009
Location: Brisbane
Status: Offline
Points: 2424
Post Options Post Options   Thanks (0) Thanks(0)   Quote weber Quote  Post ReplyReply Direct Link To This Post Posted: 28 November 2016 at 8:52pm
Thanks, Johny. I think.

Yeah, it's fun. Interesting that we had similar ideas. The WaveSculptor is doing most of the work for me. It's a nice bit of kit.

Today I worked on another of Jeff's suggestions -- an indicator light for when it's in cruise-control/speed-limiting. This time I was forced to do something other than think and type.

There has been a long-standing problem that has prevented us from using the only spare light on the dash. Long ago we connected the dashboard alternator warning light to an output of the Tritium EV Driver Controls unit (EVCU), but whenever we turned it on, the brake warning light would come on too! The brake warning light would also come on by itself under the appropriate conditions, namely when the handbrake is on, when the brake fluid reservoir is low or when there is insufficient vacuum in the vacuum reservoir for brake boosting.

Today I finally got to the bottom of it. This is apparently intentional by Mazda! There is a diode between the alternator warning light and what was the alternator, and another diode between the brake warning light and the junction of the first diode with the alternator light. This second diode isn't shown on the schematics we have. So I cut a track on the flexible circuit board at the back of the dash to disconnect the second diode. There are also two 180R 2W resistors in parallel with the alternator lamp. I've cut a track to disconnect them too. The two tracks happened to be side-by-side, so a single cut sufficed for both, as you can see at the red arrow in the photo below.



Now they work separately. Hoorah!

Edited by weber - 28 November 2016 at 8:53pm
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Back to Top
 Post Reply Post Reply Page  <1 656667
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.03
Copyright ©2001-2015 Web Wiz Ltd.

This page was generated in 0.281 seconds.