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

Using a Raspberry Pi for controlling actuators

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Dewald, Nov 13, 2016.

  1. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Good day,

    I am new to programming and the use of a raspberry pi. I have a great interest in racing and would like to build my own racing simulator. I would like to know how does a raspberry pi communicate with the xsimulator software. I would like to use telescopic actuators to induce the motions and would like to know how to get all the software and hardware to work together.

    Kind regards
  2. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    The same as a microcontroller does; either by serial or UDP.
    Last edited: Nov 13, 2016
  3. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Oky thanks.

    Because I'm new to a raspberry, how do I access the data sent by the Game Engine in my raspberry?
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    either by serial or UDP.
  5. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    If I send data via UDP, what must I code the Pi with in order to see what and how the data was received?
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    I don't know. I don't use one and neither does anyone else here for motion (as of now at least). Since you are new to programming I suggest you take a look at what you can get from this site and go that route instead.
    https://www.xsimulator.net/community/forums/simtools-compatible-interfaces.25/
    • Agree Agree x 1
  7. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
  8. TFOU57

    TFOU57 Member

    Joined:
    Mar 30, 2009
    Messages:
    164
    Location:
    Thionville - France
    Balance:
    5,723Coins
    Ratings:
    +16 / 1 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    Hello ,
    What type of actuator?
    DIY?
    Motor DC or AC ?
    Raspberry Pi = Output PWM 3.3v?
    What power interface do you use?

    Bonjour ,
    Quel type d'actionneur ?
    DIY?
    Moteur DC ou AC ?
    Raspberry Pi = Output PWM 3.3v ?
    Quelle interface de puissance comptes-tu utiliser ?
  9. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    One issue with the R. Pi is it doesn't have built in ADC's so it can't read pots without adding external ADC's. I don't imagine it has PWM outputs either. That said, it may work well for reading encoders and you could use Sabertooth controllers with it. :)
  10. PiaMan

    PiaMan Active Member

    Joined:
    Aug 2, 2015
    Messages:
    192
    Location:
    Saskatchewan, CANADA
    Balance:
    607Coins
    Ratings:
    +131 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino
    Maybe a motion controller is a little ambitious for first programming project. Start by learning to open data ports and receiving data first. Maybe turn on an led. Next try to understand something like the code in the smc controller. If you understand that you should be able to start porting the concepts you've learned to raspberry pi
    • Agree Agree x 1
  11. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Thank you, I will read up about it!!
  12. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    I have done some small programming like that, just never used live input data and also never used serial or UDP and don't know how yet.
  13. Dewald

    Dewald New Member

    Joined:
    Nov 10, 2016
    Messages:
    7
    Location:
    South Africa
    Balance:
    145Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Hello,
    Want to use SMC 117N Electric Linear Actuator, 24V dc, 200mm stroke actuator
    It is a DIY project I want to start,
    Want to use DC as far as possible,
    Yes it's 3.3V
    Not sure what to use yet
  14. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,574
    Occupation:
    Retired
    Location:
    Brisbane Australia
    Balance:
    28,370Coins
    Ratings:
    +2,844 / 38 / -0
    My Motion Simulator:
    AC motor, Motion platform
    https://www.xsimulator.net/community/faq/
    • Agree Agree x 1
  15. mirkobastianini

    mirkobastianini Active Member

    Joined:
    Jan 23, 2017
    Messages:
    193
    Occupation:
    informatic
    Location:
    italy
    Balance:
    1,300Coins
    Ratings:
    +77 / 2 / -0
    My Motion Simulator:
    2DOF
    If you want to install Simtool on Raspberry, this is impossible because it's developed in .net language. Maybe you can try to install with "wine", but in my opinion it doesn't works.

    Anyway you can send data from Simtool to Rasp with USB (serial), or UDP. When this communication works, you can write your custom python script to move actuators.