Jump to content

Open Source Joystick FFB / DIY FFB Joystick


Recommended Posts

I ordered one anyway and am hoping I'll be able to figure out what to do with it when it arrives :thumbup:

 

Well, it has just arrived :thumbup:

Now to work out what to do with it :(

 

Is anyone able to give me guidance as to what I actually need to do to get started? :joystick:

Basically I just want to set up a simple test rig so I can start attacking bits with a debugger :smartass:

Link to comment
Share on other sites

  • Replies 419
  • Created
  • Last Reply

Top Posters In This Topic

Hi

What exactly are you trying?

Starting with MC's?

 

Or run the code I made?

 

For getting used to a MicroC (using yourController):

1. Download Arduino

2. Plugin you Controller

3. set Arduino to your Serial where youController is plugged in.

4. Run some test codes blink is recommended.

 

For using my code:

 

 

Follow the instructions I gave earlier.

 

 

Edit: can someone tell me how fast the stickmovement Need to be? maybe someone with a SideWinder can tell us how fast it travels the Maximum way?

MetalGear_Honk

 


Edited by MetalGear_Honk

The threemost dangerous threads to Programmers:

  • Fresh air
  • Bright sun light
  • The horrifying screams of singingbirds

Link to comment
Share on other sites

Follow the instructions I gave earlier.

 

Yeah, I can't actually find these instructions :(

 

Do you reckon you could put all the relevant information in the first post so we'll all know where to find it. It would make things a lot eaiser to follow.

 

All the best,

(:

 

 

Edit: Oh, I see you're not the OP.

 

Any chance you could incorporate the relevant information into your first post anyhow? As it is there is now a awful lot of information in this thread and while I've read the whole lot twice now I've obviously missed the critical bits ;).


Edited by Slartibartfast
Link to comment
Share on other sites

Hi

here is the post about Programming a Pro Micro

 

 

Hi

To use a Pro Micro:

First we need to get rid of the ArduinoBootloader.

For that we will need an ISP or a JTAGProgrammer.

ISP is cheaper and you can use anotherArduino for that.

The Problem here is that most Programmeruse their own Software.

 

I will try to get the instructions out ofmy Memory.

Usingan Arduino uno:

 

1. Load the Arduino IDE.

2. Connect the Uno to your PC (USB)

3. Open the source code"ArduinoISP" from the Examples Folder

4. In the Tools/Board Folder select thecorrect Serial port.

5. Press the upload button

6. Wire the Uno to the Pro micro

UNO Name Micro

Pin 11 MOSI Pin16

Pin10 Reset RST

Pin12 Miso pin14

Pin13 sck pin15

+5V Voltage VCC

GND Ground GND

 

7. Select sketch/Upload with programmer

8. Select the HEX I uploaded.

 

That should be it.

 

No guaranty I haven’t done it this way fora Long time.

 

MetalGear_Honk

 


Edited by MetalGear_Honk

The threemost dangerous threads to Programmers:

  • Fresh air
  • Bright sun light
  • The horrifying screams of singingbirds

Link to comment
Share on other sites

Hi

here is the post about Programming a Pro Micro

 

Thanks for that Metal.

 

I take it those instructions are for loading the program onto an ATMega32u4 Arduino by using a separate Arduino Uno in place of a boot-loader.

Given I have a Teency 2.0 rather than a Pro Micro can't I just load the program directly onto the board using the built in boot loader?

 

As it is I did manage to load something onto the Teency and once it started running a device called "Big Block" appeared as a game controller:

BigBlock.png

However I have no way of interacting with it but I assume this is the program running as it should.

 

So while it seems to be functioning fine I don't relay have a means to do anything with it at present.

While I appreciate the final design of the joystick is still a ways off I was hoping for some means to assemble a test rig such that I could start hacking code.

I assume I'll need a couple of potentiometers, a couple of motors and no doubt a fist full of resisters and things but being a code monkey I get all confuddeled when it comes to this 'meat-space' malarkey :doh:

 

So what would be the best way to interact with this bad boy?


Edited by Slartibartfast
Link to comment
Share on other sites

Hi

Looks good.

For interacting: jep you need at last somepots (10k) and some LED and Resistors. That is the Basic Setup I am using mostof the time.

I think I wrote the connections in thecode somewhere, but I can't find it at the Moment.

The Motors are nice but to work on bugfixes it is not necessary.

To test the affects you can downloadfedit.exe or ForceTest.exe

One is a free tool and the other came withthe direct Input. (Don’t ask me witch is witch)

MetalGear_Honk

 

The threemost dangerous threads to Programmers:

  • Fresh air
  • Bright sun light
  • The horrifying screams of singingbirds

Link to comment
Share on other sites

For the OSW we had that discussionalready. The Software is not compatible for two axis.

True, but it might still be worth tracking the SimuCUBE development. Mika said that they will try to open source at least some the effect code, so that users could try to implement missing effects, because it might be that they won't support all of them (the list is quite huge, was actually surprised myself).

Although especially in case of flight sims, they possibly should only use constant force or the periodicsineoffset as racing sims do.

Except that it's then for two axis.

Another Point is the third axis (pedals) wewere talking about.

Really, I wouldn't bother with that. Focus on what is important and force feedback for the pedals clearly is not.

But yes, when talking about pedals, then you really need torque.

Actually torque is everything. Especially when we are considering full length control columns with somewhat realistic loads. An ffb wheel has 15-20cm lever arm, while a control column has 40-50cm, so you need 2-3x more torque for the same force on the grip.

It really depends on what you want from such a setup.

For me, I only want something that properly simulates the force trim in a helicopter setup.

I don't need and actually don't want to have a flight stick that goes wild. Not even sure how realistic that would be. Ok, maybe for WW2 aircrafts, but other than that?

But if that is your goal, then yes, torque is everything.

However, from my experience with the OSW, in this case I would definitely go DD.

Trust me, it is really worth it, because it's so much better regarding response, speed and precision.

Torque vs Money

You can surely use direct drive instead of gears, the only problem is the budget.

If you are to spend a grand for two BLDC motors, drivers, and PSU, you can have it matesmilewink.gif

Actually, I have two Lenze 29 Nm BLDC servos right here, both worth a grand.

I have to admit though that trying to sell the second one doesn't go that well, so yes maybe not the best idea to use those.

And yes, the footprint is enormous.

For the racing simulator that doesn't matter too much, since there is usually a lot of space where you mount it, but for a flight sim, it really depends on your rig.

Two of them wouldn't fit in my (racing sim) rig.

 

But again, my goal really wouldn't be any torque at all.

I just want to have a very precise joystick with proper force trim simulation.

So something like a 1-5 Nm servo would be ok for me, even when going DD.

Precision here is the more important factor.

With belts or gears, you lose precision, which is a no-go.

Link to comment
Share on other sites

Yeah, I can't actually find these instructions :(

 

Do you reckon you could put all the relevant information in the first post so we'll all know where to find it. It would make things a lot eaiser to follow.

 

All the best,

(:

 

 

Edit: Oh, I see you're not the OP.

 

Any chance you could incorporate the relevant information into your first post anyhow? As it is there is now a awful lot of information in this thread and while I've read the whole lot twice now I've obviously missed the critical bits ;).

PM me whatever you want to have in the first post, I can update it then. ;)

