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

Hoddem's DIY Linear Actuator

Discussion in 'DIY Motion Simulator Projects' started by Hoddem, May 23, 2017.

  1. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,110Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Game changer...
    • Agree Agree x 1
  2. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    @kermitkong, @yobuddy, @bruce stephen, @Thanos
    After some actual testing my theory on the encoder and resolution isn't exactly correct. The confusion comes from the different encoder sources using count/line/pulses as mixed terminology and the way the kangaroo interprets the pulses. My first actuator used a 200 pulse encoder from sparkfun, there words directly. Turns out that the sparkfun encoder is actually 200 counts and 800 pulses per revolution. My new encoder is a 50 count/200 pulse encoder from US digital.

    upload_2018-2-12_10-36-28.png


    There is a factor of 8 difference between the two actuators (10mm pitch vs 5mm and 50/200 vs 200/800 counts/pulses), not really a problem as I wanted to keep my total pulse count below 80,000/s for two units. I am still getting a theoretical max 20,000 pulses/second with the new actuator which puts me comfortably at the 50% mark for total pulses. Here is where the kicker comes in with simtools and the kangaroo. The kangaroo actually reads the pulses as 1/4 count so each pulse adds 0.25 to the position. So it is possible to control the position of the kangaroo down to 0.25 increments giving me the the minimum step of 0.05mm that I had speculated (10mm /200 pulses). However, Simtools outputs in whole numbers so with simtools even using 16 bit output I still reduce my step resolution by a factor of 4. so my minimum travel is up to 0.2mm. There maybe some hope though as describe has a units function that allows commands to be scaled (IE move 1 foot would equal 1 foot) I thin I can just change this by a factor of 4 to get back tot he 0.05mm minimum move. something like 4 = 1 line and then scale up simtools output to be 4x my current output.

    upload_2018-2-12_10-50-46.png

    These are my current parameters
    upload_2018-2-12_10-51-56.png

    1,start<13><10>1,home<13><10>1,units65535=1900<13><10>2,start<13><10>2,home<13><10>2,units65535=15390<13><10>
    1,p<Axis1a><13><10>2,p<Axis2a><13><10>
    1,powerdown<13><10>2,powerdown<13><10>

    Notice I am scaling the 16 bit output to the 1900 counts in the kangaroo, I believe if I change the units in describe I can just change the scale by a factor of 4 to be 7600.

    Another thing to test tonight

    Also being that I was able to comfortably run both actuators simultaneously I should have been theoretically running close to 100,000 pulses/s (80K for the old actuator and 20K for the new actuator) so with friction and efficiency losses I still wasn't maxing out the kangaroo which gives me enough confidence to say that using a 100 count/ 400 pulse encoder for two actuators would work. Assuming I can get everything working correctly that would get be down to 0.025mm steps or 0.05mm with the 5mm ball screw. My gut feeling is that the 5mm screw will be more practical for actual simulator use. I will give US digital a call to see if I can just order the encoder disk, it might be a cheap fix.
    • Informative Informative x 2
    • Like Like x 1
  3. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    That looks like a good starting point, though it is a little involved and I don't have any of the parts on hand. At first thought I was thinking maybe I could split the encoder signal and use an arduino to measure the time between pulses. My encoder has the Index feature so it pulses or counts once every revolution, that could be an easy way reliably capture max speed or even live speed feedback without taxing the arduino too much.

    Edit - Now that went through the arduino code this applies more then I first thought, thanks.
    Last edited: Feb 12, 2018
  4. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    Hopefully, If the kangaroo performs as well as they claim and we don't have to mess with PID tuning that would be amazing.
  5. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,162
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,172Coins
    Ratings:
    +5,037 / 16 / -0
    @Hoddem,
    Once you know how to make the kangaroo v2 work perfect with SimTools, we can build a Kangaroo v2 Interface plugin for it.

    That way we can build all the 'fixes' into the interface and make it easy for people to use.
    Without having to worry about a tricky setup.
    yobuddy
    • Agree Agree x 1
    • Winner Winner x 1
  6. kermitkong

    kermitkong Active Member Gold Contributor

    Joined:
    Apr 12, 2016
    Messages:
    187
    Occupation:
    Hardware Development
    Location:
    Germany
    Balance:
    1,247Coins
    Ratings:
    +275 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    Hi @yobuddy , @Hoddem

    Would be nice to have this kangaroo v2 interface plugin. I had the same hassle with the setup.
    For me it works actually but again would be nice to have this easy interfacing.

    @Hoddem
    Nice work, nice actuator, you really made it!
    In the meantime I have my new 6DOF build running and it’s amazing.
    Im only interesting to play elite dangerous, it’s totally different setup compared to a setup for car racing . And of course my kangaroo setup has a much more relaxed PID setup.
    Compared to other motor drivers and PID regulators the kangaroo is easy to set it up.
  7. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    Hopefully, If the kangaroo performs as well as they claim and we don't have to mess with PID tuning that would be amazing.
    @kermitkong are you running a pot or an encoder?
  8. kermitkong

    kermitkong Active Member Gold Contributor

    Joined:
    Apr 12, 2016
    Messages:
    187
    Occupation:
    Hardware Development
    Location:
    Germany
    Balance:
    1,247Coins
    Ratings:
    +275 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    I‘m running 500mm soft potentiometer.
  9. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    In an early post you mentioned that the kangaroo has 12bit ADC so are you using 12bit decimal output with no scaling? so no UNITS command in the startup box to get a 1:1?
  10. kermitkong

    kermitkong Active Member Gold Contributor

    Joined:
    Apr 12, 2016
    Messages:
    187
    Occupation:
    Hardware Development
    Location:
    Germany
    Balance:
    1,247Coins
    Ratings:
    +275 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    I’ve 500mm = 5000mV in the KangarooV2 setup and yes, no UNITS command, because of the fact that data coming in with 12bit already.
  11. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    One last question

    From what I remember the kangaroo only accepts 2.5v as center. So for setup did you move your actuator to the center and set your pot to 2.5v or is there a different way to set the min/max travel and center of the actuator.

    I never got that far when I tried it with my 2dof rig and with an encoder center is found automatically based on limits.
  12. kermitkong

    kermitkong Active Member Gold Contributor

    Joined:
    Apr 12, 2016
    Messages:
    187
    Occupation:
    Hardware Development
    Location:
    Germany
    Balance:
    1,247Coins
    Ratings:
    +275 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    I ran the Autosetup first and they ask me to move the actuator via the software to upper And lower limits. I guess they measure the center based on these info. After finalizing the auto setup I modified the PID setup to my need.
  13. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    Makes sense, I was remembering some problems with the pots and scaling and centering. I believe it had more impact when the system is used for levers like my 2dof where you only use 90 deg or less pot rotation. @BlazinH has a tutorial with a hack to use the pots full range for a smaller actual range. I remember running into that problem when I was playing with the kangaroo and my gear motors. glad everything is working for you. I hope you get a video of the working rig up soon, can't wait to see it.
  14. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    I heard back from US digital, the encoder disk is matched to the sensor so I would need to replace both at a cost of around $60 a savings of $10 dollars vs buying a whole kit.

    I was mistaken earlier about the Units function, I had it in my head that that was happening in simtools. The kangaroo is doing the conversion real time so I have reached out to DE to see if the numbers are scaled to a whole number or decimal place. If it is a decimal place then everything is good, if it is a whole number then I would want a higher count encoder.
    • Like Like x 1
  15. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,834Coins
    Ratings:
    +1,043 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    I know these kinds of posts are to be kept to a minimum, but that new actuator is a work of engineering art. Kudos, sir!

    I've been thought-building different actuator designs for a 6 dof but it's hard to not come back to yours and say that's how to do it.
    • Agree Agree x 1
  16. llluis

    llluis Active Member Gold Contributor

    Joined:
    Mar 30, 2017
    Messages:
    164
    Location:
    Quebec
    Balance:
    1,630Coins
    Ratings:
    +103 / 1 / -0
    My Motion Simulator:
    6DOF
    This motor is a beast!!!

    Did you / do you measure current it's pulling? I had hopes this would run on a Sabertooth 2x32 @ 24V.
  17. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    Thanks It's not perfect but getting close. I think when I get to rev 4 or 5 it should be there. ;) I still haven't branched out from plain gray 3d prints, I'm not nearly as artistic as you with all the bright racing colors. I really hope you end up going 6DOF, I would love to see where your 3d printing skill takes you.
    • Like Like x 1
    • Agree Agree x 1
  18. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    No I haven't measured it yet, and none of my testing has been under load. I would think you are going to run out of juice though. take a look at this chart and see where 32/64 amps puts you. you will be pretty low on the chart. I would wait until I can do some additional testing though as its still up in the air. I wish the sabertooth 2x60 had the same usb interface as the 2x32 and I could just monitor the current of each channel real time. It would be cool to sync the two outputs on the 2x60 and get 120/240 amp peak that would really push the limits of this motor.

    upload_2017-9-28_11-49-20.png
  19. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    Didn't get as much done as I would have liked, but still good progress. I set out to get a better indication of the max speed. I started by using my o-scope to read the Index pulses on the encoder, after a bunch of fiddling around I found the best way to do it was to send positional commands over serial to move the actuator from one max to the other. during which I would record the pulse outputs with my scope.
    Here is a screenshot from the middle of the stroke.

    I counted am showing about 11.5ms from pulse to pulse which is one full rotation of the motor. ((1/0.0115)*10mm)=870mm/s
    1.jpg

    then I started playing around with live positioning and noticed there is an option to show current speed in counts. I had to take a slow motion video and step through it a frame by frame, but the highest value I was able to capture was 4,522 counts/s. ((4,522/50)*10mm) = 904.4 mm/s. If you notice where the position is the motor is just starting to decelerate so by the looks of it I am running out of stroke before max speed is hit.

    2.png

    for the testing I turned off speed limiting and there was a noticeable jump in speed. so much so that I think I'm over driving the mechanical components and there is a lot of vibration near top speed. I will try to get a video as soon as I can.

    Lastly I tried sending decimal commands to the kangaroo like 1,P100.5 and there was no response so I am pretty confident that the UNITS function is scaling to whole numbers and as such I will only get 0.2mm minimum moves with my 50 count encoder vs my hoped 0.025mm.

    Tomorrow I am going to call the IGUS bearing guy and see why I am getting so much squeaking, make sure I have the right kind of shaft. I can't do much about the main shaft, but I can easily change out the 12mm shafts if needed.
    • Informative Informative x 1
  20. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    404
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    3,342Coins
    Ratings:
    +715 / 2 / -0
    I made a video with the speed limited from 20% to 100%. Not a noticeable jump at the end between 80 and 100, but it is faster.



    I can’t listen the the squeaking anymore tonight, I need to get that fixed. Next up I plan on hooking it up to my current rig and running some laps with the rally car and heave turned on. I will just have it running with no load to see how it reacts. This weekend I will dig out all the stuff to build up the test frame and start doing some load testing.
    • Like Like x 9
    • Winner Winner x 3