#$%@$#@ <--- (insert favorite swearword here), IT WORKS !!!!

Electric Motors and Controllers

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 26, 2012 1:24 pm

Miles wrote:In the case of using reverse to change gear, most parts of the transmission are freewheeling until the load is retaken in the opposite direction. The bulk of the inertia to overcome is in the rotor of the motor.
Is a pause needed before reversal?

If the throttle is going to be held, it might be good to have a temporary torque limit after reversing, until the load is retaken.. :)


Well my motor got a 2 kg rotor, stopping it dead is violent :D
What pause do you mean ?
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Miles » Thu Jan 26, 2012 1:31 pm

Some sensorless controllers seem to need a pause of at least 100 milliseconds at zero rpm, before restarting in reverse.
User avatar
Miles
100 GW
100 GW
 
Posts: 9254
Joined: Fri Mar 16, 2007 4:15 pm
Location: London UK

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Alan B » Thu Jan 26, 2012 2:02 pm

Motor controllers often have a reversal input. A good controller will reverse at high power.

I would think to reverse quickly you would set PWM to zero, reverse the phasing of the commutation, and ramp the PWM back up. Clearly during this ramping the power is going to buck the motor EMF, but just like other situations the PWM is used to control the current to a safe level. Applying bucking power is the fastest way to reverse the motor while keeping voltages and currents at a safe level.
-- Alan W6AKB Cromotored FS GreyBorg, Novara MTB 9C, eBikeE Bent BMC, myEbikeWeb and Thanks to Justin at ebikes.ca for rescuing this forum!
User avatar
Alan B
1.21 GW
1.21 GW
 
Posts: 3871
Joined: Sat Sep 11, 2010 7:43 am
Location: San Francisco Bay Area, USA

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 26, 2012 3:23 pm

Alan B wrote:Motor controllers often have a reversal input. A good controller will reverse at high power.

I would think to reverse quickly you would set PWM to zero, reverse the phasing of the commutation, and ramp the PWM back up. Clearly during this ramping the power is going to buck the motor EMF, but just like other situations the PWM is used to control the current to a safe level. Applying bucking power is the fastest way to reverse the motor while keeping voltages and currents at a safe level.


Ramping the PWM back up in your description comes down to the regen in my description,
it will not be a faster process. Both mean a negative current out of the motor, in your case via a negative
voltage and small PWM, in my case via a reduced positive voltage and a higher level of PWM. In
both cases the same amount of energy per second can be extracted from the rotor, giving equal
rates of deceleration.

As I see it, there is no real difference between your and my description.....?

An interesting puzzle for you guys to figure out how it works,
to reverse the direction of the motor a single assembly instruction
which XOR's the 16 bit phase variable with 7FFF hex is enough...
Last edited by Lebowski on Thu Jan 26, 2012 3:30 pm, edited 1 time in total.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 26, 2012 3:24 pm

Miles wrote:Some sensorless controllers seem to need a pause of at least 100 milliseconds at zero rpm, before restarting in reverse.


no, there's no need for a pause like this. But, would you notice a pause like this ?
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Miles » Thu Jan 26, 2012 3:36 pm

I'm hoping for a total turnaround time of about 0.5 second (obviously not with a rotor the size of yours..) - so that would be 20%.... :)
User avatar
Miles
100 GW
100 GW
 
Posts: 9254
Joined: Fri Mar 16, 2007 4:15 pm
Location: London UK

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Alan B » Thu Jan 26, 2012 4:53 pm

When I looked into it I found that there was a not so subtle difference between regen braking and power reversing the motor. Regen is weak compared to power reverse.

Let's say we are putting 1KW into the motor. If we go into regen we take out somewhat less than 1KW which quickly diminishes as the motor slows. So the regen power over the deceleration period averages less than 0.5KW. If we instead do power reverse we stay at 1KW the whole time we are reversing, so in less time that regen has merely stopped the motor a power reverse has accelerated through stop and continued fully to reverse.

Normally the motor's back EMF is bucking the battery voltage and reducing motor current, when power reversing they are series aiding. So the current will be really high if not properly managed.

