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

got my chip in yesterday, one quick question. Its an uart output soI can hook it up to an serial to usb converter, like an empy arduino uno board right? Or does it require the rs232 conversion?
 
okay, when i send a charachter via termite, it bounces back the same character.

Pin 1 has to be pulled to 5 volts right? (called enable on the schematic)

When powered on,drive 0 turns on. I set the setup jumper, pin 19 to ground. And hit reset (pin 1 to ground with button) drive 0 goes off.

Sorry guys, rookie mistake again. (lets blame it on the some what stressful workweeks)

Grounding your reciever chip helps alot with high speed serial. Had this same issue with my diy bms system :lol:
 
yes I did. Built myself a nice little test setup using a Honda IMA inverter gen 2. Which turns out to have some what smart controllers. I will probably have to cut some traces to get even more control, but for testing it should not be an issue.

Motor now makes ticking noises in when turned on, drive 0 is lit. For the rest it does not spin, or trip the inverter. The strange thing is nothing changes on throttle increase.

Did some settings, set the start mode to sensor less calibrated the throttle and set some guess values that should be alright for an first spin. However I must add the test motor is this inrunner at the moment, https://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=48176. Any settings that would make life easier for me to get it sorted?

Got a few questions, please keep in mind I have had the inverter spinning with an diy induction motor controller board:
-Do the high and low side actualy need to be high and low or having them swapped make a big difference?
-Do the Drive signals and the current sensors need to match? (No clue on control strategy or self correction)

Hope to get my little motor spinning. Also running the current sensor calibration at the moment the inverter steps in and shuts down the gate drivers, so probally to agressive however I do not intend to use HF start right now so this does not need to be set.

Tomorrow I will take a look at the current sensor output maybe these are just too rough.
 

Attachments

  • DSC_02671.jpg
    DSC_02671.jpg
    224.3 KB · Views: 2,203
In drive_0 all it does is wait for throttle to be closed and it wants to see around 2.5V on the motor phase voltage feedback. This last in effect means the motor has to be (almost) standing still and all FETs must be off. So, if stuck in drive_0 make sure all these conditions are met. In drive 0 it has the option to pulse the output stage (options c,d and e in the miscelaneous menu) which is only necessary when you use a simple output stage driver like the IRS2186 (see manual). This is probably causing your clicking noise. In drive_0 it does not respond to throttle as it is waiting for a safe condition to start. In the recovery menu (options n, o) you can disable the safety checks.

Swapping the high and low side can have a big effect. If you swap them in effect the voltage for instance increases while the controller IC is trying to decrease it and vica versa. Instant blown fuse. It would be OK to reverse high and low side if you also reverse the direction through the current sensors. But just be very careful here and make 100% all the polarities are correct. And use a fuse !

For the same reason gate drive signals and current sensors must match. So PWM output for channel A controls the motor terminal that has the current sensor to channel A. THIS MUST BE 100% CORRECT !.
 
Thanks for the info. Will run over all my connections. I got a fuse right after the contactor.

However, the newest version chip does not need the phase voltage measurement right? So I do not have it connected, will turn off that check.

edit 31-12 3.40 pm

Sorted my connections, turned the check rotation to disable. It now switches to drive mode 1 however, at standstill the led for drive mode 0 flickers. Need to check if its due to the 5 volt line or its something else.
However when twisting the throttle it goes full into drive 0, makes me think its something else then the power. Plus need to accurately find out what the sensor range/signal is in mv/amp. Its an 5 volt sensor that is around 2.5 +/- 0.02v at 0 amps.

Could having the sensor reading be scaled incorrectly cause something like this?
 
Lebowski said:
If you want to have a look at the internal motor controller variables while the motor is running, I use the attached Labview program. I know Labview is available on torrent sites but I myself use the old Labview 6.1 running under Linux, as was once distributed by a German computer magazine. Googling 'labview free demo' links to a 45 day free trial, but I have not tried that one myself.
I have labview.

But how do I set it up? I down loaded the zip you sent as well and it opens with labview but not on its own?

What do I need to set up in the controller and in labview for it to work?
 
Lebowski said:
@ Arlo1, which labview version do you have ? Did you setup the RS232 port in Labview ?
LabView 2013

And Are you talking under the option for setup a remote panel?

otherwise I can't seem to find anything for an option to setup a com or rs232 port...
 
Have a look here

https://www.ni.com/getting-started/set-up-hardware/instrument-control/serial-connect

In the labview I sent you at the left of the schematic view it should have a reference to the channel, i think on my computer it is number 5 but you can change that. Which one did i sent, the variableviewer or the dashboard?
 
Lebowski said:
Have a look here

https://www.ni.com/getting-started/set-up-hardware/instrument-control/serial-connect

In the labview I sent you at the left of the schematic view it should have a reference to the channel, i think on my computer it is number 5 but you can change that. Which one did i sent, the variableviewer or the dashboard?
You posted veriableviewer but I think the dashboard would help a lot as well.
 
