Compact Field Oriented Controller, ASI + Grin, limited run

Place for dealers to post items for sale.
User avatar
spinningmagnets   100 GW

100 GW
Posts: 10959
Joined: Dec 21 2007 10:27pm
Location: Ft Riley, NE Kansas

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by spinningmagnets » Nov 23 2015 8:56pm

What is the dimension that 80mm measures?
The 80-100 and the 80-84 are known RC motors around here. They are hard on RC ESCs unless they are reterminated in Wye, they need additional power input capacitors (Low ESR), and several builders have added hall sensors so that they could be run with common ebike controllers.

The "80" refers to these having an 80mm diameter.

User avatar
justin_le   10 MW

10 MW
Posts: 2185
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by justin_le » Nov 23 2015 9:41pm

Alan B wrote: I wonder at the nomenclature used here, however. "Plug Braking" generally refers to directing motor regen into a passive load that can dissipate the power. What we have here is "Reverse Power" applied to the motor, which I think calling "Electric Braking" is probably a better term, since it goes beyond "Plug Braking".
Interesting, I though "plug braking" was applied in the context of DC motors when the applied battery polarity was reversed, and in the case of a BLDC motor this would be analogous.

Motor Spinning Forwards + Motor Torque Positive + Battery Current Positive = Normal Motoring
Motor Spinning Forwards + Motor Torque Negative + Battery Current Negative = Regenerative Braking
Motor Spinning Forwards + Motor Torque Negative + Battery Current Positive = Plug Braking

Motor Spinning Backwards + Motor Torque Negative + Battery Current Positive = Motoring in Reverse
Motor Spinning Backwards + Motor Torque Positive + Battery Current Negative = Regenerating in Reverse
Motor Spinning Backwards + Motor Torque Positive + Battery Current Positive = Plug Braking in Reverse

It would be nice for sure if there was an agreed upon terminology; can others with more industry or academic experience as it were comment if "plug braking" is the most appropriate term to use? "Electric Braking" to me sounds just general purpose, like that would cover all of, regen, plug braking, or dumping into an external load.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
amberwolf   100 GW

100 GW
Posts: 26547
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by amberwolf » Nov 24 2015 3:20am

Warning: Possible term confusion ahead. ;) :oops:

AFAICR, the simplest plug braking is simply shorting the windings together, so it doesn't really cover what this thing does.

But I have also heard it used for brushed systems with a forward-reverse contactor that switch that contactor and actively brake with motor power, or a button/switch that reverses direction on a brushless motor, or even more complicated systems that *do* do something like what the Phaserunner does, in one way or another.


Then there is "dynamic braking" which I've generally heard used for regenerating back into a resisitive load (wasting the power as heat), which is just about the same as what I had understood plug braking to be, except PB would use no resistors and simply directly short the motor wires (making the motor be the resistor(s) and is where the heat would be dumped).


I think "EABS" (Electric/Electronic Antilock Braking System) is probably a good description of what the Phaserunner does, and that term is already used for something similar on other ebike controllers. (though I haven't experienced any that actually keep braking down to near zero like this one is supposed to; they're better than regen but not quite good enough).


So...probably Plug Braking if you want to remain consistent with larger EV terminology, or EABS if you want to go with some existing ebike terminology.

User avatar
cycborg   1 kW

1 kW
Posts: 441
Joined: Jul 05 2014 4:45pm
Location: Boston metro, US

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by cycborg » Nov 24 2015 9:08am

I hadn't encountered the "plug" term until earlier in this thread. I'm familiar with "regenerative", in which energy is extracted from the motor and stored, and "dynamic", in which energy is extracted from the motor and wasted. Seems these could be applied appropriately to either forward or reverse motion.

It would be nice to have a term that indicates energy being applied to the motor, and "plug" worked for me, but if it's true that this is equivalent to "dynamic" in some contexts, then I guess something else is needed. Maybe "positive braking"? I agree that "Electric braking" is too general.

Alan, thanks for sharing your regen experience. Is the parameter you set in the Sabvoton motor amps or battery amps? Right now I'm using just an on/off pushbutton with the PhaseRunner, in which I've set a battery current limit for regen. Since it's battery current, this makes it effectively constant power, which means low torque at high speed and high torque at low speed. Not the most intuitive arrangement, but I've adjusted my habits so that I rarely use the mechanical brake. Basically I do some supplemental mechanical braking at some point during deceleration to bring the speed down to the "high torque" range, then I pulse the pushbutton to bring the bike to a stop.

