Lebowski's motor controller IC, schematic & setup, new v2.A1

Electric Motors and Controllers
nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Feb 27 2012 10:24am

do you have to press a button on the pc to get a response after a reset on the controller?

if you dont need to press a button, it most likely has to do with the inverters on the RX and TX line.
atleast this was what cured the problems i was having.

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 27 2012 10:46am

I got it to respond properly. I had to switch to a better serial to usb converter. So I will try to set up the rest of the board today and flash it later.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
fechter   100 GW

100 GW
Posts: 14644
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Lebowski's motor controller IC, schematic and setup manu

Post by fechter » Feb 27 2012 10:32pm

I'll be quite interested to see how these work out. Any commercial controller with these features is going to be very spendy. Making the technology affordable is a key to being successfully adopted.
"One test is worth a thousand opinions"

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 28 2012 1:02am

fechter wrote:I'll be quite interested to see how these work out. Any commercial controller with these features is going to be very spendy. Making the technology affordable is a key to being successfully adopted.
Thats why I linked the proto board I found and have. Its only ~$50 and then you build a powerstage with current sensors and you are set. With all that stuff I can through one of these together in a 8 hour day! I just got everything together to test with and I will be tring to fire it tonight or tomorow morning!
But If I was lebowski I would offer a chip only feture and if he wants to do the work or colaborate with someone else a compleat controller. It could be offered having the controller and motor shiped to get set up then shiped back again! But if money is the thing people are trying to save then they should do as much them selfs as possiple!
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 28 2012 2:19pm

Ok so this is damb cool. I have almost all the setting where I think I need them to start. I have a question. DO we have to worry about the back emf voltages getting to hi or is that curcit to stop them from going past 5 volts???
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 28 2012 3:01pm

Arlo1 wrote:Ok so this is damb cool. I have almost all the setting where I think I need them to start. I have a question. DO we have to worry about the back emf voltages getting to hi or is that curcit to stop them from going past 5 volts???
The circuit with all the resistors and the 6 diodes is there to scale the back-emf and to protect the controller IC. So if you chose the resistor values as mentioned in the schematic you don`t need to worry about the voltages getting too high.
Are you trying sensored mode ?

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 28 2012 3:56pm

Yes sensored startup.
So I used these diodes its all I could find in town. http://www.datasheetarchive.com/IN4004-datasheet.html they are the 4004 number.
I CAN NOT for the life of me get it to calibrate the coil positions. If I spin it to fast sometimes I just frezes. And if I don't spin it before I click calibrate it just says failed, It is pretty hard to do with the 80-100 motor I have to put one fingure in the end and spin it while reaching cross armed to click enter on my computer.
Termite froze on me once and I almost thought I was done with a fried chip! But I spent about 15 minutes unpluging it and pluging it back in to get it to reset!.

Im going back over the manual but maybe i need to raise the Ra resistor? I am using 10k for Ra and 10k for Rb I dont have any 33k resistors or any 3 watt resistors at all. I am going to order some but being in canada its about 1 month for ebay stuff and I can spend more to get it from digikey...
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Feb 28 2012 4:08pm

how about using a cordless drill or something to spin up the motor?

also adding some momentum to the motor should help (just repeating what lebowski told me:P)

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 28 2012 4:20pm

good tip from Nieles, try to spin it with a drill. Start slow and retry until it accepts. Did you have a look at the hall sensor results with the table out and a spreadsheet ?

sorry for the short comment, its hard to type on a nintendo 3ds :-)

The sampling of the backemf assumes a decelleration of the motor so if you start with a stopped motor it assumes speed is not going up, it gives the fail message immediately. If you start too fast, so backemf voltages too high, it will print a message saying its waiting for the motor to slow down. Motor speed does not need to decellerate by the way, it can remain constant or increase so rotating the 80-100 with a drill is fine.
If you`re afraid of blowibg the chip, take it out abd put your scope on where the chip measures the voltages, at the diode points. The controller chip wants a few volts of backemf, adjust your drill speed accordingly.

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 28 2012 6:11pm

Ok thanks guys i will try this later. I scoped the volatage to the pins on the chip and as fast as i can spin it by hand it never went over 4.5 v. I will pull the chip and try with a drill later.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 29 2012 12:25am

