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

Electric Motors and Controllers
Post Reply
User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 09 2012 3:22pm

I'll have a look at running calibration on 2 current sensors before the controller goes into drive_3.... Also
will try to install Python on my windows XP machine to see if I can write a real-time data capture and plot
program...

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Mar 11 2012 3:38pm

not sure how usefull it its, but maybe this can help you with the python data capture
http://www.blendedtechnologies.com/real ... python/231
http://eli.thegreenplace.net/2008/08/01 ... thon-guis/

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Mar 11 2012 5:45pm

just finished a pcb for the controller
albis controller board (2).jpg
albis controller board (2).jpg (130.85 KiB) Viewed 3267 times
the only thing missing are the filters for the hall sensors. (will update this tomorrow)

all i need to do now is mirror and scale the artwork for the tonor transfer

i can post a pdf file here if anyone is interested?

User avatar
Arlo1   100 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 11 2012 8:10pm

Cool niles. So.... I tried with the 7kw colossus (80-100) and no luck sesnros are glued so then I went to the big colossus and got it to calibrate the coils but its still glitchy and I can not get termite to comunicate right when I first open it. And I push the reset button and it does nothing even though it should I have to cycle the main power to get termite to comunicate.

Code: Select all

.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-00	-.5400
.5000	000	..5200	00	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400


a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> b] 

Spin the motor then press any key to start measurement
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
ÿ






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------>  

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> a 

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> c 

hall 1, hall 2, hall 3
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	-.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
-.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	-.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400


a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------>  

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------>  

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> z 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b] 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b] 

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture successfull
 data arrays now contain sampled back-emf waveforms

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> c 

 data arrays now contain reconstructed back-emf waveforms

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d 

data A, data B, data C
.9232	-.3459	-.6034
.9382	-.3807	-.5799
.9514	-.4144	-.5557
.9615	-.4473	-.5300
.9674	-.4798	-.5018
.9684	-.5119	-.4705
.9638	-.5438	-.4355
.9537	-.5752	-.3966
.9385	-.6063	-.3539
.9190	-.6367	-.3076
.8964	-.6665	-.2583
.8718	-.6958	-.2066
.8463	-.7245	-.1535
.8209	-.7528	-.0997
.7960	-.7805	-.0458
.7721	-.8077	.0073
.7488	-.8343	.0593
.7259	-.8599	.1097
.7028	-.8842	.1584
.6790	-.9066	.2051
.6542	-.9267	.2497
.6279	-.9440	.2924
.5999	-.9579	.3329
.5704	-.9680	.3716
.5393	-.9742	.4085
.5067	-.9763	.4437
.4725	-.9744	.4775
.4366	-.9686	.5101
.3988	-.9593	.5421
.3585	-.9467	.5733
.3154	-.9312	.6045
.2692	-.9130	.6355
.2196	-.8927	.6669
.1669	-.8702	.6983
.1116	-.8458	.7300
.0544	-.8201	.7616
-.0035	-.7931	.7927
-.0609	-.7652	.8229
-.1165	-.7368	.8517
-.1692	-.7082	.8785
-.2183	-.6796	.9029
-.2635	-.6514	.9246
-.3049	-.6233	.9431
-.3431	-.5953	.9581
-.3789	-.5670	.9698
-.4135	-.5377	.9776
-.4478	-.5069	.9819
-.4827	-.4737	.9823
-.5186	-.4374	.9789
-.5557	-.3975	.9717
-.5935	-.3536	.9607
-.6313	-.3056	.9458
-.6679	-.2540	.9273
-.7027	-.1994	.9055
-.7345	-.1425	.8806
-.7630	-.0846	.8533
-.7878	-.0268	.8242
-.8094	.0297	.7941
-.8280	.0840	.7637
-.8448	.1355	.7337
-.8605	.1838	.7049
-.8759	.2286	.6775
-.8916	.2703	.6516
-.9075	.3092	.6270
-.9233	.3457	.6033
-.9383	.3806	.5798
-.9515	.4143	.5556
-.9616	.4472	.5298
-.9676	.4797	.5016
-.9685	.5118	.4703
-.9640	.5437	.4354
-.9539	.5751	.3965
-.9386	.6062	.3537
-.9192	.6366	.3074
-.8966	.6665	.2582
-.8720	.6957	.2065
-.8465	.7244	.1534
-.8211	.7527	.0996
-.7962	.7804	.0458
-.7723	.8076	-.0074
-.7489	.8342	-.0594
-.7261	.8598	-.1098
-.7030	.8841	-.1585
-.6792	.9065	-.2052
-.6544	.9267	-.2498
-.6280	.9439	-.2925
-.6001	.9578	-.3330
-.5705	.9679	-.3717
-.5394	.9741	-.4086
-.5068	.9761	-.4438
-.4726	.9742	-.4776
-.4367	.9684	-.5103
-.3990	.9591	-.5422
-.3587	.9465	-.5734
-.3156	.9310	-.6046
-.2694	.9129	-.6356
-.2198	.8925	-.6669
-.1671	.8700	-.6984
-.1117	.8457	-.7301
-.0545	.8199	-.7617
.0033	.7929	-.7928
.0608	.7650	-.8230
.1164	.7366	-.8517
.1691	.7080	-.8786
.2182	.6795	-.9030
.2634	.6512	-.9247
.3048	.6232	-.9432
.3429	.5952	-.9582
.3788	.5668	-.9698
.4133	.5376	-.9777
.4476	.5068	-.9819
.4826	.4735	-.9824
.5185	.4373	-.9791
.5556	.3973	-.9718
.5934	.3534	-.9609
.6312	.3055	-.9460
.6679	.2539	-.9275
.7026	.1992	-.9057
.7345	.1424	-.8807
.7630	.0845	-.8535
.7877	.0267	-.8244
.8093	-.0298	-.7943
.8279	-.0841	-.7638
.8447	-.1357	-.7339
.8604	-.1840	-.7051
.8759	-.2288	-.6777
.8915	-.2704	-.6517
.9075	-.3093	-.6271

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
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
Arlo1   100 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 11 2012 8:29pm