Tomdb said:
Thanks for the info. Will run over all my connections. I got a fuse right after the contactor.

However, the newest version chip does not need the phase voltage measurement right? So I do not have it connected, will turn off that check.

edit 31-12 3.40 pm

Sorted my connections, turned the check rotation to disable. It now switches to drive mode 1 however, at standstill the led for drive mode 0 flickers. Need to check if its due to the 5 volt line or its something else.
However when twisting the throttle it goes full into drive 0, makes me think its something else then the power. Plus need to accurately find out what the sensor range/signal is in mv/amp. Its an 5 volt sensor that is around 2.5 +/- 0.02v at 0 amps.

Could having the sensor reading be scaled incorrectly cause something like this?

I had a look at your hex, you did not calibrate for the FOC (menu i)

I see you've set it for 10mV/A, which would be for around 200 A sensors. Everything is scaled according to this, so the absolute value is not that important. For instance with 50A phase current you are basically saying that the phase current can be 25% of the sensor range. The controller IC does not care about how many Amps etc, it sees everything as so and so many % of current sensor range.

That it does not exit drive mode 1 makes me thing something is going on with the power stage. With the motor disconnected, did you use the PWM check function to make sure all 3 outputs work independently of each other (check for instance with 5%, 50% and 95% dutycycle). If you don't have a scope you can use a multimeter to check the terminal voltage is roughly dutycycle% times battery voltage.

Make sure the power stage is OK before running the FOC measurement !

It can be the controller is stuck in drive 1 because the current sensors are really off and need to be calibrated.

In drive_1 it basically waits for the currents to be less than specified in menu k, option h. If the current sensor offset is move than specified here it will not exit drive_1...
 
Arlo1 said:
Lebowski said:
Have a look here

https://www.ni.com/getting-started/set-up-hardware/instrument-control/serial-connect

In the labview I sent you at the left of the schematic view it should have a reference to the channel, i think on my computer it is number 5 but you can change that. Which one did i sent, the variableviewer or the dashboard?
You send veriableviewer but I think the dashboard would help a lot as well.

I will post the dashboard but once I've made it a bit more userfriendly... at the moment the constants are based on my own setup.
 
Lebowski.

You mention possibly removing the current sensor calibration. What if you add a feature that at every time the controller is reset or started it keeps all stages off while it looks at the current sensor voltages and set those to newtral.? I say this because I find mine to need to be recalibrated often to keep it from starting with a tick tick and bouncing between drive 1 and 2.
 
Arlo1 said:
Lebowski.

You mention possibly removing the current sensor calibration. What if you add a feature that at every time the controller is reset or started it keeps all stages off while it looks at the current sensor voltages and set those to newtral.? I say this because I find mine to need to be recalibrated often to keep it from starting with a tick tick and bouncing between drive 1 and 2.

As mentioned before I have my reservations now about the offset calibration, based on new insights...

During the offset calibration you can hear the motor makes a tone. What I do is during offset calibration it runs a tone through the motor, the purpose of which is to get rid of the magnetic hysteresis in the current sensors. The magnetic material in the sensors 'rememers' some magnetic field from the last time a current ran through it. You need to get rid of this if you want to know te real offset, so hence the tone.

Problem though (only know this recently), the tone combined with the motor inductance non-linearity makes for a DC current going through the motor and current sensors, making the offset measurement useless. This became especially clear to me when Izeman reported that one of his sensors apparently had a 200mV offset (even though the current sensor datasheet showed it should be less than 5 mV).

The amplitude of the tone is taken from the force position current in the currents menu, so you can play around with that one to see if it has an effect on the calibration values. But, to stop it jumping out of drive 2m, in the misc menu at the bottom are the parameters for jumping back from 2 to 1. You can increase the fixed part, this should help.

But you do have some extreme current sensors though, only 1.8mV per A. The controller IC only has 10 bit ADC's, so 5 mV per LSB. There is lots of signal processing which improves on this 10 bit, but, still ... I typically try to use at least half the range of the sensors, or, to have at least 1V amplitude out of the current sensors....
 
Lebowski said:
Arlo1 said:
Lebowski.

You mention possibly removing the current sensor calibration. What if you add a feature that at every time the controller is reset or started it keeps all stages off while it looks at the current sensor voltages and set those to newtral.? I say this because I find mine to need to be recalibrated often to keep it from starting with a tick tick and bouncing between drive 1 and 2.

As mentioned before I have my reservations now about the offset calibration, based on new insights...

During the offset calibration you can hear the motor makes a tone. What I do is during offset calibration it runs a tone through the motor, the purpose of which is to get rid of the magnetic hysteresis in the current sensors. The magnetic material in the sensors 'rememers' some magnetic field from the last time a current ran through it. You need to get rid of this if you want to know te real offset, so hence the tone.

