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

It now works super at 160v however 200v and the issue is back. EMC is a bitch, however the Lebowski chip is sweet.

Will probally build this controller into a kart or moped for fun, since it cannot do the power needed for the motor I am currently testing with. Now just to get my hands on a nice powerstage :D

[youtube]pgPT-Rt6hKk[/youtube]

Remy core spinning super at 160v, almost no startup issues now and it runs fine.

Code:
0xFFFF	0xFFFF	0x795E	0x0020	0xA1B3	0x4177	0x033C	0x000A
0x0000	0x07AE	0x0018	0x0000	0x01E0	0xFFFF	0xF852	0xFFE8
0x0000	0xFE20	0x0000	0x4CCD	0x0018	0x0000	0x01E0	0xFFFF
0xB333	0xFFE8	0x0000	0xFE20	0xFAB5	0xFF06	0xFFFF	0xFFFF
0x2916	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x01DA	0xA92F	0x0207	0x0207
0x008C	0x008C	0x0343	0x001A	0x0019	0x000A	0x0033	0x0A3D
0xFFFF	0x7FBC	0x0000	0x0164	0x00B2	0x03F9	0x03F8	0x03F8
0x0BB7	0x0474	0x008F	0x0592	0x0006	0x0CF9	0xFFFE	0x0A00
0x1000	0x0000	0x0000	0xF000	0x0000	0x0000	0x0167	0x01FA
0x0000	0x03FF	0x0590	0x0047	0x0590	0x0356	0x0418	0x0258
0x0064	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0003	0x0000	0x0078
0x0000	0x0000	0xFFFD	0x0000	0xFF88	0x0000	0x0000	0x0005
0x0000	0x0064	0xFFFB	0x0000	0xFF9C	0x000C	0x0000	0x00F0
0xFFF4	0x0000	0xFF10	0x05CC	0x279D	0x0205	0x019F	0x008E
0x0067	0x01BD	0x026F	0x000F	0x0010	0x0E10	0x0000	0x03E8
0x03B6	0x6000	0x01AB	0x009B	0x4000	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0000	0x0000	0x0000
0x0005	0x2000	0xA14E	0x0002	0xECD8	0x0000	0xFFFF	0x0000
0xFF67	0x0000	0xFF2A	0x0000	0xFFFF	0xFFFF	0x0007	0x0005
0x0007	0x8000	0x0435	0x0000	0xF898	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0xFFFF	0x0000	0x0000
0x0000	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xAAAA	0x6666	0x4924	0x38E3	0x2E8B	0x2762
0x2222	0x1E1E	0x1AF2	0x1861	0x1642	0x147A	0x12F6	0x11A7
0x1084	0x0F83	0x0EA0	0x0DD6	0x0D20	0x0C7C	0x0BE8	0x0B60
0x0AE4	0x0A72	0x0A0A	0x09A9	0x094F	0x08FB	0x08AD	0x0864
0x0820	*
 
Nice work, it would be great to see how it would run with the original IMA motor.
 
Good news, I got my Opel Ampera/Chevy Volt inverter. Glad that some engineers with logic thinking worked on this. Nice separate powerstage, needs 5v for control and gets it power from the HV bus.
One big difference is that it is active low instead of active high. Not an issue since this can be set in the pwm menu, so tomorrow I will wire up an adapter loom for testing.
 

Attachments

  • Reverse engineering of Opel Ampera.pdf
    992.7 KB · Views: 73
Tomdb said:
Good news, I got my Opel Ampera/Chevy Volt inverter. Glad that some engineers with logic thinking worked on this. Nice separate powerstage, needs 5v for control and gets it power from the HV bus.
One big difference is that it is active low instead of active high. Not an issue since this can be set in the pwm menu, so tomorrow I will wire up an adapter loom for testing.

BE CAREFUL TO CHANGE THE POLARITY OF THE CONTROLLER IC BEFORE HOOKING IT UP TO THE INVERTER !!!

at reset (also on first turn-on) it turns off all PWM outputs based on the setting it has at the time. So a blank chip will pull all PWM outputs low, and
in your case turn on all output transistors. So change the polarity before hooking up the output stage.
 
That is why it is in bold in my document. :D
Program chip, then hookup the powerstage. Keeps everything nice and safe, need to get some holes in the motor busbars to bolt up the cables instead of using the clamping with the oem connector.
 
Gentlemen,

I have got it working, however the faults I was seen remain. This means I will create a new pcb that now buffers the outputs and has an isolated dc-dc to power the chip and a normal supply for the gate driver. I hope this will solve my issues, I will be posting my layout in this thread for feedback before committing to getting it made.