Link to comment
Share on other sites

@ Berhiyh

 

Why would you lose precision with gears and belts?

One hall sensor directly mounted to stick's pivot axis,

reading exact position and providing data for motor at the same time..

I don't see any reason for inacuracy..

 

I think Berhiyh is talking about 'slop' or 'back-lash'. I don't think it will be much of a problem and if anything the reduction will reduce the 'cogging' felt from the motor itself but I think that's what Berhiyh is referring to.

Link to comment
Share on other sites

I think Berhiyh is talking about 'slop' or 'back-lash'. I don't think it will be much of a problem and if anything the reduction will reduce the 'cogging' felt from the motor itself but I think that's what Berhiyh is referring to.

Exactly. I've had and tried several FFB wheels with belts and gears over the last 10-15 years and trust me, especially gears/cogwheels result in a loss in precision.

 

If cogging is a problem or not depends on the servo, on some it is, on others you don't feel it.

So it's hard to tell upfront.

Link to comment
Share on other sites

If cogging is a problem or not depends on the servo, on some it is, on others you don't feel it.

So it's hard to tell upfront.

 

What do you mean by servo, just so we're all clear on what you're talking about. Do you just mean 'motor' or are you referring to something different?

 

I take it you're not talking about one of these things:

hitec-hs645mg-servo-motor_2.jpg

