build your very own Lebowski controller !

Futterama said:
So the controller IC will basically put out a perfect drive waveform regardless of motor back-EMF shape, it kinda matches the drive waveform to the back-EMF?
No, that is not what I wrote in the previous post. It will try to match the waveform by changing phase and amplitude of a sine (but trying = not succeeding), plus this is not what you want anyways...

But what you're saying is a goal for which I have several strategies planned, but I want to try them out in Labview (modelling) to see if they work before implementing a working strategy
 
Futterama said:
Oh, I just thought the perfect drive waveform for a motor would match the back-EMF waveform.

Nope :D and funnely enough (yey ! :( ) the perfect drive waveform will be throttle and speed dependent....

slowly I'm starting to grow out of the 16bit DSPIC...
 
Take a look at Cypress PSoC 4 or 5LP Lebowski (48MHz+, 32 bit ARM core, "mini CPLD", analog blocks, huge internal switch matrix, totally free IDE). It's 1.8-5.5V but I think there are no DIP versions, smallest is 28pin SOIC or something.
 
Lebowski said:
The features of the reverse are similar to v1.xx. The reverse pin is treated as a request for reverse. When you flip the reverse switch, power from the motor is removed
or a pre-set regen braking force is applied. Any regen throttle is still processed and will slow the motor (vehicle) down with even stronger regen braking if the throttle
requested braking is stronger than the pre-set regen. (note: the preset regen level can be made 0, effectively spooling down the motor unbraked when requesting a direction
change). Once the erpms drop below a preset level, the request for reverse is granted and full power is again available to drive the motor in reverse.
8) That sounds like it will work for me. Regen level O is the only option to actually get a change of direction?
 
Miles said:
Lebowski said:
The features of the reverse are similar to v1.xx. The reverse pin is treated as a request for reverse. When you flip the reverse switch, power from the motor is removed
or a pre-set regen braking force is applied. Any regen throttle is still processed and will slow the motor (vehicle) down with even stronger regen braking if the throttle
requested braking is stronger than the pre-set regen. (note: the preset regen level can be made 0, effectively spooling down the motor unbraked when requesting a direction
change). Once the erpms drop below a preset level, the request for reverse is granted and full power is again available to drive the motor in reverse.
8) That sounds like it will work for me. Regen level O is the only option to actually get a change of direction?
No, setting the regen on reverse current to 0A means the motor will spool down unbraked before reversing. If you set the regen on reverse current to 10A it the motor will
spool down with a negative or braking phase current of 10A (the equivalent energy is put in the battery). The 10A braking current will mean the motor will slow
down much much faster than if there was no braking current, so it'll be quicker to change rotation direction...
 
Njay said:
Take a look at Cypress PSoC 4 or 5LP Lebowski (48MHz+, 32 bit ARM core, "mini CPLD", analog blocks, huge internal switch matrix, totally free IDE). It's 1.8-5.5V but I think there are no DIP versions, smallest is 28pin SOIC or something.

I need a DIP version, and the two most important 'specs' are actually the PWM module (must
be 6 channel for motors, preferably with the possibility to have a deadtime as long as the
cycle time) and the ADC module (must be capable of taking at least 3 samples at the same time).
As far as the CPU goes, a fast (one cycle) multiplier is a must.

I've actually been dreaming about a ARM / FPGA combo where the PWM module can be custom build
in the FPGA part. I know VHDL so making the PWM module is no problem. At the moment the DSPIC
PWM module is not as I want it as it doesn't have the long deadtime I would like...

At the moment on an error current event, the controller effectively shuts down to drive_0, and waits
for the motor to come to a complete stop. Very long deadtime as described above would make
it possible to re-aquire the motor and start powering it again, without the need to come to a full stop....
 
Lebowski said:
If you set the regen on reverse current to 10A it the motor will
spool down with a negative or braking phase current of 10A (the equivalent energy is put in the battery). The 10A braking current will mean the motor will slow
down much much faster than if there was no braking current, so it'll be quicker to change rotation direction...
That's what I wanted to hear :D
 
Miles said:
Lebowski said:
If you set the regen on reverse current to 10A it the motor will
spool down with a negative or braking phase current of 10A (the equivalent energy is put in the battery). The 10A braking current will mean the motor will slow
down much much faster than if there was no braking current, so it'll be quicker to change rotation direction...
That's what I wanted to hear :D

