Close
0%
0%

ExacT force feedback steering wheel

The ExacT is an affordable precision force feedback sim racing wheel platform with open source hardware/software

Public Chat
Similar projects worth following
The ExacT is a sim racing wheel designed to provide the track-feel of an expensive direct drive wheel, without the price-tag of some of the other direct drive wheels on the market.. This project was inspired by this thread https://goo.gl/cTPx7o on xsimulator.netHere is a demo of what I have working so far https://youtu.be/0ifB8cdinQI

The motor drive system is composed of a 12NM NEMA32 stepper motor.,off the shelf TI development boards, a custom phase current sensing board, custom firmware,  and a US Digital 5000 PPR  (20000 CPR) Differential encoder. 

The software uses Field-Oriented Control to, with the help of the encoder, precisely control  the magnetic flux vector so that maximum torque with minimal ripple is achieved. 

stepperFOC.xlsx

Excel Spreadsheet for FOC of stepper motor

sheet - 26.81 kB - 02/08/2018 at 04:41

Download

  • The Grand Redesign

    John Taylor11/07/2018 at 04:27 0 comments

    Hi Folks. I left you guys last time with news that electrical noise from the motor was causing problems with some of the important signals in the design.  The PWM signal from the PC that lets the motor know how much force to produce and in which direction was so distorted that is was unusable and the encoder signals were affected at high currents. I ordered a new motor driver with integrated phase current sensing to move the motor traces far away from the signal traces on my board, but when It arrived, it did not fit on the current C2000 launchpad with my custom driver board well at all. When I did get it to fit, I had to re-do the encoder connection and ended up breaking one of the pins off of the back of my US digital encoder... This was the second pin that broke on this encoder and It took some real finesse to re-attach the previous one.

    Instead of trying to patch the encoder up and continue testing, I took this as an opportunity to  address some of the major design flaws with the project.

    First, the encoder is a pain to install. It requires a custom 3D printed adapter, Standoffs and also requires gluing to the motor shaft, which at best is tedious and at worst causes misalignment that could rip the connection apart at high speeds. Also I was using a single ended encoder, which is susceptible to noise compared to a differential encoder. To remedy this I searched and searched for a through-shaft encoder to easily attach to this dual shaft stepper motor. After several hours of searching for a through shaft encoder with a 12mm hole with no luck, I was just about ready to give up. Then I had one final idea...Check Alibaba. Immediately I was presented with several serviceable solutions and settled upon the GHH60-12G5000BKL5(60mm outer, 12mm through hollow shaft, 5000PPR, 5v line driver output, 1 meter cable side) encoder from CALT. I should be receiving the motor and encoder by next Monday, so We I'll be interested in the quality of the encoder and to see how well the motor and encoder fit together. Hopefully this will solve the encoder noise and fitment problems for good.

    Another problem was the entire interface to the STM board. I was trying to isolate all of the signals from the board, but the power for the board and the USB comms were two separate connectors so there were a lot of wires everywhere on my desk. To simplify this, i will power the STM from the motor supply and isolate between the computer and the STM USB comms. This will require a custom adapter board that will connect the motor driver, C2000 board and the STM. It will also contain the differential signal receiver for the encoder. Here is a block diagram of what the new system will look like.

    I hope to be getting into some of the PCB design soon, but I have been doing a lot of that at work lately so it's hard to find time/motivation. Should have something by the end of the year.

  • MAKE SOME NOISE

    John Taylor10/23/2018 at 02:18 0 comments

    Although it has been several months since I updated the site, I have still been working on the project. Since the last update I have met several milestones, and ran into a HUGE hurdle. Let's get into it.

    The biggest accomplishment I have made so far has been getting motor current control working. I was able to leverage TI's IQmath fixed point library to implement the Field Oriented Control algorithm so that it runs fast enough to be useful. It was a challenge to get all of the libraries working and I have to remove all of the function calls from the algorithm to make it lightning fast. With all said and done, the algorithm works well. 

    I have noticed that sometimes the measured electrical phase angle becomes offset from the actual value, usually when the motor is under heavy load. I am chocking this up to noise from the motor interfering with the encoder signals.

    I have also been able to get the PWM capture from the STM disco board working. The PWM from the disco board tells the motor controller how much force to apply and in which direction. Unfortunately when the motor is running the signal is severely distorted. This seems to be due to the motor power trace running right next to the signal line. The noise on this line makes it impossible to do any real testing with IRacing, which is disappointing.

    In order to solve these problems I have ordered a new motor driver from TI that will allow me to move the motor traces away from my signal lines. 

    I have also designed a "brake chopper" board that connects to to the power supply and prevents the motor from putting unwanted back-emf onto the supply.

  • Plotting

    John Taylor05/04/2018 at 02:09 0 comments

    Today I finally got back to the project a little bit. I got the basic plotting functionality for the phase currents implemented and it looks pretty good. Hopefully later this week I can make the plots a little nicer and add labels, then start working on getting the controller math worked out and tuning. The github for the python plotting libraries can be found here : https://github.com/Taylorjtt/ExacTune

  • Testing complete...on to firmware development

    John Taylor04/06/2018 at 22:31 0 comments

    Update

    Wow, it's been a while since this project has gotten an update. After a long hiatus, I have finally completed the assembly and testing of the current sensing booster-pack. The only problem i ran into was one of the tiny 0402 caps was shorted because of a poor soldering job. I was able to fix that easily enough, and since I tested for continuity between power and ground before actually powering the board I didn't break anything. I also modified the firmware to use the new ADC channels that the booster pack feeds into. To verify, I was able to apply voltages to each of the motor phases and see the correct current output in the ADC registers.  Over the last couple of days I have been working on a task-scheduler that I can use to do various tasks at fixed rates using one timer.  I used this blog post as a template, but since I am using C++ I am doing things a little differently. Check the github if you are interested. I will use this for my control loops as well as data transfer to a host-PC (more on that later...)

    Whats Next?

    The obvious next step is to start working on the controller. We very obviously need current controllers for both the A and B phases.  In my experience developing control systems, ones job becomes much easier if he/she is able to see an output of the control signals as well as the setpoint in order to do step-response test, see errors in real time, etc. My plan is to develop a GUI in Python that communicates with the motor control processor to facilitate this. This GUI will make tuning and validating the system much easier. I usually use Java for this sort of thing, so I am excited to see what Python brings to the table. Once the GUI is working I'll implement the PID controllers for the current control system and start testing. 

  • Current Sensing board 99% assembled + Test Plan

    John Taylor02/28/2018 at 19:52 0 comments

      I received the phase current sensing PCB from OSHPark on Monday. I finally got around to assembling it today. Here are some pics.

      If you look closely, you will notice that U2, one of the isolators, is missing. Unfortunately I forgot to order this part from digikey and I'll have to wait for it to come in.  There were a few problems with the board. I used really tiny 0402 resistors and capacitors and from an assembly perspective this made things tedious. I also forgot to put a package outline and a pin-1 callout on the current sense amps so I had to reference the Altium file to figure out which way they needed to go on the board. 

      Test Plan

      1. Make sure no power nets are shorted to ground (done)
      2. power board on (done)
      3. Check Vref (done)
      4. Apply i known current through the channels and make sure it shows up on the output of the op amp (done)
      5. Check all of the digital signals to make sure they are working (done)

      I probably wont get to this until late next week because I'm going to be out of town.

  • Current Sensing PCB is ordered

    John Taylor02/11/2018 at 21:44 0 comments

    After a few weeks of tinkering, I finally finished the PCB that will allow me to sense the phase currents of the stepper motor. The phase output wires of the motor driver board plug into one side and feed the motor current through 5mohm resistors. Special kelvin connections that I learned about from this article were used to improve the measurement accuracy at high-currents. INA240 current sensing amplifiers from TI were used for their enhanced PWM rejection. With these components I should be able to sense currents from -16.5-16.5A. Isolators were added to isolate the motor driver processor/power circuitry from the STM discovery board. I have also added connector ports to route the encoder and PWM signals to the STM discovery board. This board has a standard booster pack layout and will plug directly into the C2000 launchpad.

  • Update

    John Taylor02/08/2018 at 04:39 0 comments

    I have been working on the project for almost a month now and have accomplished a bunch, and also ran into a few problems.  

    Accomplishments

    • Sourced motor, encoder, motor driver,wheel rim, game controller interface board (STM32) and motor controller processorboard (TI C2000)
    • Mounted the encoder to the back of the motor with a 3D printed adapter. I had to machine a hole in the back of the motor case in order to have access to the shaft. I then drilled and tapped mounting holes and mated the encoder shaft with the motor shaft via an adapter. (pics)
    • Mounted the wheel rim to the motor output shaft with a 3D printed coupler (pics)
    • Wrote software to set up the Motor Controller Processor to talk to the Motor Driver/send PWMs and wrote a basic stepper motor algorithm to spin the motor up to about 300RPM
    • Researched Field Oriented Control for Stepper motors extensively and made an excel spreadsheet detailing and graphing the desired current in each of the motor coils in one electrical cycle. (Great PPT on the subject)
    • Got MMos set up on my STM32 dev board and got my FFB-less wheel to control a car in IRacing. (video

    I have however ran into one big challenge. The DRV8301 Motor Driver Booster pack from TI uses low-side current sensing. Because of the topology of the motor I am using, the sensors on the low-side of the inverter do not provide enough information to determine the phase currents. For this reason I have been working on a custom phase-current sensing booster pack that the motor leads will pass through on their way to the motor. This booster pack will plug directly into the launchpad dev board and provide the phase current information that I need for FOC. 

    The plan moving forward is to order the PCB in the next couple of days. As soon as i receive the PCB's I will test them and begin writing the FFB code. 

View all 7 project logs

Enjoy this project?

Share

Discussions

jnowak1054 wrote 10/15/2018 at 07:13 point

Thoughts on utilizing a system such as https://hackaday.io/project/18468-smart-stepper could be used as driver and encoder combo? If so, one would think it would certainly simplify the build.

  Are you sure? yes | no

John Taylor wrote 11/07/2018 at 04:37 point

That is a really cool project.

It seems like they are really successful with position  control. 

This application uses force control and requires a lot more processing power to run the Field Oriented Control algorithm, so I don't know if their platform would work. 

I am far from an expert, however, so I'd love to talk to these guys about their experience working with these types of motors.

  Are you sure? yes | no

lee.williams824 wrote 09/23/2018 at 21:05 point

hi John

Great project idea, super exciting what you are attempting. I'd love to see someone bridge the gap between the commercial wheels and the servo motor wheel out there. I know accuforce use a custom stepper but if you guys could make it a reality too, count me in.

Any news on how the project is going? Once again, great work

  Are you sure? yes | no

John Taylor wrote 11/07/2018 at 04:44 point

Thanks for the interest! Sorry it has taken me so long to respond. 

I have also read that the AccuForce is using a stepper motor. I am really curious about the internals of their design, particularly the encoder that they use.

As far as updates, I am still working on the project. I have had good progress getting force control working with the motor and motor driver, but I ran into some noise issues with some of the sensors/signals. There were also mechanical problems with the encoder I was using. All of this required me to make a pretty big hardware pivot. Its going to take me some time to design some new PCB's and do some more testing but I have a good feeling about this next iteration. I'll be sure to post more updates, because I know sometimes I fail to keep this site updated. The goal is for everything to be open source so that anyone with enough ambition can build one of these for less than you can buy one from AccuForce.

Keep in touch!

-John Taylor

  Are you sure? yes | no

matthew.gregg wrote 05/01/2018 at 11:40 point

Hi John, I have been doing some investigation after reading this. A thought has struck me that maybe it could be possible to use this  BOOSTXL pack from ti http://www.ti.com/tool/boostxl-3phganinv. It has inline current sense and is compatible with the launchpad eco system. I see that there would be a extra need for encoder input, but that should be a relatively simple circuit.  I have most components for this project now, Including a NEMA34 13NM stepper.  I'm currently having nightmares with TI CCS, but slowly this software stuff is coming back to me.

  Are you sure? yes | no

John Taylor wrote 05/01/2018 at 14:40 point

Matt, it would definitely be possible to use that booster pack. It is actually the same design I based my phase current sense board on. It seems like TI only recently started selling it however. Because when I found the reference design a couple months ago it was not avalilable for purchase. Feel free to message me with any problems you have with CCS. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates