#$%@$#@ <--- (insert favorite swearword here), IT WORKS !!!!

Electric Motors and Controllers

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby fechter » Wed Jan 11, 2012 9:20 am

[quote="Lebowski
I don't want to waste my time writing a fance windows GUI interface, plus I like the 80-ies BBS feel of it :mrgreen:[/quote]

I agree. Once you get it dialed in, there should not be much need for tweaking. As long as you can figure out how to enter the parameters properly I don't see a lot of value in a fancy GUI.

Are you planning to have any kind of display?
"One test is worth a thousand opinions"
User avatar
fechter
100 GW
100 GW
 
Posts: 9357
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Wed Jan 11, 2012 9:31 am

fechter wrote:I agree. Once you get it dialed in, there should not be much need for tweaking. As long as you can figure out how to enter the parameters properly I don't see a lot of value in a fancy GUI.

Are you planning to have any kind of display?


At the moment there's no setup for a display. There's no reason it shouldn't be possible in a next version though,
there's CAN bus communication so a second controller could ask the motor controller al kinds of questions. First
I'm concentrating on making my bike go :D

What it does have at the moment is RS232 out during motor use. There is 10 to 20 parameters inside the controller
which can be outputted over RS232 at a rate of around 4 kHz. Dependent on which parameter you want to view you
send a letter to the controller. This then starts sending back the 16 bit variable over RS232 to the PC where you can
real-time plot it in a graph (see also the 2nd video of the RC motor, on the laptop screen). It can transmit variables
like e-phase, motor current, control loop variables, effective throttle input, effective PWM amplitude etc etc. Send
another letter and it will output another variable, a letter out-of-range will shut down the RS232. Nifty, eh ?
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby etard » Wed Jan 11, 2012 10:18 am

Great work Lebowski! I can't believe the redneck in your avatar is the same guy who built this controller, this has got to be the most advanced piece of redneck engineering yet! :lol:

Redneck= good ol country boys, like the one in Lebowski's avatar.
Four wheels moves the body, Two wheels moves the soul
Thanks to Justin @ http://www.ebike.ca He brings the soul to ES
User avatar
etard
10 MW
10 MW
 
Posts: 2029
Joined: Sun Aug 03, 2008 3:28 pm
Location: Redlands, CA

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby fechter » Wed Jan 11, 2012 10:34 am

With RS232 output it wouldn't be too hard to make something that works on a Palm Pilot or similar to display useful parameters like current.
"One test is worth a thousand opinions"
User avatar
fechter
100 GW
100 GW
 
Posts: 9357
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Arlo1 » Wed Jan 11, 2012 10:40 am

fechter wrote:With RS232 output it wouldn't be too hard to make something that works on a Palm Pilot or similar to display useful parameters like current.

I have a couple rs232 db9 bluetooth adapters you can stream a wireless serial link to a bluetooth device and do what you need.
I set it all up a couple years ago for my roadrunner I can start it outside and sit on the couch and play with the tuning. I was looking at trying to make it work at the track so I can watch the cars I tune from the pits but bluetooth is not great for that.
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5227
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Hugues » Wed Jan 11, 2012 10:48 am

etard wrote:Great work Lebowski! I can't believe the redneck in your avatar is the same guy who built this controller, this has got to be the most advanced piece of redneck engineering yet! :lol:

Redneck= good ol country boys, like the one in Lebowski's avatar.


Actually there are 2 persons on the avatar picture, Lebowski could also be the woman :shock:
Hugues
Switzerland
Mountain bike
XC-204 -> Crystalyte HT3525/Infineon ctrlr 40 A EB712XC board/LiPo 88 V 10ah
All Terrain Vehicle
Hanebrink -> Crystalyte HS/Infineon ctrlr 20 A/Allcell Li-ion 36 V 10ah
Motor bike Cruiser
My build thread here
User avatar
Hugues
1 kW
1 kW
 
Posts: 441
Joined: Sun Aug 07, 2011 11:45 pm
Location: Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby parabellum » Wed Jan 11, 2012 12:53 pm

Hugues wrote:
etard wrote:Great work Lebowski! I can't believe the redneck in your avatar is the same guy who built this controller, this has got to be the most advanced piece of redneck engineering yet! :lol:

Redneck= good ol country boys, like the one in Lebowski's avatar.


Actually there are 2 persons on the avatar picture, Lebowski could also be the woman :shock:

There is video on page 5 where you can see Lebowkis reflection in the screen, definitely not the guy on the avatar! :D Thanks God!
User avatar
parabellum
10 kW
10 kW
 
Posts: 871
Joined: Fri Nov 19, 2010 9:55 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 12, 2012 4:19 am

ctirad wrote:Do you plan to make it comercially available some day?


That would be nice :D I don't know about selling complete controllers though it is an attractive
possiblity... At the moment I'm still finishing up the program, after that I'll send chips to people
that want to do beta testing :)

