Hi All,
I already posted this information in my new user hello post http://www.x-sim.de/forum/viewtopic.php?f=3&t=2031#p16958, but figured this would be a more appropriate location so to start off I'll repost the relevant project information the update the thread with reports on what I'm doing and how far along I am.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As a start, I plan to build a force feedback wheel. I work at Applied Motion Products, a step and servo motor/drive company, so have lots of access to high-powered stepper and servo motors and drives as well as our machine shop and large format 3D printer for part fabrication.
I plan to build the wheel with a direct connection to an old left over servo motor (1 or 2 kW) and one of our servo drives.
I feel comfortable on the mechanical side and with anything involving configuring our motor and drive, but don't have much programming experience, so any help would be much appreciated! Depending on how successful the wheel is I might be able to convince my boss to let me build a 6dof platform using our big stepper motors as a tech demonstration as well.
Our drive can be set to run the motor in torque mode and have the torque settings sent to it as ASCII strings over a serial cable. The encoder position can also be queried to learn the wheel position. Since I'm new to this community and software, I have been looking through the forum and elsewhere online, but haven't yet found answers to a couple of questions:
Is there a way to have x-sim output steering wheel ffb as ascii strings?
If so, can the strings be customized and how?
What would need to be done to have x-sim receive input ascii encoder position results then convert them and send them to a game as wheel position?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Postby Relsek » Fri 7. Aug 2015, 10:44
Thank you all for the replies already, this really does seem like a great community.
I'm lucky to have easy access to my coworkers who have much more experience with these types of motors than I do to help troubleshooting problems.
After messing around with lots of settings and error over the last two days, I just got X-SIM to output lateral force in a reasonable scaling range to my servo motor using only a serial to usb adapter cable (and some weird math in x-sim).
I'm setting the drive in analog torque mode, using a constant voltage source from the drive's own +5 volt output pin, and constantly varying the offset using the x-sim output. It currently allows for 6 levels of torque from zero to a user-specified max torque in each direction right * If only I could get ex-sim to output decimals instead of integers there could be as many values as desired, but that's for a later date and should be easily resolved by inserting math either in a physical arduino-style board or another program between the X-SIM output and physical com port on my computer.
I'm just using a small test motor on my desk right now and don't have a wheel, so I can't calibrate the wheel to a final desired range of torque, but I think that will be simple to do once I finish the proof-of-concept based on how the setup currently works.
I haven't personally done work with an arduino before, but am trying to get this to work with as little hardware as possible for simplicity.
The thing I want to get figured out now is using the built in encoder (8000 counts per revolution) to act as a joystick. I can actually do all of the encoder querying through X-SIM at the same time as I send my ffb information out to the drive, so the solution I'm trying to find is a virtual joystick that can read incoming serial commands without taking over the port then doing some math before outputting as a virtual joystick that works for windows.
Yesterday I came across vJoy, which seems to do all of the joystick interfacing with windows and receives input from a user-written "feeder application". My coworker that's more experienced with programming thinks it should be pretty straight forward to write a feeder that monitors and grabs incoming com signals then converts them to degrees of revolution or whatever format vJoy needs to receive.
Have any of you ever used a virtual joystick program like that and maybe have any recommendations?
Any input is welcome and I'd be more than happy to put together some sort of guide to recreating my setup if I'm able to get it all up and running.
Thanks again!
-Relsek
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Overall, I found a solution to many of the problems I mentioned encountering in my first post and am now working on the steering wheel position aspect of this project. One of my goals with them project is to have the simplest hardware setup I can. I think it's doable to get this up and running with just a servo motor with encoder, a servo drive (120 from wall so no extra power supply), and a serial to USB adapter cable.
Also while only having 6 torque levels doesn't sound great, at least on my small test motor it feels smooth since I'm able to send axisinformations with a 0ms delay and have a very narrow deadband for the wheel center.
As mentioned, I'm currently testing with a 400W motor for safety, then when I have it working reliable I'll probably end up with a 750-1000W motor.
I'm leaving tonight for vacation for 2 weeks, but hope to finish the project soon after I get back so please feel free to ask questions or share input.
-Relsek