Pixhawk 2.4.8 vibration sensor VIb01

Hello, does any one as an idea to connect the Vib01?

I need to connect 4 vibration sensors in order to monitor my 4 engines

here are several solution:

1–>i can connect this analog sensor to ADC entries:

2–> other solution could be I2C vibration sensor but i don’d find it on web

3–> i could connect the sensor to an arduino –>something lik that:image

Thanks for your ideas

Depending on how far your sensors are from the FC using those boards with I2C analog to digital converter could be a good solution. However you will need to write any necessary drivers in C++ as Pixhawk 2.4.8 lacks support for scripting.

1 Like

I am not sure but I don’t think this sensor is directly supported by ardupilot firmware. So you might run in the same problem as with your temperature sensors. You have to change or add a driver to your firmware b changing the Firmware itself.
From measurement point it is best do digitize the signal near to the sensor and use digitial signals instead of analog signals

1 Like

if you can use arduino, connect them to that then send them as named float mavlink messages to the flight controller.

1 Like

I will try this solution for 1 sensor first and several after

thanks all

Seems I need a logic level converter between Pixhawk (3,3V) and Arduino Nano (5V)

Do you confirm?

Here is connection details:

  • In direction Pixhawk to Arduino is no level shifting necessary. The 3.3V output of the FC is high enough to be recognized by the arduino input.
  • In direction Arduino to Pixhawk you only need a level shifting resistor network for example on Arduino output pin to GND 10kOhm + 20kOhm in series with the Pixhawk input connected to the interconnection point of the two resistors

OK–> i will try :grinning_face:

Do you know where on Pixhawk I can recover Arduino Alimentation (7V-12V)?

maybe i can recover this voltage somewhere in the drone (ESC/Batteries)

Why you need 7 to 12V?
My Arduino Nano also runs direct with 5V on the 5V pin as input. In this case the onboard 5V regulator is not used.

Today drone tested ok with 3 Temperature sensors 23°C & 1 vib sensor 0,16 (MP Quick View+ CtrlF/Mavlink Inspector “value” View)

–>next step: to configure 3 more Vib Sensors

2 Likes

With 4 Vib sensors, with arduino, i need to generate a MAVLink.h dedicated file

following explanation here

i tried this:

with xml input is:

error i have:

image

whatever i choice C or javascript language

any idea?

maybe my XML is not good (i recovered it from Copilot!)

how to write the xml is described here: link

I have no idea what rabbit hole the AI is taking you down, you can send as many as you want as long as they have different names.

this is my motor controller that uses arduino to send named floats, it should give you an idea where to start, they are part of the standard mavlink library.
#include “mavlink/common/mavlink.h”

send a mavlink heartbeat at 1hz to the flight controller and it will show up as a mavlink device on mission planner.

2 Likes

thanks geofrancis, I will try that!

you mean, similar to HB?

or telemetry?

Heartbeat is just so it logs that the device is alive, the telemetry is what you want to use to send your named floats.

Yeah! looks like it’s working fine with 2 sensors!

thanks for your help :grinning_face:

1 Like

If i open the Telemetry logs (tlog),

when i play them with Mavlink inspector, i don’t recover MAV_VIB1 & MAV_VIB2 (named in MP/Quick View) :

In State Tab: No MAV_vib1

or no Value or Vib1:

Whereas, if I Open the tlogs file with notepad, i can see them:

why these differences?

In State Tab, just founded vibration values:

your sending it far too fast, 100hz is too much, lower it to something like 10hz by adding a 100ms delay