I'm working on setting up a second throttle for variable regen. This will allow me to raise the battery current limit for stronger braking at higher speeds, without risking fork-splitting torque pulses as I come to a stop. :o

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by MrDude_1 » Nov 24 2015 9:18am

spinningmagnets wrote:
What is the dimension that 80mm measures?
The 80-100 and the 80-84 are known RC motors around here. They are hard on RC ESCs unless they are reterminated in Wye, they need additional power input capacitors (Low ESR), and several builders have added hall sensors so that they could be run with common ebike controllers.

The "80" refers to these having an 80mm diameter.
yup.
although the phaserunner is advanced enough that it can run a high frequency signal through the motor to figure out rotor position without halls... So you do not need to add halls to use it from a dead stop.
The hardest part of it, is the low inductance... theres a fine line between properly tuned and a phase overcurrent... thats why its tricky to tune.
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

User avatar
justin_le   10 MW

10 MW
Posts: 2185
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by justin_le » Nov 26 2015 3:48am

cavallo pazzo wrote:Used to link ebrake to opposite brake lever.
On a bike with front motor, I link the ebrake to rear brake lever; that way, one lever will give integral braking. Now it really works to full stop.
Variable regen will introduce the last part of it. Just to find a way to link mech brake progressivity to ebrake level.
Well, no need for that now if you have a throttle. I've just made available the CA3 P13 firmware which enables the throttle modulated regen, which is described here:
https://endless-sphere.com/forums/viewt ... 2#p1123992

For anyone using the Phaserunner with a CA3 device I highly recommend updating to this code, since proportional regen really kicks butt and this lets you do it with standard ebike hardware (normal on/off brake lever or button, and throttle).

I've also been playing around a fair bit lately with reverse pedal proportional regen, so if you have a quadrature PAS sensor, when you spin the cranks backwards this activates regen, and the faster you spin backwards the more the regen intensity. It works rather well when you are trying to regulate speed down longer hills, but it feels a little awkward when coming to a stop to be spinning the cranks in reverse. As well, there are times when I still want to pedal normally while doing regen, in order to maximize the energy recovery or keep up a steady pedal effort, and this scheme doesn't work with that. But for people who like a PAS only controlled bike, with no throttle on the handlebars, it is an option I'd like to make available.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
Alan B   100 GW

100 GW
Posts: 7492
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by Alan B » Dec 03 2015 3:32pm

cycborg wrote:...

Alan, thanks for sharing your regen experience. Is the parameter you set in the Sabvoton motor amps or battery amps? Right now I'm using just an on/off pushbutton with the PhaseRunner, in which I've set a battery current limit for regen. Since it's battery current, this makes it effectively constant power, which means low torque at high speed and high torque at low speed. Not the most intuitive arrangement, but I've adjusted my habits so that I rarely use the mechanical brake. Basically I do some supplemental mechanical braking at some point during deceleration to bring the speed down to the "high torque" range, then I pulse the pushbutton to bring the bike to a stop.

I'm working on setting up a second throttle for variable regen. This will allow me to raise the battery current limit for stronger braking at higher speeds, without risking fork-splitting torque pulses as I come to a stop. :o
I believe it is motor current, and the only value that makes sense is motor current, which is proportional to torque. Battery current would not give good control feedback, and the Sabvoton measures motor current directly. In the Sabvoton's from Jeremy that have this feature the units were not actually amps, so the value of current is some small fraction of the value entered. They mentioned 10% but I'm not sure that is right, in any case I had to set values of several hundred to get good braking, a setting of 50 did very little if anything. I cover this in some detail in my Borg thread. Once I set the value high enough it had really good braking and confident descent control on a 15% grade was well within its capacity. I like the feel of it, and I like having rear braking on a bike that doesn't have room to easily fit a disc. I also like not wearing out front disc brake pads, and not heating up the brakes.

User avatar
Alan B   100 GW

100 GW
Posts: 7492
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by Alan B » Dec 03 2015 3:45pm

Alan B wrote:...

I wonder at the nomenclature used here, however. "Plug Braking" generally refers to directing motor regen into a passive load that can dissipate the power. What we have here is "Reverse Power" applied to the motor, which I think calling "Electric Braking" is probably a better term, since it goes beyond "Plug Braking". I should have pre-checked references on this, it does appear that manufacturers have used the term plug braking to indicate power reversal. It is generally used only in motors that are run in both directions such as forklifts or golfcarts and requires controls to prevent wheel lockups.

