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

4DoF controller and code?

Discussion in 'SimTools compatible interfaces' started by Javiju555, Oct 11, 2023.

  1. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello,
    some time ago I built my 2 DoF motion sim and I´m happy with it, but recently i wanted to search about more than 3 DoF and 4 DoF interested me the most, but I wanted to know if someone made some software like SMC3 but for 4DoF to start thinking about a project or maybe ask how people did sims like this, my first idea was something like the qs-v20 from qubic systems but without linear actuators, using dc motors with something like a 10 or 15cm lever
    Thanks
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You can use SMC3 with 2 Arduinos, as they will run on different ports, SimTools has no problem being configured for 2 Arduinos, again you just have to specify the correct ports in the Interface settings.
    • Like Like x 1
  3. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Oh thanks, I did not think about it, it will need 2 usb ports then but then could I divide the 4 motors into 2+2 so both of them would be less stressed than if one would be driving 3? Also, are there any software like Smc3 for something like esp32 o stm32? I was intending on driving like 200w motors so now I will look into some dc powerful and cheap driver
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    esp32 o stm32 are most commonly used for peripherals, like wheels and pedals, there are a range of member projects that use them for that if you do a quick search.

    If you mean you intend driving a single axis using 2 motors then it can be challenging, as build quality differences in hardware mean the two motors may not be perfectly in sync, so fight against each other.
    • Like Like x 1
  5. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Oh, I thought that as stm32 and esp32 are more powerful they would be more popular nowadays and more people used it.
    With the motors I meant like driving 2 axis per arduino, since my idea is using 1 motor per axis, but maybe later I will need to use more powerful motors, that is something I need to calculate soon,
    Thanks for the replay
    • Like Like x 1
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    2 axis per Arduino with SMC3 is fine.

    Tools like SimCalc can help you work out the tradeoffs in design Vs physics and the forces provided by motors based on their specs and the design: https://www.xsimulator.net/communit...e-linear-speed-and-forces-of-your-design.270/
    • Like Like x 1
  7. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Like Like x 1
  8. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'm still in search of a decent hall position sensing and I've been looking into the as5070a and the a1330lletr, which can sense the position based in a magnet on the axis, I may finally use this as they seem to be cheaper than aliexpress option and has analog output
    • Like Like x 1
  9. Yaser_ViraEQ

    Yaser_ViraEQ Vira

    Joined:
    Jan 2, 2024
    Messages:
    2
    Balance:
    - 37Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    SCN5, SCN6, SimAxe, Arduino, Motion platform, 4DOF, 6DOF
    help for 4dof about the Arduino code?
    It is possible to get the Arduino code for 4 axes.
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Please see the earlier post.
    • Like Like x 1
  11. Yaser_ViraEQ

    Yaser_ViraEQ Vira

    Joined:
    Jan 2, 2024
    Messages:
    2
    Balance:
    - 37Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    SCN5, SCN6, SimAxe, Arduino, Motion platform, 4DOF, 6DOF
    thanks
  12. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello, after some time i´m testing the initial setup I planned, the motors just move in one direction, and did an audible high pitch noise. I´m trying to find why because as it is 2 arduinos and im testing first 2 and then the other 2 (which for now have not been tested) and maybe will have the same problem or will work nice. I disconnected the motors from the IBT-2 to see with my scope the output the motor receive and i found that the noise do not come (or entirely) from the motors, as it still sounds. When i set up PWMmax over 40 the noise changes and my scope just shows random spikes of voltage but never with the frequency I set in smc3 Util, the IBT-2 which I´m testing (both of them) heat up even with the output just conected to the scope and without any current drawing. I´m using 24v as i´ve saw in other post that IBT-2 could not work well at this voltage, but I´m confused because that noise and the motors moving but just in one direction just switching on the button on smc, without PWM or Kp set (which makes the sim go down by the way) and heating up not just the IBT-2 but also the cable (and maybe internals of the motor, but its sill cold at touch)
    I post the photos of the last smc3 config I used and the scope output I got... I can do the same for all configs of SMC and still will have same results, maybe changing the sound a little if i put pwm frecuency up or turning PMWmax up.
    Also, the arduino I´m testing is an official one, first connected to the hub it should use and then directly to 3 different ports of my pc with the SMC3 modified to MODE2 as it should be.
    If more information is needed, I´ll try to get it. I´m using an IDSO1070A scope which also worked nice up for others projects so it works nice
    Thanks IMG_20240618_184640.jpg IMG_20240618_184645.jpg
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Shielding is important.

    Try Fpwm at 25 and also set MaxLimits:

    Max Limits Used to create a band at either limit of the feedback range beyond which if the motors move (typically through inertia) the SMC3 will automatically shutdown the drivers and keep them disabled until reset. This is essentially a safety mechanism if something goes wrong. The value can be between 0-255 (however can’t be greater than the current clip setting).

    [​IMG]
  14. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I've done that too, still nothing... I can still hear something, just different pitch. For the limits I usually set it to 255 too but since my computer and the sim aren't very close and the sensors are not mounted definitely (first I need to see where the center is) and I have It set up at 0 just have smc3 running, when I set it to 255 or other values and move the sensor it can change the sound if the feedback is above instead of below.
    Everything is pretty much shielded and the motors are specifically built dc motors, not wiper motors or things like that with each arduino sharing its ground with the 2 ibt-2 each one drives. The arduino I'm testing used to work in my first 2dof sim which used MM shield and still works if I modify the code to mode1 and use the wiper motors I had but this doesn't do anything. Also I have tested the motors with a pwm controller and they move fine and strong... I think it could be the IBT-2 that are faulty but I think if the cable of the motors and the IBT gets hot, it should have an output... Even if it's just in one direction
    I'll try to do more test to find what it is and post results of what you've recommended
    Thanks
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Members have reported quality issues with IBT-2s and also issues when running them at 24v, despite their ratings.
  16. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'll do more test to see if it's the IBT-2 that are faulty, I've bought the 4 at same time but only tested 2, I'll test the other arduino and ibt today to see if there are the same problems.
    I'm considering using cytron Md13s as my motors are 200w 24v 8.4A and it should handle it well or maybe I'll "upgrade" the IBT-2 with btn8982TA which I've seen that are the replacement of the bts7960, original from infineon and maybe it could fix the issue, if I finally find that the IBT-2 are the faulty parts... Maybe should I test them with 12v and my old wiper motors that worked with MM to see if the IBT-2 drives them good?
  17. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    After some tests, I´m starting to think that the noise I´m saying comes from the power supply, it just changes the pitch from 15kHz to 35kHz (at 5 kHz, 10 kHz and 15kHz it sounds at same pitch) and increasing the frequency makes the pitch go down... As i´ve said, the IBT-2 without anything connected to the output just get hot itselfs, is that normal?
  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,710
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    146,110Coins
    Ratings:
    +10,809 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I don't use IBT2s, so others are better qualified to advise, but in general controllers need cooling, but should not be hot under no load.
  19. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    As I´m seeing in other post, my problem could be very similar to gaboff_k one: Circuit not working with Arduino R3 and IBT-2 in SMC3 Utils (xsimulator.net)
    For the cooling part, I made in my 3d printer an adapter for a 12cm fan which I'm pretty sure it should be more than enough to maintain it cooled, also I added thermal paste to the cooler the IBT-2 has and added a little cooler on top of the bts7960... If with that modifications it still gets hot under normal operation I'll be worried haha but I think it might be that the IBT-2 are faulty and that makes the power supply make noise, makes themselves get hot and makes the motors only go in one direction at same speed no matter what PWMmax is selected.
    I'll test them as I said with 12v to see if they are 100% faulty and see what I'll do... Cytron looks good but replacing bts7960 with btn8982TA it's cheaper.
  20. Javiju555

    Javiju555 New Member Gold Contributor

    Joined:
    May 2, 2021
    Messages:
    19
    Location:
    Spain
    Balance:
    - 33Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I´ve just have tested the other 2 IBT-2 which I didn´t test before... they just work king of good, I did not put a load to them but they don´t output a random scope signal, don´t make the power supply to make any kind of noise and don´t heat up whiout load. Tomorrow I´ll test them with the same 2 motors to see what happens... Maybe I just broke the other IBT-2 because a bad connection to the arduino or because I put accidentally 30kHz at SMC3 and that drestoyed them.
    I´ll post what happens and when everything works I´ll upload photos
    • Informative Informative x 1