(which is what I think of when you say "servo")

 

The reason gearing is necessary is because while electric motors can be surprisingly powerful generally speaking they're actually only capable of providing a remarkably small amount of 'native' torque. In fact it is surprising just how little torque is provided by most electric motors.

They are however capable of spinning at truly impressive speeds (with virtually no loss in torque), which is what gives rise to their spectacular performance. I know electric car's are famous for the amount of torque they have available but it's not actually the amount of direct torque the motor produces that's impressive, it's more how much the torque can be multiplied (threw gearing) that is impressive and it is this same multiplication we are intending to leverage our selves.

 

Given the motor is capable of spinning at many 1000's of RPM with virtually no loss in torque and we only need the driven element to rotate at say 100 RPM we may as well implement a 10:1 or 100:1 reduction and thus achieve a massive boost in torque (or rather only require a motor capable of producing but a fraction of the amount of torque we would otherwise need).

 

You may think only a small amount of torque is necessary and that we are over delivering in this project, which may be the case for your needs, but I dare say doing away with the reduction gearing all together would reduce the torque at the stick so severely that even your meager requirements would fail to be satisfied.

 

Now there are "Direct Drive Torque Motors" on the market and perhaps these are used in some sim wheels but generally speaking such motors are not really feasible to your average consumer. If you have access to such motors than I'm sure we would love to hear about it but unless you have the buying power of one of the world leading manufactures I wouldn't think such options would be viable –though I would love to be proven wrong. Do you know of any such direct drive products that would be suitable? I would be most keen to investigate the idea but I am not aware of any such motors that would be viable.


Edited by Slartibartfast
Link to comment
Share on other sites

What do you mean by servo, just so we're all clear on what you're talking about. Do you just mean 'motor' or are you referring to something different?

Servo is just short for servomotor.

https://en.wikipedia.org/wiki/Servomotor

I take it you're not talking about one of these things:

(which is what I think of when you say "servo")

Nope, but I do get where you're coming from.

Now there are "Direct Drive Torque Motors" on the market and perhaps these are used in some sim wheels but generally speaking such motors are not really feasible to your average consumer.
You might be surprised regarding what is possible.

The most common servo (Mige 130ST-M10010) for the OSW costs about 250-350€, so cost-wise, it might be feasible.

But obviously this particular model is inappropriate, because it's a huge massive thing and wouldn't fit into your average rig if you were going to use it for a FFB joystick.

However, that doesn't mean that there couldn't be other models that do fullfill the requirements, but I didn't (yet) check for it.

IMO the problem would be rather the control unit.

At least with the hardware I know of, we're talking about 500€ minimum.

Do you know of any such direct drive products that would be suitable? I would be most keen to investigate the idea but I am not aware of any such motors that would be viable.
tbh, I didn't yet investigate too deeply, because I don't see a solution for the control unit yet, which I see as the bigger task.

There are thousands of servos/motors in this world, should be possible to find something that suits our needs.