In any case, great work on these new controllers!
Updated my post on the previous page.

sh33p   1 W

1 W
Posts: 56
Joined: Jul 15 2015 10:51pm

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by sh33p » Dec 05 2015 9:52pm

Will this controller have a higher top speed than a 12 fet regular controller?

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by MrDude_1 » Dec 06 2015 7:52pm

sh33p wrote:Will this controller have a higher top speed than a 12 fet regular controller?
Technically it would be lower... sine vs switched...
voltage makes rpm, not the controller.
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

User avatar
amberwolf   100 GW

100 GW
Posts: 26547
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by amberwolf » Dec 06 2015 8:41pm

Although to confuse the issue, the controller's max eRPM may limit how fast it can spin a motor; this can limit geared hubs and middrives, though typically not DD hubs.

121jiggawatts   10 µW

10 µW
Posts: 6
Joined: Mar 19 2015 1:28am

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by 121jiggawatts » Dec 07 2015 1:24am

I've been using a Bac500 for some time on a Crystalite motor but was not that successful. Just could not get the initial torque right to run the bike from standstill even though it runs perfectly quiet after getting it going under pedal power. Then, I bought a PhaseRunner and connected it to my Inokim electric scooter.... ...yeah, its overkill but the size and shape of this controller made it ideal for the tiny space on these scooters.....not affected by heat and I can change battery voltage without opening the scooter each time. Then, I recently upgraded to a 500W, geared motor from China. I think the original is 300W from memory. I spent a few days programming with Bacdoor. Motor Discovery 4 just would not work in Sensored mode. Kept changing phase wires and it was noisy etc. Then I ran it sensorless mode and it finally started behaving nicely with speeds up to 30Km/h. In sensored mode I kept getting Error Code - "Bit5 Motor Hall Sensor fault". The motor is brand new so I guess we can assume the usual Chinese quality issue. I have no idea why they don't install a second set of halls for about $5. Opening these little motors is a real pain. I'm not even sure if I can access the hall sensors. Anyway, I'm running in Sensorless mode for now.....then, because I cant help playing around to see how fast these little motors will go.....I Added a 48V battery and re-programmed it again, and it runs at 40km/h. One thing I did realise with geared motors is that the speed will be inaccurate if you insert the 4.5 to 1 ratio and 10 pole pairs into Bacdoor under Motor Nameplate Settings. I changed it to 1, and I get the correct speed reading from the righthand pane etc. Prior to that, I had 4.5 in the Gear Ratio field and 8km/h. Weirdly, the CA3 wasn't showing the speed so I reconnected the hall connector from the motor and viola....I get speed on the CA3 now. If one of the hall sensors is, indeed faulty, should I be seeing more errors, or am I missing something?
I've yet to start tweaking throttle settings but I do notice less torque on the phaserunner than an infineon/lyen etc. I do remember someone posting something awhile back.

User avatar
tangentdave   1 kW

1 kW
Posts: 437
Joined: Jun 06 2015 11:40am
Location: Seattle, WA
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by tangentdave » Dec 12 2015 1:18pm

I'm currently testing this chipset in BAC2000 form on my ride, I love it. I'm running a Astro Flight 3210 10turn at 72V. Compared to a Castle Creations HV80, the Phaserunner causes the motor to run quieter (less electrical hum) and it feels smoother in my hand. Right now, I have less startup torque than the HV80 but the BAC uses less current overall, by quite a bit, 20% or more over the combination of CA V3 and HV80. There is still much tuning left to do but it'll already get me started on a big hill in low gear fine.

I see 13kRPM indicated by BACdoor, and can confirm the awesomeness of field weakening on the trail; attack two obstacles instead of one or wheelie down the entire straight. At 72V the 10turn should only spin to about 9.5kRPM; the Astro seems to run the same or cooler than the HV80 even with inefficiencies of the extra revs. I've set the current limit to 80A (20-40A continuous is the majority of riding) and am only using 9A for the open loop starting current (I suspect the HV80 set to 'high' startup torque is pushing well more than 10A and the Castle Creations startup algorithm is pretty impressive, it's actually hard to stall). I'm also transitioning to closed loop what I think is quickly, 150msec or 15Hz I think, and the Current Regulator Bandwidth is set to zero. Field weakening is at 15% and starts at 90% ra.