Because I'm also working on this for my own personal bike I'll make a sort of 'reference' design,
I'll post a schematic for how to build a controller with the 30F. This can be used to see how the
30F should be connected (if you want to plug it into an existing XieChang controller) or can be
used to build a controller from scratch. Just ordered $150 worth of 30F's, 4115's, NCP5181's,
20A versions of the ACP714's etc etc on digikey :D

Because of all the configurable variables and options in the controller I'll also write a sort of
manual explaining all the parameters, suggesting values and equations for calculating them.
The suggested equations for the parameters are basic (so if you just want to ride you'll have
no problem setting it up correctly) but allow room for your own experimentations as well.

Just a tip, I went to the town recycling centre last week to get rid of some paper and cardboard. I had
a dig through the electronics bin and found a 100-240V to 16.6 V / 2 Amps laptop charger. I tried
it on 65 V DC and it worked fine. I'll use this on my bike to go from 96V (ping) down to 16.6V
to power the PIC (via 1 Amp version of 7805) and FET drivers.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 12, 2012 4:30 am

parabellum wrote:There is video on page 5 where you can see Lebowkis reflection in the screen, definitely not the guy on the avatar! :D Thanks God!


I do play some banjo though ! :shock:

or at least I did 7 years ago...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby markobetti » Thu Jan 12, 2012 5:08 am

Lebowski , i sent pm to ya.. Please check
markobetti
10 kW
10 kW
 
Posts: 769
Joined: Fri Jul 17, 2009 1:28 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Thu Jan 12, 2012 8:04 am

so running sensorless after startup would mean the timing adjustment tool on another thread would not be required, you would be running at ideal timing
no matter the rpm?
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 12, 2012 8:12 am

whatever wrote:so running sensorless after startup would mean the timing adjustment tool on another thread would not be required, you would be running at ideal timing
no matter the rpm?


Yep, that's the idea
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby c_a » Thu Jan 12, 2012 10:07 am

At 6.000rpm you have 100 revs per second or 10ms per rev.

If the controller needs 100us (how much is this in reality?) for input, processing and output you have an angle failure of 3,6° with a 30P rotor (one pole each 12°) the failure is... ?
c_a
100 W
100 W
 
Posts: 242
Joined: Tue Jan 04, 2011 4:21 pm
Location: east germany, behind the wall

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Thu Jan 12, 2012 10:42 am

c_a wrote:At 6.000rpm you have 100 revs per second or 10ms per rev.

If the controller needs 100us (how much is this in reality?) for input, processing and output you have an angle failure of 3,6° with a 30P rotor (one pole each 12°) the failure is... ?


10msec per (mechanical) m-rev, 30P -> 10msec/15 = 666 :twisted: usec per e-rev.
input, processing, output takes around 10 to 12 usec -> once every 6.5 degrees of an e-rev....
Your output stage though needs to be able to handle at least 40 to 50 kHz PWM (the 30F
can update it's dutycycle 2 times per PWM period, dutycycle is allowed to change
between rising and falling edge)

With my background and work experience, I could do an FPGA version to go much, much faster :mrgreen:
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Fri Jan 13, 2012 6:01 am

came across this site
http://urun.gittigidiyor.com/elektronik ... p-39337642
lcd.jpg
lcd.jpg (72.01 KiB) Viewed 218 times


