View Single Post
Old 03-25-2016, 07:43 PM   #2696 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by WindyDrew View Post
Not sure that will work after thinking about it.
This is the time to change your mind .. before coding!

Quote:
I would like the gas pedal to work as a regen pedal once the reverse button was engaged.
I'll just rephrase that so I'm sure I understand.

So you are driving on the track, pushing your throttle to go faster. You come to .. say a corner .. and let off the throttle a bit. You press in the reverse button to start regen. The regen starts immediately based on your previous level of acceleration and you are now using regen for braking going into the corner. You press the throttle to get MORE regen. You get around the knee of the corner, back off on the throttle (which you are using as a brake right now) a bit to reduce your regen braking. Now you release the reverse button ... and you go from mild deceleration to mild acceleration. You push the throttle to accelerate out of the corner and down the stretch ...

Did I get that right? I removed the paranoid delays and sequencing stuff to get to more of the driving experience thing that .. I think .. you are looking for.

Quote:
an I doubt I'll want to hit the brake, gas, and regen button just to start regen braking. Maybe a brake signal before engaging reverse would be best.
So I guess you won't be able to wire the reverse button through the brake switch. That's your call. If you want to make the brake happen before moving into reverse, the brake switch will need to be wired into the controller.

To get the response that you want, changing the throttle code in the AC controller is, I think, the way to go. I'm not sure that is a good idea in the general case, for everyone's car. I'm sure it will work fine on your race car, once you get used to it. You are doing one foot driving with a button on your steering wheel (maybe a lever?) but it may be hard to explain to someone else - push the throttle to brake harder.

If you want some level of paranoia for bad wiring, it may be possible to wire the switch or lever to an analog input. A resistor in series and a resistor in parallel will confirm that the lever is still connected, not just shorted out or open circuit. Like the throttle reading 4.5V at full throttle instead of 5V, the lever could read 4.5V when released. And it could read 0.5V when you are pushing 'reverse' instead of 0V.

That way the controller knows that the lever is disconnected or shorted ... and you can decide if you want to fault the controller and coast to a stop or flash a light of some sort and keep racing without regen.
  Reply With Quote