I have to be honest I dont understand how to determin these?

Code: Select all

b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0709
d) amplitude loop integrator coefficient: 3.0000
Is it based on inductance vs resistance. ? Industance is 8uh and Resistance is .09 ohms.
Last edited by Arlo1 on Mar 11 2012 11:40pm, edited 1 time in total.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
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
Arlo1   100 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 11 2012 10:53pm

Ok so I have another non responsive chip its likely something I did. so here is the scematic. Click the atached file to see a better picture.
I wonder if the crystal on the board is the problem?
Attachments
Capture layout (800 x 490).jpg
Capture layout (800 x 490).jpg (116.73 KiB) Viewed 4259 times
SCH-ET-BASE dsPIC30F.pdf
(31.49 KiB) Downloaded 174 times
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
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/

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Mar 12 2012 2:38am

Arlo1 wrote:I have to be honest I dont understand how to determin these?

Code: Select all

b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0709
d) amplitude loop integrator coefficient: 3.0000
Is it based on inductance vs resistance. ? Industance is 8uh and Resistance is .09 ohms.

these are the settings i used for the "small" colossus:
settings:
menu E:
b: 13.5 ( 3*1024/228 )
c: 0.02 ( 1024/(228^2) )
d: 0.6 ( 20000/458*0.002*38000 )
e:100%

x: 3*0.002*38000=228
y: 1024
this is for 20khz pwm with 38khz sample update
they work pretty well for sensorless push start. so start there.

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Mar 12 2012 3:30am

These are the calculated values for the big colossus as stated in the manual:
PWM frequency: 20khz
F sample: 38khz

x: 3*0.000089*38000=10
y: 1024


settings:
menu E:
b: 307.2 ( 3*y/x =>3*1024/10=307.2)
c: 0.02 ( y/(x^2) =>1024/10^2=10.24 )
d: 12.9 ( 20000/458*0.000089*38000 )
e:100%

