Yaapu LUA Fully Functional and Supported with PX4 Firmware

@rollys, thanks again.

Setup: Pixhawk 4, Frsky X8R Rx. Plugged in via USB.

I have been trying everything this morning with no luck.

The pinout to the Teensy looks ok

  • I have 2 grounds. 1 going to Frsky X8R Rx and 1 going to Telem2 port pin.
  • Signal wire from Rx SPort going to TX1 on Teensy
  • TX Out from Telem2 port to RX2 on Teensy
  • RX Out from Telem2 port to TX2 on Teensy

Maybe a silly newbie question, when reading the pinouts for the Pixhawk 4 does +3.3v means I can receive 3v from that pin or do I need to supply that port with 3v?
On the Pixhawk Power Management Board I see 2 pin rows that output 5v.

  • ADC-3v3 (Is this the pin I should try to get power from?)
  • ADC-6v6.

I tried to take 3.3v from another port (SBus Out) and supply that to the Teensy, however it didn’t make a difference.

I have enable “Air Mode” in the config file. I re-flashed the Teensy again with the Mav2PT_v2.35 and there were no errors. It stated uploading done.

In Arduino I enabled “#define Mav_Debug_All” to test as I read elsewhere.
I then enabled the Serial Monitor under tools.
This is the msg I get:

Starting … C:\temp\Mav2PT_v2.35\Mav2PT_v2.35
Target Board is Teensy 3.x
Air Mode
Battery_mAh_Source = 3 - Define battery capacities in the LUA script
Using Serial_1 for S.Port
Default RSSI_Source
Mavlink Serial In
Waiting for telemetry

When I power up the quad the LED still blinks and no more sensors found.

You need to use MavlinkToPassthru_v1.0.19.ino

Good luck.

Thanks a million @rollys. It is all working perfect now. I did try the MavlinkToPassthru_v1.0.19.ino previously however kept getting heaps of errors due to it not finding a library.

I used the MavlinkToPassthru_v1.0.19.ino with the libraries located in the correct directories and it now all work great.

Thanks.

@broadys
As i understand you did take power for teensy from S.Bus out port at pixhawk4?
If yes, then i think it is not a best place for powering teensy. Tho you can get 3.3V from sbus out port, but it is actually signal line, thus not meant for powering anything.
http://www.holybro.com/manual/Pixhawk4-Pinouts.pdf
According to that description i can not see any good place to get 3.3V from that board. Also PDB does not seem to have any 3.3v power source.
So it might work with your current setup, but i would not use it like that. I think best solution in your case is still power Teensy to its Vin pin with 5V

Greetings, is there a way to display custom sensor data in the Yaapu screen on a Horus x10s? We have a lightware LW20 rangefinder hooked up to telemetry port 2 on a pixhawk cube 2.1 blue. I can see the value of this in the software, but would like to be able to see the distance to ground on the Horus controller. Will this require custom coding?

Hi guys,

i am using Yaapu Telemetry Widget 1.8.1 with FrSky X10S and Teensy Board (with mavlinkToPassthru) on Pixhawk BlackCube with PX4 FMU (latest stable version).

Have still the problem on my yapuu telemetry screen, that Voltage is always 99% and FlightModes are not correct mapped. Rest, like GPS, IMU and Messages are working correct. For example if flight mode “altitude” is choosen by switch (QGC shows correct), in Display it shows and says loud “Manual”. Same on “AltCtrl”, but it should be “Position Control”.

May you know this issue and i am just a noob?

  • What voltage are you referring to? A screenshot would help.

Start from

  • Did try going to the Telemetry page do Discover Sensors?
  • Did you “enable px4 flightmodes:” as in Post #9 from the LUA menu?

Good luck.

Hi @rollys,

thanks for reply. Yes this i already did. Only GPS, RSSI and RxBt got this * before value. VFAS is correct and Fuel always 99%.

I would like to display Px4 parameter battery remaining and correct flight modes.

I think this is related to your CFG setup that probably needs additional sensors. Check out the discussion here. So if you go the CFG folder and open the modelname_sensors.LUA file that has the same name of your model, it should show what sensors are available. You may need to add your sensors there. There are some sample ones you can use to copy and rename to your model name in the SD Card \HORUS\SD\SCRIPTS\YAAPU\CFG\ folder.

Good luck.

Haha they linked this Discussion here before. So i already asked there. You can also add sensors in yapuu directly.

On same telem connection i use 3DR Telemetry as well and made an y-cable out of it. Could it be the reason?

Maybe you can post the issue in the Yaapu thread and hopefully he can give you the solution.

Good luck.

i got it. It was the incorrect .ino file and missing define of air_mode. Now with MavlinkToPassthru_v1.0.19.ino it works. The flight modes are correct.

But i still have the problem FUEL still shows 99%. How i can map left capacity value to % batt capacity left? Currently it is ID 060F. Is this correct for Battery Status in percentage like it is in QGC?

  • Just to clarify, are you using battery or nitro/petrol for your FW motor?
  • If battery, what sensor are you using? Have you setup Curr and Used (Consumption)? in the Telemetry page?
  • If liquid fuel, I believe you’ll need to setup and add gsuite_sensors.lua in your CFG with your modelname. I don’t have any experience on this setup as I only use battery.

Ultimately, you can also post in the Yaapu RCGroup forum.

Good luck.

Hi @rollys, thanks for reply.

we use only battery and there a standard voltage divider. No Curr Sensor. in telemetry page i defined dual batt par, number of cells and capacity. Is there any other to define to get FUEL in percentage?

Thanks for this link to RCGroup. I guess i should write my probs there :smiley:

I believe you have to have a current sensor so you can discover and calculate consumed current to determine percentage of battery, otherwise it’ll just display voltage. In QGC, you setup the battery’s capacity then you have to do a couple or so flights to calibrate the current draw so you’ll have a fairly accurate calculation of percentage left in its capacity.

Good luck.

This i know and its already done. We use a voltage-based estimation. I just didn’t know that the percentage display from QGC cannot be represented directly as the FUEL parameter.

Please can you give me the link for MavlinkToPassthru_v1.0.19.ino and the libraries (plus locations)for it to work.I found a link on github and save the file as raw but it compiles with loads of errors.

Just delete “.pdf”.

Good luck.

MavlinkToPassthru_v1.0.19.ino.pdf (16.1 KB)

I just updated the link to take you directly to the page.

Good luck.

Perfect.Thank you for the direct download link.