Custom sensors and Real-Time logging

Hi everyone,

Does anyone have experience with configuring their own sensors onto the Pixhawk (I have an IRIS)? I purchased a gas sensor that I'd like to wire to it, does anyone know of any good resources to help me get started? I've downloaded the PX4 development environment from the Pixhawk developers website and have gone through some of the "getting started" instructions on there, I have been able to install the firmware through Eclipse as opposed to the Mission Planner. I also purchased 3-position and 5-position connectors for the analog inputs.

I was also wondering if there is a way to view the telemetry log data on Mission Planner during flight? If I did add this sensor, would data be saved through the telemetry logs or dataflash logs?

I appreciate whatever help I can get, thank you!

Kate

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I am also doing the same project can anyone help me.
  • Hi Aaron, I am working in a project very similar to what you have done. 

    I have al ready connect some sensors via i2c to the pixhawk, but I can´t  make the changes in the mavlink, can you show us how to make it ?

    Aaron Curtis said:

    Hi Katie, I have flown with CO2, SO2, and H2S sensors on an APM. I hooked them up via I2C and then added a new dataflash 'GAS' log message and later also a mavlink message. Would be interested to hear more about your application, and happy to show you the code I used. It's in a local branch but if you remind me I'll push it to github. You can see the discussion I started here.

  • Hi,

    Glad I found this post.  I have had some success in connecting an  Odroid XU4 to a Pixhawk using the UART-USB connection to the telemetry.  The sad thing is that the connection is intermittent (might be an issue with my connection setup).  however, it does read the gas sensor (I tried an CO2 sensor) connected to the ADC pin on the odroid and display the voltage readings.. the parts per million(concentration levels can be easily obtained from the voltage given).  I can send details of how to connect to anyone interested. 

    What I am in need of is to trace a plume based on the concentration levels and have a drone navigate that to locate the source of the plume.. any ideas would be most welcome..

    Good post folks..  Keep up the good work

    Cheers

    Prasanna

  • Hi James.  An example would be great if you have the spare time! 

    • Hi all,

      i am currently working on an px4 i2c driver to communicate with an external board.
      i used the hmc5883 and mb12xx drivers as guiding examples.
      everything compiles fine but when i try to send data to the external board i get "i2c::transfer returned -6" in the nsh.

      is anyone familiar with this problem or can point me in the right direction?

      thanks in advance!

  • Thanks for the encouragement, Eric. Will do!!

  • It would be great if someone who knows what they are doing could write a set of instructions (including a flow chart) to show how to read an additional ADC pin and send the data to Mavlink and to log the data. 

    Anyone ?

  • Hi Katie, I have flown with CO2, SO2, and H2S sensors on an APM. I hooked them up via I2C and then added a new dataflash 'GAS' log message and later also a mavlink message. Would be interested to hear more about your application, and happy to show you the code I used. It's in a local branch but if you remind me I'll push it to github. You can see the discussion I started here.

    • Hello Aaron,

      I want to use some sensors connected to an arduino and then connect the arduino to the pixhawk by i2c to get thoses values in dataflash logs and to in mavlink messages to store them in live in the ground station.

      Have you succeeded to do that with your gas sensors ?

      Have you some code sample to begin with this ?

      Thanks,

      Ed.

    • Aaron,

      Glad to see someone else who's accomplished configuring gas sensors to the APM. I have an H2S gas sensor (link here) that I need to configure to the Pixhawk. How did you test/calibrate the sensors? Definitely interested in hearing about your experiments.

      Thanks!

This reply was deleted.

Activity

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Monday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…