1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Download Package Now!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

The RC-Rider Project (Let's 'Ride' Radio Controlled Models!)

Discussion in 'DIY Motion Simulator Projects' started by yobuddy, Jan 24, 2018.

  1. cfischer

    cfischer Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    66
    Location:
    Colorado
    Balance:
    523Coins
    Ratings:
    +26 / 0 / -0
    Like you guys, I've been dreaming about this for a while now too.
    When I came across the time I was going to use the smart port telemetry from frsky. You can pump the data back to the taranis(radio) with minimal latency and you then only have one radio connection. This is especially advantageous because then you only need one tiny x4r-sb reciever on the quad.

    https://oscarliang.com/sbus-smartport-telemetry-naze32/

    Super excited you guys are working on this. Will follow closely and help wherever I can.

    Another idea I had about transmitting the data to the chair is to just use the stick data directly off the taranis. This would probably not be the best for docile flight but on race quads where the speeds and direction changes are so great that accelerometer data becomes trash quickly this could be a possible work around(especially as most people fly by gyros anyway). This plugged into a low latency gseat could work pretty well I imagine.

    Oh and if you want the best video go with a runcam swift mini 2, a really nice set of goggles, and a clearview receiver. My 2 cents.
    • Like Like x 1
    • Informative Informative x 1
  2. Matthew Bangerter

    Matthew Bangerter New Member

    Joined:
    Jun 27, 2014
    Messages:
    22
    Occupation:
    Mechanical Engineer
    Location:
    Dallas, TX
    Balance:
    40Coins
    Ratings:
    +18 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    @JBoogie and @cfischer I totally agree, I think the best shot we're going to have with the telemetry is for a slow flyer with smooth transitions, that's really what I'm after at this point.

    Also, @cfischer I definitely agree that for quads, the stick data may be a good option. Hasn't somebody already developed a plugin for usb controller movement already? What we would need now is just to figure out how to control the RC from your USB computer controls. Any arduino experts wanna take a whack at that?:)

    Also I definitely looked into doing the telemetry through the receiver and really like the idea of less stuff, especially on weight sensitive aircraft, but I couldn't figure out how to get that data back to the computer? I also liked the idea of having an isolated module that you can basically just stick onto anything, however I think ultimately it would be best to have both options.
  3. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,118
    Location:
    Newcastle Australia
    Balance:
    26,447Coins
    Ratings:
    +2,413 / 23 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Great work :thumbs. Seen a few similar systems demonstrated through the years. So many legal issues with drones (especially in OZ) that I have kept away from them..





    Unfortunately, cannot find all the other videos that I remember seeing - too long ago... :rolleyes:.
    • Like Like x 1
    Last edited: Feb 7, 2018
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,270
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    24,811Coins
    Ratings:
    +3,328 / 10 / -0
    Making an app that uses the controls should not be to hard.
    But I'm not sure how to send the control data from the PC to the RC device itself (yet).
    • Like Like x 1
  5. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    Sorry guys, got busy this week! I can help with Arduino and RC stuff. Getting an arduino to output a PPM stream and input that to a RC transmitter trainer port is pretty easy. I made this several years ago and never really finished it. Could work nicely with this project!


    I also have Frsky taranis and several receivers so I can mess around with the telemetry feed and see if we can access it somehow.

    JB
    • Winner Winner x 2
  6. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    Quick update. It looks like I can indeed get the telemetry data from the RC controller into the PC. There is a serial port in the battery bay of the frsky taranis. I am definitely getting data so I just need to figure out how to make sense of it now.
    • Like Like x 3
  7. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    Ok it took some digging but I finally found enough info on the FrSky s.port protocol to decode the telemetry data. I can now see the accelerometer data from the onboard flight controller in real time. It looks to be only a few updates per second but that should be plenty for a slower moving plane I think.

    I’ll post more details when I get some time.

    JB
  8. cfischer

    cfischer Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    66
    Location:
    Colorado
    Balance:
    523Coins
    Ratings:
    +26 / 0 / -0
    Great job cutting through the s.port protocol! That is a pity the update rate is so slow. But maybe its just as well. As you say it might work great for less dynamic aircraft.
    For faster stuff like racing quads, I wonder if it would make sense to put the stick data into the computer or bypass simtools all together and go straight to the arduinos for lower latency. With FPV video any delay much more than 30ms makes racing very difficult.

    @yobuddy Has anybody done latency testing with simtools?
  9. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    I haven’t looked super close yet, but I am not sure yet if it is the Smart port protocol itself, the receiver, betaflight Or the passthroigh on the taranis that is limiting the data rate. If it is betaflight, that is easy to hack.
  10. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    This is in the smartport class in Betaflight:
    #define SMARTPORT_MIN_TELEMETRY_RESPONSE_DELAY_US 500

    If we get this all working, I'll try reducing that to see how low we can take it.
    • Like Like x 1
  11. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    proofs!
    • Like Like x 1
    • Winner Winner x 1
  12. cfischer

    cfischer Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    66
    Location:
    Colorado
    Balance:
    523Coins
    Ratings:
    +26 / 0 / -0
    Excellent work! Are you showing gyro data there or accelerometer?
  13. JBoogie

    JBoogie Member

    Joined:
    Jan 14, 2014
    Messages:
    81
    Occupation:
    Pre-sales Engineer
    Location:
    Northern VA
    Balance:
    1,295Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, SimforceGT
    I am pretty sure this is accelerometer readings. I have been digging in the betaflight source code trying to understand the scaling. From just moving the quad around the X and Y values are zero when flat and go from -45 to 45. E.g. a full 90 degree bank to the right measures 45.
  14. cfischer

    cfischer Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    66
    Location:
    Colorado
    Balance:
    523Coins
    Ratings:
    +26 / 0 / -0
    Oh yeah I see that now. I was hung up on how you were rotating it only and was thinking that might be gyro data. But looking closer I see what you mean.

    Again nice work man! I wonder how you feel about documenting your progress somewhere on the net so others can build on what you've done. I just think about all the things I learned from people posting in their blogs or on rcgroups.
    • Like Like x 1
  15. Matthew Bangerter

    Matthew Bangerter New Member

    Joined:
    Jun 27, 2014
    Messages:
    22
    Occupation:
    Mechanical Engineer
    Location:
    Dallas, TX
    Balance:
    40Coins
    Ratings:
    +18 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    @JBoogie Fantastic work getting the data from the telemetry port!! Perhaps you already have an understanding of this but one of the biggest challenges is that once you get the raw accelerometer and gyro data in, you then have to process it into something sensible like linear acceleration(gravity removed) and orientation(gyro's output angular velocity, not angle) via sensor fusion which is actually quite complex. Here is some pretty in depth explanation that I started into but quickly got overwhelmed http://www.starlino.com/imu_guide.html. I'm sure there are those here that understand this fairly well.

    For this reason, I am testing out a sensor that does all the fusion for you (call me lazy) as I spent a fair amount of time on the sensor fusion and failed miserably. I am getting really close on the dedicated sensor though, so hopefully I'll have something up and running soon!

    Also, fantastic work on the arduino RC controller! We just need a way to get the USB joystick/steering wheel data into the arduino so that we can use existing sim equipment
  16. Wanegain

    Wanegain Active Member

    Joined:
    Nov 6, 2013
    Messages:
    549
    Location:
    Bruxelles
    Balance:
    1,293Coins
    Ratings:
    +271 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I decided to restart from scratch my project.
    So I just bought a FPV racing drone (cheap Hubsan H122D) and ordered a radio telemetry kit 433MHz.
    I keep my IMU 9dof from Sparkfun as it's include a microcontroller Arduino compatible onboard : https://www.sparkfun.com/products/14001
    • Like Like x 2
  17. Matthew Bangerter

    Matthew Bangerter New Member

    Joined:
    Jun 27, 2014
    Messages:
    22
    Occupation:
    Mechanical Engineer
    Location:
    Dallas, TX
    Balance:
    40Coins
    Ratings:
    +18 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    awesome, let us know how that board works, that could be awesome. does it run regular arduino code?
  18. Wanegain

    Wanegain Active Member

    Joined:
    Nov 6, 2013
    Messages:
    549
    Location:
    Bruxelles
    Balance:
    1,293Coins
    Ratings:
    +271 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Yes it's Arduino compatible : "The onboard microprocessor, Atmel’s SAMD21, is an Arduino-compatible, 32-bit ARM Cortex-M0+ microcontroller also featured on the Arduino Zero and SAMD21 Mini Breakout boards.

    In addition to a pair of ICs, the 9DoF Razor IMU includes a µSD card socket, LiPo battery charger, power-control switch, and a host of I/O breakouts for project expansion. It comes preprogrammed with example firmware and an Arduino-compatible bootloader, so you can customize the firmware and flash new code over a USB connection."

    Everything needed is onboard but RF transmission...
    • Informative Informative x 1
  19. Wanegain

    Wanegain Active Member

    Joined:
    Nov 6, 2013
    Messages:
    549
    Location:
    Bruxelles
    Balance:
    1,293Coins
    Ratings:
    +271 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I received today my radio telemetry kit!
    Maybe tonight I will try something...

    @yobuddy do you plan to share your RC-Rider app ?
    Currently my IMU sends 360° rotation data, should I convert to 180°/ -180° ?
  20. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,270
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    24,811Coins
    Ratings:
    +3,328 / 10 / -0
    @Wanegain,
    I believe this is where matthew and I are with the ard code.

    Code:
    #include <Wire.h>
    #include <Adafruit_Sensor.h>
    #include <Adafruit_BNO055.h>
    #include <utility/imumaths.h>
    Adafruit_BNO055 bno = Adafruit_BNO055(55);
    imu::Vector<3> v;
    void setup(void)
    {
    Serial.begin(57600);
    Serial.println("Orientation Sensor Test"); Serial.println("");
    /* Initialise the sensor */
    if(!bno.begin())
    {
    /* There was a problem detecting the BNO055 ... check your connections */
    Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!");
    while(1);
    }
    delay(1000);
    
    bno.setExtCrystalUse(true);
    }
    void loop(void)
    {
    /* Get a new sensor event */
    sensors_event_t event;
    bno.getEvent(&event);
    // Possible vector values can be:
    // - VECTOR_ACCELEROMETER - m/s^2
    // - VECTOR_MAGNETOMETER - uT
    // - VECTOR_GYROSCOPE - rad/s
    // - VECTOR_EULER - degrees
    // - VECTOR_LINEARACCEL - m/s^2
    // - VECTOR_GRAVITY - m/s^2
    v = bno.getVector(Adafruit_BNO055::VECTOR_LINEARACCEL);
    float Roll = event.orientation.x;
    float Pitch = event.orientation.y;
    float Yaw = event.orientation.z;
    float Surge = v.x();
    float Sway = v.y();
    float Heave = v.z();
    /* Display the floating point data */
    // Serial.print(event.orientation.x, 2);
    // Serial.print(",");
    // Serial.print(event.orientation.y, 2);
    // Serial.print(",");
    // Serial.print(event.orientation.z, 2);
    // Serial.print(",");
    // Serial.print(v.x()); //x acceleration
    // Serial.print(",");
    // Serial.print(v.y()); //y accel
    // Serial.print(",");
    // Serial.println(v.z()); //z accel
    byte* RollPtr = (byte*) &Roll;
    Serial.write( RollPtr[0] );
    Serial.write( RollPtr[1] );
    Serial.write( RollPtr[2] );
    Serial.write( RollPtr[3] );
    //
    byte* PitchPtr = (byte*) &Pitch;
    Serial.write( PitchPtr[0] );
    Serial.write( PitchPtr[1] );
    Serial.write( PitchPtr[2] );
    Serial.write( PitchPtr[3] );
    //
    byte* HeavePtr = (byte*) &Heave;
    Serial.write( HeavePtr[0] );
    Serial.write( HeavePtr[1] );
    Serial.write( HeavePtr[2] );
    Serial.write( HeavePtr[3] );
    //
    byte* YawPtr = (byte*) &Yaw;
    Serial.write( YawPtr[0] );
    Serial.write( YawPtr[1] );
    Serial.write( YawPtr[2] );
    Serial.write( YawPtr[3] );
    //
    byte* SwayPtr = (byte*) &Sway;
    Serial.write( SwayPtr[0] );
    Serial.write( SwayPtr[1] );
    Serial.write( SwayPtr[2] );
    Serial.write( SwayPtr[3] );
    //
    byte* SurgePtr = (byte*) &Surge;
    Serial.write( SurgePtr[0] );
    Serial.write( SurgePtr[1] );
    Serial.write( SurgePtr[2] );
    Serial.write( SurgePtr[3] );
    delay(25);
    } 
    Below are the current RCRider_GamePlugin and RCRider App.
    It's all a work in progress, so let me know how it goes.
    yobuddy

    Attached Files:

    • Like Like x 1