09-28-2016, 12:36 AM
|
#2851 (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
|
Oh good point. Yes, the same would be true for the DC controller (the big bertha DC controller with the ATTiny)
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
10-09-2016, 03:16 PM
|
#2852 (permalink)
|
Ale Madeo
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
|
"ACControlBoardDebugging"
hello,
almost already I have a pcb to test.
I need to know how the code "ACControlBoardDebugging" works.
It has functional UART?
It makes some feedback control, or just crank the motor?
What are the steps for starting up my board?
thanks to all
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
|
|
|
10-14-2016, 11:37 AM
|
#2853 (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
|
Hello! I'm sorry, I've been away in Oregon at work. We just got back yesterday. All that debugging code does is set the PWMs of all 6 outputs to a fixed value, so you can measure the voltage from gate to emitter on each of the 6 PWMs. You can even just use a volt meter. That way, if all 6 of them are somewhere between -8.2 and +15 (far away from -8.2 and far from +15), you know the PWM is working, and that the hardware is good to go. Actually, make sure there is no motor and no batteries hooked up during that test. Leave the 3 phase cables unconnected. Also, if you just have the standalone board with no IGBTs, to avoid a false desat fault, you will have to temporarily have C1 connected to E1 connected to C2 connected to E2 connected to C3 connected to E3. You will also have to have a throttle plugged in, as well as the 3 current sensors. Only then will the PWMs make it all the way to the output.
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
10-23-2016, 05:14 PM
|
#2854 (permalink)
|
Ale Madeo
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
|
Quote:
Originally Posted by MPaulHolmes
Hello! I'm sorry, I've been away in Oregon at work. We just got back yesterday. All that debugging code does is set the PWMs of all 6 outputs to a fixed value, so you can measure the voltage from gate to emitter on each of the 6 PWMs. You can even just use a volt meter. That way, if all 6 of them are somewhere between -8.2 and +15 (far away from -8.2 and far from +15), you know the PWM is working, and that the hardware is good to go. Actually, make sure there is no motor and no batteries hooked up during that test. Leave the 3 phase cables unconnected. Also, if you just have the standalone board with no IGBTs, to avoid a false desat fault, you will have to temporarily have C1 connected to E1 connected to C2 connected to E2 connected to C3 connected to E3. You will also have to have a throttle plugged in, as well as the 3 current sensors. Only then will the PWMs make it all the way to the output.
|
Thanks Paul!
I can´t compile the "ACControlBoardDebugging".
I`m working on MPlab IDE V8.60 and i have the C30 compiler install. In fact, I can compile without problems the code "ACController".
I think this missing some file, I have the "ACController.h", "P30F4011.h", "uart.c" and "uart.h".
I copy down all warnings and errors:
Quote:
ACControlBoardDebugging.c:20: warning: missing braces around initializer
ACControlBoardDebugging.c:20: warning: (near initialization for 'savedValuesDefault.spares')
ACControlBoardDebugging.c:24: warning: missing braces around initializer
ACControlBoardDebugging.c:24: warning: (near initialization for 'savedValues.spares')
ACControlBoardDebugging.c:28: warning: braces around scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:28: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:28: warning: (near initialization for 'savedValuesDefault2.throttleType')
ACControlBoardDebugging.c:31: warning: braces around scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:31: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:31: warning: (near initialization for 'savedValues2.throttleType')
ACControlBoardDebugging.c:118: error: syntax error before 'RTData'
ACControlBoardDebugging.c:118: warning: type defaults to 'int' in declaration of 'RTData'
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: excess elements in scalar initializer
ACControlBoardDebugging.c:118: warning: (near initialization for 'RTData')
ACControlBoardDebugging.c:118: warning: data definition has no type or storage class
ACControlBoardDebugging.c: In function '_ADCInterrupt':
ACControlBoardDebugging.c:398: error: 'THROTTLE_FAULT_COUNTS' undeclared (first use in this function)
ACControlBoardDebugging.c:398: error: (Each undeclared identifier is reported only once
ACControlBoardDebugging.c:398: error: for each function it appears in.)
ACControlBoardDebugging.c:503: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:504: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:505: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:505: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:506: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:506: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:509: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:510: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:511: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:515: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:515: error: 'piType' has no member named 'P'
ACControlBoardDebugging.c:515: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:515: error: 'piType' has no member named 'I'
ACControlBoardDebugging.c:515: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:518: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:519: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:520: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:524: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:524: error: 'piType' has no member named 'P'
ACControlBoardDebugging.c:524: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:524: error: 'piType' has no member named 'I'
ACControlBoardDebugging.c:524: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:527: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:528: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:531: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:532: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:535: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:536: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:539: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:540: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:544: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:545: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c: In function 'InitPIStruct':
ACControlBoardDebugging.c:627: error: 'piType' has no member named 'P'
ACControlBoardDebugging.c:627: error: 'SavedValuesStruct' has no member named 'Kp_Id'
ACControlBoardDebugging.c:628: error: 'piType' has no member named 'I'
ACControlBoardDebugging.c:628: error: 'SavedValuesStruct' has no member named 'Ki_Id'
ACControlBoardDebugging.c:629: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:630: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:631: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c:633: error: 'piType' has no member named 'P'
ACControlBoardDebugging.c:633: error: 'SavedValuesStruct' has no member named 'Kp_Iq'
ACControlBoardDebugging.c:634: error: 'piType' has no member named 'I'
ACControlBoardDebugging.c:634: error: 'SavedValuesStruct' has no member named 'Ki_Iq'
ACControlBoardDebugging.c:635: error: 'piType' has no member named 'error'
ACControlBoardDebugging.c:636: error: 'piType' has no member named 'pwm'
ACControlBoardDebugging.c:637: error: 'piType' has no member named 'errorSum'
ACControlBoardDebugging.c: In function 'ComputeRotorFluxAngle':
ACControlBoardDebugging.c:750: error: 'MAX_RPS_TIMES16' undeclared (first use in this function)
ACControlBoardDebugging.c:751: error: 'RPS_FAULT' undeclared (first use in this function)
ACControlBoardDebugging.c: In function 'FetchRTData':
ACControlBoardDebugging.c:1323: error: request for member 'throttle' in something not a structure or union
ACControlBoardDebugging.c:1324: error: request for member 'temperatureBasePlate' in something not a structure or union
ACControlBoardDebugging.c:1326: error: request for member 'IdRef' in something not a structure or union
ACControlBoardDebugging.c:1327: error: request for member 'Id' in something not a structure or union
ACControlBoardDebugging.c:1328: error: request for member 'IqRef' in something not a structure or union
ACControlBoardDebugging.c:1329: error: request for member 'Iq' in something not a structure or union
ACControlBoardDebugging.c:1330: error: request for member 'pdc1' in something not a structure or union
ACControlBoardDebugging.c:1331: error: request for member 'pdc2' in something not a structure or union
ACControlBoardDebugging.c:1332: error: request for member 'pdc3' in something not a structure or union
ACControlBoardDebugging.c:1333: error: request for member 'RPS_times16' in something not a structure or union
ACControlBoardDebugging.c:1334: error: request for member 'batteryCurrentNormalized' in something not a structure or union
ACControlBoardDebugging.c:1335: error: request for member 'faultBits' in something not a structure or union
ACControlBoardDebugging.c: In function 'EESaveValues':
ACControlBoardDebugging.c:1340: error: 'SavedValuesStruct' has no member named 'Kp_Id'
ACControlBoardDebugging.c:1341: error: 'SavedValuesStruct' has no member named 'Ki_Id'
ACControlBoardDebugging.c:1342: error: 'SavedValuesStruct' has no member named 'Kp_Iq'
ACControlBoardDebugging.c:1343: error: 'SavedValuesStruct' has no member named 'Ki_Iq'
ACControlBoardDebugging.c: In function 'MoveDataFromEEPromToRAM':
ACControlBoardDebugging.c:1425: error: 'SavedValuesStruct' has no member named 'Kp_Id'
ACControlBoardDebugging.c:1426: error: 'SavedValuesStruct' has no member named 'Ki_Id'
ACControlBoardDebugging.c:1427: error: 'SavedValuesStruct' has no member named 'Kp_Iq'
ACControlBoardDebugging.c:1428: error: 'SavedValuesStruct' has no member named 'Ki_Iq'
ACControlBoardDebugging.c:1443: error: 'SavedValuesStruct' has no member named 'Kp_Id'
ACControlBoardDebugging.c:1444: error: 'SavedValuesStruct' has no member named 'Ki_Id'
ACControlBoardDebugging.c:1445: error: 'SavedValuesStruct' has no member named 'Kp_Iq'
ACControlBoardDebugging.c:1446: error: 'SavedValuesStruct' has no member named 'Ki_Iq'
ACControlBoardDebugging.c:1462: error: 'SavedValuesStruct' has no member named 'Kp_Id'
ACControlBoardDebugging.c:1463: error: 'SavedValuesStruct' has no member named 'Ki_Id'
ACControlBoardDebugging.c:1464: error: 'SavedValuesStruct' has no member named 'Kp_Iq'
ACControlBoardDebugging.c:1465: error: 'SavedValuesStruct' has no member named 'Ki_Iq'
|
thanks
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
|
|
|
10-26-2016, 02:36 AM
|
#2855 (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 I've changed the code so there's no need for a separate debugging program. Now you just type
debug 1
and that turns on debug mode. To turn it off, you type
debug 0
Make sure no motor is attached when you do that. Then you can measure the voltages from each gate to source.
I tried to make a new github thing for it, and I can't friggen figure out how to add files to it. I don't know if they changed how it's done, but I don't know how now.
This code is tested with the Leaf motor and an induction motor. I hate github. there, I said it. haha.
edit: Well, I tried to make a new somethingOrOther, and that failed, but I was able to edit the other files in the existing "somethingOrOther", so now they have updated code.
Last edited by MPaulHolmes; 10-26-2016 at 02:50 AM..
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
10-26-2016, 10:37 AM
|
#2856 (permalink)
|
Ale Madeo
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
|
Thank you very much Paul!!
only a humble comment, I think in the uart.c file on github it´s the uart.h header code, so i replace this with n old that i have save on my pc.
Now almost compiling, just throw me two errors in uart.c:
UART.c: In function 'ProcessCommand':
UART.c:138: error: 'PERMANENT_MAGNET_AC_MOTOR_WITH_ENCODER' undeclared (first use in this function)
UART.c:138: error: (Each undeclared identifier is reported only once
UART.c:138: error: for each function it appears in.)
UART.c:143: error: 'PERMANENT_MAGNET_AC_MOTOR_WITH_RESOLVER' undeclared (first use in this function)
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
|
|
|
10-26-2016, 11:44 AM
|
#2857 (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
|
Oh dang it. OK I fixed github. Now try it. I think yesterday I pasted into uart.c twice. Once for uart.c, and then once for uart.h.
|
|
|
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
|
|
10-31-2016, 02:29 PM
|
#2858 (permalink)
|
Ale Madeo
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
|
Hi arber333,
I don´t have that board, but on AD2S1210 datasheet say that pin 47 is "Voltage Reference Output" and on the analog devices evaluation board "EVAL-AD2S1210SDZ" is not connected, only goes to a testpoint.
Paul surely going to help you.
Now I have a question for Paul and another forum members, I have my hardware controller finish and my dspic communication works good, there any way to disable failures? Because, I don´t have the desat fail conected and another thinks, and my controller protect the hardware triggering the alarm and dosent works.
thanks
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
|
|
|
10-31-2016, 05:25 PM
|
#2859 (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
|
The settings are 115200bps, 8 data bits, no parity, 1 stop bit. (8N1). To get a list of commands just hit '?' and then <enter>.
|
|
|
10-31-2016, 05:28 PM
|
#2860 (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
|
Settings are 115200bps, 8N1 (8 data bits, no parity, 1 stop bit). type '?' and then hit <enter> to see a list of commands.
|
|
|
|