Tried the drill. I can not get the drill to fit the shaft so I wraped tape around the arbor and used it as a friction drive to spin the motor. But I still can not get it to calibrate the coil positons. It just gets stuck on sampling and never does anything! I tried everything from 10-1000 samples. If i spin it to fast it says waiting to slow down. Then says sampling but frezes and I have to unplug it a bunch of times. To reset it.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 29 2012 1:48am

First thing to check is the power supply of the chip. The chip takes around 200 mA so make sure the 5V supply can
deliver this. Second, use lots of decoupling capacitors ! I use 4 times (for each supply set of vdd/vss) a 100 nF and 47 uF
capacitor in parallel. Keep in mind that internally the chip runs at 120MHz, faster than an old PC. It needs a proper power supply !

I've never seen it conk out of sampling mode where it just freezes.... In this sampling mode it switches on the ADC's which increase
the power consumption. If your supply cannot handle this or if there are not enough decaps I can imagine that switching on the
ADC's causes a drop in supply resulting in the chip to freeze...

Also, you must calibrate the hall sensor positions before you can sample the back-emf. If the chip conks out and you reset it
it has forgotten the hall positions as all calibration data is stored in RAM until you give it the command to save it in EEPROM.
This would be the only thing I can think of that freezes it during back-emf sampling, no hall position data... Can you post the
hall sensor graphs / tables ?

just had a look at the code:

Code: Select all

cw_amplitude_in_range:
                                                ;print 'sampling' message
    mov #tblpage(cw_sampling_message), w0
    mov #tbloffset(cw_sampling_message), w1
    call tx_str_232

;----------------------------------------wait for 'position lock'
cw_position_lock:
						                                            ;loop until flag bit is set
    btss flags1, #hall_based_lock
    bra cw_position_lock
it's as I thought, no hall calibration means it will print the sampling message and then hang itself on
the loop waiting for hall_based_lock (this bit is set using interrupts).

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Feb 29 2012 6:30am

Got my motor Running in sensorless with push start last night! (with two current sensors)
it took me a while to test will different kind of settings. i think i have a pretty good understanding of all the settings in the running modes menu, so i should be able to fine tune it when i get home from work

is it normal the motor will spin slowly when you release the throttle?
when i try to stop the motor with my hand it will stop. but with an ever so slight movement on the rotor and it starts spinning again.

maybe the throttle calibration is a bit off?

i also tried the controller briefly with an other motor i have (a hub motor) with hall sensors

when i tried to calibate the hall sensors, it froze up and didnt respond to any commands.. after a reset of the controller and a reset of the rs232 adapter it would work fine again until i tried to callibrate again.
but it was late and i could have missed something. will try again tonight

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 29 2012 8:38am

:D nice, what motor did you use ?

Whether the motor continues to spin when you release the throttle depends on the calibration you did.
I would recommend to slightly open the throttle and use this as a minimum. What happened
in your case probably was that the noise on the throttle signal caused enough throttle to
keep the motor running. To reduce the noise on the throttle the schematic has an RC filter
in the throttle lines, did you implement those or leave them out ? When the motor runs with
throttle closed it's probably in drive_3 (indicated by the LEDs), it will keep running because
of the small throttle signal (rectified noise). When you stop it by hand it will jump to drive_1
(the waiting-for-a-push mode) and stay stopped because in this mode the throttle is artificially
forced closed. A small push will have the controller jump back to drive_3. If it's toggling between
drive_1 and drive_3 you need to increase the 'push start current' in the running modes menu.

An ever so slight movement of the rotor to get it to spin again, that's normal. Dependent on the
setup variables entered in the menus it can be very sensitive. You can start a big hub motor with a
small pinky-push in this mode...

About the sensored hub motor, did you check the hall signals are really toggling ? Maybe you have
open collector output type hall sensors (in which case you need to add some 1k to 4.7k resistors to
vdd) ? The way to get it to 'freeze' during hall calibration is when none or not all hall signals are
toggling. The controller is not really frozen then, it's just endlessly waiting for the halls to toggle.

