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

Electric Motors and Controllers
User avatar
Lebowski   1 GW

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

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

Post by Lebowski » Apr 14 2018 12:32pm

Busy with some extremely interesting stuff.
DSC02111-800x800.jpg
DSC02111-800x800.jpg (108.74 KiB) Viewed 1381 times
I've started programming on a different chip, one of the 33EV types. Goal is to have sensorless start with full torque at standstill. Relative (sensorless) position at standstill is quite easy, but to get absolute phase information requires a bit more doing. The picture above shows the different versions of analog signal processing that I am considering for processing the current sensor signals. The left one has 4 opamps, the right one 8 at the moment but should be 10... but have already scrapped that one in my mind and am drawing up schematic for version 3....
DSC02110-800x800.jpg
DSC02110-800x800.jpg (128.37 KiB) Viewed 1381 times
The new processor plugges onto the powerPCB. The analog bits plug into the bottom right header of the experimental processor board.

Altair   100 W

100 W
Posts: 267
Joined: May 03 2014 10:35am
Location: Quebec, Canada

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

Post by Altair » Apr 14 2018 3:28pm

Mmmmmm, analog electronics. A slowly disappearing art unfortunately.

User avatar
methods   10 GW

10 GW
Posts: 4385
Joined: Aug 08 2008 12:08pm
Location: Santa Cruz CA
Contact:

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

Post by methods » Apr 14 2018 5:03pm

Go for the win
Increasing battery voltage and controller current limit will result in a non linear experience

User avatar
Arlo1   100 GW

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

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

Post by Arlo1 » Apr 14 2018 5:06pm

Altair wrote:
Apr 14 2018 3:28pm
Mmmmmm, analog electronics. A slowly disappearing art unfortunately.
Parts of the system will always have to be analog as there is no other way to determine amplitude and position of things.
My Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
My YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
RC and most types of Lithium batteries you MUST know your individual cell voltages charging and discharging.
Don't keep them were you cant afford smoke or fire!
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: 3177
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

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

Post by Lebowski » Apr 26 2018 4:39am

Since whereswally606 asked in a PM about the sensorless start with full torque Iam working on, might as well post the status here:

I am at a point where I have a one-shot algoritm to get the double phase out. So the controller IC takes just one look (it does not need multiple, but filtering multiple ones reduces the noise on the measurement) at the current sensors and can tell you where the magnetic field of the rotor is. It does not need rotor rotation or for the rotor to go first through a full rotation, or to run 3 different measurements for the 3 windings.

Unfortunately it cannot tell you the difference between a magnetic North or South... In effect this means you know at which phase to apply current but whether the motor will go forward or backward is a 50-50 chance.

It is very accurate though, the output is in degrees and it can really sense the rotor moving by just a millimeter...

So i am now busy to try to get a distinction between North and South...

User avatar
izeman   10 GW

10 GW
Posts: 4690
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

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

Post by izeman » Apr 26 2018 6:44am

Lebowski wrote:
Apr 26 2018 4:39am
So i am now busy to try to get a distinction between North and South...
that's an easy one: ice bears are in the north, if you see penguins you're at the south pole!!

Altair   100 W

100 W
Posts: 267
Joined: May 03 2014 10:35am
Location: Quebec, Canada

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

Post by Altair » Apr 26 2018 7:07am

Fantastic!

If I understand correctly what you are saying, you are now trying to determine if a particular phase is actually under the influence of a north or south magnet, or between the two.
Wow, under static condition, this must be very though to determine.

I would like to be able to give some suggestions...
Can you micro-pulse the phase to see how the coil reacts?

Sincerely wishing you the best success!

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » Apr 26 2018 7:22am

It is actually possible to get absolute phase information (so including north/south) and without pulsing etc... but this signal almost disappears the moment you apply phase current so cannot be counted on as a reliable and ever present source of info...

Still trying to find a workaround, will just take some more time.

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » Apr 30 2018 2:45am

nice thing of a bigger chip is larger RAM (8kB, wow :shock: ) so I can sample real-time data and have a look at signal spectra:
(this is a complex spectrum with two notch filters implemented, one at DC and one at a negative frequency)
real time datalogging-800x800.jpg
real time datalogging-800x800.jpg (128.29 KiB) Viewed 1211 times
It was a real #$%@ though to get fast data transmission between the (new to me) laptop and the processor...

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 08 2018 2:03am

Sensorless torque at standstill, unfortunately direction is still random and can change when switching on/off, so that will be the next thing to work on :D


User avatar
izeman   10 GW

10 GW
Posts: 4690
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

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

Post by izeman » May 08 2018 3:14am

