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. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    I would be best to upload the video to youtube, and posting the link here in your project thread.

    thanks
    Christian

    Edit:
    250kb
    Bigger files should be uploaded to online file-hosters like rapidshare, or similar for example.
    Videos in general to a video-streaming service like youtube or similar. Preferable youtube, as youtube videos can be embedded in the posts.

    Regards
    Christian
  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Yes, you need interrupts for the serial port as well as a decent buffer to store them until you read them. I'm using 30bytes buffer just in case...

    Well, the old profiler does send data every 32ms, but in the new X-Sim² Profiler you can define this 32ms pause to a lower one yourself:
    New_profiler2_USO.gif

    In this screen you can also see that you can use as many DOF axis as you like!! (X,Y,Z,rX,rY,rZ etc...)

    The UART is using interrupts to work but it won't affect the PWM as they use different clock source. And PWM will not stop running whatever is the load of the program code... Just be sure to update the PWM values as soon is possible!!

    Regards, Thanos
  3. tronicgr

    tronicgr

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

    Hi R-eng,

    I'm happy that it works for you!

    Here are the other firmware for 22.1184Mhz and 24.0Mhz crystal speeds:
    ATMEGA644_PWM_AMC15_2DOF_V1_CRYSTAL22.zip
    ATMEGA644_PWM_AMC15_2DOF_V1_CRYSTAL24.zip
    Try them and tell me if you can reach 24Mhz speed without troubles...

    I don't know if its wise to use STP80PF55 mosfets instead of IRF4905... In their datasheet I seen that IRF4905 can handle -74A (negative) while the STP80PF55 +80A (Positive) .... It might not work... In worst case you may blow up the mosfets... Testing will show you if it can be used after all. LOL

    I already had my PCB's in ExpressPCB format, if you asked me I would give them to you and avoid the trouble of re-draw them yourself. The quality of your PCB's is awesome! Are they made from ExpressPCB etching service?

    Also your Thrillrider looks awesome! Cool! You must relay on software to make those washout moves you mention. My electronics are used only for DC motor servo positioning at the moment! I'd like to see a video of it in motion!


    Best Regards, Thanos
  4. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @ Thanos

    I inserted the 24.0Mhz crystal and everything is functioning. I redid fuses, read/write hex files, and changed settings with HyperTerminal. No problems at all.

    Changes on the pots were consistent and smooth. I'm a happy camper for now. Thanks!

    Yes, the boards were made by ExpressPCB and the quality is great.

    Ready for 3DOF, 3-motors, and paralleled DSMhb.

    Regards, R-eng

    Attached Files:

  5. tronicgr

    tronicgr

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

    Wow, nice boards indeed! :thbup: This is before you sliced it up?

    Hey, can you share here the ExpressPCB files you made, so everyone that can affort to use this etching service, can order them from there? My expresspcb design seem too amateur, compared to yours, to post it here...!

    Best Regards, Thanos
  6. zaphod42

    zaphod42 New Member

    Joined:
    Sep 21, 2007
    Messages:
    17
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    Thanos, Thanks for the info , I've been useing x-simulator and never knew of the udate to x-Sim2. I learn something new every day. :bulboff:

    In your controller do you use full PID control?? I am looking at only useing PD control algorythm as intergral is mainly used for steady state machines trying to maintain a constant output (sims don't do that by nature).

    Your Thoughts?

    Zap.
  7. lotada

    lotada New Member

    Joined:
    Jul 31, 2008
    Messages:
    41
    Occupation:
    coffe Roaster
    Location:
    Kralupy nad Vltavou
    Balance:
    248Coins
    Ratings:
    +0 / 0 / -0
    Hi please should you send me anybody picture of pcm in SPRINT, .lay i need it for one company which will make pcm for me.. ( controller v1.5) and (V1.2 for motor) and for lcd?BYE Mila
  8. zaphod42

    zaphod42 New Member

    Joined:
    Sep 21, 2007
    Messages:
    17
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    Thanos, Lotada ect: I've noticed some posts about feedback potentiometers.

    What I've used on my first model motion sim ( made from lego) was potentiometers from an old PC game port joystick. Remember the old (In the days of XT & AT pc's) two button analog joysticks with the D15 conector.
    They have two 60 deg potentiometers and can be used directly coupled to the sim pivot axle.
    If your sim moves more than +/- 30 degrees then your in for one hell of a ride.

    You can pick them up for next to no cost ( free most times) , from junk yards or swap meets / second hand shops.

    Zap :cheers:
  9. lotada

    lotada New Member

    Joined:
    Jul 31, 2008
    Messages:
    41
    Occupation:
    coffe Roaster
    Location:
    Kralupy nad Vltavou
    Balance:
    248Coins
    Ratings:
    +0 / 0 / -0
    ÿeah of course you can give us any pcm layouts to upgrade all knew about motion simulators.. i need the pcm in Sprint .lay format. my controller is not working when cnnect it red LED anf green is still lighting only when i press alps button thered shut off but on lcd is nothink.. also my lcd donw want to light itis lcd with under light when i give the battery direct on contacts + - it lights bu form pcm nothink,, :-( i think i have to make the board again... :-(
  10. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @ lotada, If you need it so badly then just do it yourself like I did with ExpressPCB, or in your demand, Sprint.

    And you apparently did not read my first post on page.40 where I specifically mention your problem seems just like mine was...I inspected you board image and you can easily fix it, just like I did.

    Go back, read, and learn!

    R-eng
  11. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    No problem! I use 240' pots with the onboard 10k adjuster set so it reads 1023 at 90' (or anything you wish) and it worked out perfectly (thank you Thanos!)

    Better you should worry not to use cermet pots because they will have short lifespans. Expensive (unfortunately) conductive plastic is the choice.

    Regards, R-eng
  12. lotada

    lotada New Member

    Joined:
    Jul 31, 2008
    Messages:
    41
    Occupation:
    coffe Roaster
    Location:
    Kralupy nad Vltavou
    Balance:
    248Coins
    Ratings:
    +0 / 0 / -0
    Hi to all i have problems with my lcd backlight.. it lights but after few minutes it was lost.. i think its burned.. but idont know why you connect the + wire from lcd connector on second pin .. because my lcd have + first pin ..? can anybody help? i send the scheme of my lcd panel also i have some problems with atmel when i watn in ponyprog open fuses? i have no fuses to select like tornic have on video.. i have only lot of chekboxes and thatsall.?

    Attached Files:

  13. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @lotada

    I looked at the ATM1602B Chinese LCD and the pinouts are slightly different. The backlight A(+) and K(-) are in different location on your LCD. You can make this work, if you have not damaged it beyond repair, but you have to be creative.

    Look at the pictures I post here. We have Thanos' correct one, like you probably etched. The other picture of your LCD shows the pinouts as defined by the .pdf datasheet you supplied. This is the topmost image of the three. The middle shows it from the front view. The lowest image is what it would look like if you physically placed the LCD module over the etched side of the Thanos board. But you have to shift it over 2-pins so that the pins 1..14 line up. Then you will need to hard wire the pins (+,-) as I diagrammed for you here. Maybe not so pretty, but it will be fine if not damaged already...try it, you have nothing to lose.

    Once you understand this, you can then mirror the board under the LCD so everything lines up correctly. You would then need to rotate 180' the direction of the Molex connector so those pins would match.

    Or, you can redesign and etch the board to suit the ATM1602B Chinese LCD.

    Regards, R-eng

    Attached Files:

  14. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    I've connected 5V to these pads to power the backlight. Depending the specs of your backlight, a pre-resistor will be neccessary.

    lcd_backlight.JPG

    Regards
    Christian
  15. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    The pre-resistor still functions in my solution. Just the value may need to be changed.
  16. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @Thanos, the Mosfet appears to be working.

    Another step realized; My AVR-DSMhb with a single motor runs very nicely at 24Mhz. I also tested the comm/control with Force-Profiler and that is functioning. Hopefully tonight will see rFactor take the control with the x-sim plugin active...we'll see.

    This project is moving along very smoothly with only very small issues encountered so far...all solved. Here is the video of the initial motor test.

    [​IMG]

    R-eng
  17. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Great to see your progress!

    Just to save you some time of frustration. Dont forget, that you have to copy a rFactor plugin .dll out of the X-Sim Folder into the rFactor directory. As well there is an ingame button in rFactor that enable(s)/disable(s) the hardware plugins. It has to be activated!
    You can find it in the keymap/config in R-Factor.

    Regards
    Christian
  18. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    Thanks egoexpress,

    I already did what you mentioned, and just finished testing a single, unloaded motor with the AVR-DSMhb. It took a while to figure out which effects would actually deliver what I needed for lat-g and long-g, but it appears I've found them.

    Regards, R-eng
  19. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Another alternative way of making the PCB's is to using the ExpressPCB etching service:
    http://www.expresspcb.com/

    On my first layouts of AMC I used their software to design the layouts but I didn't used their on-line service. Instead I printed the layouts on paper (PDF). But as R-eng reports, the quality of their boards are great, so if you can affort the extra money for ordering from them, you will be happy with the results. And they use double-sided PCB's too!!!

    I would give my old expresspcb layout plans but instead I prefer to give you the ones that R-eng made, and used to actually order the boards. They have a few modifications most of them to take advantage of the double layer PCB boards!!! Also there is a small size increase of the fan used on DSMhb to 92mm. I have run a quick check on them and they look correct. Thus we have seen his video with these boards made and working fine!

    Here is the expresspcb files which include the board you see in the picture, and another one which would be a basic AVR-DSMhb system.
    AMC_DSMhb_ExpressPCB_R_eng.zip

    1xavr_3xdsmhb.jpg

    And here is a short description from R-eng about the ordering he made to ExpressPCB service:

    Regards, Thanos


    BTW, I repaired my Sprint-layouts of AMC1.5 and Parallel_Lcd boards after R-eng suggestions... post7978.html#p7978 & post8644.html#p8644
  20. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Today morning I decided to try to interface a FT232R evaluation board I purchased to my AMC:

    FT232R_to_AMC_1.JPG

    FT232R_to_AMC_2.JPG

    It worked perfectly with one try only!! As you can see in the photos I connected only the TX pin from the FT232R and RX pin from AMC. But you can connect RX on FT232R as well to have the AMC send back data (hyperterminal config...). And of course I tied together both boards grounds.

    For the connection I bypassed the use of max232 (both on AMC and FT232 eval board) as the signals are simple TTL logical level.

    The FT232R is configured as com port and since it took com5 on device manager, I had to use the \\.\com5 statement on the USO to configure the port. Also I had to choose a serial printer option on the properties of the COM port that FT232R created for compatibility reasons!

    Perhaps in future versions of my AMC I will discard the use of max232 circuit entirely and use the sparkfun FT232R breakout box so it will be USB connection! The options will be to use it either as virtual com port (VCP) or with direct access with D2XX from application plugin!

    Regards, Thanos