Beta CA build for R/C controllers

Whiplash said:
Very cool to hear AJ! So, I am still a little confused about this setup, does it actually limit the current now? Or is it just that it gives better control over the throttle and makes it smoother? I guess I am wondering it if fixes the low RPM high load problems associated with the R/C speed controls?

There is a setting to limit current, and according to the Castle Creation data logging, it is spot on the money too, I have mine set for 130 amp it limits the fun factor with the right hand, the CC hv160 spikes a 100amps+ when its inboard current is set to lowest 160amp setting, I guess I am pretty unobservent too, as aside from when the rear wheel is off the ground and the throttle is held steady (the power keeps rising when motors unloaded) i don't notice any difference from a voltage based throttle when actually ridding the bike, I don't even notice the current limiting kicking in, the only negative is the settings and understanding what they do and how much each affects throttle response, other than this its an outstanding piece of kit!! Once a few more of the well respected members ac actually try these, and report back with their findings, these rc CAs will be HUGELY popular.

KiM

Hahaha@adrian I knew that one of u friction bois would bite. I did forget to add my CC hv160 throttle setting is on 3. My magura pot has also been adjusted from stock, see previous page for easy how-to and what ca setting requires changing to match.

KiM
 
johnrobholmes said:
Well it certainly sounds like there are as many opinions on throttle control as there are people in here :lol:

Voltage based
amperage based
mixed control

Any way to have each type selectable on this Justin?

For sure anything can be done in principle! Just trade-off's to consider with development time and having too many options / parameters which can cause more confusion than it is worth. Plus trying to figure out if we can squeeze all of this in the standard CA code or vs. needing to have a separate firmware specific to RC applications.

Right now it is possible to select between current throttle or an actual speed throttle, and I'm working on having a 'throttle pass-through' option to effectively achieve a voltage throttle as most people are familiar with. Out of curiosity, has anyone here with an R/C CA tried setting it up as a speed throttle mode?

You just need to set AuxVoltage to Speed Limit to achieve this, and set your Speed Limit to something reasonable. I have a feeling that without a proper damping term in the PID loop that people will have a hard time getting it to hold steady without a fair bit of overshoot and undershoot, but I would be interested to hear if anyone has experimented with it.

-Justin
 
When you say "set the speed limit to something reasonable" What exactly is ' reasonable' Justin? As I think my idea of ' reasonable speed limit' might differ a fair bit, I cam try it right now if you clarify this for me buddy!

KiM
 
So the RC CA can use speed mode for throttle too? Probably solves my want right there. Like a voltage throttle and then some, the automatic torque mode!


I am setting up a DPDT switch on my normal CA so that I can swap between amperage and voltage control. Both have advantages and disadvantages. I can tell you I hate the amperage throttle when I am riding with a group, absolutely do not like it. It is so much harder to keep constant speed and ride with a pack, it is like I am always hunting for the load of the road. The differences in terrain are much more pronounced with the amp based throttle. I haven't used current mode in a while for this reason, as I routinely ride with many other bikes. It just takes more throttle action than I am used to, even if the power control is better when the cards are all on the table.


On the other hand when I ride by myself I really enjoy the amp throttle. When I joyride I typically cruise at low speeds so I can double my range and enjoy the ride. Totally easy to keep a low amp draw or dial it down with a POT in amp mode and not even worry about the load that the upcoming hill will put on my pack. Furthermore it gives instant feedback on the power being used, no more glancing down at the CA display as I go up the hill to keep track of amps.


But really we are splitting hairs here. Its funny that this is a main focus of the thread, and not just how awesome this product will be! Obviously the RC CA doesn't have far to go, or else there would be a lot more talk about how to improve it and what it lacks instead of the finer points of throttle control :lol:
 
justin_le said:
.... I have a feeling that without a proper damping term in the PID loop that people will have a hard time getting it to hold steady without a fair bit of overshoot and undershoot, but I would be interested to hear if anyone has experimented with it.

-Justin

I'm not sure how hard it would be to test, but I thorize that having a fast attack, slow decay in the feedback loop can prevent a lot of the oscillation issues without sacraficing safety. Of course practice never seems to cooperate with theory.

