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

Tronic's AMC motor motion-controller with pwm/servo output

Discussion in 'SimTools compatible interfaces' started by tronicgr, Aug 30, 2007.

  1. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    The HB-25 PWM frequency is fixed on 9,2Khz. No way to change it. I just send a servo pulse to it and it take cares of the rest.

    Its true that the hardware it has it limitations but I'll try to implement it in multitasking software mode.

    If it fails on speed responce, then I have to redesign it and make an addon board with several small Attiny AVR 's to take care of the counting of the encoders and the PWM of each motor. No big problem though. The smaller AVRs will be directed by the Atmega8535 easily.
  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Variable PWM is possible via pot (and an LCD to see what PWM speed is chosen).

    Generally there are so many options to chose from that I have to redesign the controller all over many times. Right now I have it placed on the STK500 development board and experimenting directly from there making temporary connections of its ports on a large breadboard. Eventually I will came up with a design that fits out purpose and make a new permanent PCB to host the whole project.

    I hope that the RNV2-Dual will arrive soon to finally start the PWM tests...

    Regards, Thanos
  3. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Perhaps a decoder IC would be an option?
  4. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Yes its an option too. Do you have any recommentations on decoder chips?

    The nice part of using ATtiny will be that each ATtiny will handle an encoder and a PWM channel for a motor. And it can be made adjustable by sending to it the parameters for the motor during power-up. Then it will just keep driving and decoding and cummucicating with the master Atmega chip for aquiring the desired position.

    Ian (from Builtforfun) has built something simular to drive with PWM his motion cockpit... but with PICAXE controllers.

    But I'm not going to give up from now the all-in-one chip solution (ATMEGA8535) yet. I guess that more experimenting will show the propper way to make this universal controller...

    Regards, Thanos
  5. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Yeah, a lot cheaper than using Basic Stamp2!!!

    Thanos
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    If I understound right the question:

    The current controller using the basic stamp2 does one complete code round every 33ms. This happens because it BS2 does not support interrupts to know when data from pc are waiting to be read. So I just run one round the code and let it wait for the next data packet. This way it synchronizes to the 33ms of the software.

    The Portdrvr works even faster with 19ms update rate, so the control of positioning in flight is more smooth.


    The new controller I'm preparing, that is based on AVR, will run the tasks of controlling the motors and the encoders constantly (perhaps less than 5ms in each code round) making an interrupt only when new serial data are waiting on its buffer. So it will be indepented from the 33ms refresh of the software and more accurate on positioning. And with 115kps serial communication speed will be ultrafast! To determine the actual speed I could use a toggle pin as you suggested and a frequency meter...

    Thanos
  8. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    5ms sounds much better than 33ms ;)

    Could it be possible to speed it up a little more by letting away the smoothness algorithms?

    Or could it be speeded up by using additional ATinys for 16bit encoder reading and PWM output?

    I'd prefer to leave out the smoothness code out of the ATMEGA completely. Cause in this case, there are only smooth movements, if the Profiler outputs them (e.g accellerations, brakings)

    I want to feel every little tiny stone on the road and all bumps, which is only possible, if your interface controlls the motors directly without smoothening.

    Imho smoothness algorithms are a useful feature for the old I/O boards, but not recommended for your new interface ;)

    Thanks for your efforts ;)

    ego
  9. EvanF

    EvanF Member

    Joined:
    Jun 10, 2007
    Messages:
    199
    Occupation:
    Multimedia Producer
    Location:
    New Zealand
    Balance:
    423Coins
    Ratings:
    +1 / 0 / -0
    The electric actuators may amplify the 'noise' too much and smoothness may dampen the noise out. Give and take.
    Graphic analogy: gif alias viz jpeg anti-alias.
    Won't know until try out different actuator/platform setups I guess.
  10. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    The noise could be damped with plastic dampers between the platform and the actuator as well.

    Thanos released 3 different firmwares for the basic stamp controller. Perhaps it would be possible for him to make this as well for his new interface.

    I'd prefer it direct :)
  11. EvanF

    EvanF Member

    Joined:
    Jun 10, 2007
    Messages:
    199
    Occupation:
    Multimedia Producer
    Location:
    New Zealand
    Balance:
    423Coins
    Ratings:
    +1 / 0 / -0
    rubber engine mounts between the chair and the platform is another good one. I know from my actuator/platform combination I get a very direct feel from the motors, I fear too much road noise and I will think I need new shock absorbers!
  12. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    The PWM mode driving of a motor will be for sure more direct than using HB-25 or other servo systems...

    It could instantly full reverse the motor if instructed by the motion data... and damage the motors gearing if done in full speed...!

    Selectable ramping will be implemented and disabling it entirely also (with users responsibility of cource).

    I have implemented motion with the HB-25 as proportional control because there was no other way of controlling its position. After all they are not true servo controllers. The HB-25 was designed only to drive robots around...

    Thanos
  13. kjg71

    kjg71 New Member

    Joined:
    Sep 12, 2007
    Messages:
    61
    Occupation:
    Designer
    Location:
    Toledo, Ohio - USA
    Balance:
    9Coins
    Ratings:
    +0 / 0 / -0
    Finally caught up reading this thread,

    my ezio controller went out last night (actually stopped working) and I was looking to get another K8055 and go with that, but maybe I should wait for the Thanos Universal Controller

    or work with K8055s for testing and then move to the Thanos solution for X-sim capatibility when all is ready

    so.... Thanos, sounds like it will be:

    4 pwm
    8 analog in for pots
    4 (is that) on-board poteniometers for testing?

    plus more of course :)

    any standard digital inputs for limiters (I still want mine even if I added encoders) but not a show stopper.


    Also sounds like I should gear up for replacing my Newmicros H-bridges and look at

    KT-5198 Dual Bidirectional DC Motor Speed Controller
    RN-VN2 DualMotor (North American seller?)

    these seem to be very powerful or at least with modification.

    wow!! lots of advancments in the last 15 days it seems
  14. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Digital limiters, if you just want them for safety, do not have to be connected to the interface. They could be attached in a way that they just cut of the current.

    That way simulators with potis could be calibrated easily, without driving the simulator to its physical maximums.

    The RN-VN2 DualMotor is a driver that has been developed by some users of a german robotics forum.
    The IC on it is equal to those on the HB-25 drivers.

    Afaik the driver can be purchased via http://www.robotikharde.de only.
    Thanos ordered one with the help of RaceRay. But if Thanos' interface will be a success, then we have to talk to the robotikhardware guys in order to convince them, that it is neccessary to translate their HP ;)
  15. kjg71

    kjg71 New Member

    Joined:
    Sep 12, 2007
    Messages:
    61
    Occupation:
    Designer
    Location:
    Toledo, Ohio - USA
    Balance:
    9Coins
    Ratings:
    +0 / 0 / -0
    yes for safety, but also as a position indicator.

    I know I should use encoders eventually. Right now when I hit the limit it serves as a position indicator and just makes motor 0% power but not off.

    So say I go left on stick half way and it goes left until I move right or center. the limit stops it and also serves as a position.

    Pretty basic but works well for follow the stick. I would envision adding pots going with positional awareness next and then keeping the limiters for safety then.

    RN-VN2 DualMotor sounds like it has alot of potential

    kyle
  16. kjg71

    kjg71 New Member

    Joined:
    Sep 12, 2007
    Messages:
    61
    Occupation:
    Designer
    Location:
    Toledo, Ohio - USA
    Balance:
    9Coins
    Ratings:
    +0 / 0 / -0
    Ego,

    wait...I see what you are saying....just trying to visualize it.

    5 volt relay tied into the pwm logic line that runs the motor maybe?

    less processing...right now I am reading the input constantly to see if a limit is hit.....I could elinate all that!

    regards Kyle
  17. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    @Kyle

    The x-sim software controls simulators with either xy data out of the game, or ForceFeedback effects. To do this, encoders or pots are neccessary for positon feedback.

    Sorry, but I think follow the stick is the absolutely worst simulator control method ;)

    Please move to your thread concerning this matter. I dont want to go Off Topic in this thread. Thanks
  18. kjg71

    kjg71 New Member

    Joined:
    Sep 12, 2007
    Messages:
    61
    Occupation:
    Designer
    Location:
    Toledo, Ohio - USA
    Balance:
    9Coins
    Ratings:
    +0 / 0 / -0
    No problem I'll try to post those in another thread that might be more relavent.

    Kyle
  19. EvanF

    EvanF Member

    Joined:
    Jun 10, 2007
    Messages:
    199
    Occupation:
    Multimedia Producer
    Location:
    New Zealand
    Balance:
    423Coins
    Ratings:
    +1 / 0 / -0
    @ thanos

    Have you ever had direct drive gearing disintegrate by constantly and suddenly reversing it's motion? I never have, I'm just wondering if this is an anecdotal thing derived from a concept?

    @ ego

    If you use servo control, there goes your chance to feel the different grades of bitumen on your seat :wink:
  20. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    This will for sure never happen with free-wheel gearing on the motors.

    But its a very real possibility when using worm gears like the wiper motors do. If it rotates in full speed holding a large mass (say 50% of the weight of a man when moved in joyrider) and the motor is full stopped suddenly, the inertial of the mass will stress the gearing causing broken teeths or damage to the worm spiral...

    It didin't happened to me yet with the HB-25 but I see it as real possible during the tests with the RN-VN2 DualMotor if I'm not carefull enouph...!

    Thanos