Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBUS out and I2C sensors not working #11221

Closed
multimensch opened this issue Jan 15, 2019 · 18 comments
Closed

SBUS out and I2C sensors not working #11221

multimensch opened this issue Jan 15, 2019 · 18 comments

Comments

@multimensch
Copy link

multimensch commented Jan 15, 2019

Hi,
I have a Pixhawx 4 with 1.8.2 firmware/QGroundControl and this is the first time I am using it. My Hexacopter is flying well with the Pixhawk 4 and I wanted to add some additional features, but without success.
My problems are:

  • I don´t get a signal on the sbus out port
  • I2C Sensors are not working/recognized (Lidar-Lite (LL40LS), Maxbotix Sonar (mb12xx))

I set up the corrosponding parameters but nothing works. I don´t find any other settings.
Can someone support me with some information how to set up these things?

@DanielePettenuzzo
Copy link
Contributor

For sbus out did you set PWM_SBUS_MODE to 1. Moreover on this output you will get the same output that you would get on the IO PWM port. Therefore IO must be enabled (SYS_USE_IO = 1) and you should have a mixer loaded on this output.

Regarding the I2C sensors the automatic scanning of ports I2CA and I2CB is supported on master but not on the latest release. This will be included in the next stable release. You can try either master or v1.9.0-alpha

@multimensch
Copy link
Author

Thanks for the answer.
I tested it with 1.9 alpha but it is still not working. Then i flashed ardupilot to check if something is working there. Also no functionality.
I start thinking that the Pixhawk 4 from Holybro is wasted time and money.

@DanielePettenuzzo
Copy link
Contributor

What distance sensor on which i2c port? I will try to reproduce the issue. Can you also send me the output of the commands on the mavlink console:
pwm info
px4io status

@multimensch
Copy link
Author

On Saturday I accidentaly flashed 1.9.0 beta and everything is working as expected now. Lidar-Lite, Maxbotix Sonar and PX4Flow. I am so happy now, thanks.
SBUS OUT is still not working and the PWM_SBUS_MODE parameter disappeared.

@DanielePettenuzzo
Copy link
Contributor

Happy your sensors are working. Regarding the PWM_SBUS_MODE parameter it might be that the px4io is not running. Can you check the SYS_USE_IO parameter if it’s enabled? Then it would help to see the outputs of the following mavlink console commands after you enable the IO:

pwm info
px4io status

The mavlink console can be access via qgc

@multimensch
Copy link
Author

The PWM_SBUS_MODE parameter appeared after setting up the vehicle type.
PWM_SBUS_MODE = 1 and SYS_USE_IO is enabled but still no SBUS output.

iostatus
pwminfo

@DanielePettenuzzo
Copy link
Contributor

It looks like your SBUS is running on the SBUS_OUT port on the pixhawk. Are probing it with a logic analyzer?

@multimensch
Copy link
Author

At the moment I don´t have a logic analyzer, but I connected a gimbal and another flightcontroller for testing and get no sbus signal. Would be nice if it works with the SBUS_OUT port. So please tell me if you have any other advice. If not I will make a Y-connector for the sbus receiver.
Thank you Daniele

@DanielePettenuzzo
Copy link
Contributor

I will try to reproduce this. What airframe did you choose from QGC?

@multimensch
Copy link
Author

Sorry I was on vacation...
I use hexarotor x.

@stale
Copy link

stale bot commented Jun 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jul 8, 2019

Closing as stale.

@stale stale bot closed this as completed Jul 8, 2019
@julianoes
Copy link
Contributor

@DanielePettenuzzo could you follow up?

@multimensch have you tried v1.9 in the meantime?

@julianoes julianoes reopened this Jul 10, 2019
@stale stale bot removed the Admin: Wont fix label Jul 10, 2019
@FlavioTonelli
Copy link
Contributor

FlavioTonelli commented Jul 26, 2019

I can confirm sbus out is working as expected on Pixhawk Cube and PX4 1.9.2.
I can correctly read the same pwm values of the eight main outputs.

@dennisonlau
Copy link

dennisonlau commented Nov 15, 2019

@FlavioTonelli Hi I am trying to read the pwm values from Pixhawk through the sbus. Did you use any library to decode it? Did you use a micro controller to read out the value?

Thanks

@FlavioTonelli
Copy link
Contributor

Hello @dennisonlau. I used two Pixhawk, one generating sbus signal and one reading the signal as a classic RC input one.
Of course is not the best way, but it was on my side the less expensive on a time base.
I can't help you much more, but there are plenty of ways to read such a signal. A classic board with a micro can easily do that task.

Last but not least, this platform is intended as a bug tracker. I suggest to use px4 forum or community channel to receive further assistance.

@dennisonlau
Copy link

Hi @FlavioTonelli Thanks for the quick reply. Do you know which repository consist of the code for implementing the sbus out protocol? I am currently reading the port with Saleae logic but the bit pattern does not match the sbus protocol I originally knew.

Thanks

@FlavioTonelli
Copy link
Contributor

I'm not sure it can help you but you can try to have a look at src/lib/rc/sbus files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants