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

Progress on hardware PWM motor control

Discussion in 'SimTools compatible interfaces' started by tronicgr, Oct 19, 2007.

  1. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Guys,

    Just wanted to open a thread here to inform you about the progress of implementing PWM driving control of the motors and receive questions (and suggestions for improvements).

    Yesterday I finished programming full proportional control on PWM with the 10 turns pot as position feedback. I was surprized by the speed and its accuracy of positioning! Using the same Proportionality Constant as in basic stamp2 (KP=4) I had accurate positioning but a little slow responses when I was reversing the rotation of the motor. So I started testing higher KP constants and found out that it could handle up to KP=20 that was reversing the motor instantly and introduced very little final position trip-over.

    I'll prepare a video to see its fast positioning action soon, and maybe give you firmware and schematics to assemble a test table for the differential control of frex type actuators (that their motion is linked). I changed completely the connections of everything from the fisrt schematic I uploaded!

    I will try the encoder that is attached on the shaft of the motor during weekend and tell you how it goes.

    Regards, Thanos
  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    In the last videos I used simple RC Servos (from toys). But the HB-25 motor controllers I used in the old BS2 interface are controlled too as simple servos.

    For the PWM tests I use a real DC motor with encoder aligned on its shaft.
    Its fast motion is not comparable with the slow rc servos!!

    [​IMG]

    Just need to develop code to measure position feedback thru the encoders yet.

    I'm going to do some changes on the simulator to be able to keep it in one piece when I'll place on it the AVR controller with its new angry motor controller! I bought some Bus engine belts to totally replace the coated wire I use on the pulleys for start.



    Thanos
  3. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Hi Thanos

    I'm looking forward to assemble your test circuit and connect it to the firgelli actuators :gut:

    They have a built-in pot. So I could use your test circuit instantly :)

    As well I am curious how good it will be possible to drive the dc motors with rumble motions. Because your current servo setup lacks this feature.

    Btw: Its even harder to get a step into the mechatronic studies as I thought. The damn basics. No practical lessons. Just mathematics...

    regards
    ego
  4. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I took a short video of the PWM control tests I've made so far. I took some pics too to see the condition of my office with all these electronics taking all over and the mess is keep growing.

    http://rapidshare.com/files/64146451/PWMtest1.wmv


    [​IMG][​IMG]


    In this video I controlled the position of the motor manually with a pot to show you the rapid changes of direction. The crappy dc motors (with gearbox) are from a toy and produce lots of whinning sounds with PWM. And their gearbox tended to keep rotating cause of the inertia even if I fully reversed the direction. I wonder If the same happens to the wiper motors...


    I now use these crappy dc motors fom a toy because I had a little drawback with the DC motor I used (the one with the encoder). I was trying to remove the ball bearing on the tip of its axle and after much try I was getting angry and started hitting it with a france wrench. But after I tryed to get it back on work I found out that I had also braked its commutator carbon contacts inside it!!! :-( I'll try to get another cause I really liked that it had its own encoder. But I may not get the chance to dissasemble such large printer that contained it soon so I will search the local market for such motors or just the encoders if I get lucky.


    Anyway I had not much free time to implement much more because I also had some hard work to be done on the joyrider. I changed the steel pulley cables with a BUS type engine belt. It turned out real pain in the ass because the belts I bought was 10cm longer (I could not find excactly 2meters long that I needed) and I had to add more pulleys to archive the proper tension. And I had to unbolt many, many, many bolts to pass the belt thru the pulleys! Now I have yet to buy some large clips to be able to hook the frames with the belts too.


    [​IMG][​IMG][​IMG]



    After all, it looks good and its thousand times more durable than the simple coated wire that needed tensioning after some hours of using the simulator.


    Ego, I'll give you schematics and some code to test as soon as I prepare the coupled version that is usefull for yout Frex style motion. It will be able to lean you on the sides and up-down (during acceleration-decceleration or bumps if you use different output from the x-sim profiler). Good luck with your mechatronic studies!

    See you soon, Thanos
  5. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Imho the coupled version can be setted up in the Profiler already by inverting one actuator.

    I'd like to have EvanF in the BETA test crew as well, when your layout is ready for assembling/testing.

    He is burning to use it, and I think that he would be a very active hardware tester, which will report results as they come.
  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    No, the motors, need to coupled inside the microcontroller. Its a restriction I faced when started using USO... Its totally different from using matrix for pneumatic actuators!

    To explain better: Since you have read the x axis position you have to substract right motor position from left motor position to lean it on either side.

    And the y axis position will translated to cooperated motion of both motors to move up and down.

    Now is the tricky part: You also have to consider the posibillity to have both motors to move up or down while leaning to the sides! Yet another coupling is needed!

    Generally it needs to figure out the mathematic formulas to do these couplings. And it get worst in the case of using 3DOF setup like EvanF is using!

    I'd like also ta have EvanF in the beta testing crew so I can have him test the 3DOF on his side as its impossible to do with my current 2DOF setup. of course when I'm ready to give him something to test too!

    Regards, Thanos
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Sirnoname

    I want to start tests for my avr motion controller in which I need to retrieve not only x,y data but also z or even yaw (rotation).

    Is it possible to alter the USO to accept more parameters?
    It would be nice if they were in the form of:

    ~x~ ~y~ ~z~ ~w~ (where w is yaw)


    Also it would be awesome if you could output also other general parameters like ~d1~ ~d2~ ~d3~ ~d4~ to also use these data to move RC servo operated gauges (speed, engine RPM, gear number etc)

    These data already exist in the profiler, its just the uso that can't output them in the serial string.

    Regards, Thanos
  8. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Sirnoname,

    Running the profiler twice doesn't work for me. Once a profiler is running the USO is using all the handles to the serial ports, even those it doesn't use, so when running a second profiler I just get a message that it cannot open the serial ports... And even If I got it work I would still need a second AVR interface connected to the second serial port to handle the other one or two motors.

    Can't you just alter the USO plugin? And add atleast z parameter output to the profiler to be able to test for 3DOF simulator (like EvanF's)?

    Regards, Thanos