As mentioned in the response to Arlo's post, you must calibrate the halls positions before running
the back-emf calibration. The menu's are meant to be gone through in consequetive order, jumping ahead
to the back-emf calibration before hall sensor calibration will cause the chip to hang. During back-emf
measurement the chip uses the hall signals as a reference frame. If you have a geared hub, make sure
the clutch engages so that the magnets inside are spinning. This type of geared motor needs to be
calibrated in reverse, you can use the 'reverse and save' option in the EEPROM menu to reverse all the
calibration data (turning it into forward motion data) before saving.

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 29 2012 11:00am

Lebowski wrote:First thing to check is the power supply of the chip. The chip takes around 200 mA so make sure the 5V supply can
deliver this. Second, use lots of decoupling capacitors ! I use 4 times (for each supply set of vdd/vss) a 100 nF and 47 uF
capacitor in parallel. Keep in mind that internally the chip runs at 120MHz, faster than an old PC. It needs a proper power supply !

I've never seen it conk out of sampling mode where it just freezes.... In this sampling mode it switches on the ADC's which increase
the power consumption. If your supply cannot handle this or if there are not enough decaps I can imagine that switching on the
ADC's causes a drop in supply resulting in the chip to freeze...

Also, you must calibrate the hall sensor positions before you can sample the back-emf. If the chip conks out and you reset it
it has forgotten the hall positions as all calibration data is stored in RAM until you give it the command to save it in EEPROM.
This would be the only thing I can think of that freezes it during back-emf sampling, no hall position data... Can you post the
hall sensor graphs / tables ?

just had a look at the code:

Code: Select all

cw_amplitude_in_range:
                                                ;print 'sampling' message
    mov #tblpage(cw_sampling_message), w0
    mov #tbloffset(cw_sampling_message), w1
    call tx_str_232

;----------------------------------------wait for 'position lock'
cw_position_lock:
						                                            ;loop until flag bit is set
    btss flags1, #hall_based_lock
    bra cw_position_lock
it's as I thought, no hall calibration means it will print the sampling message and then hang itself on
the loop waiting for hall_based_lock (this bit is set using interrupts).
Ok man I will look at this all tonight. It could be a lack of caps. I will scope the 5v in when I hit calibrate. I will try to calibrate the halls again. What I have done so far because I learnt that I need to do resets. Is I burnt all the settings to the eeprom before going to the coil position calibration. Then it remembers all the rest.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 29 2012 11:02am

One other thing is it normal for the motor to power up the chip when I spin the motor and the controller is unpowered?
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 29 2012 11:21am

Here is a sample of a quick test before I head to work,

Code: Select all

------> z 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------>  

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d 

data A, data B, data C
.0058	-.0005	-.0058
.0056	-.0002	-.0059
.0053	-.0001	-.0061
.0054	.0002	-.0060
.0052	.0005	-.0061
.0049	.0007	-.0062
.0047	.0010	-.0063
.0045	.0013	-.0064
.0043	.0016	-.0066
.0041	.0019	-.0067
.0041	.0023	-.0068
.0039	.0026	-.0070
.0038	.0029	-.0072
.0036	.0032	-.0072
.0034	.0035	-.0074
.0032	.0038	-.0073
.0029	.0039	-.0073
.0024	.0040	-.0072
.0022	.0044	-.0070
.0019	.0047	-.0070
.0015	.0048	-.0069
.0012	.0051	-.0068
.0008	.0054	-.0067
.0004	.0056	-.0067
.0001	.0059	-.0066
-.0001	.0061	-.0064
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> cÿ






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------>  

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> 
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 29 2012 2:17pm

Arlo1 wrote:One other thing is it normal for the motor to power up the chip when I spin the motor and the controller is unpowered?
It kinda depends...

Some current will flow from the high voltage battery via resistors Ra and the diodes to the 5V
but if the resistors are 10 kOhm we're talking only max 30 mA for 100V battery. With the chip
taking 200 mA this is nowhere near enough to power the chip so this mechanism is unlikely.