Problem though (only know this recently), the tone combined with the motor inductance non-linearity makes for a DC current going through the motor and current sensors, making the offset measurement useless. This became especially clear to me when Izeman reported that one of his sensors apparently had a 200mV offset (even though the current sensor datasheet showed it should be less than 5 mV).
The problem with most current sensors is they need a voltage applied to produce the 2.5v at neutral but the 2.5v can be off a bit depending on all the power supplies. I have a supply for 5v for the brain one for 10v for the sensors and then 2:1 divider resistors. And if any of those components are off a touch it makes a big difference with my 1.8xx mv/a output/off set.
 
Arlo1 said:
The problem with most current sensors is they need a voltage applied to produce the 2.5v at neutral but the 2.5v can be off a bit depending on all the power supplies. I have a supply for 5v for the brain one for 10v for the sensors and then 2:1 divider resistors. And if any of those components are off a touch it makes a big difference with my 1.8xx mv/a output/off set.
So you also need to have the power supply to the sensors very stable...
 
Njay said:
Arlo1 said:
The problem with most current sensors is they need a voltage applied to produce the 2.5v at neutral but the 2.5v can be off a bit depending on all the power supplies. I have a supply for 5v for the brain one for 10v for the sensors and then 2:1 divider resistors. And if any of those components are off a touch it makes a big difference with my 1.8xx mv/a output/off set.
So you also need to have the power supply to the sensors very stable...
Yes I use a 13.8v power supply for everything. Then from there the 5v and the 10v isolated supplies on the brain have their own liner regulators. And the driver boards have their own separate isolated supplies for each high and low which comes from another liner regulator. I did it this way so I could adjust each section to the right voltage and I wanted to use isolated supplies everywhere and I wanted to make sure it was consistent.


The last video I posted I found a recalibration from 1 time I run the system to the next showed a very small difference and if it was magnetic hysterias or a small difference in a regulator its hard to say.
 
Arlo1 said:
Yes I use a 13.8v power supply for everything. Then from there the 5v and the 10v isolated supplies on the brain have their own liner regulators.
How about the grounds? If they move between the 5V and the 10V system you get a change in the sensor's output too.
 
As requested by Arlin, here the dashboard as used in the fieldweakening video

In the main dashboard labview, you need to change to the correct channel for your RS232:
rs232channel.png

in the main screen, set your parameters:
settings.png

to get a value, the program sends the correct character to the controller IC, reads the first two bytes (even though the controller outputs continuously, about 3500 16 bit values per second) and shuts down the transmission from the controller IC by sending a '!'
readvar.jpg
 

Attachments

  • dashboard.zip
    44.4 KB · Views: 27
Njay said:
Arlo1 said:
Yes I use a 13.8v power supply for everything. Then from there the 5v and the 10v isolated supplies on the brain have their own liner regulators.
How about the grounds? If they move between the 5V and the 10V system you get a change in the sensor's output too.
Yes. But when things are at rest the ground is the ground unless something looses connection.
 
Arlo1 said:
Njay said:
Arlo1 said:
Yes I use a 13.8v power supply for everything. Then from there the 5v and the 10v isolated supplies on the brain have their own liner regulators.
How about the grounds? If they move between the 5V and the 10V system you get a change in the sensor's output too.
Yes. But when things are at rest the ground is the ground unless something looses connection.

Stuff is never at rest in a controller. The chip by the way is not sensitive to the common offset in the current sensors, it only looks at the difference between the sensors. So in Arlo's case the 200mV has no effect, only the 10mV between the sensors. Groundbounce is also common and will have no effect.

This is one of the reasons for having 3 current sensors, common groundbounce and noise has no effect. I just cannot understand SEVCON etc etc all use only 2 current sensors,meaning it will be very sensitive to groundbounce and noise and no way to clean up the signals....
 
Lebowski said:
Stuff is never at rest in a controller. The chip by the way is not sensitive to the common offset in the current sensors, it only looks at the difference between the sensors. So in Arlo's case the 200mV has no effect, only the 10mV between the sensors. Groundbounce is also common and will have no effect.

This is one of the reasons for having 3 current sensors, common groundbounce and noise has no effect. I just cannot understand SEVCON etc etc all use only 2 current sensors,meaning it will be very sensitive to groundbounce and noise and no way to clean up the signals....

The first and second sensor are 40mv apart which is about 25 amps... That would make sense why it has issues before calibrating.
 
Yep, but as mentioned in my 10.08 pm post from yesterday, part of this 25mV is because of the tone combined with rotor position dependent inductor non-linearity, so it's not true offset. Have you tried measuring the offset with different rotor positions and different tone amplitudes ?

Back in the days of audio tape they used an hf tone for scrambling the hysteresis, but it was hf with decaying amplitude. Maybe i'll put that in....
 
Back
Top