seems an lcd screen setup to go with 30f chip ( no idea what language or country its in)
excuse my lack of knowledge on this, but would it be possible to reprogram an xie-cheng chip to do the same as you are doing? is enough known on the xie-cheng chip
another link here referring to lcd with 30f ( i'll delete if not relevant)
http://320volt.com/dspic30f4011-ile-glc ... -analizor/
Last edited by whatever on Fri Jan 13, 2012 6:21 am, edited 1 time in total.
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Fri Jan 13, 2012 6:14 am

not sure if these diagrams are useful, but seems to be a 30f chip,
from this site
http://www.go-gddq.com/html/PICDanPianJ ... 551855.htm
( i'll delete this post if not relevant: let me know)
2.jpg
2.jpg (102.67 KiB) Viewed 497 times


pic1.jpg
pic1.jpg (86.62 KiB) Viewed 497 times
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Fri Jan 13, 2012 6:28 am

one more
http://140.116.40.178/mfhsieh/ch/en/study_02.htm
last one.jpg
last one.jpg (74.88 KiB) Viewed 494 times
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Fri Jan 13, 2012 7:05 am

the diagrams show a standard motor controller setup.. I don't think it's the xiechang circuit, the
diagrams from Markobettishow a gpm8f3108 chip....
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby markobetti » Fri Jan 13, 2012 7:14 am

Yes, the new xie chang boards use new chip. Old boards older chip. We for example have those boards with bigger chip and thats their new standard
markobetti
10 kW
10 kW
 
Posts: 769
Joined: Fri Jul 17, 2009 1:28 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Fri Jan 13, 2012 7:37 am

markobetti wrote:Yes, the new xie chang boards use new chip. Old boards older chip. We for example have those boards with bigger chip and thats their new standard

there's a lot of 8's in the name of the chip, is it an 8 bit ? I can't find any datasheet for it.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Fri Jan 13, 2012 9:38 am

theres a paper
Design and control of a multilevel inverter for electric vehicles
Arthur W. Matteson, Michigan State University
uses the 30f might be worth a read if anyone can find a copy on the net
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby whatever » Fri Jan 13, 2012 9:40 am

new xie cheng chip was 'in-house' apparently
whatever
10 kW
10 kW
 
Posts: 651
Joined: Thu Jun 03, 2010 2:16 am

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Arlo1 » Fri Jan 13, 2012 10:20 am

whatever wrote:theres a paper
Design and control of a multilevel inverter for electric vehicles
Arthur W. Matteson, Michigan State University
uses the 30f might be worth a read if anyone can find a copy on the net

We already have this going on my thread. See not simple BLDC controller.
I just switched from a dspic30f3010 to a dspic30f4011 mostly for the extra pins for more fetures but also because its more powerfull.
The reason I made it "multylevel" is because I want to be able to swap fets and not have to worry about a fet blowing and making a mess out ot the Brain stage.
I also figure this was I can build a little 6 fet for a bicycle or a multi fet monster for a motorcycle or can and use the same brain design, or even the same brain with a quick reflash!!
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5227
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Sat Jan 14, 2012 2:48 am

whatever wrote:new xie cheng chip was 'in-house' apparently


Hmmm, that would be something, to turn my algorithm into a custom IC....

This is actually my profession :mrgreen:
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: #$%@$#@ <--- (insert favorite swearword here), IT WORKS

Postby Lebowski » Sat Jan 14, 2012 4:41 am

busy adding the menu's for all the variables.

this is for PWM :
Code: Select all
1) PWM frequency: 21kHz
2) deadtime: 499ns
3) dutycycle testsignal: 50%
4) toggle high side polarity, now active HIGH
5) toggle low side polarity, now active HIGH
8) test PWM signals
9) return to main menu

options 4 and 5 are to adjust whether the controller gives out a logic 1 or 0 to turn
the output stage FETs on. A XieChang has active LOW for the high side FET and
active HIGH for the low side FET. Someone (like me) using NCP5181 drivers
needs both active HIGH.

Code: Select all
1) current sensor transimpedance: 3.32 milli-Ohm
2) maximum motor phase current: 600.0 A
3) maximum battery current, motor use: 350.0 A
4) maximum battery current, regen: 50.0 A
5) maximum shutdown error current, fixed: 10.0 A
6) maximum shutdown error current, proportional: 5.0 A
7) error current filter coefficient: 5
9) return to main menu

Above is the currents setup menu for a high power setup (600 amp sensors as C_A wants
to use), for my testing I use something much more moderate

Code: Select all
1) current sensor transimpedance: 100.00 milli-Ohm
2) maximum motor phase current: 4.0 A
3) maximum battery current, motor use: 1.5 A
4) maximum battery current, regen: 0.0 A
5) maximum shutdown error current, fixed: 0.1 A
6) maximum shutdown error current, proportional: 0.0 A
7) error current filter coefficient: 5
9) return to main menu

The resolution of the currents is 1/32 of an Amp and can go up to 2047 Amps.
Should be enough I think :D
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 4 guests