would your sensorless start improvments help with "regular" sensored start in some way as well?
even though the controller/software now (since last autumn's update with hall data integration in sensorless mode) works better than ever, there is still some improvment possible in the (sensored) start situation.
start under heavy load can be very rough and stuttering, and power application is still very "soft". soft so far is great for all day riding, but can be hindersome in cases where you need instant power like wheelies for hopping over a fallen tree or something.

Altair   100 W

100 W
Posts: 267
Joined: May 03 2014 10:35am
Location: Quebec, Canada

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

Post by Altair » May 08 2018 7:28am

Impressive to see that it keeps a constant torque regardless of position, even if you rotate it backwards.
I also agree with izeman that instant startup with full power is a necessity for off-road riding.
I'll continue watching this thread with great interest.

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 08 2018 12:03pm

izeman wrote:
May 08 2018 3:14am
would your sensorless start improvments help with "regular" sensored start in some way as well?
even though the controller/software now (since last autumn's update with hall data integration in sensorless mode) works better than ever, there is still some improvment possible in the (sensored) start situation.
start under heavy load can be very rough and stuttering, and power application is still very "soft". soft so far is great for all day riding, but can be hindersome in cases where you need instant power like wheelies for hopping over a fallen tree or something.
I mean it would be instead of hall sensored start. And hall sensors divide the electrical rotation into only 6 pieces, so it is quite coarse. The one from the video was setup up for dividing an electrical rotation into 512 pieces, so should be much smoother. But am not there yet :D

lizardmech   100 mW

100 mW
Posts: 45
Joined: May 19 2017 4:16am

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

Post by lizardmech » May 13 2018 11:46am

Lebowski wrote:
Apr 14 2018 12:32pm
Busy with some extremely interesting stuff.
DSC02111-800x800.jpg
I've started programming on a different chip, one of the 33EV types. Goal is to have sensorless start with full torque at standstill. Relative (sensorless) position at standstill is quite easy, but to get absolute phase information requires a bit more doing. The picture above shows the different versions of analog signal processing that I am considering for processing the current sensor signals. The left one has 4 opamps, the right one 8 at the moment but should be 10... but have already scrapped that one in my mind and am drawing up schematic for version 3....
DSC02110-800x800.jpg
The new processor plugges onto the powerPCB. The analog bits plug into the bottom right header of the experimental processor board.
Interesting, what is the function of the additional analog processing between the current sense and the MCU?

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 14 2018 2:52am

Filtering and amplification... basically compensating for the ADC being only 10 bits

lizardmech   100 mW

100 mW
Posts: 45
Joined: May 19 2017 4:16am

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

Post by lizardmech » May 14 2018 5:11am

Lebowski wrote:
May 14 2018 2:52am
Filtering and amplification... basically compensating for the ADC being only 10 bits
You could do this really easily with delta sigma based current sense, you could sample the same data sets with different digital filters to simultaneously produce a low latency 10 bit output and a slower high resolution 16bit or 18bit output. I don't think dspic has the needed hardware for that though unfortunately.

How do you maintain sensorless control on your design if you do not have any information regarding motor inductance or resistance? It sounds interesting and quite different to FOC and DTC techniques, or are you keep it secret in the hope of commercializing it or something? I will have to build one next time I'm making some motor control inverters.

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 15 2018 2:30am

lizardmech wrote:
May 14 2018 5:11am
are you keep it secret in the hope of commercializing it or something?
yes :D

User avatar
fechter   100 GW

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

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

Post by fechter » May 15 2018 8:07am

Can you sort of quickly pulse the motor while monitoring the polarity of the unused phase to determine if it's going the right direction? Not sure how long it would take to pulse, sense, and reverse if going backwards. Hopefully pretty fast.

Another possible approach would be to ignore the sensing for a few revolutions and just commutate the phases in the desired direction. The magnets should sync to the stator at some point, then increase power.
"One test is worth a thousand opinions"

lizardmech   100 mW

100 mW
Posts: 45
Joined: May 19 2017 4:16am

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

Post by lizardmech » May 15 2018 10:02am

I think the second one is more or less how instaspin and most other sensorless ones do it, they quote about 1hz/60RPM as the limit for their observer, there's a force angle variable in the firmware that seems to put it into an open loop mode below certain speeds.

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 15 2018 11:14am

My goal is to have something which can sense the correct phase even when the motor is (mechanically) locked, so that the motor can provide torque in the correct direction against the mechanical lock. So no cheating by having a necessary small bit of movement to try and figure out which way we're going....

The math is horrendous though, got pages and pages full of sine and cosine etc :D

User avatar
fechter   100 GW

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

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

Post by fechter » May 16 2018 8:44am

Lebowski wrote:
May 15 2018 11:14am
My goal is to have something which can sense the correct phase even when the motor is (mechanically) locked, so that the motor can provide torque in the correct direction against the mechanical lock. So no cheating by having a necessary small bit of movement to try and figure out which way we're going....

The math is horrendous though, got pages and pages full of sine and cosine etc :D
That would be ideal but I can't think of how to do that without resorting to sensors.
"One test is worth a thousand opinions"

Altair   100 W

100 W
Posts: 267
Joined: May 03 2014 10:35am
Location: Quebec, Canada

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

Post by Altair » May 16 2018 9:13am

The rotor is never actually "locked". It is always slightly moveable by a small amount in the center of a magnetic cog.
Can this be used as a detector by pulsing a phase?

Njay   10 kW

10 kW
Posts: 835
Joined: Sep 09 2010 10:43am
Location: Portugal

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

Post by Njay » May 16 2018 12:30pm

Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.

lizardmech   100 mW

100 mW
Posts: 45
Joined: May 19 2017 4:16am

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

Post by lizardmech » May 16 2018 1:16pm

Njay wrote:
May 16 2018 12:30pm
Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.
I imagine the challenge is current sense range, you need enough to run the motor at full power but somehow have enough resolution to detect very small changes when trying to determine rotor position while unpowered.

User avatar
Lebowski   1 GW

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

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

Post by Lebowski » May 16 2018 1:32pm

lizardmech wrote:
May 16 2018 1:16pm
Njay wrote:
May 16 2018 12:30pm
Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.
I imagine the challenge is current sense range, you need enough to run the motor at full power but somehow have enough resolution to detect very small changes when trying to determine rotor position while unpowered.
I actually want to sense changes in phase inductances (to deduce position) while powered, i do not want something where i have to alternate between powering and sensing. The video a few posts back was sensing and powering at the same time.
Lizardmech comment about enough resolution ('Dynamic Range') is correct and is the reason for the analog pre-processing.

Post Reply