Are you maybe trying to calibrate the back-emf with no high voltage battery connected ? In
such a case the back-emf of the motor will be rectified by the protection diodes of the FETs
and the motor will put a DC voltage on the main battery supply line. If this then goes via a
regulator to the 5V supply of the chip then yes, you're supplying the chip via the motor. The
high voltage battery supply should be connected when you're doing the calibration just to
prevent current drawn from the motor influencing the measured back-emf waveforms. Maybe
connect something like 24V to the high voltage battery supply (no need to go straight to 200 V) ?

Maybe something funny is going on with the circuit, having to unplug it when it freezes should not
be necessary, a simple reset should do. Make sure your circuit is OK !

Sampling of the back-emf, once started, only fails when the hall sensor give an irregular pattern
to the chip. This can be because the motor spins unregular (maybe it is slipping because of the
way you spin it with the drill) or because the hall signals are noisy. I can imagine a bad supply
(via the motor) will give funny hall signals, these have to look like nice square waves without
any spikes as the calibration works with rising/falling edges (not with high/low states). A noise
spike on the halls will be interpreted as a rising/falling edge and will fail the back-emf measurement.

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Feb 29 2012 2:32pm

I have been trying to calibrate the coils with out the powerstage powered but i did try powering the powerstage with 12v to try to calibrate the coils but i got to try again because the low side fet were in the wrong setting (thought i set it right. But i was wrong)
Last edited by Arlo1 on Feb 29 2012 10:32pm, edited 1 time in total.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 29 2012 2:38pm

Arlo1 wrote:I have been trying to calibrate the coils with out the powerstage powered but i did try powering the powerstage with 12v to try to calibrate the coils but i got to try again because the low side fet were in the wrong setting (thought i set it write. But i was wrong)
The high/low active settings in the PWM menu are the only settings that you don't
need to save via main menu EEPROM option, they are immediately written to EEPROM...

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Feb 29 2012 2:40pm

Lebowski wrote: nice, what motor did you use ?
i am using a brushless outrunner http://endless-sphere.com/forums/viewto ... 30&t=20292

the hub motor is this one:
http://endless-sphere.com/forums/viewto ... 30&t=26012

Lebowski wrote:Maybe you have
open collector output type hall sensors
doh!.. pull-up resistors.. how could i have forgotten those. THANKS

installed the pullup resistors and the calibration is working:
hub motor.JPG
hub motor.JPG (108.57 KiB) Viewed 842 times

i tried to run the motor. but when it wants to transition form drive 1 to drive 2 it stalls briefly and tries again or goes to drive 0



User avatar
Lebowski   1 GW

1 GW
Posts: 3348
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Feb 29 2012 4:00pm

What's the funny noise in sensorless ? A loose fender or something ? It should run almost soundless in drive 3...