Another more difficult approach is to use a feed forward arrangement to minimize overshoot. You have to sort of predict where the PWM needs to be in the near future based on input changes, error, and rates of change.
 
johnrobholmes said:
So the RC CA can use speed mode for throttle too? Probably solves my want right there. Like a voltage throttle and then some, the automatic torque mode!

Indeed. Just be warned that it might be a speed mode akin to being towed at constant speed via a bungee cord :wink:

I am setting up a DPDT switch on my normal CA so that I can swap between amperage and voltage control. Both have advantages and disadvantages. I can tell you I hate the amperage throttle when I am riding with a group, absolutely do not like it. It is so much harder to keep constant speed and ride with a pack....

... On the other hand when I ride by myself I really enjoy the amp throttle. When I joyride I typically cruise at low speeds so I can double my range and enjoy the ride. Totally easy to keep a low amp draw or dial it down with a POT in amp mode and not even worry about the load that the upcoming hill will put on my pack...

That's a great summary of the difference and merits of each approach. If you have a voltage throttle but are trying to keep an eye on your battery consumption, then you are always tweaking the throttle up and down with every change in terrain which is a PITA, while a current throttle lets you hold steady in the same place. However, if you are mostly concerned about keeping a steady speed, then a current throttle requires endless tweaking based on the terrain while a voltage throttle can just be held in place.

Anyone else trying to understand the 'implication' of a current vs. a voltage throttle in practice, that is it.

But really we are splitting hairs here. Its funny that this is a main focus of the thread, and not just how awesome this product will be! Obviously the RC CA doesn't have far to go, or else there would be a lot more talk about how to improve it and what it lacks instead of the finer points of throttle control :lol:

For someone interested in control loops and human interfaces to EV's, these are exciting finer points to hear about and see actively discussed though!
 
fechter said:
justin_le said:
.... I have a feeling that without a proper damping term in the PID loop that people will have a hard time getting it to hold steady without a fair bit of overshoot and undershoot, but I would be interested to hear if anyone has experimented with it.

-Justin

I'm not sure how hard it would be to test, but I thorize that having a fast attack, slow decay in the feedback loop can prevent a lot of the oscillation issues without sacraficing safety. Of course practice never seems to cooperate with theory.

Another more difficult approach is to use a feed forward arrangement to minimize overshoot. You have to sort of predict where the PWM needs to be in the near future based on input changes, error, and rates of change.

That's exactly what a differential term would do. If it senses that the vehicle is accelerating even if it is still below the target speed, it will preemptively start to back off on the PWM output. It's actually quite simple to code as well, and would result in very smooth speed control, but it requires that the CA have an accurate value for the instantaneous acceleration which isn't implemented in the base code yet.
 
This is a bit OT, but:

Justin, could you take a peek over here and let me know if that control method, using the CA, would work for the NuVinci gear change?
http://www.endless-sphere.com/forums/viewtopic.php?f=28&t=30641&p=451734#p451734
If it would, that would be an awesome way to deal with the control of the NV, and not have to add any (or much) other electronics to the bike than I already have. :)
 
justin_le said:
For someone interested in control loops and human interfaces to EV's, these are exciting finer points to hear about and see actively discussed though!


I wish I had more people interested in this near to me. I can't really tell my girlfriend how my day went when it involves the finer points of controlling a PWM based system :lol:


Glad to be a part of the discussion, if I can help in the development otherwise just let me know.
 
johnrobholmes said:
justin_le said:
For someone interested in control loops and human interfaces to EV's, these are exciting finer points to hear about and see actively discussed though!


I wish I had more people interested in this near to me. I can't really tell my girlfriend how my day went when it involves the finer points of controlling a PWM based system :lol:


Glad to be a part of the discussion, if I can help in the development otherwise just let me know.
Yup same here. Just remember if they don't find ya handsome at least they find ya handy, were all in this together :)
 
While we are on the subject of interfaces...


Are there any extra channels on the CA that could have temp inputs, like 10k thermistors?
 
That is a GOOD Idea!
 