More riding and tuning dependent of this terrible Seattle weather. It's so wet here, the weather app on my phone shorted out.

-dave
GGMT/Tangent 8kW
tangentmotors.com

sh33p   1 W

1 W
Posts: 56
Joined: Jul 15 2015 10:51pm

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by sh33p » Dec 23 2015 8:13pm

justin_le wrote:
cavallo pazzo wrote:Used to link ebrake to opposite brake lever.
On a bike with front motor, I link the ebrake to rear brake lever; that way, one lever will give integral braking. Now it really works to full stop.
Variable regen will introduce the last part of it. Just to find a way to link mech brake progressivity to ebrake level.
Well, no need for that now if you have a throttle. I've just made available the CA3 P13 firmware which enables the throttle modulated regen, which is described here:
https://endless-sphere.com/forums/viewt ... 2#p1123992

For anyone using the Phaserunner with a CA3 device I highly recommend updating to this code, since proportional regen really kicks butt and this lets you do it with standard ebike hardware (normal on/off brake lever or button, and throttle).

I've also been playing around a fair bit lately with reverse pedal proportional regen, so if you have a quadrature PAS sensor, when you spin the cranks backwards this activates regen, and the faster you spin backwards the more the regen intensity. It works rather well when you are trying to regulate speed down longer hills, but it feels a little awkward when coming to a stop to be spinning the cranks in reverse. As well, there are times when I still want to pedal normally while doing regen, in order to maximize the energy recovery or keep up a steady pedal effort, and this scheme doesn't work with that. But for people who like a PAS only controlled bike, with no throttle on the handlebars, it is an option I'd like to make available.

Technically, could you use this feature with a 2nd throttle to modulate how much regen is applied?

User avatar
justin_le   10 MW

10 MW
Posts: 2185
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

First prototype of the Grin Phaserunner software

Post by justin_le » Dec 24 2015 5:19am

Hey guys, we're probably not going to hit our Jan 1st target for the next batch of Phaserunner controllers to be available. We've run into difficult to solve issues with our soft latching on/off button for handling a situation when the Phaserunner is plugged in and there is a short between V+ and Gnd on the CA lead. So it's up to the 4th daughterboard revision now and getting close.

But we do have great news about our simplified Grin software package for configuration the Phaserunner controller without needing to install the bacdoor software, and it's ready for some testing from all you beta users. Here is the download for windows:
http://www.ebikes.ca/downloads/Grin_Pha ... r_Beta.zip
and Linux
http://www.ebikes.ca/downloads/Grin_Pha ... eta.tar.gz
(MacOS as always will come a bit later).

What we've done is pair things down to the parameters that we felt were important for people to be able to setup and tweak on a single page, and also to remap a lot of parameters into familiar scales rather than the "per-unit" normalized scaling that is used internally in the controller. That means that there are dependencies, so if you change say the rated system voltage, then all the the Low voltage and high voltage rollbacks will scale in proportion. Similarly, change the max forwards phase current, and the regen phase current, field weakening, autostart currents etc. will change accordingly. And rather than having the sensorless ramp-up RPM configured in Hertz, we show it here in terms of the much more intuitive motor RPM, but that means if you change the # motor pole pair parameter, then the autostart RPM will change too:
Phaserunner Beta Software.jpg
Phaserunner Beta Software.jpg (151.38 KiB) Viewed 3581 times
The other main goal was to simplify the initial motor tuning to a couple button clicks. Rather than entering the motor parameter discovery codes, then polling the autotune data, then manually copying the values of Ls, Rs, hall mapping etc. to the input fields, then saving it to flash etc. now you can just click the "autotune" wizard.
Static Test.jpg
Static Test.jpg (61.64 KiB) Viewed 3581 times
It's quite important that you have the correct effective pole-pair count and a good approximate RPM/V value, since the phaserunner uses these values to determine the frequency that it injects for the static test parameter detection. Click the "launch static test" and it will set the discovery in place, show you the measured values, and save it all to flash.

After that, it will do the motor spinning test and determine both the hall mapping (if halls are present) and the actual motor kV constant and save these to flash. If the motor spins in reverse, then just set the checkbox and click the test launch again. If there are valid halls connected, it will map them and set the motor mode to sensored start - sensorless run, if there aren't halls it will set it to purely sensorless operation.
Spinning Test.jpg
Spinning Test.jpg (84.78 KiB) Viewed 3581 times
If the motor doesn't actually spin up but just starts and stutters, then you may need to play with the values in the "Sensorless Starting Parameters" section. If you give the motor a relatively long spinup time (like 1000 mS) to a reasonable RPM (like 10-20% of the no-load RPM) then it will normally start fine for the self test, and you can tweak those later for nice behavior for starting the bike.