Looking at the graphs, it's strange they're not scaled and have a +1/-1 amplitude.. did you connect
the main battery supply when measuring the back emf ? Can you maybe post or send me the raw back-emf
data right after sampling (tables) and the reconstructed data ?
About the sensored mode, i have the feeling the order of the motor phases as they are connected to
pins 5, 7 and 8 of the chip are mixed up. Please check that motor phase A goes to pin 5 (via resistor of course), phase B
goes to pin 8 and phase C to pin 7. Maybe you have phases B and C reversed ? Also make sure the current
sensors in A and B go to pins 2 and 3 respectively (though i think this is OK else it wouldn't run in sensorless).
Can you also please post the contents of main menu d, e and g ?

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Feb 29 2012 5:42pm

halls

Code: Select all

-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
raw data

Code: Select all

.5913	.4042	-.9521
.5473	.4545	-.9570
.5009	.4898	-.9575
.4609	.5328	-.9565
.4130	.5694	-.9497
.3671	.6097	-.9448
.3247	.6390	-.9350
.2773	.6683	-.9208
.2304	.6962	-.9013
.1801	.7200	-.8833
.1293	.7502	-.8632
.0805	.7781	-.8403
.0307	.8024	-.8164
-.0175	.8226	-.7915
-.0654	.8464	-.7666
-.1123	.8642	-.7392
-.1621	.8839	-.7075
-.2080	.9008	-.6738
-.2568	.9146	-.6445
-.3032	.9288	-.6098
-.3486	.9356	-.5742
-.3271	.8061	-.4667
-.4150	.9420	-.5195
-.4526	.9457	-.4814
-.4931	.9448	-.4379
-.5332	.9411	-.3916
-.5722	.9361	-.3496
-.6118	.9301	-.3056
-.6464	.9233	-.2583
-.6782	.9072	-.2138
-.7070	.8871	-.1689
-.7377	.8720	-.1166
-.7670	.8528	-.0688
-.7934	.8258	-.0195
-.8193	.8047	.0322
-.8408	.7768	.0791
-.8593	.7543	.1274
-.8774	.7250	.1728
-.8925	.6958	.2216
-.9106	.6683	.2695
-.9243	.6362	.3173
-.9331	.6037	.3583
-.9389	.5776	.3984
-.9453	.5351	.4433
-.9477	.5012	.4858
-.9472	.4614	.5234
-.9492	.4234	.5644
-.9462	.3813	.6040
-.9365	.3428	.6406
-.9267	.3012	.6733
-.9135	.2531	.7026
-.8979	.2091	.7329
-.8779	.1629	.7602
-.8598	.1190	.7900
-.8369	.0704	.8168
-.8149	.0256	.8437
-.7910	-.0201	.8666
-.7651	-.0654	.8872
-.7377	-.1084	.9082
-.7055	-.1538	.9262
-.6738	-.1977	.9414
-.6425	-.2444	.9575
-.6083	-.2893	.9677
-.5747	-.3286	.9736
-.5366	-.3652	.9750
-.5004	-.4023	.9760
-.4531	-.4435	.9775
-.4130	-.4838	.9721
-.3676	-.5140	.9697
-.3237	-.5502	.9628
-.2792	-.5822	.9536
-.2373	-.6147	.9399
-.1948	-.6422	.9272
-.1464	-.6710	.9116
-.0986	-.7022	.8920
-.0517	-.7283	.8657
-.0024	-.7489	.8452
.0468	-.7713	.8203
.0917	-.7878	.7939
.1396	-.8038	.7636
.1816	-.8180	.7338
.2314	-.8317	.7016
.2749	-.8454	.6699
.3178	-.8532	.6367
.3623	-.8651	.6035
.3999	-.8688	.5698
.4321	-.8711	.5454
.4755	-.8711	.5034
.5185	-.8738	.4580
.5561	-.8720	.4184
.5942	-.8665	.3769
.6289	-.8578	.3339
.6591	-.8500	.2934
.6879	-.8358	.2485
.7167	-.8226	.2060
.7470	-.8088	.1611
.7758	-.7914	.1123
.8051	-.7749	.0625
.8295	-.7534	.0175
.8525	-.7333	-.0297
.8701	-.7099	-.0766
.8974	-.6848	-.1191
.9130	-.6582	-.1669
.9335	-.6307	-.2158
.9501	-.6015	-.2592
.9594	-.5690	-.3061
.9658	-.5378	-.3457
.9711	-.5035	-.3837
.9721	-.4678	-.4238
.9726	-.4188	-.4780
.9721	-.3703	-.5185
.9643	-.3341	-.5566
.9624	-.2938	-.5932
.9531	-.2508	-.6289
.9409	-.2101	-.6606
.9282	-.1702	-.6889
.9125	-.1235	-.7207
.8886	-.0791	-.7519
.8725	-.0334	-.7817
.8540	.0137	-.8095
.8300	.0599	-.8310
.8046	.1039	-.8540
.7783	.1519	-.8735
.7470	.1940	-.8945
.7197	.2430	-.9135
.6850	.2883	-.9252
.6513	.3332	-.9389
.6118	.3717	-.9482
reconstructed waves

Code: Select all

.0135	.0098	-.0226
.0126	.0108	-.0227
.0117	.0117	-.0227
.0107	.0126	-.0226
.0097	.0135	-.0225
.0086	.0144	-.0223
.0076	.0152	-.0221
.0065	.0160	-.0218
.0054	.0167	-.0215
.0042	.0174	-.0211
.0031	.0181	-.0206
.0019	.0187	-.0201
.0008	.0193	-.0196
-.0002	.0198	-.0190
-.0014	.0203	-.0184
-.0025	.0207	-.0177
-.0035	.0211	-.0170
-.0046	.0214	-.0162
-.0056	.0216	-.0155
-.0066	.0219	-.0147
-.0076	.0220	-.0139
-.0086	.0222	-.0131
-.0096	.0223	-.0123
-.0105	.0224	-.0115
-.0114	.0224	-.0106
-.0123	.0223	-.0097
-.0132	.0223	-.0087
-.0141	.0221	-.0077
-.0149	.0219	-.0067
-.0157	.0216	-.0056
-.0165	.0212	-.0045
-.0172	.0208	-.0034
-.0179	.0203	-.0023
-.0185	.0198	-.0011
-.0191	.0192	-.0000
-.0197	.0186	.0010
-.0202	.0180	.0021
-.0207	.0173	.0032
-.0211	.0167	.0043
-.0215	.0160	.0054
-.0219	.0152	.0064
-.0221	.0144	.0075
-.0224	.0136	.0085
-.0225	.0127	.0095
-.0226	.0118	.0105
-.0227	.0108	.0115
-.0226	.0098	.0124
-.0225	.0087	.0133
-.0224	.0077	.0142
-.0222	.0066	.0150
-.0219	.0055	.0158
-.0216	.0044	.0166
-.0212	.0033	.0173
-.0208	.0022	.0179
-.0203	.0011	.0186
-.0198	.0000	.0192
-.0193	-.0010	.0198
-.0187	-.0022	.0203
-.0181	-.0033	.0208
-.0175	-.0044	.0213
-.0167	-.0056	.0216
-.0160	-.0067	.0220
-.0152	-.0078	.0223
-.0144	-.0088	.0224
-.0135	-.0098	.0226
-.0126	-.0108	.0227
-.0117	-.0118	.0227
-.0107	-.0126	.0226
-.0097	-.0135	.0225
-.0086	-.0144	.0223
-.0076	-.0152	.0221
-.0065	-.0160	.0218
-.0054	-.0167	.0215
-.0042	-.0174	.0211
-.0031	-.0181	.0206
-.0020	-.0187	.0201
-.0008	-.0193	.0196
.0002	-.0198	.0190
.0014	-.0203	.0184
.0025	-.0207	.0177
.0035	-.0211	.0169
.0046	-.0214	.0162
.0056	-.0216	.0155
.0066	-.0219	.0147
.0076	-.0220	.0139
.0086	-.0222	.0131
.0096	-.0223	.0123
.0105	-.0224	.0115
.0114	-.0224	.0106
.0123	-.0224	.0097
.0132	-.0223	.0087
.0141	-.0221	.0077
.0149	-.0219	.0067
.0157	-.0216	.0056
.0165	-.0212	.0045
.0172	-.0208	.0034
.0179	-.0203	.0023
.0185	-.0198	.0011
.0191	-.0192	.0000
.0197	-.0186	-.0010
.0202	-.0180	-.0021
.0207	-.0173	-.0032
.0211	-.0167	-.0043
.0215	-.0160	-.0054
.0219	-.0152	-.0064
.0221	-.0144	-.0075
.0223	-.0136	-.0085
.0225	-.0127	-.0095
.0226	-.0118	-.0105
.0227	-.0108	-.0115
.0226	-.0098	-.0124
.0225	-.0087	-.0133
.0224	-.0077	-.0142
.0221	-.0066	-.0150
.0219	-.0055	-.0158
.0216	-.0044	-.0166
.0212	-.0033	-.0173
.0208	-.0022	-.0179
.0203	-.0011	-.0186
.0198	-.0000	-.0192
.0193	.0010	-.0198
.0187	.0022	-.0203
.0181	.0033	-.0208
.0174	.0044	-.0213
.0167	.0056	-.0216
.0160	.0067	-.0220
.0152	.0078	-.0223
.0144	.0088	-.0224
menu d

Code: Select all

------> d 

a) number of current sensors: 2
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 39.9 A
d) maximum battery current, motor use: 14.9 A
e) maximum battery current, regen: 0.0 A
f) maximum shutdown error current, fixed: 4.9 A
g) maximum shutdown error current, proportional: 4.9 A
h) IIR filter coefficient: 4
i) use additional comb filter: YES
z) return to main menu
menu e