In regen the motor back EMF is boost converted up in voltage to flow current backwards into the battery, in power reverse battery power is applied to slow and reverse the motor. Perhaps a way to look at that is the regen/deceleration and the reverse acceleration are overlapped and going on at the same time.

At least that's my present understanding.
-- Alan W6AKB Cromotored FS GreyBorg, Novara MTB 9C, eBikeE Bent BMC, myEbikeWeb and Thanks to Justin at ebikes.ca for rescuing this forum!
User avatar
Alan B
1.21 GW
1.21 GW
 
Posts: 3871
Joined: Sat Sep 11, 2010 7:43 am
Location: San Francisco Bay Area, USA

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Arlo1 » Fri Jan 27, 2012 12:15 am

I cant find the video jeremy harris posted but here is a ebike wheel reversing at full power.
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5214
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Fri Jan 27, 2012 1:46 am

In the end how fast it will be able to reverse depends on the setup, all variables influencing this process
are accessible to the user. You can set the regen current during slow down and the rpm below which
the reversal is made. You can try to make the reversal as fast as possible with these but it won't allow you to
violate certain current limits like phase wire current and battery regen current (though you can also change
these as well but you have to be sure your FETs/battery can take it).
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Gordo » Fri Jan 27, 2012 1:56 am

Lebowski wrote:In the end how fast it will be able to reverse depends on the setup, all variables influencing this process
are accessible to the user. You can set the regen current during slow down and the rpm below which
the reversal is made. You can try to make the reversal as fast as possible with these but it won't allow you to
violate certain current limits like phase wire current and battery regen current (though you can also change
these as well but you have to be sure your FETs/battery can take it).


Isn't this getting a little goofy? How many people want to use this function? Maybe you could make it hover and levitate while spinning on it's axis?
X-treme 3KW Scooter...OFF ROAD ONLY....Giant 1KW 48V 24" Hubmotor....E-Apex 1KW 48V 26" Hubmotor, built 2012-05-26
Thanks Justin, for saving ES. May Grin Tech grow and prosper.
User avatar
Gordo
100 kW
100 kW
 
Posts: 1387
Joined: Sun May 23, 2010 4:46 pm
Location: THE COLD WHITE NORTHWEST, EH?

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Miles » Fri Jan 27, 2012 2:06 am

Maybe you misunderstand what it's for, Gordo?
User avatar
Miles
100 GW
100 GW
 
Posts: 9254
Joined: Fri Mar 16, 2007 4:15 pm
Location: London UK

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Fri Jan 27, 2012 2:17 am

Gordo wrote:Isn't this getting a little goofy? How many people want to use this function? Maybe you could make it hover and levitate while spinning on it's axis?


Not really I think, I can imagine that also for use in a 4 wheel hub motor vehicle or a
rear wheel driven trike you want to (have the option to) actively and controllably slow
down the motor(s) when the driver flips the reverse switch.... That there's people out
there that want to abuse this funtion 'cause they got a two speed gearbox which works
on reversing the motor... :D

levitate, no :D but I'm kind of dying to get my hands on a 48V 500W induction motor
to try and to get that running as well, it should be possible with some small changes
but I can't develop this when I don't have a test subject to experiment with. I've been
eyeing my laundry machine but expect this has a 2 phase motor, not a 3 phase.

On the other hand, I think the controlled slow down for motor reverse is the last thing. I'll
finish it up now and run some tests, go over the whole thing one last time, draw a schematic,
write a manual for the setup menu and ship the IC's to the people that PM'ed me and want to try it out.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Fri Jan 27, 2012 3:00 pm



This video shows the dissipating of the rotor energy into light bulbs when reversing the motor.
The menu option to actively apply regen to the motor when reversing is selected, so
every time I reverse the rotor energy is recovered with regen and (in this case) dissipated
in the bulbs. The amount of regen Amps can be set for gentle or hard braking, or anything
in between.

The bulbs are accross the supply of the output stage, which in turn is connected
to the power supply via a diode. During motoring the current flows from the power
supply via the diode into the motor and the lamps. On regen the current is reverse but,
because of the diode, can only take the route via the lamps, lighting them up more
brightly. This just to explain why the lamps are on all the time..