Kind of frustrating, but hey at least I got a little bit of spinning action out of the inverter without blowing it up. :D

[youtube]JzUUDTXzZoU[/youtube]
 
Will this be strictly for high voltage or will it work well on lower voltage, say, 200-250V ? You are really getting with it on these oem conversions.
 
the ampera inverter works above 30v as I stated on diy electric car forum.

The board design I am thinking of doing will most likely be my aim to have a drop in replacement for the main board in this inverter. Still have to decide if I want two lebowski chips controlled by an other IC, or whether i am making two separate lebowski boards and think about getting a master contoller later.

Below are a wip schematic and layout, could anyone please provide some feedback.

Added more 47u caps to the dc-dc side, only question is how large a dc-dc is needed to provide the 5v for the Ic?

Should the unused pins of the IC be tied to ground?
Btw. current issue is that the IC hangs after the FOC measurement, so it needs to be reset to get back to the main menu.

Looking at arlo's setup it is easy to see why he has less issues with interference. Nice short leads and good grounding through the motor and inverter practically sharing a case.
 
I think only pin 22 is unused, but this is configured as an output so should not be grounded.

When pin 22 is high the chip is calculating, when low it is waiting for the next period of f_sample, I use it to see how busy it is...
 
Because I am not measuring the phase voltages, the battery voltage and hall sensors should I wire those pins to ground? Currently in my schematic they are just floating.
 
Unbelievable, there is something really haunting me with this project.

Decided to go for broke, isolated 5v supply however decided tie the groundplane to the inverter casing just like the original brainboard. why test at 50v, just go for broke 220v it is. And she does run foc properly set at 8kerpm and 5 amps. :D

For reasons like this I am not an electronics engineer by trade but a mechanical engineer.

Update: for some reason I ran out of luck again, it does not want to run the FOC calc again without getting an overflow. Will try later again with just the minimal connections to the IC.

v2.9
Code:
0xFFFF	0xFFFF	0x795E	0x0080	0xCCFF	0x6D6B	0x1114	0x000A
0x0000	0x07AE	0x0018	0x0000	0x01E0	0xFFFF	0xF852	0xFFE8
0x0000	0xFE20	0x0000	0x4CCD	0x0018	0x0000	0x01E0	0xFFFF
0xB333	0xFFE8	0x0000	0xFE20	0xFAB5	0xFF06	0xFFFF	0xFFFF
0x2916	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0096	0x3FF8	0x0207	0x0207
0x008C	0x008C	0x0343	0x001A	0x0019	0x000A	0x0033	0x0A3D
0xFFFF	0x7FBC	0x0000	0x0067	0x0033	0x03F1	0x03F2	0x0401
0x0BB7	0x0474	0x008F	0x0592	0x0006	0x0CF9	0xFFFE	0x0DC0
0x1000	0x0000	0x0000	0xF000	0x0000	0x0000	0x0167	0x01FA
0x0000	0x03FF	0x019C	0x0047	0x019C	0x0112	0x0418	0x0258
0x0064	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0003	0x0000	0x0078
0x0000	0x0000	0xFFFD	0x0000	0xFF88	0x0000	0x0000	0x0005
0x0000	0x0064	0xFFFB	0x0000	0xFF9C	0x000C	0x0000	0x00F0
0xFFF4	0x0000	0xFF10	0x02CC	0x2BEC	0x0714	0x019F	0x0044
0x0067	0x01BD	0x026F	0x000F	0x0010	0x0E10	0x0000	0x03E8
0x03B6	0x6000	0x007B	0x009B	0x4000	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0000	0x0000	0x0000
0x0005	0x2000	0xA14E	0x0002	0xECD8	0x0000	0xFFFF	0x0000
0xFF67	0x0000	0xFF2A	0x0000	0xFFFF	0xFFFF	0x0007	0x0005
0x0007	0x8000	0x0435	0x0000	0xF898	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0xFFFF	0x0000	0x0000
0x0000	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xAAAA	0x6666	0x4924	0x38E3	0x2E8B	0x2762
0x2222	0x1E1E	0x1AF2	0x1861	0x1642	0x147A	0x12F6	0x11A7
0x1084	0x0F83	0x0EA0	0x0DD6	0x0D20	0x0C7C	0x0BE8	0x0B60
0x0AE4	0x0A72	0x0A0A	0x09A9	0x094F	0x08FB	0x08AD	0x0864
0x0820	*
 
Tomdb said:
Because I am not measuring the phase voltages, the battery voltage and hall sensors should I wire those pins to ground? Currently in my schematic they are just floating.