Code: Select all

------> e 

a) loop sample frequency: 38.01 kHz
b) 1st order phase loop integrator coefficient: 53.0000
c) 2nd order phase loop integrator coefficient: 0.3099
d) amplitude loop integrator coefficient: 1.5000
e) maximum amplitude: 200 %
z) return to main menu
menu g

Code: Select all

------> g 

a) sensored or sensorless: SENSORED
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 1183
d} e-rpm reached before transition: 47 %
e} minimum current push start: 2.9 A
f} push start current, error allowed: 24 %
g] erpm sensored to sensorless transition: 500
h] transition time sensored to sensorless: 99 milli-sec 
i) return to motor start below 500 erpm
j) controlled slowdown for direction change: YES
k) phase current for controlled slowdown: 0.9 A 
l) motor maximum, forward: 99.97 k-erpm 
m) motor maximum, reverse: 39.99 k-erpm 
n) motor standstill voltage threshold: 0.49 V
z) return to main menu
the noise is a resonance in the steel tubes the motor is mounted in (in person the sound isnt as bad as it sounds in the vid)

i checked, the motor phase wires are wired correctly, and the current sensors too.

about the hall position sensors;
how much does the position of the hall sensors matter? does the spacing beteween the halls close?
the order of the sensors in relation to the phases doesnt matter right?

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 01 2012 12:17am