I have converted one of my K-force 100A esc's for direct connection to the CA. It gets a bit tight soldering the shunt directly to the ESC circuit board as Justin did with the CC160 esc so I decided to fit the shunt half way along neg cable.

Couple of other minor differences to what Justin did with the CC160.
The yellow +5V form the CA has been cut back and isn't used as the K-force has its own +5V supply.
I havent looped in the Grd from the CA to the ESC control wire Grd as they are grounded within the ESC anyway.
I only used one of the supplied shunts rather then paralleling 2 shunts together. This setup will only be used at around 30A and I figure one shunt should be fine up to 50A without a problem. This means the CA shunt value will be set to 1.4 mohm.

I havent had a chance to test it yet with this setup as I sold my CA with a drive last week but should have a batch arriving in a week or 2 so I can give it a test then.
 

Attachments

  • P1010011.jpg
    P1010011.jpg
    52.5 KB · Views: 3,365
  • P1010014.jpg
    P1010014.jpg
    55.6 KB · Views: 3,365
  • P1010015.jpg
    P1010015.jpg
    50.1 KB · Views: 3,365
Kepler said:
This setup will only be used at around 30A and I figure one shunt should be fine up to 50A without a problem. This means the CA shunt value will be set to 1.4 mohm.


Can confirm, for at least breif periods, those shunts can handle over 160amp without turning to molten metal LoL...only breifly mind you..

How are you finding the rc CA now you have had some more time to 'play' with it Keplerz ma main MAN? :wink:

Personally just liking it more and more each time i ride power delivery is silky smooth and if you rip the throttle hard A HELLA lota fun talk mega ev-grin....Have her cranked to 160amp now cuts off smack on the mark too god bless Justin Le godanm rock star he is!!!

smiley-rocker.gif


KiM
 
Excellent. Sounds like the single shunt will suit my application just fine.

Been really pleased with how the RC CA has worked out. I am now offering it as an option for my drives as its worked out to be a really easy plug and play fit. The button throttle setup works really well too so now I have basically all throttle options covered. Just ordered another 5 units with the view to install a few more in some of my drives and also to have some local stock handy for re sale.
 
Hey Justin,

I just ordered a CA-LRC too for my mini friction drive system, are they still in production or is it just the test batch?
Is there a way to limit the maximum speed as well? Cause then my friction drive would be 100% legal in the Netherlands!


Thanks, hjoore
 
hjoore said:
Hey Justin,

I just ordered a CA-LRC too for my mini friction drive system, are they still in production or is it just the test batch?
Is there a way to limit the maximum speed as well? Cause then my friction drive would be 100% legal in the Netherlands!


Thanks, hjoore

I do believe there is ;)

KiM
 
With this CA is it possible to run more then one motor and controller while still been able to limit the current to the motors. Or would you have to take the sum of all the amps going to the controllers and limit that max and pray that all the controllers draw the same current?

This would have all the motors on a single shaft, say 4 Turnigy 80-100 motors with 4 castle HV160. I don't suppose there would be a way to limit each controller separately? Or would i have to buy a CA for each controller that way and run everything from one throttle? And a question for those running multiple motors do they ever have a large difference in the power each motor provides seeing as they are mechanically linked?
 
Sorry for the belated beta-testing report, but I finally got around to running my CA-LRC last week on my Hunter EV Prize race bike.
( Hunter Valley EV Prize thread). I just used a single shunt.

Worked beautifully first go. I plugged in similar numbers to Adrian, and basically ran with that in the race. I really only had five laps of practice, so I didn't change any parameters before the race.

I probably should have slowed the response a little since the race was a test of battery life. I found it was fairly quick to get to max power and fairly quick to back off as well.

Top work Justin, thanks heaps!
 
Grinhill said:
Sorry for the belated beta-testing report, but I finally got around to running my CA-LRC last week on my Hunter EV Prize race bike.
( Hunter Valley EV Prize thread). I just used a single shunt.
Worked beautifully first go. I plugged in similar numbers to Adrian, and basically ran with that in the race. I really only had five laps of practice, so I didn't change any parameters before the race.