Ah yes, those should go to ground. Especialliy a floating battery voltage pin can give all sorts of problems...
 
How is the controller working if you're not using the phase voltage and battery voltage or current sensor inputs? Doesn't the controller meed all those parameters for the control algorithms?
 
Animalector said:
How is the controller working if you're not using the phase voltage and battery voltage or current sensor inputs? Doesn't the controller meed all those parameters for the control algorithms?

It only needs the current sensor inputs... battery voltage is good to have but not absolutely necessary (but is one of the first things to connect when you have persistant problems)

Phase voltages are only used at startup (when selected) to check for always-on FETs...
 
looking at the schematic on page one:

phase voltages are pins 5 7 8
Hall sensors are pins 6 18 23

So these shall get tied to ground, not done currently :( did not read the data sheet properly.

However which pin reads the battery voltage I could not find it on the schematic. Doh, Hall pin 6 also doubles as batt input. currently floating, this might have been all my worries all along. We shall find out after my dinner.
 
Tomdb said:
looking at the schematic on page one:

phase voltages are pins 5 7 8
Hall sensors are pins 6 18 23

So these shall get tied to ground, not done currently :( did not read the data sheet properly.

That should be common sense the voltage you send to the brain board needs a reference. There is no way for the brain to know the current without both the + and ground signal sent back to the brain. Any time you have electricity and you want it to do something you need to complete the loop meaning you need at least 2 wires (2 paths) one in and one out of the source.

As for the Battery measurement. I did have mine tied to ground for a while but now I added it and the system does run different for sure. If its floating it will cause weird issues.
 
Tomdb said:
looking at the schematic on page one:

phase voltages are pins 5 7 8
Hall sensors are pins 6 18 23

So these shall get tied to ground, not done currently :( did not read the data sheet properly.

However which pin reads the battery voltage I could not find it on the schematic. Doh, Hall pin 6 also doubles as batt input. currently floating, this might have been all my worries all along. We shall find out after my dinner.
I think you're looking at an old schematic, in the first post of this thread there is a PDF schematic for 2.30 .
Here phase voltage pins are 5, 7 and 8. Halls are 23, 25 and 26. Pin 18 is best connected with 4700 ohm to the 5v, this pin is both input and output for the temp sensors. And finally battery measurement is pin 6, which can be grounded if not in use.
 
I connected pin 5 6 7 9 18 and 23 to ground. Will add 25 and 26.

Also wrapped the inter connects to the gate drivers with alutape, and grounded these to the lebowski board. Now currently the v2.9 chip only gives me an overflow error. A chip on version 2.5 just hangs after the FOC test.

Can the calculation go wrong if the current sensor scale is set wrong? Might also try measuring a higher current to get a bigger voltage difference on the sensor output.
 
Lebowski, thank you for helping out. And also all the other guys.

I was about to throw the towel in before Christmas, but it was nagging me that something basic must have been missing. I did a evening of tracing the connectors on the oem logic board. Turns out the current sensors are connected with 5k to ground, i of course did not have that. So I wired some 4.7k resistors between current sense and ground. Oh my she be a working, no more overflow during foc. Plus she spins nice, after dicking around getting the propper startup settings back on the chip ofcourse. And yes I did film it, will upload when on youtube :D

running V2.90 with this setup

Code:
0xFFFF	0xFFFF	0x795E	0x0020	0xA1B3	0x4177	0x033C	0x000A
0x0000	0x07AE	0x0018	0x0000	0x01E0	0xFFFF	0xF852	0xFFE8
0x0000	0xFE20	0x0000	0x4CCD	0x0018	0x0000	0x01E0	0xFFFF
0xB333	0xFFE8	0x0000	0xFE20	0xFAB5	0xFF06	0xFFFF	0xFFFF
0x2916	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x01DA	0xA92F	0x0207	0x0207
0x008C	0x008C	0x0343	0x001F	0x0019	0x000A	0x0033	0x0A3D
0xFFFF	0x7FBC	0x0000	0x0089	0x0044	0x03F8	0x03F9	0x03F8
0x0BB7	0x0474	0x008F	0x0592	0x0006	0x0CB9	0xFFFF	0x0DC0
0xF000	0x0000	0x0000	0x2000	0x0000	0x0000	0x0167	0x01FA
0x0000	0x03FF	0x0225	0x001B	0x02AF	0x0112	0x0418	0x0258
0x0064	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0003	0x0000	0x0078
0x0000	0x0000	0xFFFD	0x0000	0xFF88	0x0000	0x0000	0x0005
0x0000	0x0064	0xFFFB	0x0000	0xFF9C	0x000C	0x0000	0x00F0
0xFFF4	0x0000	0xFF10	0x02CC	0x279D	0x0205	0x026F	0x0044
0x0067	0x01BD	0x026F	0x000F	0x0010	0x0E10	0x0000	0x03E8
0x03B6	0x6000	0x00A4	0x009B	0x4000	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0000	0x0000	0x0000
0x0005	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000	0x0000
0x0000	0xFFFF	0xAAAA	0x6666	0x4924	0x38E3	0x2E8B	0x2762
0x2222	0x1E1E	0x1AF2	0x1861	0x1642	0x147A	0x12F6	0x11A7
0x1084	0x0F83	0x0EA0	0x0DD6	0x0D20	0x0C7C	0x0BE8	0x0B60
0x0AE4	0x0A72	0x0A0A	0x09A9	0x094F	0x08FB	0x08AD	0x0864
0x0820	*
 
Tomdb said:
Lebowski, I did a evening of tracing the connectors on the oem logic board. Turns out the current sensors are connected with 5k to ground, i of course did not have that. So I wired some 4.7k resistors between current sense and ground. Oh my she be a working, no more overflow during foc. :D


Do you have a sch?

I have mine set up like this.

10v into the sensor which gives out 5v at 0amps

I from there take a 1k resistor from the output to another 1k from the controller side of the output to ground which is a 2:1 divider and that gives a 2.5v output at 0 amps.
 
[youtube]7cJJQT425fo[/youtube]

She spins good. :D



What i did is top left header the pins are as follows:

GND
Cur A
GND
Cur B
GND
Cur C

So I addded a resistor literally between direct output from sensor and ground only because it was this way on the original logic board. Reason most likely is due to needing a current draw to create a stable voltage output from the sensor.
 
Hi Bas,

We have gone through the 2.90 manual and put in all the settings we have thought appropriate and then tried to run the motor (for hall calibration) but we are getting nothing except for led 1 in response from the controller.

below is the rom dump, can you have a look and see whether there is something we have missed, many thanks.

Code:
version:292_
0x7FBC.0x7D2E.0x0031.0x0030.0x0645.0x1B54.0x05C4.0x0045
0x000F.0x1000.0x001E.0x2000.0x795E.0x0080.0x8B67.0x000A
0x0000.0x07AE.0x0018.0x0000.0x01E0.0xFFFF.0xF852.0xFFE8
0x0000.0xFE20.0x0000.0x4CCD.0x0018.0x0000.0x01E0.0xFFFF
0xB333.0xFFE8.0x0000.0xFE20.0x01C6.0x00DB.0x001E.0x0017
0x34EE.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0x0000.0xFFFF.0xFFFF.0x0061.0x202A.0x0028.0xFFFF
0x00A2.0xFFFF.0x0040.0x0029.0x0028.0x0028.0x0000.0x0001
0x0014.0x0000.0x00F5.0x007A.0x0400.0x0400.0x0400.0x02ED
0x0375.0x0009.0x0453.0x0007.0x1F9A.0xFFFE.0x02D0.0x1000
0x0000.0x0000.0xFFFF.0xFFFF.0xFFFF.0x00A4.0x02C5.0xFFFF
0xFFFF.0x03D6.0x0031.0x01EB.0x00F5.0x0548.0x0258.0x0064
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0x0003.0x0000.0x0078.0x0000
0x0000.0xFFFD.0x0000.0xFF88.0x0000.0x0000.0x0005.0x0000
0x0064.0xFFFB.0x0000.0xFF9C.0x000C.0x0000.0x00F0.0xFFF4
0x0000.0xFF10.0x0A00.0x0639.0x01E6.0x01E3.0x01EB.0x0050
0x0159.0x01E3.0x000C.0x0010.0x0E10.0x07D0.0x03B6.0x6000
0x0126.0x0079.0x4000.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF.0xFFFF
0xFFFF.0xFFFF.0xFFFF.0x0000.0x0000.0x0000.0x0005.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000
0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0x0000.0xFFFF
0xAAAA.0x6666.0x4924.0x38E3.0x2E8B.0x2762.0x2222.0x1E1E
0x1AF2.0x1861.0x1642.0x147A.0x12F6.0x11A7.0x1084.0x0F83
0x0EA0.0x0DD6.0x0D20.0x0C7C.0x0BE8.0x0B60.0x0AE4.0x0A72
0x0A0A.0x09A9.0x094F.0x08FB.0x08AD.0x0864.0x0820.*
 
Can't check your hex. But what did you set the throttle and regen throttle to?
That has gotten me a few times.
 
Back
Top