you might want to upp the PWM frequency when using the big motor.

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 12 2012 5:07am

Arlo1 wrote:Cool niles. So.... I tried with the 7kw colossus (80-100) and no luck sesnros are glued so then I went to the big colossus and got it to calibrate the coils but its still glitchy and I can not get termite to comunicate right when I first open it. And I push the reset button and it does nothing even though it should I have to cycle the main power to get termite to comunicate.

Code: Select all

.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-00	-.5400
.5000	000	..5200	00	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400
.5000	.5200	-.5400

I don't like this bit, something happens here in the communication. Maybe the there was a powerglitch ?
I looked at the schematic of the board you're using, I don't think the Xtal is the problem though I don't like
its connected to pin 14 (where there's supposed to be the drive_0 LED).

Looking at the schematic, there's a ferrite between the 1000uF cap and the main processor. This ferrite
a little bit isolated the supply after it, meaning the chip does not 'see' the 1000uF (to a small extent).
Comined with the glitch in the communication, I would solder at least 4 caps around the main processor,
preferably 47 uF or something like that (more of 10 uF or less of 100 uF should also be good).

I've seen really weird stuff hapenning when there's not enough capacitance. I remember the first time
testing the PWM, I would only see groups of 3 PWM pulses on the scope. I thought I programmed something wrong,
something which turned the PWM on and off. When I zoomed out though I saw the groups were 50 msec or
so apart and I realised the chip was resetting itself after 3 PWM pulses because the supply dropped (caused
by the sudden PWM activity). I added 200 uF worth of caps and this took care of the issue...

I wonder whether the problem lies with the MAX3232 interface chip, it has a lowest max rating of 120 kbaud, close
to the 115.2 kbaud I'm using. I also wonder whether it needs some toggling on the lines to get the boodstrap
supply going, I don't know never used these chips myself. If you got some bipolar transistors lying around i would
disconnect the MAX3232 and connect directly to RF4 and 5. The resetting difficulties you have are definitely not
normal.

It's a pity you did not plot the raw back-emf data (output the data arrays immediately after the back-emf sampling),
only the reconstructed version.... The reconstructed looks good though, not really sinewaves but good 120 degree
spacing. Same goes for the halls, looks good.
Screenshot.jpg
Screenshot.jpg (46.88 KiB) Viewed 4237 times
I would calculate the parameters you mentioned in your post with an LR_delay of 0.5 msec, the 0.089 msec (8u/0.09) from the
L and R values you post seems scarely low :D .

The new chips go in the mail this afternoon, you're getting the updated version 1.01 . This version has as extra features
the pulsing of the low side FET's during drive_0 (see new manual which I will post later this week in the very first post
of this thread). Also it has the possibility to store the calibration data of the current sensors by pressing the setup
button during motor use (also see updated manual)

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 12 2012 7:55am

nieles wrote: i can post a pdf file here if anyone is interested?
Yes please :D

Maybe put in 2 more 47uF or so decaps and add a TO220 style 7805 for the supply ?
You can always replace the 7805 with a wire if you don't need it...
How about moving the connector in the top right a bit more to the top and adding
a 47uF next to the 100nF that is already there. Maybe add the transistor RS232 interface,
again, no need to put the components in when you don't need them but some people might...

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 12 2012 2:16pm

I posted an updated schematic and user manual in the first post of this thread (version 1.01).
RC filters where added in the hall sensor lines. The user manual explains the extra options in
the version 1.01 controller IC's.

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Mar 13 2012 5:33pm

made some changes to the layout and added some parts.

in the bottom right should be some room for a 7805.
i will make a new version with the 7805 added.

as for size reference the pcb is 59x89mm
albis controller board 1.1 (1).jpg
albis controller board 1.1 (1).jpg (130.81 KiB) Viewed 4180 times
this is a pdf file in A4 format for tonor transfer etching a pcb.
albis controller pcb 1.2 (8x mirrored for etch).pdf
(340.67 KiB) Downloaded 139 times
(adjust the scaling to 100% and measure with the 30f chip if all 40 holes match on a test print first!)

