Reading Data from Pixhawk to Motor

Hi,

I have a Pixhawk 2.4.8 and have installed the latest Rover 4.0 fmuv2 firmware. This is my first build and not able to go further. I have attached two images of what I have done. The first one is the screenshots from Mission Planner and Second one is the output from Pixhawk Main Output (Motor Output) Pin 1.

Screenshots : https://pasteboard.co/J277u3W.png
Duty Cycle : https://pasteboard.co/J277Mjw.png

  1. I have connected Flysky remote using SBUS-PPM and receiver is working as shown in (Image1-Part1)
  2. Since I am working indoors, I have disabled AHRS_GPS_USE and ARMING_CHECK by setting it to 0. (Image1-Part2)
  3. There is no output on a custom display which is reading pin 1 yet. Frequency is Infinity (or junk value)
  4. Now when I press the safety switch, then it shows frequency 400Hz and Duty as 59% (sometimes it is 50%. I guess its about radio calibration)
  5. If you check the screenshots, Servo Output -> Servo 1 is set to GroundSteer and Servo 2 is set to Throttle. When I check frequency on Pin 3, it says 2000 Hz and duty as 50%. However, moving throttle stick does not make any change.
  6. When I switch the frequency check pin to pin 1, then moving the right joystick to the right changes duty cycle to 75% and moving it left changes duty cycle to 44% as shown in second image.
  7. Now I change the MOT_PWM_TYPE to 4 (since I want to use it as BrushedBIPolar) and reboot the board.
  8. I set servo output 1 to throttle left and servo output 2 to throttle right as per Image1-Part5.
  9. When I check the frequency and duty cycle now, there is no change on Pin1 or Pin3.

What I have is a rover with four wheels which has an Arduino based motor controller. Arduino board can read the duty cycle from two pins and take it further to control the four motors to control the robot. The robot is designed on skid steer mechanism.

What am I doing wrong? Since this is my first build, I have tried to understand and follow https://ardupilot.org/rover/docs/gettit.html link. However, it seems like I am not able to follow it right.

Can someone kindly check and help me?

Thanks,
Praveen

1 Like