If you want to set or read one of the parameters that we haven't shown on this screen, then you can go to Edit->Edit Parameters, which brings up a new window that lets you add any number of parameters in a list and read/write as you wish. We've put in appropriate scaling for most of these, but the bit fields (like the Flag bits) are not handled yet as individual boolean parameters so if you want to play with those then Bacdoor will be more convenient.
Custom Parameter List.jpg
Custom Parameter List.jpg (115.07 KiB) Viewed 3581 times
And finally there's a development screen for those that want to have a look at all the communications with the Phaserunner, from which you can also read and write individual parameters.
DevScreen.jpg
DevScreen.jpg (120.79 KiB) Viewed 3581 times
So it's a start, and we'd appreciate and welcome any feedback from Phaserunner users who can download and test this out over the holidays!
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 24 2015 9:39am

Excellent! I'm just about to begin tuning my system.

Can you confirm that Grin's Phaserunner software be used to tune a BAC2000?
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 25 2015 1:29pm

After completing my wiring assembly according to the wiring diagram in the attached PDF file below, I proceeded to tune the BAC2000 to my motor. (The wiring diagram incorrectly shows TTL TX connecting to Pin 4 of the 16-pin MX150 connector. I connected it to Pin 3, according to the pinout table in the same document.)

Unfortunately, I was unable to complete the tuning process.

The Grin Phase Runner Software starts up fine, and it appears to communicate with the BAC2000 as it reads the correct system voltage (about 26.2v at the time) and can read and write to/from the controller. I entered Kv=130 RPM/v and 8 pole pairs for my motor that has 16 distinct poles in its rotor magnet ring. I wrote the information to the controller successfully.

During Autotune the software modified Kv slightly, but did not find values for Rs or Ls, leaving them both at 0.

While running Autotune I see the message in the lower right of the window alternating between "Success!" and "Time Out". Upon completion of the first tuning phase Autotune returns a message that the Halls are not functioning, in which case it unsuccessfully attempts a sensor-less tuning, or that the USB cable has become disconnected--it wasn't and it didn't. If I rerun Autotune I get one of these messages seemingly at random. At this point I can go no further with the process.

I also attempted to tune several other motors in my collection and reached the same impasse.

So, then I fired up BACDoor 1.5.4 and followed Robbie's instructions from Page 2 of this thread as best I could. Some of the parameter names are different--perhaps he was using an earlier version of BACDoor--but I managed to muddle through with the help of the pop-up hints.

BACDoor indicates that communication with the controller is successful when I press "Write" or "Read" at the bottom of the pane. When I manually spin the shaft of the motor in one direction I see Status values in the right-hand pane increase with the RPM, when I spin the shaft the other direction I see the values go negative to a similar degree.

Based on these observations I believe my supply, phase, and data wiring are correct. I also believe the Halls are wired correctly to the BAC2000--I double-checked my wiring, and I know that the motor functions properly with an Infineon-style controller that requires Hall signals. Even if I had mis-wired my Hall connector at the controller, the controller should still be able to perform a sensor-less tuning. The 6-pin CA connector was left unconnected.

One signal that did appear off from the expected was the throttle voltage signal in the "Display Only" screen. It varied from 0.09xx to 1.11xx volts as I varied the throttle signal through it's range, although I don't believe this should affect the Autotune process. The throttle was attached to the 3-pin lead as in the diagram, but I also tried leaving the throttle disconnected and got the same results.

As with Grin's Phase Runner Software, when BACDoor attempted to discover Rs and Ls, it could not find the values, and I could proceed no further with the tuning process.

(In version 1.5.4, Motor Discover Mode takes values 0, 1, or 2. 0 is "off", 1 is "stationary parameter discover", and 2 is "moving parameter discover".)

How shall I proceed?
Attachments
BAC2000_CA3_Schematic.pdf
BAC2000_CA wiring diagram
(2.25 MiB) Downloaded 96 times
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 26 2015 4:00pm

After spending some time away from my workbench thinking about why I was unable to complete Autotune, I couldn't help but think there must still be a wiring error. So, after I checked my physical wiring (which was as I had intended), I cross-checked the wiring diagrams that Justin has provided on this forum, and I noticed another inconsistency.

In the PDF file I attached in my prior message, the 80kOhm pull-up resistor is shown connected to Pin 5 of the large MX150 connector, but in the wiring photo Justin posted earlier in another message (See below.), this pull-up resistor is clearly connected to Pin 4. This mis-wiring may also explain why the throttle voltage signal was low.

The wiring diagram in the PDF file shows the TTL TX and pull-up resistor shifted erroneously one position to the right, to Pins 4-5 instead of 3-4.

I went ahead and moved the pull-up resistor circuit from Pin 5 to Pin 4 and attempted to use the Grin Phase Runner Software again and got stuck being unable to Autotune. I then fired up BACDoor 1.5.4, and again I could not get a response when attempting a static Autotune to get resistance and inductance.

Then, I uninstalled BACDoor 1.5.4 and installed BACDoor 1.5.0 the version linked here:

http://www.ebikes.ca/shop/experimental/c-bac2000.html

With BACDoor 1.5.0 I was able to Autotune both static and dynamic parameters (sensored and sensor-less), reading 20mOhm and 28uH for my motor.

Where Robbie writes that I should now be able to spin the motor using an attached throttle, I got no response from the motor.

I then went back to Grin's Phase Runner Software and was able to get through the static Autotune (although the motor made more noise and for a shorter duration than when I did this through BACDoor), but the software disconnected from the controller, complaining of a power loss or USB disconnect, when I attempted the dynamic Autotune, and kicked me out of the Autotune "wizard".

To make sure the controller had the correct values I went back to BACDoor 1.5.0 and checked all the parameters from the beginning per Robbie's list on Page 2 of this thread. When I tried to Autotune again, I at first got no response. But, after disconnecting, connecting, and doing a read/write from the controller, BACDoor let me do a static then dynamic Autotune.

I suspect my inability to get a throttle response may have something to do with how the controller expects to read throttle input. I'm wiring my controller per the photo below, using the eBrake input circuit. Do I need to tell the controller my throttle signal is coming from this circuit and not the normal throttle circuit? I could find no way to specify this in BACDoor 1.5.0. Robbie's BACDoor tutorial was written before Justin posted his wiring diagram for the BAC2000. Are there are other parameters in later versions of BACDoor to recognize this wiring?

A minor nuisance is that the software (both BACDoor and Grin's Phase Runner Software) is glitch-y and at various times cannot communicate with the controller during Autotune. But, performing a dummy write or restarting the program clears the glitch.

Lastly, I now have tried four different application versions to program my controller:

Grin Phase Runner Software
BACDoor 1.5.0
BACDoor 1.5.3.0
BACDoor 1.5.4

I was able to get furthest in the setup process with BACDoor 1.5.0, perhaps because it was the version Robbie used when writing his tutorial.

At this point I've gone through Peripheral Selection tabs and Peripheral Configuration for Throttle, Brake, and Basic Motor (sensored), but I cannot get a throttle signal to spin the motor. My wiring is the same as Justin's in the photo below but with the addition of Hall sensor leads.

Have I missed something, and what version of BACDoor should I be using?
Attachments
BAC2000%20Signal%20Wires.jpg
BAC2000 MX150 connector wiring
BAC2000%20Signal%20Wires.jpg (115.03 KiB) Viewed 3474 times
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 28 2015 9:16pm

mrbill wrote: I suspect my inability to get a throttle response may have something to do with how the controller expects to read throttle input. I'm wiring my controller per the photo below, using the eBrake input circuit. Do I need to tell the controller my throttle signal is coming from this circuit and not the normal throttle circuit? I could find no way to specify this in BACDoor 1.5.0. Robbie's BACDoor tutorial was written before Justin posted his wiring diagram for the BAC2000. Are there are other parameters in later versions of BACDoor to recognize this wiring?
I uninstalled BACDoor 1.5.0 and installed BACDoor 1.5.3. Then I saw that the throttle source was set to 0 (throttle input), so I changed that to 1 (eBrake input).

I'm not quite sure why this was set improperly because I'm sure I set it to use eBrake input in 1.5.0. But, after I made this change I was able to spin up the motor.

I also noticed when I sweep the throttle, the motor spins up to a single RPM. Motor RPM is not proportional to throttle setting. Does throttle input on this controller adjust torque, not speed?
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by MrDude_1 » Dec 28 2015 10:06pm

mrbill wrote:I also noticed when I sweep the throttle, the motor spins up to a single RPM. Motor RPM is not proportional to throttle setting. Does throttle input on this controller adjust torque, not speed?
Yes the default throttle is torque, not speed. You can change it though.
Personally, I love the torque throttle.
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 29 2015 8:05pm

MrDude_1 wrote:Yes the default throttle is torque, not speed. You can change it though.
Personally, I love the torque throttle.
How can one change to speed throttle? I plan to run my throttle signal through a CAV3, and for testing I'd prefer to have a speed throttle as it puts less stress on my clutches when testing.
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by MrDude_1 » Dec 29 2015 8:19pm

mrbill wrote:
MrDude_1 wrote:Yes the default throttle is torque, not speed. You can change it though.
Personally, I love the torque throttle.
How can one change to speed throttle? I plan to run my throttle signal through a CAV3, and for testing I'd prefer to have a speed throttle as it puts less stress on my clutches when testing.
to be honest I dont remember... but I poked around with it on the pc and I think I relocated it...

System Debug tab->Control Mode tab->Speed regulator mode.
throttle.PNG
throttle.PNG (23.84 KiB) Viewed 3374 times
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 29 2015 8:36pm

As I mentioned a few posts above, I was able to get the throttle to respond. But I still have a few problems for which I cannot yet find a solution.

1) The motor remains inactive until throttle voltage reaches about 2.7 volts. Then the motor suddenly spins up to one power level and then latches at that level no matter how high throttle voltage goes until throttle voltage drops below about 2.0 volts. I cannot vary torque (when wheel is under load), just one "on" state, and "off". When under load the motor draws 75 watts and no more. If I increase Kp I can get about 250 watts under load, but then the motor coughs a bit as the RPM deceases.

