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

i have made my first death machine 2dof

Discussion in 'DIY Motion Simulator Projects' started by 0v3rkill, Mar 29, 2022.

  1. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    hi i have been lurking the forms, for quiet some while now, gathering ideas and info.
    I got my first motivation to build this from "D Max" on youtube, he made some nice simple videos showing that it could be done easly.

    i have build around 3 weeks on everything made 2 types at first.

    for the center piece i used a cross section that was on top of a 4x4 axel from a jeep.

    20220312_141124[1].jpg

    with a bit of welding and help from my father i turned it into this :

    20220312_141058[1].jpg

    Then i first made a version to test how sturdy it was with mdf wood and some metal reinforcements :
    20220314_074331[1].jpg
    (it wasn`t ! the wood still bends when you sit on it with 95 kilo`s and thats even without the chair etc.)

    i then got me some pallets from work, and salvaged the parts of it :
    20220318_193647[1].jpg

    added some planks on top also :

    20220320_110340[1].jpg

    And connected the mouting for the motor`s (im using 2 vw golf, bora wiper motors 12v 40watts each)
    20220320_170416[1].jpg

    of course the way it was mounted now it was WAY to heavy for the motors to carry or function proper.
    (was allot of fun for my daughter for the first test)

    i then removed the motor`s at the back and moved them as far as i could to the front.
    this resulted into the following.



    Problems that i had with my build :

    * the 180 degrees hall sensors where all out of stock, so i ordered 360 degrees versions
    - the range of the sensor was incorrect when mounted to the motors (i fixed this by changing the software for the arduino a bit and adding a scale factor to it)
    - the motors when mounted the second time where reversed but the software only allowed 1 reversed motor, i added the option to also reverse the other motor.

    the problem that i need to fix is the increase the power supply, because it`s only 8,3 amps and running into trouble when hitting the low ends of the motor.

    The adjusted file is a few posts below this one
    • Like Like x 3
    • Useful Useful x 1
    Last edited: Apr 1, 2022
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,533
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,022Coins
    Ratings:
    +10,776 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    • Like Like x 1
  4. SaintFrank

    SaintFrank Member

    Joined:
    Aug 14, 2021
    Messages:
    76
    Occupation:
    Proces operator
    Location:
    Nederland
    Balance:
    136Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi,
    Nice build , and budget friendly:thumbs

    What did you change in the software code ? (smc3 i guess)
    And how does this scaling factor work.
    I have 360 degrees hall sensors on my rig , wondering if i can optimize their behavior with your changes
  5. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Yeah i changed some code in smc3

    i will upload the code tonight over here so you can check it out, i changed the scaling by using a small multiply and small deadzone.

    i think it was * 1.75 and 500 wass the middlepoint for the reading
    so when the sensor was only at 625 isch it was at the max top for me so using the calculation it would rise it to 1093 and i also added a max in the formuala so that it would go over it.
    for the other way around i used / 1.75 so that 425 would go to 242.

    for the rest i only added an option so that you could change directions for both motors
    • Like Like x 1
  6. SaintFrank

    SaintFrank Member

    Joined:
    Aug 14, 2021
    Messages:
    76
    Occupation:
    Proces operator
    Location:
    Nederland
    Balance:
    136Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks for the information , will check out code

    I only calibrated the hall sensors analogue with a multimeter.
    https://nl.aliexpress.com/item/1005002969876097.html?spm=a2g0o.productlist.0.0.defa397fVgQuIC&algo_pvid=caab89f9-46cb-44a3-8c37-5a1b71e5b0fa&algo_exp_id=caab89f9-46cb-44a3-8c37-5a1b71e5b0fa-11&pdp_ext_f={"sku_id":"12000023010618671"}
    set the motor levers parallel to the ground and getting value of hall sensors close as possible to 2,5v.
    I don't know much about what is going on in the arduino:grin , time to learn

    Attached Files:

    • hug.gif
      hug.gif
      File size:
      7.5 KB
      Views:
      111
    • Like Like x 1
  7. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    in the arduino the range/position of the sensor gets send as a value between 0-1023 where 2,5v would be around 500 ish
  8. SaintFrank

    SaintFrank Member

    Joined:
    Aug 14, 2021
    Messages:
    76
    Occupation:
    Proces operator
    Location:
    Nederland
    Balance:
    136Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    How do you read the value of the hall sensor ?
    serial read FeedbackPin trough the serial monitor in the arduino software.
    and do you use center off set to get it to a value of 512
  9. David Baker

    David Baker New Member Gold Contributor

    Joined:
    Feb 3, 2022
    Messages:
    21
    Occupation:
    Engineer
    Location:
    Grand Rapids MI
    Balance:
    135Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino
    I have pots that have 1o turns and therefor were super slow. I also had to modify the arduino code. I ended up doing this:
    if (Feedback1 > 1020) {Feedback1 = Feedback1 - 1020;}
    if (Feedback1 > 918) {Feedback1 = Feedback1 - 918;}
    if (Feedback1 > 816) {Feedback1 = Feedback1 - 816;}
    if (Feedback1 > 714) {Feedback1 = Feedback1 - 714;}
    if (Feedback1 > 612) {Feedback1 = Feedback1 - 612;}
    if (Feedback1 > 510) {Feedback1 = Feedback1 - 510;}
    if (Feedback1 > 408) {Feedback1 = Feedback1 - 408;}
    if (Feedback1 > 306) {Feedback1 = Feedback1 - 306;}
    if (Feedback1 > 204) {Feedback1 = Feedback1 - 204;}
    if (Feedback1 > 102) {Feedback1 = Feedback1 - 102;}
    Feedback1 = Feedback1 * 10;
    but then that made it super noisy (signal wise).

    So I wrote an averaging function too:

    int FeedbackAveraging(int CurrentPosition)
    {
    static int FeedbackSum;
    static int FeedbackAverage;

    FeedbackArray[10] = FeedbackArray[9];
    FeedbackArray[9] = FeedbackArray[8];
    FeedbackArray[8] = FeedbackArray[7];
    FeedbackArray[7] = FeedbackArray[6];
    FeedbackArray[6] = FeedbackArray[5];
    FeedbackArray[5] = FeedbackArray[4];
    FeedbackArray[4] = FeedbackArray[3];
    FeedbackArray[3] = FeedbackArray[2];
    FeedbackArray[2] = FeedbackArray[1];
    FeedbackArray[1] = CurrentPosition;
    FeedbackSum = FeedbackArray[1] + FeedbackArray[2] +FeedbackArray[3] + FeedbackArray[4] + FeedbackArray[5] + FeedbackArray[6] + FeedbackArray[7] + FeedbackArray[8] +FeedbackArray[9] + FeedbackArray[10];
    FeedbackAverage = FeedbackSum / 10;
    return FeedbackAverage;
    }

    This seems to have greatly reduced the signal noise.
    *I know there are probably quicker ways to do the averaging, but brute force is always a simple way to go*
  10. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    this is the file with the changes i made

    Attached Files:

    • Like Like x 1
    • Winner Winner x 1
  11. SaintFrank

    SaintFrank Member

    Joined:
    Aug 14, 2021
    Messages:
    76
    Occupation:
    Proces operator
    Location:
    Nederland
    Balance:
    136Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    thank you very much .
    • Like Like x 1
  12. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    let me know if you can do anything with it or need any help with it.
    • Like Like x 1
  13. Halloween2go

    Halloween2go Active Member Gold Contributor

    Joined:
    Dec 12, 2019
    Messages:
    202
    Balance:
    1,407Coins
    Ratings:
    +175 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    That looks fantastic my friend! I'm glad you sorted out the POTs issue.. I still am going to order some 360's and mess around with the code when I get a chance.. Great job! Have a great time! DMAX
  14. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    i also posted my code changes a few posts up, maybe you can use it
  15. 0v3rkill

    0v3rkill Member

    Joined:
    Mar 24, 2022
    Messages:
    46
    Occupation:
    Programmer
    Location:
    Netherlands
    Balance:
    - 259Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    found out today that it`s a good idea to create a killswitch for the motor`s,
    will be making a killswitch on the floor and button box for the rest.
    il post pictures after my holiday
    • Agree Agree x 1