1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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 Now a Download Plan!
  3. 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
  4. 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. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Heli controls and MobiFlight

Discussion in 'DIY peripherals' started by Aerosmith, Oct 7, 2024.

  1. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    I recently bought the Heli flight controls from @GoFlying and I'm about to connect all the wires to the Arduino board and hopefully will get everything to work. All the programming of the trim motors are done with MobiFlight. I know there is a seperate Discord server for MobiFlight projects and this is probably not the right forum. But I hate Discord and Discord hates me. I spent 3 days trying to register. Maybe I was blacklisted for not passing their CAPTCHA test too often.:mad:And Discord is just a mess. It's a big chatroom and every piece of useful information is soon lost in the noise.

    So if anyone here is also using MobiFlight and thinks this could be useful I'd like to share my work. I see that cockpit builders use MobiFlight a lot but the forum search here returns zero results.
    • Like Like x 1
  2. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    Ok, my first advice: Don't do it like this
    Arduino-SensorBOB.jpg
    Connecting single wires with Dupont connectors is good for a quick testbench hook-up. But as soon as you plug in more than ~10 it soon gets messy and it's definitely not lasting long in a rig that is moving all the time. The bare Arduino board with the female headers and the male Dupont wires is even worse. They pop out if the wire is only slightly touched.
    Arduino-TerminalBOB.jpg
    So I ordered one of theese. It's occupied with push-lock (screw-less) terminal blocks so hopefully I'll be able to connect all the wires in a more reliable way.
    • Like Like x 1
  3. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    Today, I was able to connect all the wires for the cyclic control. It still looks a bit messy but it's getting better.
    HeliControl-box1.jpg
    I also hat to disassemble the cyclic mechanis completely to exchange the stepper motors. The old ones had too much winding resistance and were getting too hot. The new ones stay cold but I have to tune up the current a bit as the torque is too low.
    • Like Like x 1
  4. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    About MobiFlight: It's a software that supports building DIY cockpits. It can read variables from the sim software and forward it to all sorts of "displays". A display can be anything from a simple LED to 7-segment displays or even stepper motors or model servos. You can also use buttons or analogue inputs to influence internal variable values or variables in the sim software. If you don't know the software there is a very good tutorial explaining the basics.

    There is also a step-by-step procedure of how to configure the heli controls in Mobiflight on the 737diysim page. But unfortunatelly, their example config file (step 4) doesn't work. The schematics are also a bit messy as all the button signals seem to be spread quite randomly instead of well ordered. But trying to keep track of all individual signals and naming the pins by function make not much sense anyway.

    It's better to just assign a range of pins to the inputs and another range for the outputs. I used pins 2..17 for the steppers and 18..19 for the motor driver disables. The rest of the pins are all for inputs. Then I added devices to the module and named them simply "Button 20" for pin 20, for example, not to care about the function of it at this stage. In the Input configs Edit dialog we can then use the "scan for input" feature. You can simply click on the button and the input is automatically assigned to the right pin.
    • Informative Informative x 1
  5. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    How it works: As explained here this is not a true force feedback control stick. The stepper motors move the neutral position of the centering springs of the stick. So for example, if you press the trim hat switch forward this causes the neutral position to move forward. There's a trim force release switch that simply switches the stepper motor current off (driver disable input). So the torque drops to nearly zero and the spring mechanism slides freely so the neutral position matches the current position.

    The actual position input of the joystick is handled completely seperate from the Arduino board and Mobiflight. There is a BU0836 interface board on the back side of the control box where the hall sensor/potis are connected. I found out that this could be handy to connect extra buttons. As I bought it there were not enough wires running through the tube of the collective stick. The Bodnar board supports a 6x6 key matrix so this could be use to save some wires.

    I wonder why everybody seems to use those cheap TB6600 stepper drivers. At full current the get boiling hot. So the fan installed at the controll box is almost as loud as the turbine of a real helicopter.:DOnly a few more $ and you'd get much better drivers that would need no fan at all. Same for the stepper motors. The small NEMA17 motors cost only ~$10 but are at their limit. NEMA23 motors cost $15 and have more torque at a lower current. So we could get rid of the cooling fans so the bigger motors would actually need less space.
  6. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    257
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,652Coins
    Ratings:
    +130 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I see. Well, with FlyPT we should be able to get the control surfaces position and trim position. In heli it may not be as relevant, but in airplanes, the resistance should grow depending on the speed and deflection of the control surfaces. So I thought about using a similar mechanism for pushing the centering zone away to create resistance depending on those variables. And with trim adjustment, it would get back to the centring zone. It may be tricky depending on how trim affects surfaces and may need to be set up differently for each plane. But I suspect it should just work if I can read the joystick values and make the resistance go to 0 (normal center position) when the joystick is centred. Will try to figure it out when I get there. Need to finish the 6DOF build first, it will take weeks.
  7. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    380
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    2,223Coins
    Ratings:
    +225 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    I also have lots of good ideas but too little time to iplement them, at the moment. I also need to get my rig ready, first.

    The problem with the centering spring feedback is this:
    FFB-slopes.png
    For precise centering and a good feeling you normally want the red curve with a detent in the middle. So you need some "hysteresis" force before the stick actually moves. But that would make it difficult to simulate low force changes as it wouzld have a dead zone in the middle.
    So for optimum force feedback the blue curve with a strict linear relation would be better. But without the ability to react fast (stepper motors) this would give a sloppy feeling near the center.

    So for real force feedback I think we need servo motors where you can apply force directly at any time. Stepper motors with springs can only build up the force with a delay because they need to tension the spring andtherefore need to change position more than the stick actually moves.