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

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Still cant make it work, Could it be something wrong with my Amega? I am checking all the solderings, but I believe they are ok. All ideas are welcome!

    Btw TOM, you dont need to be a Rapidshare member to download, just need to wait 60 sec or so. before you can start downloading!
  2. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Hi 914Tom,

    Thanks for the suggestions earlier. Did you manage to come right with your hyper terminal connection? Everything on my 2 boards are working, except that I can't go faster than 14mhz crystals, and i also can't connect to them using hyper terminal. I am using an old pentium 3 with windows XP on it, so ports are no problem. I also have a straight (extension) cable I use for programming, as well as a normal null modem cable for connecting to the second serial port on the amc. Non of them seems to work though. I have tried replacing the 1n2 caps with different values (22pf, 18pf, etc), without any difference. I have also changed my max232 chip with one I know is working from another circuit, and still nothing. I am starting to run out of ideas here...

    If I can just get the programming done with a faster crystal, and be able to connect to the amc using hyper terminal, I believe I should be done..

    ANY help at this point would be MUCH MUCH MUCH appreciated!

    Thanks mate, hope to hear from you again soon!
  3. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Fredspeed,

    Here is what I had to do... I took those 2 little caps at the cyrstal out, and since I had every crystal that Thanos made a firmware for (14mhz, 18mhz, 22mhz and 24mhz), I tried every cap combination from 18pf to 22pf, and with every try, I tested each crystal to see if I could read the configuration bits repetitively. Once I could read the fuse bits successfully every single time (I was ONLY able to do this with the 14mhz crystal and 18pf caps), I then went to the programming, and loaded the firmware for that crystal, and low and behold, it worked! I am still stuck with a few other problems (see my previous post), but I believe I am making progress. Once I can see my amc in hyper terminal, I believe I will be able to see it in X-sim as well, which will be a HUGE leap forward for me.

    There is one other thing i'd like to ask, while I am busy typing :)...

    I see that on both my boards I don't get exactly the same voltage out to the motors, regardless of the fact that I can tune every pot to 1023 and they have been properly calibrated. Is this where the kpx and kpy values will be used to further adjust and compensate for this, or is there something else that i might need to look for? I will get like 12.3V going to one motor in one direction (with the values reading 128 128 1023 0), but in the complete oposite direction (128 128 0 0), I will only get around 11.4V. Obviously this affects the speed the motor runs at. i did see that Thanos made a video to adjust the motor so that it runs the same speed both ways, but just thought I'd check on whether that's the way to fix it, or if there is some other electronic bug I can check...

    Thanks guys, looking forward to helping each other complete this wonderful journey!
  4. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Looks like you are the kind that never gives up! I like the way this forum works, and will try what you suggested! First I must get rid of some frustration in driving a couple of rounds i GTR-EVO :highfive:
  5. 914tom

    914tom Member

    Joined:
    Nov 19, 2009
    Messages:
    37
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0
    hi watkykjy,

    thank you, my hyperterminal problem is solved, i used a slower (18.432MHz) chrystal and all went good.
    after a short search i found the solution for connecting the x-sim to the board, so to me all is fine.

    now to you.

    in a threat i read that it is importand for the comunication betwen the atmega an the max, that the christal ist not 18MHz but exact 18.432MHz. (it has to do with clock dividing betwen the both) maby this is a Hint.

    TOM
  6. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Hello again
    I am considering to order and replace some parts, eventually solder a complete new AMC, but it will cost me 40 euro incl shipping (I have another pcb). As far as i can understand there is just a few components and solderings between the programmer port and the microcontroller, so i am starting to beliewe it is something wrong with it. How sensitive is Atmega8535PU? (I have been very carefull) Since the leds are ok I beliewe the circuit is ok too! I have also tried vatkykjys metod with no luck!

    Fred
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    About the crystals, I posted it maybe a page or two up. UART serial communications need a crystal that divide 1.3165MHz perfectly. Other frequencies will work as well, only there will be a % error after the frequency and baud rate prescaling. 2% is the most you can have to be within specs.

    One more thing to consider is that the Atmega8535 is rated for 16MHz maximum. Now, some of them might work with a faster clock, but it will be a lottery. (don't ask me why so many people try to use 20-24MHz) I recommend sticking with the 14.76MHz crystal, 18.432MHz tops.

    Fred, how far are you into your simulator? Is this control board the last thing you need? Double check your components. Make sure your diodes and transistors are connected in the right way and not reversed. Did you use a socket when you soldered the uC? It is possible to blow parts of the controller chip with the soldering iron, and also connecting things the wrong way. I can't really give specific advice as I never built this board before, only my own stuff on breadboards.

    If you can wait, I am working on my own controller/h-bridge system. I don't want to let the cat out of the bag as of yet, it is still in an early stage.. It might be worth trying to fix your board instead of buying a whole new set of everything.
  8. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Hi 914Tom,

    Yes, I have the right crystals (18.423, 14.76, etc), but just wrote them out in short cause I didn't have them next to me when I wrote my reply, so I couldn't read the exact specs :)...


    I am very glad that yours is working now. I am heading out to the electronics shop this morning to buy a few new crystals, and a whole range of caps. Somewhere I will find the right combination! I need a bit faster PWM frequency.. Ultimately I would like to be able to overclock mine to run in the ~22mhz range, but even 18mhz would be better than the 14Mhz..

    I will report back as soon as I have tried all of these. Worst comes to worst, I would also be happy with a 14 mhz cyrstal, and still be able to see the AMC in hyper terminal as well as X-sim, than not having a working amc at all...

    Thanks guys!

    Ps, if all goes according to plan, our frames should be done today. Then we just need to start mounting the motors and configure them for the proper movement, hence my urgency to get the amc to work properly with the PC...
  9. Nicko355

    Nicko355 New Member

    Joined:
    Oct 17, 2009
    Messages:
    27
    Occupation:
    Automotive Tech
    Location:
    Sydney , Australia
    Balance:
    483Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi everyone update . I have my motors running no problems and I am still waiting for my LCD to arrive.I am able to run the 14 , 18 , Mhz crystals with the caps in place no problem . The only problem I was having was not being able to programme my kp parameters so i worked out that it was my rx line , because I would always recieve a response when I pressed reset . So in desperation I bridged the transistor on the rx line across the emitter and collector and then I had communication and I was able to set the kp values.I was not keen on doing that but does anybody understand why it worked when I did this ? As I have said previously my knowledge of electronics is limited CHEERS Nick
  10. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Which transistor did you bridge? There are a lot of unnecessary components on that part of the AMC. If you inspect the schematic you will see that the transistors don't really do anything in terms of logic, maybe invert the signal and invert it back (or it wouldn't work).

    Here is my little circuit that has BOTH the serial programmer circuit and the RS232 level converter circuit for RX/TX. Measures 4.5 x 3cm, but without the connector I made it even smaller on a perfboard. As you can see there are only 4 capacitors that you need the MAX232 to work.

    Attached Files:

  11. 914tom

    914tom Member

    Joined:
    Nov 19, 2009
    Messages:
    37
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0
    hi fred,

    i take again a look at your firs post an the picture of your board.
    1. try to solder the trasistors direkt to the board, eventualy there is a problem withit (the sokets are not necercery)
    2. your power adapter is 6.3V 1.8A ? your imput voltage is maybe to low ?!
    on the datasheet http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS008822.PDF side 2 you can read, the minimum input voltage vor the LM is 6.25v.
    When you hit the elektronic store maybe buy a cheap socket 'multivoltage AC-DC adapter' and try it with 7.5v or maybe 9v.

    an if this ALSO will not work...... i have no more ideas

    tom
  12. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Hi Frakk and Tom: I have not build the rest of the simulator yet because I dont need it without AMC. I am in a learning prosess about electronics, and I know I can do the rest If i get the AMC and H-bridge to work :D .
    I think the direction of the components are ok but you are velcome to look at the pictures on page 76 on this post. My multimeter says 7,14 v on my adapter, but i will try to find another for testing. As long as there is new things to test there is hope!
  13. 914tom

    914tom Member

    Joined:
    Nov 19, 2009
    Messages:
    37
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0
    7.14 should be OK.
    between the middel an the right contact of the LM make sure there are 5v.
    and solder everything but the ic's direkt to the board, maybe a contact problem.

    .. the same stragety is working for me, first the elektronic, the the motors, then the mechanic.
    TOM
  14. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Hi Guys,

    Update from my side... I just lost an atmega chip ;(

    I had a lightning surge last night, and the only thing that was left in the battle was my atmega. I tested it by replacing it with another atmega, and the rest of my AMC was working again.. So sad.. Oh well, luckily I am building 2 of these, so I can still experiment on the other one..

    I still have the problem of not being able to see my amx in hyperterminal, and as such I also can't see it x-sim..

    @niko,
    Would you mind posting a picture of the amc board showing which transistor you bridged out? Maybe that's my problem too. I would appreciate it tremendously if you could do that mate!
    Also, once bridged, did you leave it like that, and when you open up force profiler, does the program detect your x and y axis?

    Thanks again, appreciate all the help!
  15. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Hi Guys,

    Update from my side... I just lost an atmega chip ;(

    I had a lightning surge last night, and the only thing that was left in the battle was my atmega. I tested it by replacing it with another atmega, and the rest of my AMC was working again.. So sad.. Oh well, luckily I am building 2 of these, so I can still experiment on the other one..

    I still have the problem of not being able to see my amx in hyperterminal, and as such I also can't see it x-sim..

    @niko,
    Would you mind posting a picture of the amc board showing which transistor you bridged out? Maybe that's my problem too. I would appreciate it tremendously if you could do that mate!
    Also, once bridged, did you leave it like that, and when you open up force profiler, does the program detect your x and y axis?

    Thanks again, appreciate all the help!
  16. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Hi Tom.
    I do have 5v between the middel an the right contact of the LM, and now I have soldered the transistors directly to the board, but with no luck. Guess i am running out of options! Maybe one of the components are broken. Any suggestions where i should try to replace?
  17. Nicko355

    Nicko355 New Member

    Joined:
    Oct 17, 2009
    Messages:
    27
    Occupation:
    Automotive Tech
    Location:
    Sydney , Australia
    Balance:
    483Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi everyone . The transistor I bridged was the very bottom one on the board.On the RX line.Currently i am placing the transistor in backwards to make it work :? What I also found was that my Dip switch No 2 was not functioning properly .I could feel it was not clicking as well as the other's .I was carefull not to put too much heat into it when I soldered it but I suspect it being of poor quality,they were cheap :thbd:I also noticed that J1 (servo power jumper) marked as Gnd,Vin,Vcc are inverted, correct me if I am mistaken.Some of the earlier drawings are correct.Also noticed some of the hex files the crystal numbers dont match the crystals on the parts list that I used.I dont know if thats important. Keep the posts flowing every little bit helps CHEERS NICK

    Attached Files:

  18. 914tom

    914tom Member

    Joined:
    Nov 19, 2009
    Messages:
    37
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0
    sorry fred,
    i'm also running out of ideas.
    send it over an i will take a look (but my electronic skills are limidet too *g*).
    tom
  19. watkykjy

    watkykjy Member

    Joined:
    Nov 29, 2009
    Messages:
    30
    Balance:
    - 10Coins
    Ratings:
    +0 / 0 / -0
    Hi Guys,

    I am sorry to hear that Fred has not gotten his amc to run properly. I on theother hand think that I am winning!! I made the biggest NOOB mistake ever (blush)... When trying to connect t hyper terminal, I EVENTUALLY saw that I had only the RX lines connected with the little cable I made, but NOT the TX lines... DOH!! Quickly made a cable to connect the TX as well, and boom, all worked like a charm!

    So, it seems that I am on the home stretch here.. I have only limited questions left to ask, and if any of you came accross this before, please let me know, so I can learn from you!

    Firstly, my one H-brdige gives out over 12V in one direction, but only around 9V in the other direction.. Any ideas as to what I can check here? I mean, it is working, responding to the inputs from my pots and everything, but of course, seeing only 9V in one direction, and over 12V in the other, causes the motor to spin at different speeds in every direction... One can see how this is a problem... Any ideas?


    Next, when I turn the pots to make my one motor spin, it completely blanks out the LCD. The circuit still operates and everything, but the characters on the LCD dissappears... Only the backlight stays on. Like I said, I don't loose control over the circuit, but the fact that the LCD characters dissappear is a little alarming to me.

    Lastly, and this is my issue right now... I am trying to test my amc and h-bridge with the motors, etc in X-sim, but don't quite know how to go about it. I have installed a force feedback steering wheel and when I start force sender, it sees the steering wheel, etc. Then I click on try send data, and then open up force profiler. When clicking on the input tab, I don't see any values change when I move the steering wheel, and also, when I go to the output tab, it doesn't detect any x or y axis that I can calibrate, and as such, when I click on the big START button, it tells me that no axis is defined...

    WTFFFFF!!!??

    Any help here, or am I missing something (as usual)? LOL

    Thanks guys for all your help, it's really appreciated, and I look forward to hearing how to properly operate and test my circuit!!

    Johan
  20. 914tom

    914tom Member

    Joined:
    Nov 19, 2009
    Messages:
    37
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0