i kept the corners clean, to mount the pcb. if you do this, keep in mind the copper is the GND plane

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 26 2012 2:45am

last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate
driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage
generation, after startup it supplies itself from the generated 5V / 18V
DSC00732.jpg
DSC00732.jpg (94.55 KiB) Viewed 4100 times

User avatar
Arlo1   100 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Arlo1 » Mar 27 2012 12:45am

Lebowski wrote:last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate
driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage
generation, after startup it supplies itself from the generated 5V / 18V
DSC00732.jpg
Very cool lebowski! Ill be back on this soon very soon! The kinda good news is I have major issues with my usb-serial converter tonight trying to program my car so. I will look at buying or finding another usb-serial converter.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
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
fechter   100 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by fechter » Mar 27 2012 8:29am

Lebowski wrote:last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage generation, after startup it supplies itself from the generated 5V / 18V
I've been trying to find something simple that does that for quite a while. I've looked at various off line switching chips like the Viper as a buck converter. Here's a datasheet:
http://www.st.com/internet/com/TECHNICA ... 279018.pdf
The problem I had was making work at lower voltages, but some kind of startup supply could solve that. The Viper has almost everything you need in one chip, and it's cheap.
"One test is worth a thousand opinions"

Teh Stork   1 kW

1 kW
Posts: 461
Joined: May 25 2011 8:02am

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Teh Stork » Mar 28 2012 1:00pm

Having the same problems myself. I need very little current from my driver, but I need 10V and 3,3V. I've been leaning towards LDO regulators as they are cheap and easy to impement. Gate drivers draw very little (I think about 1mA each) and the 5V output doesn't need to be strong either. Any suggestions?
2013 VW E-UP!
Kona mtb: Cromotor, Kelly KEB, ~6kW peak, 1,4kWh 90V battery 29E cells, 38 kg

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Mar 29 2012 5:11am

Well, I build the circuit in the way I did because I already had all the components. It uses a simple 8 pins PIC processor which
has a 0.6 V reference inside. The 150V is buck-converted down to 18 V and then a second converter takes it from
18V down to 5V.

Both 18V and 5V are divided down to 0.6V with resistors.This then goes (first one, then the other) to the comparator
to be compared with 0.6V. If it's too low the 12F617 will generate a 10 usec pulse (folowed by a mandatory 20 usec
wait before a possible next pulse) on the appropriate output.

For the 18V the pulse goes through the high-side driver part of a NCP5181 (standard gate driver IC) and controls
the gate of a 4115. The 4115 is the switch in a standard buck converter.
For the 5V the pulse goes through the low-side driver of the 5181 into a PMOS 5210 power transistor (which I still had
lying around). The PMOS is the switch in a standard buck converter which is supplied from the 18V.

The 2 chips are supplied via diodes from the 18V and 5V or a 5V / 17V zener diode generated voltage. It starts up from
the zener voltages, then the diodes switch to the 18V/5V once these are higher than the zener voltages.

On startup the 12F617 waits one second to allow all voltages to come up (as the current though the zener is only 1 mA),
all capacitors especially in the gate driver circuit get the change to pre-charge. The first few pulses run of the pre-charge
until the 18V is 'strong' enough to take over.

I don't know about using LDO's, I think you really have to look for a specific type that can handle the high voltage and
the high dissipation. I didn't have any like that...

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Apr 01 2012 2:02pm

finally got around making the pcb!
IMG_20120331_205040 (1).jpg
IMG_20120331_205040 (1).jpg (86.87 KiB) Viewed 3467 times
but i have a problem programming the controller chips. i get the main menu in thermite (without pressing "enter") when i reset the controller,
but when i want to select an option (eg. going to menu d) the controller does not respond.

i tried inverting both the rx and tx but this didnt help.

i tried it with both chips (v1 and v1.01) but both have the same problem.

what i will try tomorrow:

check the board for faults
double check my schematics
ground any unused pins on the controller chip
add more caps to the 5v rail


