MicroPilot

MicroPilot Autopilot Users Group

Hello Everyone!

I try to run the autopilot MP2128HeliG2 in trueHWIL setup. After load a simulation to the xPC Target computer I run the Autopilot and I got a lots of errors from sensors. The message gathered from Terminal is:
[1B][2J[1B][0;0HFATAL ERRORS:
Watchdog CRC Mismatch[1B][K
x accl failed [1B][K
Accl Temperatures Failed[1B][K
GPS config error[1B][K
Compass is enabled but is not installed.[1B][K
[1B][K
WARNINGS:
Autopilot loaded with non-release code.[1B][K
[1B][K
Lockd 11.3V 0.0V
spd= 17
z acc=854
compass hdg=0 0 0 0
I tried to run the calibration trueHwil Control Centre program to calibrate sensors. When I load the callibration_2128.thprj file and tried to load it to run the simulation I got the error of different numbers of parameters between downloaded model to target PC and parameter file. In result I cannot load the model to xPC Target computer to run the calibration. In xPC Target I have this message:

Download started...
Download finished
Mismatch between model and kernel versions


Is the calibration proces necessary for those Horizon fatal errors? If Yes then how I can solve the problem with calibration program problem? 

Thanks for any advices
Regards

Janusz

Views: 1297

Attachments:

Reply to This

Replies to This Discussion

Hi Janusz,

I did not realize you are using the new 400 Hz servo board. With this, the fast servo mode MUST be set to fast servos 1-10. So go in to your VRS, flight B tab and set fast servo mode = 5 - Fast servos 1-10. Then transmit that VRS to your autopilot and power cycle.

Then perform the test again. But first disconnect the 4 3 pin (black, red, yellow) connectors from the servo board. Then probe the S1, S2, S3, S4 pins on the servo board. Hopefully you should now be seeing 30 Hz PWM signals with high times that match the servo zero setting. Then re-connect those 4 3 pin connectors to S1, S2, S3, S4 and do the previous test again. If you're still not getting expected results, trace back the 4 yellow wires and let me know what pins they go to on the digital interface board. Send some pictures showing these connections as well.

Hi Kevin,

When we bought autopilot MP2128HeliG2 in this year we got also the 400Hz servo-board so I connected it to the whole setup. We still have the older servo-board for the fixed wing autopilot so we can switch it if it is needed. When I changed the fast servo mode the signals from s1,...,s4 from oscilloscope looks much better. Frequencies of all signals was near 30Hz. I sent You the screens for all four signals in pdf file. I connected again J18, J14, J15 and J16 plugs and performed the test with the sliders. And now the values responded adequately. The values for Elevator and Rudder behave in reverse direction that You described. So do we need to invert the direction of those servos?

I checked if this modification has an influence on the Horizon simulation. And I runed it in the standard start up, after pressing the Power on button the Horizon program could be armed (after clearing the Pitch gyro fatal error). And then simulate fixed wing finally could take off. It traveled correctly between waypoints, and I managed to land in starting point. So it is a big success.

Now we have few questions about the next steps. If we want to swich againg to the old fixed wing autopilot for some experiments then could we use the new 400Hz servo-board, or we should stay with the older version?

Do we need to perform the calibration process again after we set the proper 400Hz servo-board fast mode?

Because we for now used the vrs from fixed wing model so now we probably should return to the 2015b_THWIL_2_Heli_with _GPS_ACK project?

What we could do to fix the Pitch gyro fatal error? It still occures every time I run the horizon program. I don't think that we should ignore it every time. So maybe it is some way to fix it.

Thanks for Your help. We couldn't run it without Your commitment.

Attachments:

Hi Janusz,

"So do we need to invert the direction of those servos?"

No, I wouldn't worry about that since it's flying fine.

" And then simulate fixed wing finally could take off. It traveled correctly between waypoints, and I managed to land in starting point. So it is a big success."

That's great news!

"If we want to swich againg to the old fixed wing autopilot for some experiments then could we use the new 400Hz servo-board, or we should stay with the older version?"

It's up to you. Either servo board will work with either autopilot. If using the old servo board, the fast servo mode must be disabled. If using the new 400 Hz servo board, the fast servo mode must be set to fast servos 1-10. If you do decide to use the old servo board, note that the servo connectors are not in the same positions.

"Do we need to perform the calibration process again after we set the proper 400Hz servo-board fast mode?"

No. The calibration process has nothing to do with servo outputs.

"Because we for now used the vrs from fixed wing model so now we probably should return to the 2015b_THWIL_2_Heli_with _GPS_ACK project?"

Yes. Make sure to remember to transmit "THWIL_Heli_Fast_Servo.vrs" if using the new servo board. This .vrs has fast servo mode = fast servos 1-10. And since this is a helicopter, servo 5 is collective pitch so make sure to make the S5 connection on the servo board.

"What we could do to fix the Pitch gyro fatal error? It still occures every time I run the horizon program. I don't think that we should ignore it every time. So maybe it is some way to fix it."

I'll look in to this more and get back to you.

Hi Kevin, 

In the mean time i tried to run this verified model for fixed wing autopilot directly in Matlab simulink program. And when I built the project it didn't finish because of some error during creating xml file. Could You maybe know where we can  find the configuration options for this xml files? I checked options in simulink program, but i couldn't find this inncorrect path. So i assume that this will probbably inside one of the model files.

Best regards,
Janusz 

Attachments:

Hi Janusz,

"Could You maybe know where we can  find the configuration options for this xml files?"

This is because the .mat file contains the path. The .mat files are temp files that you can delete.

Please delete all the .mat file and have another try.

Hi Kevin,


This appoach works and Matlab model were built correctly, so thanks again for Your help. 

"And since this is a helicopter, servo 5 is collective pitch so make sure to make the S5 connection on the servo board."

I was wondering about this connection of S5. Because i didn't have anything connected in S5 on servo board, so maybe this is the source of this Fatal Pitch gyro error. I checked manual and I saw that for Servo 5 I have to add the Jumper at 3 in digital interface. Is this what You meant? 

Regards,
Janusz

 

Hi Janusz,

Regarding the POST pitch gyro failure issue:

I'd like you to check both the self test (ST) signals and the pitch gyro signal.

1) J21/J23 pin 3 is ST2. It's normally 0 and goes to 5 V three times during the POST "testing gyros" phase. See attached screenshot. See if your signal looks the same.

2) J21/J23 pin 5 is ST1. It's normally 0 and goes to 5 V six times during the POST "calculating VRS CRC" phase. See attached screenshot. See if your signal looks the same.

3) J34 pin 2 is pitch gyro. It goes high once then low 6 times during the POST "testing gyros" phase. See attached screenshot. See if your signal looks the same.

J21.3%20ST2.JPG

J21.5%20ST1.JPG

J34.2%20pitch%20gyro.JPG

Hi Janusz,

"I was wondering about this connection of S5. Because i didn't have anything connected in S5 on servo board, so maybe this is the source of this Fatal Pitch gyro error. I checked manual and I saw that for Servo 5 I have to add the Jumper at 3 in digital interface. Is this what You meant? "

No, that's not what I meant, but you are right, and a jumper needs to be added to 3 in the digital interface. You also need to connect J44 to S5 on the servo board. This has no impact on the pitch gyro failed fatal error. 

Hi Kevin,

After self tests it's look like the ST2 is the same. The ST1 rise only four times. And the Pitch gyro signal only rise three times. You can see the exact shapes in the attached bitmaps. 

The J44 plug we have from fixed wing setup so there wasn't pin 3 in the plug. So probably i could bypass it with external wire directly from Servo5, up to Pin S3 inside a Digital Box and with the Jumper connect it with AD3. Is this apprach will be enough to run multirotor simulation correctly? Because this missing connection didn't influence pitch gyro error, so maybe for now we don't have to correct it. 

Best regards,
Janusz

Attachments:

Hi Janusz,

I don't know why your ST1 only rises four times and your pitch gyro signal rises three times while mine rose one time and fell 6 times. I will investigate this further when I have time. 

"The J44 plug we have from fixed wing setup so there wasn't pin 3 in the plug. So probably i could bypass it with external wire directly from Servo5, up to Pin S3 inside a Digital Box and with the Jumper connect it with AD3. "

Yes, this is what you must do. 

"Is this apprach will be enough to run multirotor simulation correctly?"

I thought you were trying to run a helicopter simulation. The helicopter simulation requires servos 1-5. For multirotor simulations, it depends on how many rotors are configured in the VRS. You can have 4 rotors, 6 rotors or 8 rotors. For example, for a quadrotor (4 rotors), when the VRS Heli tab heli mode = quadrotor A, the servos tab says servo 1 = Front right rotor, servo 2 = back right rotor, servo 3 = back left rotor, servo 4,5,6 unused. Servo 7 = front left rotor and servo 8 unused. So you'd need have connections from the servo board S1, S2, S3, S7 to the digital box in order to run a quadrotor simulation. 

"Because this missing connection didn't influence pitch gyro error, so maybe for now we don't have to correct it. "

Again, the servo connections have nothing to do with the pitch gyro failing the self test. 

Hi Kevin,

We are counting that You will find the reasons of those self tests differences. 

About my multirotor message, when You mentioned about connection of Servo 5 and digital box i tried to find the clues in "Manual_trueHWIL2_UsersGuide" and only in multirotor chapter were some informations about Servo 5. So that is why i mention about it. And You have right that we want to run the Helicopter simulation. So for now we will wait for Your investigation about ST1. 

Best regards,
Janusz

RSS

Share

© 2024   Created by MicroPilotNingAdmin.   Powered by

Report an Issue  |  Terms of Service