1. 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 Download Package Now!
  2. 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
  3. 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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

My first 3dof (wip) / 1kW AC servo / Arduino /

Discussion in 'DIY Motion Simulator Projects' started by Cartti, Aug 8, 2016.

  1. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    So... Hi!

    This is something i have been doing couple months now and it is nearly finished. It all started when i found these quite beefy AC servos online with a reasonable price tag. I was about to start building pneumatic motion sim, but ditched that idea when i found these puppies:
    [​IMG]
    Specs: 1kW/6Nm continuous / 3kW/18Nm peak (3 seconds). 400W servo from my bf20l cnc machine for comparison.

    After i got my servos i needed some gearboxes... ...aaaaand then i found they are ridiculously expensive. I tried sourcing 1:50 ratio planetary or conventional reduction gearboxes that meet the torque requirements and every single one was way beyond my payroll... Luckily i managed to find a private guy who apparently bought bankruptcy estate that had hundreds of worm gearboxes! Visited him and managed to find 3 identical worm reducers that had spec sheets and everything, but not with 1:50 reduction. In the end i had to settle with 1:100 reduction and have lower top speed for my sim.
    [​IMG]
    Specs: 1:100 reduction. Output shaft diameter 35mm and torque rating way beyond what i needed.

    Next task was to make these fit together. These worm gearboxes didn't really have any attachment points for input flange so i had to use four bolts that keep input shaft cover in its place. This was pretty straight forward task with a cnc milling machine and small manual lathe:
    [​IMG]

    After i bolted everything together i tried jogging it with a piece of cardboard. Shafts are connected with a piece of thick rubber tubing and beefy clamps:
    [​IMG]

    Now i needed a way to hold worm gearboxes upright and took the ez-mode solution. There is a laser cutter company near me who can cut up to 20mm thick steel sheet. Drew designs in cad and had them made really cheap after i told them where i was going to use them. :)
    [​IMG]

    At this point i took some measurements and drew some cad simulations in Fusion 360 to see how everything aligns and moves around.

    Lower chassis was also pretty straight forward to make. I used 120 degree wooden jig to roughly get everything aligned and double checked cross lenghts with a tape measure. Reinforcements will be added later:
    [​IMG]

    Output lever arms was next up. Had some troubles to get everything aligned as welding always pulls parts tighter when it cools off. Don't know how to describe it better in english, but you know the deal if you ever done welding work. In the end i managed to get everything acceptable on all 3 axis:
    [​IMG]

    Next up was bearing mounts and rest of the actuator arms. Please excuse me for saying... FFFffff... ok i'm not gonna say it, but i absolutely hate living in a world(country(or city...)) where there is only Metric bearings and Imperial tubing available. Absolutely nothing fits together and even if you wanna do some lathe work to make them fit it still doesn't work as pipe either gets too thin or its already loose. I ended up cutting slice out of larger piping, welding it back together and then rounding inside of it on a lathe. Sadly don't have pictures of this process, but it took a loooong time..
    [​IMG]

    All done:
    [​IMG]

    Upper rig was also nothing but bending some pipes by hand and welding it all together. Added some slightly tensioned temporary rods to keep everything aligned. Some ball joints later it ended up looking like this:
    [​IMG]

    Next up wanted to do some electronics. Again it was pain in the butt to source information how to drive +-10V analog servos with a microcontroller. After banging my head on a wall for couple weeks i finally managed to make arduino -> 0-5V i2c DAC -> -10V - +10V converter circuit. Main problem here was that the information that i actually wanted to find was hidden somewhere between millions of radio controlled servo results on google... Anyway after i had a working circuit i wanted to design a pcb so that i could easily replace arduinos or any critical components if needed. I use 1pcs Arduino mega 2560 as a master and 3pcs Arduino nanos as a slave cpu. Everything talks together with serial and plenty of cpu overhead if i want to add more stuff later on. Some cnc machining later i had a pcb on my hands:
    [​IMG]

    I will go a bit deeper with the arduino code, electronics and wiring them if that is something people are interested.

    Now there is bit of a leap in progress as i was a bit lazy taking pics. But this is where i'm today with this project. Everything is wired up and working. PID tuning needs more work and obviously i need to clean up wiring to make i all safe, clean and nice. Seat has a quick release/lock rails from citroen c5 to be able to move it back and forth. Made some changes to ball joints to get more clearance while moving around. Still working on steering wheel mount etc so it might change place later on. I also have 6 point seatbelt harness to keep driver inside the chair. :)
    [​IMG]

    Hopefully i didn't bore everyone to death with my babble... What do you guys think? :)

    Attached Files:

    • Like Like x 12
    • Winner Winner x 6
    • Creative Creative x 1
  2. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,477
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    101,755Coins
    Ratings:
    +8,477 / 41 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sounds like it fell into place for you :thumbs

    What was the final speed and lever length used?
  3. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,292
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    8,975Coins
    Ratings:
    +1,222 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    yes I am interested. please share your ardino electronics stuff......
    at least more pics;)
    • Agree Agree x 1
  4. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Lever length is 22,5cm measured from axis center to center giving out total of 45cm travel. Maximum speed of output shaft with these worms and servos is 90 degrees per second or in another words averages 22,5cm/second. As it circles around, actual linear movement is fastest when it's in middle position and slows down further it gets either way.

    I'll make schematic of one channel, explain how it works and post pics of populated pcb later when i get home.

    If anyone wants close up photos of something just let me know and i'll post them. :)
  5. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Great achievement so far! You're skilled in many subjects :thumbs

    - The motors and levers can turn full 360°, that's a good design... in case of bug, no mechanical crash!

    - About welding, if you first tack the pieces together on both sides and after this you weld them continuously, the pieces won't move that much ;)

    - What is the reference of your MIGE 130ST ...?
    (I'm using a Mige 130ST-M10010 for my direct drive wheel)

    - We would be delighted to see a video! :popcorn
  6. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Thanks :)

    Motors can't actually turn full 360. Position sensors are on the way preventing that. I'm still in the progress of trying to decrypt servo drives chinglish manual to see if i can get digital position information of motors. If i find a way to do that i can remove external position sensors completely and just add proximity sensors to zero positions on power up.

    Cheers for the for the welding tip, but knew that already. In the end i used it for my advantage and tacked a ball after ball to the side i wanted to move it.

    Motors are 130ST-M06015

    I'll make a video as soon as i get all PIDs tuned and chassis reinforcements done. :)
  7. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Yes, these motors may have absolute encoder
    that would ease the process
  8. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Here is how i made arduino talk to +-10V analog servo drive:

    First of all here is parts i used:
    Arduino Nano
    Murata NMA0515DC | Dc/Dc converter/power supply
    LM324 | Operational amplifier
    MCP4725 | I2C Digital to analog converter
    47k trimmer potentiometers (doesn't really matter what value as long as it's more than 10k)

    Next up load this online calculator:
    http://www.daycounter.com/Calculators/Op-Amp/Op-Amp-Voltage-Calculator.phtml

    Secret sauce to enter there is:
    R1 10(KOhms)
    R2 100(KOhms)
    R3 100(KOhms)
    R4 100(KOhms)
    V1 2.5(V)
    V2 5(V)
    Vp 15(V)
    Vn -15(V)

    Now if you change V1 (input your DAC output here) to either 0V, 5V or anything between what our DAC outputs the output voltage of op-amp changes between -15V to +15V. Reason why i used trimpots instead of resistors is that i can fine tune circuit to my exact need. R1 and R2 is one single trimmer (R3 and R4 is another single one). Now if you have oscilloscope it helps a lot to trim circuit, but it can also be done with a decent multimeter. In this case i trimmed amplification so that the output voltage of op-amp is maximum of 10.5Volts. This increases resolution of the output between +-10V as we don't have to drive it up to +-15V. Another trimpot is to adjust centerpoint of our output. Easiest way is to output 2.5V from DAC and measure 0Volts output on op-amp. Always cross check again if one pot is adjusted.


    Quick and messy circuit:
    [​IMG]

    Completed 3 channel circuit with test wiring:
    [​IMG]

    You could use just one arduino to drive the whole thing, but as said before i wanted a lot of cpu overhead for future purposes. If anyone has any questions i'm happy to help with this. :)

    Bonus pic how i ended up doing ball joints:
    [​IMG]

    Attached Files:

    • Like Like x 3
    • Informative Informative x 2
    Last edited: Aug 9, 2016
  9. wannabeaflyer2

    wannabeaflyer2 Well-Known Member

    Joined:
    Jun 12, 2015
    Messages:
    606
    Location:
    london uk
    Balance:
    7,105Coins
    Ratings:
    +793 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform, 6DOF
    Hi @Cartti just to chime in and say welcome to the forum and how impressed i am by the Project. seems this place is the place to be sim design wise and support and Ohhhhhh once simtools 2 is released to joe public this place will go mental .. nice design and engineering :)
  10. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    The Anolog Digital Converter behind the analog pins of the Arduino is optimized for 10Kohm pots
    Other values will be worse.

  11. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Not sure what you mean by this as this circuit has nothing to do with Arduinos ADC?
  12. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Oops, my mistake I read too quickly (my remarks is about feedback pots, and you haven't any).
    Last edited: Aug 10, 2016
  13. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Bah! Was about to weld reinforcements today and make a demo video, but apparently my MIG welder had other plans. Tacked first pipe, moved to second one and welder did absolutely nothing. No relays, gas, filament or arc. Bloody things won't even last for 35 years! :D

    Oh well.. Gonna do some electrisurgery tomorrow and see if i can get it fixed..
  14. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    maybe an idea to build a DIY "lemon" weld machine : shutterstock_6811243.jpg
    Last edited: Aug 11, 2016
  15. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Well.. I got a vid for you all. Didn't exactly go as planned, but if someone is still wondering if this rig has enough torque your answer is at the end of video... :)



    I think thats enough testing untill i figure out better way to do positional tracking.. :p
    • Like Like x 4
    • Winner Winner x 3
    • Friendly Friendly x 1
  16. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    good looking! angulation is large enough to have good feeeeelings, I bet!

    don't forget to fasten your seat belt at your first trial
  17. Slider

    Slider Active Member

    Joined:
    Jul 28, 2014
    Messages:
    150
    Occupation:
    Irrigation
    Location:
    Brisbane
    Balance:
    1,010Coins
    Ratings:
    +107 / 0 / -0
    My Motion Simulator:
    2DOF, JRK
    This is awesome, talk about beefy! I really like it, nice work.
  18. welen123

    welen123 Member Gold Contributor

    Joined:
    Jan 10, 2015
    Messages:
    98
    Location:
    HongKong
    Balance:
    29Coins
    Ratings:
    +57 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    except the work finished!
  19. Cartti

    Cartti Member

    Joined:
    Aug 8, 2016
    Messages:
    19
    Location:
    Finland
    Balance:
    215Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Thank you everyone for your compliments. :)

    Today did some scope probing and yes there is ABZ encoder output on my servo drives, but as i was expecting it is so high resolution Arduino can't keep up counting two ~65kHz lines at full rpm.

    Now i'm not sure if i will make a dedicated encoder circuit and interface it to arduino or order some contactless pots, machine casing and gearing for those or something else. Hmm...
    • Friendly Friendly x 1
  20. DEADBEEF

    DEADBEEF New Member

    Joined:
    Sep 1, 2013
    Messages:
    23
    Occupation:
    N/A
    Location:
    UK
    Balance:
    330Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    3DOF
    I'd buy some decoder chips, stick them on a breadboard and interface that with the Arduino. One arduino will be able to handle the lot that way.

    Or maybe consider a Rasberry Pi. That should just about manage to keep up with 65kHz digital signals.


    Do you have some specs for the motors? and/or a link to the manufacturer?
    It might be possible for someone else following in your footsteps to order them and specify lower resolution encoder wheels be fitted.
    • Informative Informative x 1