Hey excellent work and congratulations on the build! Anyways I'm sorry too for having left this thread hanging for so long. But trust that it's all for good cause.

I didn't mention yet but I did change the low voltage cutoff to have a 0.1V resolution as Kepler suggested earlier, and made a few other small tweaks at the end of summer which are in the Beta3 V2.24 firmware that is still available as a CA-LRC device for those wanting to experiment. However, the lively discussion, positive testing feedback and extended interest here confirmed that it was time stop this development dead in the tracks and instead opt for a complete redesign of the CA circuit to accommodate all the potential stuff we'd like to do with it rather than keeping hacking onto the existing design. So the last few months have been heavily involved in creating this:



There's now a dedicated thermistor input for measuring (and scaling back power) based on motor temperature, a bidirectional communication port so that firmware can be upgraded with bootloader via any computer with a serial or USB port, a separate dedicated throttle input (independent of the auxiliary voltage input) so you can have on-the-fly current limit adjust and throttle control at the same time, a newer microchip with several times the memory and processing power, a PAS input for measuring pedal cadence in addition to wheel speed, and most fun for me is also a torque input that is compatible with the THUN torque sensing bottom bracket. So in addition to being able to implement a torque based pedal assist feedback mode, we can also calculate and show the human pedal power going into the cranks:

CA 2.5 Pedal Power.jpg

I dunno about others here, but I've always been dying to see just how many watts my legs were adding to the mix when riding an ebike.

Anyways it's probably another 8-12 weeks of coding, testing, and redesigning before being ready for a next round of beta releases based on this new board layout and micro. But I just wanted to give a heads up to all those following this thread that that is where the project is going so you know what's up.

Thanks again for everyone here who has been a part of this. -Justin
 

Attachments

  • CA Rev12 PCB.jpg
    CA Rev12 PCB.jpg
    79.8 KB · Views: 1,675
justin_le said:
most fun for me is also a torque input that is compatible with the THUN torque sensing bottom bracket. So in addition to being able to implement a torque based pedal assist feedback mode, we can also calculate and show the human pedal power going into the cranks:
That's great. :D

Presumably, you're going to stock the Thun sensored BBs?
 
Kepler said:
I have converted one of my K-force 100A esc's for direct connection to the CA. It gets a bit tight soldering the shunt directly to the ESC circuit board as Justin did with the CC160 esc so I decided to fit the shunt half way along neg cable.

Hey Kepler, that is a superbly slick sway to do the wiring mod and gives the controller a tidy "direct plug-in" functionality that has the appearance of being factory made for the purpose. Nicely done.

I only used one of the supplied shunts rather then paralleling 2 shunts together. This setup will only be used at around 30A and I figure one shunt should be fine up to 50A without a problem. This means the CA shunt value will be set to 1.4 mohm.

Just bear in mind that the shunt resistances average about 1.4 mOhm, but can sometimes be as low as 1.1 mOhm so you'll probably want to do a more precise calibration on them at some point. The easiest way to do this on the bench is to force a known current through the shunt by wiring up a constant current power supply with the (-) side on one of the controller phase leads, and the (+) side on the negative battery lead of the controller. That will force a current through the shunt via the mosfet body diodes. Then use a multimeter to measure how many mV are between pins 3 and 4 of the CA-DP cable, and your RShunt is mV / A.

Or you can just ride the bike for a bit both with the CA and some other calibrated Ah meter and compare the amp-hours, and scale RShunt such that they will match.

Over winter we'll be working on a jig for grinding slots in the shunts so that they can all be exactly calibrated to an identical value prior to shipping.

Justin
 
What awesome improving!!!!!!!!

I was just with the CA-LRC and the HV 160 in my hands thinking on a good-net way to setup the shunt sensor when I see the thread active!!!!!!

I was thinking about a way to do a setup for the CA-shunt and the Castle CapPack along the wire.......http://www.endless-sphere.com/forums/viewtopic.php?f=2&t=33268&p=483605#p483605

Have you guys Any suggestion?

Thanks Justin for your efforts.....

Jules
 
Back
Top