if this doesnt work, i will go back to the breadboard and see if i can get the programming working

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Apr 01 2012 2:49pm

sounds like you're receiving OK but the TX from the PC to the chip does not work, maybe this one is inverted somehow ?
It used to work on the breadboard ? Maybe the gnd and tx pins are interchanged ?

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Apr 01 2012 3:04pm

tried it with the tx (pc side) inverted and non-inverted.. nothing

also checked the traces.. it looks right. tx to rx, rx to tx, gnd to gnd

yes, both chips worked a week ago when everything was still on the breadboard.. very weird

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Apr 03 2012 4:36pm

after an other evening of trouble shooting, i have narrowed it down to my new pcb.

i went back to my breadboard and was be able to program the chip. this rules out: my serial adapter, the chip itself and my termite settings.
i also tested the chip with only one 100nf and one 100uf capacitor, and was still be able to go in to programming mode. i have 3 100nf and 3 47uf capacitors on the pcb, so that is not the problem either

tomorrow i will check my schematics and my pcb for faults, then i am out of ideas to try
does anyone have any suggestions i could try?

one more observation i made when trying to program the chip while on the pcb; when i do an reset i get the main menu instanly.
normally i have to press "enter" first, an the controller then responds by sending the main menu.
so this tells me the board is somehow receiving a signal and interprets it as a "enter"

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Apr 04 2012 12:44am

I still have the feeling you're plugging in your FT232 board 180 degrees rotated. If you look at your
board layout (the first one , march 12, 12.45 AM), the TX (from chip to the PC) is in the middle with the gnd
on top and the RX (signals coming from the PC) at the bottom. If you rotate your FT232 180 degrees
the TX to the PC is still in the middle but your ground is connected to the RX and the RX to gnd.

As long as you don't type anything the RX is quiet and acts like a GND, the PC still receives characters
correctly because the TX pin is the middle one. When you type something then all goes wrong...

nieles   10 kW

10 kW
Posts: 682
Joined: Jul 14 2008 5:39pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Post by nieles » Apr 04 2012 1:58am

copper side, board side.JPG
copper side, board side.JPG (60.01 KiB) Viewed 3454 times
this is what the copper looks like next to the board.(i have flipped and rotated the copper so it is in the same direction as the board)

so from the top we have gnd,tx,rx

i am 100% sure i plugged gnd to the top pin of the programming header

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Apr 04 2012 11:59am

Schematic of my 18V / 5V power supply:
DSC00735.jpg
DSC00735.jpg (71.75 KiB) Viewed 3433 times
DSC00736.jpg
DSC00736.jpg (100.46 KiB) Viewed 3433 times

User avatar
Lebowski   1 GW

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

Re: Lebowski's motor controller IC, schematic and setup manu

Post by Lebowski » Apr 05 2012 2:36pm

Complete controller PCB now finished :D ain't she a beauty :mrgreen:
I decided to put everything on one eurocard PCB (initially I planned to use
an old laptop supply for the low voltage domains but i put on my own supply).

To wire it up it has the battery supply (far left), the three motor wires
and the three throttle wires. That's it !

The one in the picture is build with minium 150 V components (4115's etc etc)
and is build for max 20 A phase current amplitude (which all boils down to
around 2 kW effective).

Soldering the whole thing was a bitch though, lots and lots of work. Therefore
after my bike build I'll design a PCB (using KiCad) which can be processed
at Olimex to make beautiful professional circuit boards. First a 6 FET, maybe
later a 12 FET version. I think a 6 FET with 4110's can easely handle 4 to 6 kW....

The board has my controller IC, a 12F617 as the power supply brain, 5181's
1.5 Amp FET gate drivers, all high voltage FET's are neatly snubbed and have
200 nsec switch on times (4115's) and 100 nsec switch off times.

now I have to wrap a box around it and complete my bike (new thread coming :D )
DSC00737.jpg
DSC00737.jpg (102.52 KiB) Viewed 3413 times

Post Reply