The noise is the freewheel of the bicycle hub that is my motor axle. You can see how
because of the need to spin up the freewheel and gear cluster the reversal in one way
takes longer than in the other.

The motor is running sensorless on 2 current sensors in this video. It also uses sensorless start.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Gordo » Fri Jan 27, 2012 8:32 pm

Lebowski,
I understand you have built an incredible controller in a very short time. I also understand that there are a few people who have some very unique requirements. It is your choice if you want to send something out for field testing which will overjoy 95% of the people or continue to develop your software ad infinitum? We are now ready with a variety of motors to do a lot of work and provide you with feedback, if this is what you wish.
Thanks,
Gordon
X-treme 3KW Scooter...OFF ROAD ONLY....Giant 1KW 48V 24" Hubmotor....E-Apex 1KW 48V 26" Hubmotor, built 2012-05-26
Thanks Justin, for saving ES. May Grin Tech grow and prosper.
User avatar
Gordo
100 kW
100 kW
 
Posts: 1387
Joined: Sun May 23, 2010 4:46 pm
Location: THE COLD WHITE NORTHWEST, EH?

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Sat Jan 28, 2012 3:04 am

Gordo wrote:Lebowski,
I understand you have built an incredible controller in a very short time. I also understand that there are a few people who have some very unique requirements. It is your choice if you want to send something out for field testing which will overjoy 95% of the people or continue to develop your software ad infinitum? We are now ready with a variety of motors to do a lot of work and provide you with feedback, if this is what you wish.
Thanks,
Gordon


Well I thought it was finished last wednesday but then I saw the post from Hugues about his big bear chopper. I followed
the link in that post to the Kelly controller he wants to use. Reading through its specs I realized the only thing I was missing w.r.t.
the $1200 Kelly was reverse... so I decided to add it as well. And with reverse comes the problem of what to do when
reverse is selected when still moving forward, so I decided to put in an automatic regen option for this.

Adding something like reverse seems simple (the actual reverse is only 1 instruction) but it has to be integrated correctly
so that it also works over CAN bus in a multi-motor setup, a menu items have to be added etc etc.

But it's done now, I'm not adding any more features (for now :D ). I want to sit on it for one or 2 weeks to run tests and to make sure
that everything works as it should. I don't want the "oh #@$%@ I forgot such and such" thought 3 hours after mailing the
chips :D , I prefer not to ship IC's back and forth 3 times.

Before then I'll have the schematic finished so you can start soldering everything together, just use a standard 40 pins DIL
socket where the IC is supposed to go.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby MitchJi » Sat Jan 28, 2012 7:01 pm

Hi

Lebowski wrote:Been very busy adding more and more menu options. So much in fact I'm starting to get lost :oops:

Some menu's have gotten so long that I've decided to switch all to letter instead of numbers.

Also every option is indicated by a ']', '}' or ')', the meaning is:
]: option only used for sensored
}: option only used for sensorless
): option used for both sensored and sensorless

Not very user friendly.

How about as a minimum?:
-S): option only used for Sensored
-N): option only used for Non-sensored
-B): option used for Both sensored and sensorless


this is the 'running modes' submenu
Code: Select all
a-B) sensored or sensorless: SENSORED
b-N) sensorless startup: PUSH START
c-N) e-rpm limit sensorless self start: 999
d-N) e-rpm reached before transition: 89 %
e-N) minimum current push start: 0.9 A
f-N) push start current, error allowed: 20 %
g-S) erpm sensored to sensorless transition: 500
h-S) transition time sensored to sensorless: 249 milli-sec
i-B) return to motor start below 200 erpm
j-B) motor maximum: 6.99 k-erpm
k-B) motor standstill voltage threshold: 1.49 V
z-B) return to main menu
Best Wishes!

Mitch
User avatar
MitchJi
100 MW
100 MW
 
Posts: 2661
Joined: Mon Jun 02, 2008 8:09 pm
Location: Marin County California

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Mon Jan 30, 2012 5:17 am