Here is a print out with the halls and the coil positions. I see it samples the coils then looses the info so I will look to see if the voltage is droping. Or the signals need CAPing lol.

Code: Select all

 

a] number of back-emf samples: 1
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> a 
new value -> 100 

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d 

data A, data B, data C
.0049	.0003	-.0058
.0046	.0007	-.0060
.0036	.0002	-.0069
.0034	.0006	-.0070
.0032	.0010	-.0071
.0032	.0014	-.0071
.0033	.0020	-.0068
.0028	.0020	-.0073
.0029	.0026	-.0070
.0029	.0032	-.0068
.0026	.0035	-.0067
.0022	.0038	-.0066
.0019	.0040	-.0064
.0015	.0042	-.0063
.0014	.0046	-.0061
.0009	.0049	-.0061
.0007	.0054	-.0058
.0003	.0058	-.0056
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0002	.0057	-.0057
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> z 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> a 

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> c 

hall 1, hall 2, hall 3
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400


a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> z 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> z 

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a 

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> z 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d 

data A, data B, data C
.0059	-.0007	-.0076
.0057	-.0003	-.0077
.0056	-.0000	-.0077
.0057	.0008	-.0073
.0049	.0006	-.0079
.0051	.0015	-.0075
.0050	.0019	-.0075
.0047	.0023	-.0076
.0045	.0025	-.0077
.0043	.0029	-.0079
.0043	.0033	-.0079
.0040	.0036	-.0079
.0038	.0039	-.0079
.0035	.0040	-.0079
.0032	.0043	-.0077
.0034	.0049	-.0070
.0029	.0051	-.0068
.0026	.0053	-.0066
.0025	.0057	-.0062
.0021	.0058	-.0063
.0018	.0062	-.0061
.0008	.0058	-.0067
.0007	.0064	-.0065
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> 
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Arlo1   100 GW

100 GW
Posts: 8372
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 01 2012 12:55am

Ok so I thought I had it I noticed I put Phase A to the pin8 and phase B to pin 5 so I switched them but still cant get it. Here is the last try.
I scoped the 5volts a few places on the board and its a clean smooth 5v as well scoped the voltage to the motor and its clean too!

Code: Select all

------> b 

a] number of back-emf samples: 100
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> a 
new value -> 850 

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement

 Waiting for motor to slow down
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement

 Waiting for motor to slow down
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement

 Waiting for motor to slow down
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d 

data A, data B, data C
-.0144	.0134	.0010
-.0147	.0124	.0023
-.0148	.0116	.0032
-.0151	.0110	.0040
-.0154	.0105	.0048
-.0156	.0101	.0057
-.0156	.0097	.0065
-.0156	.0093	.0072
-.0156	.0092	.0084
-.0156	.0086	.0091
-.0156	.0081	.0099
-.0154	.0071	.0102
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000
.0000	.0000	.0000

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> 
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

Post Reply