With your application in mind I tried my little RC motor, first 98k-erpm one
way then flip reverse to get it to spin 98 k-erpm the other way. It really spools down
very fast if you set a forced regen level, but it overvolted my 65V supply to 100V (luckely
didn't blow it up :| ) All sensorless without the HF tone, while keeping it at full throttle...
 
Lebowski said:
With your application in mind I tried my little RC motor, first 98k-erpm one
way then flip reverse to get it to spin 98 k-erpm the other way. It really spools down
very fast if you set a forced regen level, but it overvolted my 65V supply to 100V (luckely
didn't blow it up :| ) All sensorless without the HF tone, while keeping it at full throttle...
Looking forward to playing with this.... :)
 
Wheazel said:
How well does the high frequenzy signal from the controller work for determining rotor position?
Is the method as good as a sensored setup or does it have drawbacks? Apart from the possible noise.

It cannot deliver full torque as part of the phase current is necessary for the HF tone. How good it works depends on the motor.
Effectively you cannot give it full throttle but only partial throttle at standstill.
 
Personally I wouldnt need full throttle from 0, it just sounds very appealing overall to get some benefits from a sensored setup, without rebuilding motors.
So far I have been fine with sensorless due to a centrifugal clutch(motor spins freely until n rpm) also using the weakest springs possible so engagement is early and soft.
Would probably use a centrifugal clutch with a sensored system anyway because I think it is a great component for smaller ~1kg motors.

You dont happen to have a comparision video/soundfile between this sinwave controller and a regular oldschool controller at full throttle on a large outrunner rc motor?
 
Lebowski said:
Njay said:
Take a look at Cypress PSoC 4 or 5LP Lebowski (48MHz+, 32 bit ARM core, "mini CPLD", analog blocks, huge internal switch matrix, totally free IDE). It's 1.8-5.5V but I think there are no DIP versions, smallest is 28pin SOIC or something.

I need a DIP version, and the two most important 'specs' are actually the PWM module (must (...)

Their free IDE (PSoC Creator) has a Verilog compiler, or you can draw a schematic. I think the programmable logic is actually configured through registers as any other peripheral, so the Verilog compiler is probably generating C code for register configuration (which also means you can re-configure the logic at runtime).

I'm not sure if PSoC 4 (http://www.cypress.com/?docID=46322) family 4200 covers your needs, but this prototyping board would give you a "dip" version (mouser.com has this for around 6.50€ in single quantities): http://www.cypress.com/?rid=92146

This is probably a more explanatory short introduction to PSoC 4 (you would want a 4200): http://www.cypress.com/?docID=48521
 
Lebowski just curious if I picked up tx rx for the rs232 from the locations highlighted in the photo (basically directly off the chip)

tx.png

Does that not give me a uart signal or is it inverted? I am looking to capture this with a raspberry pi and it seems silly to pump up the voltage to rs232 levels for my project just to drop it back down after a few hundred mms of travel.

Looking at your guide for the ic what letter would I send to the ic to get back information that could be transferred into rpm?

Thanks
 
You can pick up the RS232 RX and TX straight from the chip but then the signals are inverted. The little transistor stages act as inverters to make the polarity
correct. The little stages are also +- 15V tolerant...

For the speed variable you need to send the letter for 'phi_int'. When you send the letter the chip will give you a constant stream of data, 16 bit wide. It is meant
for me to do debug, the data can be plotted realtime to see what is going on. In your case, with a constant data stream you have to watch out you're not losing
track of which of the 8 bit bytes is the MSB and LSB. Best is to send the letter for 'phi_int', grab the first two bytes and then shut down the data transmission by sending
a '*' (any non-letter character will do).

To go from 'phi_int' to motor speed:

erpm = phi_int * f_sample / 1092

with f_sample the loop sampling rate (typically something around 40kHz)
 
Njay said:
Lebowski said:
Njay said:
Take a look at Cypress PSoC 4 or 5LP Lebowski (48MHz+, 32 bit ARM core, "mini CPLD", analog blocks, huge internal switch matrix, totally free IDE). It's 1.8-5.5V but I think there are no DIP versions, smallest is 28pin SOIC or something.

I need a DIP version, and the two most important 'specs' are actually the PWM module (must (...)

Their free IDE (PSoC Creator) has a Verilog compiler, or you can draw a schematic. I think the programmable logic is actually configured through registers as any other peripheral, so the Verilog compiler is probably generating C code for register configuration (which also means you can re-configure the logic at runtime).

I'm not sure if PSoC 4 (http://www.cypress.com/?docID=46322) family 4200 covers your needs, but this prototyping board would give you a "dip" version (mouser.com has this for around 6.50€ in single quantities): http://www.cypress.com/?rid=92146

This is probably a more explanatory short introduction to PSoC 4 (you would want a 4200): http://www.cypress.com/?docID=48521
it sure looks like a nice chip :D but the cpld part is not that elaborate, I don't think it'll be enough to implement a motor PWM section.
 
They have new parts (automotive grading) in that family on the roadmap production-ready Q3 this year, which have USB, CAN, double the CPLD size, double the OPAMP numbers plus more flash/ram and few more things, may be worth a look later in the year.
 
Back
Top