The only catalogue I know quite deeply is that of Lenze and the smallest motors they list there have a size of 6×6 cm², but are quite long, so I don't think they would be an option.

Also, Lenze servos are quite expensive, even though I didn't ask for a quote on the small ones so far, so maybe these are cheaper.

With these it might be possible to achieve a torque in the range of 3-5 Nm at a system voltage of 48V and a power supply of around 700-800W.

(Just a rough estimation.)


Edited by Berniyh
Link to comment
Share on other sites

Servo is just short for servomotor.

https://en.wikipedia.org/wiki/Servomotor

 

Fair enough.

 

So I've only worked with RC servos before (like the one pictured above) and the issue with those servos is that while you have good control over the desired deflection (that is where you want the motor to turn to) you don't have control over how hard it "tries" to get there.

 

For use in the FFB system all we care about is the current deflection and we wish to dictate the amount of 'drive' the motor is to apply accordingly. We actually have no interest in instructing the servo to head to a given position as such. Will these motors allow us to instruct them to 'pull' with a given force regardless of their orientation? Also, will we be able to get a reading from them as to their current position? If they do give us such a reading we may be able to use this to actually read the joystick's position itself and save us needing to add hall effect sensors (or whatever) to the joystick. That would definitely be a win!

 

The most common servo (Mige 130ST-M10010) for the OSW costs about 250-350€, so cost-wise, it might be feasible.

I'm not so sure that is cost effective. We're looking to build the entire project 300€, and while the 300€ isn't a fixed limit spending 600€ on motors alone probably isn't feasible, though 20 Nm is a staggering amount of torque! I was imagining something in the order of 1/100th this much torque, so their may well be something in the acceptable range.

 

I don't see a solution for the control unit yet

What does the 'control unit' do? I take it that's something we can't build our self?

Link to comment
Share on other sites

Re: Servo motors

 

Yes, any motor that is designed with feedback and a control circuit to move to a commanded position, speed, etc. is a servo motor. RC servos have all this built into a single unit, but are completely inappropriate for a FFB stick because the gearing is so high, the RC servo will not free spin easily enough when no force is desired.

 

A motor is very capable of moving at slow speed or at 0 speed (holding a force). They just draw more current at slow or 0 speed - which is why motors used on a FFB stick may need cooling. The motors you choose must be capable of handling this operation state without burning up. It's just a matter of seeking the right specs on the chosen motor. As Berniyh says, there are thousands and thousands of choices for FFB motors. Look at the 0 RPM specs for the motor - force output as well as power consumption at 0 RPM. That is the important spec for a FFB stick.

 

Re: FFB stick gearing

 

Most the FFB sticks I've looked at (or at least the good consumer ones) have between 1:60 and 1:80 gearing ratio if I remember correctly. RC Servos have much higher gearing. That's how they get away with such a small motor, but also why they do not free spin easily.

 

For use in the FFB system all we care about is the current deflection and we wish to dictate the amount of 'drive' the motor is to apply accordingly. We actually have no interest in instructing the servo to head to a given position as such. Will these motors allow us to instruct them to 'pull' with a given force regardless of their orientation? Also, will we be able to get a reading from them as to their current position? If they do give us such a reading we may be able to use this to actually read the joystick's position itself and save us needing to add hall effect sensors (or whatever) to the joystick. That would definitely be a win!

 

To tell the motor position, you need to use a sensor (a rotary encoder, a hall effect sensor, a pot, etc.). Some motors come with encoders on them, but for a FFB stick, best to use a hall effect sensor that measures the stick movement regardless of the motor (no backlash).

 

As for driving the motor, the controller logic (the CPU) has a position in mind that it wants to hold the stick at (center position, or off center due to a Cyclic brake function in a flight sim). If the stick is pulled away from that position then the CPU drives the motor to cause a known force to pull it back to position. For a FFB stick, that is how movement is applied - you must calculate the power required to apply a given force to the stick. How strong that force is depends on how strong the sim commands the force to be (spring force, or movement force).

 