Just checked the battery current calculation / limiting part (it works). Since I only have
current sensors in the phase wires the battery current is calculated and this needed to be
checked.

I got road-rash on my thumb now, the skin got burned and is now hard (like it melted or something).

au :(

tip: use the brake if you ever want to run a test like this....
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Tue Jan 31, 2012 6:28 am

Just finished the schematic, will post it later today (somehow I think a 16 Mb .tiff is overdoing it :D so will need
to re-generate it later today). I'm busy typing the manual explaining all the options of the setup menu's (I will go for
a powerpoint type slide set, in .pdf). Chips will most probably be shipped to the people that PM-ed me this coming
Monday (I have 3 day weekends, mondays the post office is open)....
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby nieles » Tue Jan 31, 2012 7:09 am

could this be used for programming the parameters?

http://www.sparkfun.com/products/9716
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Tue Jan 31, 2012 7:38 am

It looks like a standard USB <-> RS232 interface so yes, that can be used. Looking at its
schematic you need (from jp1) pins 1 (gnd), 4 (TX, connect to my RX) and 5 (RX, connect to
my TX).

Looking at pictures in this post

viewtopic.php?p=497791#p497791

this cable can also be used (EB2xx, EB3xx programming cable). I'm not sure
from the pictures but it looks like black is gnd, white is RX (connect to my TX)
and green is TX (connect to my RX).

I myself use a standard USB <-> RS232 cable which actually uses the same PL2303
chip as in the pictures of the post I mentioned.

You need to be able to set the speed to 115200 baud... (8 bits, 1 stopbit, no parity, no handshaking)
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Arlo1 » Tue Jan 31, 2012 10:09 am

I just checked my current sensors and they are U for unidirectional... :( Oh well I have one from burtie thats a B I only need to order 2 more. I will put an order in just in time for alll of this along with some irfp4468 fets for me a gordo to play with.
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5214
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Teh Stork » Tue Jan 31, 2012 10:37 am

Lebowski wrote:Just finished the schematic, will post it later today (somehow I think a 16 Mb .tiff is overdoing it :D so will need
to re-generate it later today). I'm busy typing the manual explaining all the options of the setup menu's (I will go for
a powerpoint type slide set, in .pdf). Chips will most probably be shipped to the people that PM-ed me this coming
Monday (I have 3 day weekends, mondays the post office is open)....


Just a suggestion, If you have borland builder - you can easily make a nice gui with values that can be exported to a text-file or similar. As for data-comm, going for a SD-solution (more code :twisted: ) would offer benefits in that you could both program, datalog and debug.

It's hard doing everything - being able to build a complete controller requires many skills, looks like you have it 8) Can't wait to see the result ;)
Teh Stork
1 kW
1 kW
 
Posts: 306
Joined: Wed May 25, 2011 8:02 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Tue Jan 31, 2012 10:46 am

Ok, before I'll start a new thread with all the documentation, this is version 1 of the schematic. The schematic itself
will 99% sure not change, maybe just some of the explanatory text... This text by the way is readable if you download
and save the file, and then zoom in.

Enjoy :D

schematic_v1.jpg
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby salty9 » Tue Jan 31, 2012 12:29 pm

Lebowski,

Would you recommend optoisolating your controller from the power board? It would be a shame for a downstream screw up to wreck the controller.
salty9
1 kW
1 kW
 
Posts: 475
Joined: Fri Aug 14, 2009 10:14 pm
Location: 42.6°N 122.71°W

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Tue Jan 31, 2012 12:57 pm

salty9 wrote:Lebowski,

Would you recommend optoisolating your controller from the power board? It would be a shame for a downstream screw up to wreck the controller.


It's possible to do this (the test power stage I'm using has this, I use hpcl2631 for opto-isolation and 4427 gate drivers)
but I don't want to recommend this as it's more costly and complex that other solutions. I want people to choose
for themselves what kind of output stage they want to use. The setup option that allows you to choose active high or
active low for the FET drivers gives a lot of flexibility in building the output stage, it makes it for instance possible
to re-use a china controller output stage.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 1 guest