So, here is the SimpleFOC based hobby project I have been working on for quite a while now. It is a simulator and training device for paragliding. It was virtually all new to me, which made it more challenging, but also very interesting. I have solid knowledge of electronics and have developed software for most of my life, but power electronics, motors, motor drivers, CAN bus and everything else involved here where white spots on my map, not even speaking of the physics behind such a simulator. Many paraglider pilots have simulators to play with their harnesses, but only very few will have one which is active, like mine:
(sorry for the mess in the background…)
Right now it performs two tasks. It serves as a training device by simulating the forces on the break lines as perceived when flying through turbulent air and it serves as input device for an online paragliding simulation game.
For the first task the torque of the motors is controlled to exert increasing forces the further down the breaks are pulled. There is a “neutral” point, where the force is 20N and this is the normal flying position. To simulate turbulances, this neutral point is randomly moved up or down and the pilot has to keep the force constant in order to fly straight. Forces and weight shifts are evaluated and a final score is given at the end of each training session. For the second task, the online simulator xcsim is controlled via a bluetooth connection to a PC and input from the breaklines and weight shifts is passed on to the online simulation.
The technical realisation connects several units with a CAN bus. The two break units are based on B-G431B-ESC1 boards, AS5047 sensors - on my first self designed PCB since 35 years, T-motor G60 kv55 motors, a lot of 3D printed stuff and of course SimpleFOC (torque mode, FOC current, sensor calibration).
Another unit contains 5V power supply, gyro sensor, signal distribution and motor temperature measurement, all built around an ESP32
Finally, the central control unit provides a very basic user interface, sends all the training commands to the motors and communicates with a PC using Bluetooth. This unit is also based on an ESP32.
The main difficulties which I encountered during the development - apart from lacking knowledge - were broken cheap CAN transceivers on breakout boards, dealing with strong BEMF if the pilot pulls the strings fast (solved with an active shunt, thanks @Valentine !), a loose magnet which still gave reasonable angle readings from the sensor (solved with a lot of help from this great forum!) and finding the right strategy for pulling the break lines in a realistic way. The last point caused some major software redesign since I started with position mode, which allowed me to nicely control the speed at which the neutral point varied, but the resulting motion never felt smooth, so I moved to torque mode with variable ramp parameters, which is very smooth now. Of course, I redesigned the mechanics several times and experimented with different motors too.
Next steps:
- Gain more real world flying experience (I am still a beginner) in order to tune the behavior even better.
- Simulate movements of the seatboard caused by wind/thermal forces. No idea yet how I will model this, but I know already it will require very strong motors if it shall be realistic…
If there are other paraglider pilots here with similar projects or ideas, I am very open to discussion. I had planned to make the design open source, but I don’t know if I will ever find the time required to clean it up sufficiently and to document everything so that other people could replicate the design.
Happy landings,
Chris