You cannot tell the motor a "force". You have to drive the motor with a given voltage/current and watch the hall effect sensor as the stick moves back into the commanded position. So it is a feedback loop. A well designed FFB stick will use PID loops (not to be confused with the USB PID spec) to prevent the stick from oscillating back and forth. PID feedback loops are a series of equations that make sure the stick moves quickly and effectively to it's commanded position, but without over shooting, under shooting, or bouncing back and forth. It may not be necessary to use PID loops, but again, a well designed FFB stick, or one with a lot of power should use PID loops if you want it to work better.

 

The USB FFB spec, if I understand correctly, usually moves the stick to a given position using a force, not an X/Y position and speed. So FFB must have the ability to see that you are not at the commanded position, and calculate the power to be driven to the motor to apply the commanded force to reach the commanded position. So the software needs to understand both - position and force - for a FFB stick.

 

This is actually the same in all servo systems - for example a CNC machine built using DC or AC Servo motors (not stepper motors) will work to both position the axis as well as do so at a given speed or force. A CNC machine is more focused on the speed thing whereas a FFB stick is more focused on the force thing, but the equations are similar, and still use PID Servo feedback methods.

 

None of this applies to a stepper motor because stepper motors are not positioned using a feedback loop. You count the number of steps and just know where you are. Similarly, a stepper motor would not work well for a force to be applied to move a stick because the force of a stepper motor is always a discrete element - a step, with the same force. You can step it forward or back, but not really control the force required to do so. Finally, stepper motors, like RC Servos, do not free spin easily - so they are entirely inappropriate for a FFB stick.

 

What does the 'control unit' do? I take it that's something we can't build our self?

 

I think Berniyh is referring to the motor drive controller - the analog circuit that specifically drives the motor (e.g. an H Bridge circuit). The motor driver is controlled by a +/-10V input, or a digital input from a CPU. For example, for the +/-10V motor driver, the larger the voltage applied, the faster the motor will spin, or the more force it will apply. For a digital interface, there are several ways that might work, but one example (as in MetalGear's software I think) is to use a PWM (pulse width modulated) signal. As the pulse width changes, the motor spins faster or slower, or in reverse. Of if not spinning, it applies a larger or smaller force.

 

As discussed in this thread, there are several off the shelf aftermarket drivers to drive motors, but as the motors get larger (i.e. direct drive vs. gearing), the motor controller gets bigger as well. More current, larger components, higher cost all around. And then you also start having to add cooling fans and maybe cooling fins on the motors.

Link to comment
Share on other sites

Thanks Drakoz, that is a very detailed and much appreciated post.

 

I had been thinking that the force required to be exerted on the stick would essentially be calculated by the simulator itself and all we'd need to do would be to fulfill these requests. I had thought these requests would basically just be vectors (as in X by this much and Y by this much) along with a handful of pre-canned sequences such as saw-tooth waves and momentary spikes. That sort of thing. I take it this is not the case.

 

In terms of implementing a motor drive controller if modulating a single voltage is all that is required I'm sure it wouldn't be too hard to do our selves. In fact in my tinkering over the past few days I've actually already done as much using a L293D ;) Here's a good tutorial I followed about using the L293D with an Arduino. Obviously if the amount of current drawn by the motor would fry the L293D chip we'd need something in between but surely we'd be able to find a way.

 

However, if the motor controller is required to monitor the position of the rotor and interpolate between poles and God knows what else, then perhaps it will be beyond us.


Edited by Slartibartfast
Link to comment
Share on other sites

 

However, if the motor controller is required to monitor the position of the rotor and interpolate between poles and God knows what else, then perhaps it will be beyond us.

 

With the community that is here I don't think anything is "beyond us". I am not a professional programmer but the arduino environment is very simple to grasp. Here is a short program I wrote using a few libraries that enabled me to read a load cell and position a servo based on the load. I did this with a stepper also which provided a very smooth response to stick pressure. The problem with the load cell approach is that when you introduce a force feedback function it thinks you are moving the stick and adjust the stick position accordingly. Again I was not looking for force feedback system, but a very smooth and highly adjustable stick with helicopter force trim and accurate fixed wing trimming that moved the joystick. Again this was just a very basic proof of concept experiment.

 

20171120_134216_resized.jpg

 

 

#include <Q2HX711.h>

#include <Servo.h>

 

const byte hx711_data_pin = A2; // sets aurduino pins

const byte hx711_clock_pin = A3; // sets aurduino pins

 

int raw;

int servo_pos_send =90; // variable to store the servo position

int stick_pressure=90;

Servo myservo; // create servo object to control a servo

Q2HX711 hx711(hx711_data_pin, hx711_clock_pin); // Sets pins per variables

 

void setup()

{

Serial.begin(9600); // only for serial monitor diagnostics

myservo.attach(9); // attaches the servo on pin 9 to the servo

}

 

void loop()

{

raw=(hx711.read()/100.0); // reads sensor

stick_pressure = map(raw, 14000, 21000, 0, 180); // maps desired sensor input range to servo sweep

servo_pos_send = stick_pressure; // seperate variables for future PID tuning NO TUNING IMPLEMENTED

if (servo_pos_send >= 0 && servo_pos_send <=180) // cleans up servo glitching

{

myservo.write(servo_pos_send); // sends servo "move to" position to servo

 

// Serial.print(raw); // only for serial monitor diagnostics

// Serial.print(" "); // only for serial monitor diagnostics

Serial.println(servo_pos_send); // only for serial monitor diagnostics

}

delay(15); //rc servo compatability

}


Edited by MilesD

Now shipping up to website Pre-Order Form date 2022/03/10

Pre-Order  Form Submission https://pointctrl.com/preorder-form/

PointCTRL Support Discord https://discord.gg/jH5FktJ

PintCTRL Website https://pointctrl.com/

PointCTRLsmall.jpg

Link to comment
Share on other sites

Hmmmmmmm would not having a small servo that "talks" to the sim for the purpose of determining stick forces and feedback and then have that servo actuate an adjustment lever that changes the pressure level in a hydraulic circuit be best? If stick forces were controlled via hydraulics you could control it with very small simply motors. Just a thought....

Link to comment
Share on other sites

I had been thinking that the force required to be exerted on the stick would essentially be calculated by the simulator itself and all we'd need to do would be to fulfill these requests.

 

Yes, the most basic FFB command is (I believe, others will have to check me on this) a force and a vector, but that information is generic. Not something you can just give to a motor driver. You have to recalculate the input to the motor controller to match the motor strength, gearing, stick length and weight in order to implement the force and vector commanded by the FFB protocol. This type of force could be used to implement friction or hydraulic feel like the way simFFB does it, or other effects. But it is probably not so often used in flight sims.

 

The other important FFB command would be the position of the spring center and the spring force. Unlike the vector/amplitude force described above, the spring center is positional. If the stick is moved away from the commanded spring center, the CPU inside the FFB stick must calculate and apply a force based on a simple spring force to return to the 0 position. Hence the spring center command would be used for cyclic brake on a helicopter. Or by changing the intensity of the spring force to approach 0 force, you could mimic the reduction of wind force on a WWII war bird as it slows and stalls. So in fact, spring center and force is probably the one we (DCS pilots) care about most.

 

The FFB protocol has other commands as well, like saw tooth or square wave movements which are intended to mimic different effects (gun fire, vibration, etc.). In those cases, too, you get a command (e.g. square wave at a given amplitude and frequency) and you must interpret that command to the motor driver to get the correct feel. This is why ever FFB stick/motor combo needs to be tuned. Most of these effects are not important to us for DCS, they are more gimmicks.

 

And if it isn't clear - the FFB protocol issues a simple command, and the CPU (e.g. the Arduino) must interpret that and give inputs to the motor controller to create the desired effect. The Windows PC has no knowledge about how the motor is driven except for seeing how the stick actually moves.

 

So that gets to the feedback part of the loop. The stick is moved by the human, or by the motor controller, the position is fed back to the flight sim, and it may then issue a new FFB command based on the movement. More likely, though, the sim will issue a command (like spring force and spring 0 position due to a helicopter cyclic brake command) and then do nothing further until the cyclic brake button is pressed again. But the FFB stick's CPU (the Arduino for example), must also constantly monitor the position of the stick and implement the previous FFB commands by adjusting the motor driver's input as needed. This is a constant activity.

 

So that is the second feedback loop - the Arduino monitors the stick's position and drives the motor controller. When I talked about PID feedback loops previously, those are implemented on the Arduino and can be as simple or as complicated as you want to make them. Heck, some FFB sticks (most of them???) probably didn't even use PID loops, and if there is no resistance to stick movement, the stick will slam back and forth trying to reach the commanded position, beating themselves to death as they oscillate to pieces. That is why most FFB sticks have a sensor to see if a human is holding the stick. When I do my own FFB stick, though, I plan to implement PID feedback looks to prevent this, and so I can make a safe FFB stick that doesn't require a "hand sensor".

 

Obviously if the amount of current drawn by the motor would fry the L293D chip we'd need something in between but surely we'd be able to find a way.

 

Yes, which is why you need to know the power draw of the motor at 0 RPM while being commanded to the maximum amount of force you want to create. For example, if the stick is capable of pushing 10 ft-lbs of force on the stick while the pilot is holding it stationary. That state draws the most current. You need to make sure that the motor, the motor controller, and the power supply can all supply the required current without burning up. Also, you need to be wary of the heat that builds up inside the FFB stick's enclosure. So fans and heat sinking may be needed. Most of the better FFB steering wheels have fans and heat sinks on the motors, for example.

 

However, if the motor controller is required to monitor the position of the rotor and interpolate between poles and God knows what else, then perhaps it will be beyond us.

 

Not beyond us. The motor controller is responsible for managing which poles to drive how and when. Whether it's a single phase DC or AC motor, or a multi-phase motor (like a 3 phase AC motor), we are isolated from that by the motor controller. All we do is provide an input to the motor controller in the form of an analog input (e.g. -10 to +10V) or a digital input like a PWM signal, or with actual commands through an I2C, SPI, or other serial bus.

Link to comment
Share on other sites

You cannot tell the motor a "force". You have to drive the motor with a given voltage/current and watch the hall effect sensor as the stick moves back into the commanded position. So it is a feedback loop. A well designed FFB stick will use PID loops (not to be confused with the USB PID spec) to prevent the stick from oscillating back and forth. PID feedback loops are a series of equations that make sure the stick moves quickly and effectively to it's commanded position, but without over shooting, under shooting, or bouncing back and forth. It may not be necessary to use PID loops, but again, a well designed FFB stick, or one with a lot of power should use PID loops if you want it to work better.

 

I don’t mean to oversell the Wheatstone bridge but it would allow precisely that; commanding a force. Here’s an example of what I mean (note this is a rigid stick but the strain gauging technique still applies) It would also allow nearly any gimbal design to be adapted to FFB. Once you’re familiar with shunt calibration almost any metal object can be turned into a load cell. It would also serve as the “hand sensor” you mentioned.

 

I understand it adds a layer of complexity though.


Edited by SinusoidDelta
Link to comment
Share on other sites

Thanks Drakoz, that's all pretty much as I expected, other than the stick being required to calculate its own 'spring-force'. Presumably it can't be that hard (it's no doubt just a quadratic function of the difference between the stick's position and its 'centre') but still I thought it would be part of the simulator's job.

 

As for aerodynamic forces, is the stick really required to determine these as well???

I really would have thought aerodynamic forces would have been part of the sim's job description. Again, we can derive a crude algorithm based on airspeed and possibly AoA but really, what is the simulator actually doing in order to 'support' FFB?

 

 

In terms of implementing a motor drive controller...

 

However, if the motor controller is required to monitor the position of the rotor and interpolate between poles and God knows what else, then perhaps it will be beyond us.

 

In regard to being "beyond us" I was referring to implementing our own motor drive controller itself. As I said, if it's as simple as modulating a single voltage I'm sure we'll have no problem but I was trying to imagine what might cost the $500 Berniyh mentioned.


Edited by Slartibartfast
Link to comment
Share on other sites

As for aerodynamic forces, is the stick really required to determine these as well???

 

Sorry if I wasn't clear. Yes, the sim calculates aerodynamic stuff like the control surfaces going light when you are about to stall. The way these are implemented is the sim just commands a reduction in the effect of the spring force. I only mean that translating such sim generated force commands into something that is "correct" for the stick has to be done by the software on the FFB stick, and "correct" for the stick is kind of up the person designing the FFB stick.

 

Similarly, SinusoidDelta comments about a way to implement actual correct force is kind of a neat idea. So I guess there are many ways you could tackle this. But just remember that the force numbers coming from the sim are really just guesses. FFB sticks are not a calibrated device. Hence why DCS has a "spring force" and "effects force" percentage adjustment in the controls menu.

 

In regard to being "beyond us" I was referring to implementing our own motor drive controller itself. As I said, if it's as simple as modulating a single voltage I'm sure we'll have no problem but I was trying to imagine what might cost the $500 Berniyh mentioned.

 

Got it. Yes, cost is a function of size of components. A bigger motor needs bigger silicon (bigger FETs), heat sinks, and power supplies. Power electronics is like that - cost goes up exponentially as the power requirements increase. But the fundamental circuits used to drive motors are still common and typical. For example, H-bridge circuits for a DC motor. It gets more complicated for AC motors, though, as they need to sense communication as the motor rotates.

 

Luckily, we can buy motor driver circuits off the shelf for any kind of motor. Unfortunately, cost gets expensive fast as you move to bigger motors.

Link to comment
Share on other sites

Hi

Just a small heads up:

I finished a Gimbal prototype.

It is not meant to be used as finalVersion, as it is not very durable.

20171123_203833.jpg

 

 

The Motors are not connected and the ones Itest with are quite weak.

But for working on the Software it shoulddo.

Speaking of Software. I am integrating anADS1115 in my design. As it gives 16bit Resolution for my Hal's. Is that ok fora General design? Or do we need a second Version with only the internal 10 ADC?

MetalGear_Honk

20171123_203833.thumb.jpg.72364a2ba7c53303240c9ab697535cf8.jpg

The threemost dangerous threads to Programmers:

  • Fresh air
  • Bright sun light
  • The horrifying screams of singingbirds

Link to comment
Share on other sites

I finished a Gimbal prototype.

 

Nice!

Could you make the specifications available such that I could knock one together myself?

 

I've actually got a 3D printer on it's way now so hopefully I'll be able to get a test rig up and running and finally start smashing out some code :thumbup:


Edited by Slartibartfast
Link to comment
Share on other sites

Hi

Sure but it will have to wait till Mondayas I am away for the Weekend.

Another small Thing is that I didn't hadproduction in mind when I designed it. The most center parts do not fit in withoutsome heating and bending.

I will draw some gears over the Weekendthe old style (pen and Paper) so I can calculate a bit and integrate that inthe test rig.

Still not quite sure how fast the stickwill have to move.

Another note: does anybody has an Ideawhat effects are supported by DCS?

The main Goal is to integrate all, but thesupported ones are higher priority.

MetalGear_Honk

The threemost dangerous threads to Programmers:

  • Fresh air
  • Bright sun light
  • The horrifying screams of singingbirds

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...