03-16-2016, 12:37 PM
|
#2651 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Ya, you are going to have to have no resistance on the lines. And You can still tune the PI loop with as low as 12vDC bus. I wouldn't do testing with 300vDC.
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
03-16-2016, 12:41 PM
|
#2652 (permalink)
|
EcoModding Lurker
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
|
Quote:
Originally Posted by MPaulHolmes
Ya, you are going to have to have no resistance on the lines. And You can still tune the PI loop with as low as 12vDC bus. I wouldn't do testing with 300vDC.
|
My next tests are going to be with 48v with no bulbs in series
I think you know that I'm running the code with the dspic30f6010a .
I have another question that my encoder is 1024 ppr but I have to configure with 2048 tick per Rev. To get correct speed...
In the code I defined generic Ac induction motor
|
|
|
03-16-2016, 12:52 PM
|
#2653 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Type the following in realterm (or whatever serial streaming software you are using):
stream-poscnt 1
data-stream-period 100
Then, make one complete revolution (turning the motor slowly by hand), noting the starting value for poscnt and the ending value for poscnt.
The difference between the 2 values for poscnt will be 4 times the resolution of your encoder.
Last edited by MPaulHolmes; 03-16-2016 at 01:05 PM..
|
|
|
03-16-2016, 01:21 PM
|
#2654 (permalink)
|
EcoModding Lurker
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
|
Quote:
Originally Posted by MPaulHolmes
Type the following in realterm (or whatever serial streaming software you are using):
stream-poscnt 1
data-stream-period 100
Then, make one complete revolution (turning the motor slowly by hand), noting the starting value for poscnt and the ending value for poscnt.
The difference between the 2 values for poscnt will be 4 times the resolution of your encoder.
|
ticks per rev: 1024 clockwise rotation
00000,
00000,
00000,
00001,
00002,
00000,
00001,
00003,
00001,
00002,
00003,
00000,
00002,
00004,
00000,
00001,
00002,
00000,
00002,
00003,
00000,
00001,
00002,
00000,
anticlockwise:
00000,
65535,
65534,
00000,
65535,
65533,
00000,
65534,
65532,
00000,
65533,
65531,
65535,
65533,
65535,
65534,
65532,
00000,
65534,
65533,
65535,
65534,
65534,
00000,
00000,
ticks per rev: 2048 clockwise rotation
00000,
00000,
00000,
00001,
00001,
00002,
00000,
00002,
00002,
00001,
00002,
00000,
00001,
00003,
00000,
00002,
00004,
00000,
00001,
00002,
00001,
00001,
00003,
00000,
00001,
00003,
00000,
00001,
00003,
00000,
00000,
00000,
00000,
anticlockwise:
00000,
00000,
65529,
65534,
65531,
00000,
65534,
65532,
00000,
65534,
65532,
65535,
65534,
65535,
65535,
65534,
65533,
65534,
65534,
00000,
65535,
65534,
00000,
00000,
|
|
|
03-16-2016, 01:25 PM
|
#2655 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
OK, the encoder isn't working. The encoder ticks per revolution setting doesn't matter for this part. This should just be recording the ticks the controller is receiving from the encoder. And it's staying at 0 +/- 3 ticks.
|
|
|
03-16-2016, 01:45 PM
|
#2656 (permalink)
|
EcoModding Lurker
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
|
Quote:
Originally Posted by MPaulHolmes
OK, the encoder isn't working. The encoder ticks per revolution setting doesn't matter for this part. This should just be recording the ticks the controller is receiving from the encoder. And it's staying at 0 +/- 3 ticks.
|
I will check and let you know
But signals with oscilloscope are OK on encoder... What is causing the problem
|
|
|
03-16-2016, 02:32 PM
|
#2657 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
I would check the pinout. Like, is qea going to index, or whatever. and do the signals go from 0 to 5v? index is ignored, by the way.
|
|
|
03-16-2016, 06:28 PM
|
#2658 (permalink)
|
EcoModding Lurker
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
|
Quote:
Originally Posted by MPaulHolmes
I would check the pinout. Like, is qea going to index, or whatever. and do the signals go from 0 to 5v? index is ignored, by the way.
|
hello paul i just tested the encoder... it is working but i noticed that output A,B of encoder gives me 4 volt and on dspic pins we have: 0 - 3.8 volt.. is it ok?
|
|
|
03-17-2016, 03:50 AM
|
#2659 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
Build log for my DC controller
March 16.
We got the various test stuff moved out to the golf cart:
- battery cables
- motor cables
- contactor
- controller
- throttle
- laptop to program the controller
We got everything checked, loaded up the debug code
did a first spin
then loaded the production code
repeated the spin
did a first run with the golf cart
did a speed run with max speed at 24V, at 100A max battery amps
decided not to mess with parameters, tuning
Paul released version 1.10 - stable release
I think he`s posting to Github
Raw video - before editing
https://youtu.be/xXwJUlZ6tFM
WE HAVE A SUCCESSFUL TEST!!!
|
|
|
The Following 2 Users Say Thank You to thingstodo For This Useful Post:
|
|
03-17-2016, 12:38 PM
|
#2660 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Hurray! It worked! Michael is so much fun to work with! Notice that the power section is identical to the AC controller. The only difference is what board plugs into the IGBTs.
shaggy:
4v? Are you powering the control board with 4 volts?
|
|
|
|