2) I have the throttle wired through the eBrake circuit (Pin 6) and have left Pin 7 floating as in Justin's photo of the large MX150 connector wiring. Do I need to wire the throttle in parallel to Pin 7 so that I the throttle parameters I have set are in effect?

3) At 50 volts I should be able to spin the motor up to almost 7000 RPM, but at no load I have not seen more than 2700 RPM, and this decreases when I place the motor under load. Why is RPM limited?

4) The controller appears to lock up the motor to prevent backward spinning. Since I'm starting out by installing this controller on a mid-drive, I'd like to disable this function so that I can roll the bike backwards. How can I do this?

Thanks for anyone's help. I have included screenshots of my BACDoor parameters.
battery.png
Battery tab
battery.png (131.51 KiB) Viewed 1165 times
commandInputs.png
Command Inputs tab
commandInputs.png (131.56 KiB) Viewed 1165 times
motorNameplate.png
Motor Nameplate tab
motorNameplate.png (125.77 KiB) Viewed 1165 times
throttle.png
Throttle tab
throttle.png (146.95 KiB) Viewed 1165 times
brakes.png
Brakes tab
brakes.png (152.98 KiB) Viewed 1165 times
motorSensored.png
Basic Motor (sensored) tab
motorSensored.png (144.94 KiB) Viewed 1165 times
Attachments
BMC600.M1.xml
BACDoor configuration for BMC600_M1
(26.76 KiB) Downloaded 143 times
Last edited by mrbill on Dec 29 2015 9:17pm, edited 1 time in total.
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
mrbill   10 kW

10 kW
Posts: 507
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by mrbill » Dec 29 2015 8:38pm

MrDude_1 wrote:System Debug tab->Control Mode tab->Speed regulator mode.
Hmm. What version of BACDoor are you running? I'm running 1.5.4. I don't see a "System Debug" tab on mine. Is there a hidden command to get this tab?
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: Compact Field Oriented Controller, ASI + Grin, limited r

Post by MrDude_1 » Dec 29 2015 8:44pm

mrbill wrote:
MrDude_1 wrote:System Debug tab->Control Mode tab->Speed regulator mode.
Hmm. What version of BACDoor are you running? I'm running 1.5.4. I don't see a "System Debug" tab on mine. Is there a hidden command to get this tab?
im also in 1.5.4.0

connect to your device (or hit analyze and open a file)
click the data tab at the top, under the menu
just under that, 4th one over is system debug.
below that, on the left side of the screen, hit the Control Mode tab.

Hover over the description label to see the options.
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

Post Reply