Open latest posts
motion simulator DIY community 

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

Aufbau, Betrieb, Reparatur und der Entwicklung von Kontrollern oder sonstiger externer Hardware - Assembly, handling, repair and construction of controllers or external hardware.
on 30.08.2007, 09:30

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

Postby tronicgr on 30.08.2007, 09:30

BEWARE: This version is obsolete now! You can find the new version, the AMC1.6USB here:
Thanos AMC1.6 USB Motion Controller.




------------------------------------------------------------------------------------------------------------------------------------

The AMC1.5 AVR controller supports 2 full H-bridge PWM channels to drive the motors. The connections will be made in the same ports and its function will be selectable by dip switches.


The major features are:

- 10bit (1024) motor speed resolution
-2 actuators/motors support (in latest firmware 1.0)
-2 full PWM channels, 2 - 8bit pwm channels (Not implemented yet the extra channels lack of timers).
-4 potentiometer inputs (that sets the max travel angle and the proportional speed.)
-LCD support

MANUAL FOR AMC / DSMHb with X-simulator software
https://rapidshare.com/files/1960710485/AMC_DSMhb_Manual_Word_97-2003.pdf



(EDIT: I HAVE NEW IMPROVED PCB PLANS FOR THE AMC1.5 HERE: post7978.html#p7978 )

Below you can see the layout I made to be able to follow the RN-VN2 connection standards. PCB plans are included to built this board if you want. Over this layout I’ll add the rest software features to make it able to fit to every type of motion simulator. Other PWM motor controller can be used too since they use the same basic connections (PWM, Enable1, Enable2) just different layout of the connection stripe.


AVRmotionsimulatorcontroller1_5_aa.pdf
(862.52 KiB) Downloaded 9698 times


And here is only the bottom side layout:

ImageavrmotionsimPCBbottom_only_1_5_a.pdf (100.25 KB)

Here is the new part list for version 1.5 of the AVR controller PCB:
avrmotioncontrollerparts1_5c.pdf
(812.02 KiB) Downloaded 7030 times


And here in text format only:
AVRmotioncontrollerpartlist1_5c.txt
(2.28 KiB) Downloaded 3949 times



Notice: If you can't find the molex connectors or you found them in too high prize, you can use pairs of simple DIP pin headers in place of the base connector or to create the data cable between avr controller and RN-VN2 motor controller. But you have to be carefull about the orientation of the connection if you plug - unplug them often. One full set of molex connectors for an AVR controller PCB, costs around 3.30 euro (14 connectors, male/female)... at least, this prize I buy them localy in Greece...








--------------------------------------------------------------------------------

Some technical details about the AVR motion controller:

Motor 1,2 run on 9bit PWM on 23,47Khz (9bit = 512)
Motor 3,4 run on 8bit PWM on 23,47Khz (8bit =256) (not implemented)
Has 8 ADC channels with 10bit resolution (10bit=1024)

Actually I drive the motor on 10-bit resolution! 0-511 for one direction of the motor and 512-1023 for the other direction!!! Same double resolution is used for motors 3,4 (9-bit)!


--------------------------------------------------------------------------------

Here is a schematic on how to do wirings for two RN-VN2 controllers to support 4 motors in the future... Only the first header in used for now.




--------------------------------------------------------------------------------
FIRMWARE 1.0

This is the first official release v1.0. It replaces all the previous beta versions!
For this reason I included the code for the two motion styles (Joyrider & SimforceGT) in it, and made it selectable between them with a jumper.





But his isn't the only feature. I also decided to give to the users the ability to change the servo motor KP proportiality values thru simple terminal connection:




Anyway you can read all about it in the manual I made for it:

PWM_AMC15_2DOF_v1_manual.pdf
(619.62 KiB) Downloaded 6386 times



And of course the firmware that cames in four files, each one for the crystal speed you are using:

PWM_AMC15_2DOF_v1 firmware.zip (Retired, sorry!!)
(20.38 KiB) Downloaded 4611 times

You can try using this interesting alternative firmware for AMC1.5:
Alternative software and firmware for the controller board AMC1.5



I connected a simple pot on directly on the motor axis and had enough precision on positioning without much ringing. So using multiturn pots is not always necessary.
You can connect two dual h-bridge motor controllers on it and control four motors but with a small restriction. The last two motor channels will run on 8bit PWM. This is a restriction of the Atmega8535, as it has only one 16bit timer that is shared on the channels for the two first motors. Anyway 8bit PWM isn’t that bad and can be used in heave or rotation that precision isn’t so critical.


Some description of the features of that Firmware v1.0 has:

-It uses only the first two motors for now: The pin header on the bottom (named rn-vn2) that can be connected to the JP1 header of an dual h-bridge motor controller.

-It uses only two the first two pots. Pot1 is position feedback for the motor1 and Pot2 is position feedback for the motor2.

-Don’t forget to align the position pots with the motor or the motion travel route to successfully have position feedback.

-When powered both motors should move to center position. If not immediately disconnect the power and reverse the motor +,- connections to turn to the opposite.

-It runs on serial speed of 115200 and you have to enter the setting of the following photo in the profiler USO to get it connected right:





The format of the output string is “AB~255~~y~~x~”
The ~255~ is there for compatibility reasons to be able to also test with Ian’s BFF 3DOF driver!!


Since the AVR controller has its own serial programmer included (ISP) you can use ponyprog to easily program the flash firmware on it and set the proper fuses for the crystal speed. You can see on the bottom of this post how you can use ponyprog.


I also developed the SimforceGT (frex-like) motion included in this version for Egoexpess and everyone else with simular motion cockpit!!!

Notice: This is a coupled motion version for two motors. Meaning the two motors are cooperate to lean to sides and back-forward.

Motor assignments are as follow:

Motor1 connection (on first DSMhb) is the right motor on the simulator.
Motor2 connection (also on first DSMhb) is the left motor on the simulator.

Again potentiometers are used for feedback on the motors: Motor1 --> Pot1 , Motor2 --> Pot2

The motion is limited in half for left-right as I reserved the rest motion capability for front-back motion!



--------------------------------------------------------------------------------

NOTICE TO ALL: This is still a BETA version and I’m not held responsible of any damage happens to your motors, simulator structure, you, etc. Use it on your own Risk!! You should know that motion simulators can be very dangerous if not handled with care!


--------------------------------------------------------------------------------

In case you don't know how to program the firmware on it, here is a small guide on how to use Ponyprog2000 to program the board:

ImageThanos_ponyprog_guide1_1.pdf (500.13 KB)

--------------------------------------------------------------------------------

If you are looking for a suitable alternative of RN-VN2 you can use this:

"Part#0708, Dual VNH2SP30 motor driver carrier"

http://www.pololu.com/products/pololu/0707/

And here is a schematic of the wirings you need to do to use the Polulu motor driver:



Its Yobuddy's design with a minor fixes on the pots connection.


--------------------------------------------------------------------------------

Another solution instead of buying a ready commercial motor controller is to make yourself the H-bridges to fit them on the amp/voltage rate of your motors. Then you can build this DIY Dual simple H-bridge motor controller!




You can learn more about it here:

http://www.x-simulator.de/forum/tronic-s-diy-dual-mosfet-h-bridge-t820.html

--------------------------------------------------------------------------------

I decided to make some video guides to help people understand the basics about my AVR motion controller.

I have made four video parts so far, that shows the cable connections, the ponyprog programming procedure, and the connection with x-sim software.

Here is the link to download all these videos:

http://rapidshare.com/files/106829488/AMC_video_guides_parts1_to_4.zip

---------------------------------------------------------------------------------------------------------------
Take a look a the following thread!!!! :gl:
Here is a some help for people that already have the old now AMC1.5 board and face problems with programming it or have serial communication problems: amc-1-5-missing-device-or-unknown-device-24-t1390-30.html#p38437


Thanos

----------------------------------------------------------------------------------------------------------------
some useful links:
http://www.x-simulator.de/forum/viewtopic.php?f=25&t=559&p=6138&hilit=multiturn+pot#p6138
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-620.html#p14488
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-630.html
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-510.html#p11967
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-510.html#p12154
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-430.html#p9780
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-420.html#p9129
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-420.html#p9258
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-410.html#p9045
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-370.html#p8922
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-360.html#p8644
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-330.html#p8163
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-320.html#p7978
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-290.html#p7350
http://www.x-simulator.de/forum/tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-170.html#p6138
http://www.x-simulator.de/forum/tronic-s-full-motion-car-racing-simulator-using-x-sim-t471-20.html#p10318
Attachments
Last edited by tronicgr on 14.07.2012, 21:40, edited 52 times in total.
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337

on 30.08.2007, 11:49

Postby egoexpress on 30.08.2007, 11:49

Hi Thanos,

I am impressed how fast you implemented the additional features. Even your interface was great before, it made a great step forward regarding to be a really universal motor controller!

With the pwm/servo and pot/encoder options your interface will be usable for any motor and feedback setup!

Everyone could decide by himself, what type and size of motor driver fits his purposes (and wallet ;) )

With the pwm and encoder support, those, who have either direct driven motors or motors with strong gearboxes, could simulate rumble, while driving over curbs, engine vibrations and all the rest of the ForceFeedback effects which require fast movements in short distances.

Keep at it! Great work!

Concering the encoder centering. I think that most motors, which are not linear actuators dont have end switches. Perhaps it could be realised that way, to set your simulator to center position in all axes. Then you would have to take this point as axis1=0, axis 2=0, axis3=0 and axis4=0
From this center point, the offset (encoder lines) should have to be able to set. For example -1000000/+1000000. One could arise these values until the desired DOFs are reached (surely limited by the setup ;) )

The idea with endswitches is good as well, but would fit only for those who have them attached on the actuators.
Another option could be to add some end-switches to the simulator. I think that they work autonomous, and dont have to be connected to the interface.
In this case, calibration would work that way, that the simulator would drive until end-switches, and the interface would have to store these values.
Center and DOF calibration could be made by simply moving the end-switches positions.
This could be done either with motor power, or manually.

Dont know which method would be best. What do you guys think?

ego
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 24.05.2013, 03:38
Obtained thanks: 287


on 30.08.2007, 13:32

Postby tronicgr on 30.08.2007, 13:32

Thanks, but I haven't done much yet. I still have to assemble a prototype and put toggether some code parts I have and start intensive testing it before I get back to you workable results...

But your feedback give me new ideas on how to proceed in this.



It happens to have some quadrature encoders at home and one of them is fixed on a DC motor:



The disk looks like 256 cpr or more!!!

The only thing that troubles me though, is the centering of the motors, while using quadrature encoders, that has to be done during power-on with full travel of the frames until limit switches are reached... Any suggestions?


In my oppinion I now find the limit switch idea unnesessary... I could program it in such way that it will do some training by itself about the limits in all axis, the first time it power up. Then if re-training is required I could program it to detect if you pressed two or three times the reset button to start over again. To detect the limit of its travel I could program it to monitor the encoders during slow moving the motor. As the motor will be physically limited it will forced to stop by itself and the controller can see this stop because the encoder is stop moving too and this will be marked as limit. And the center will be between the two forced stops of the motor.

I could even detect how many motors are connected on it this way too!


Any comments on this are welcome.

Thanos
Last edited by tronicgr on 06.11.2007, 16:55, edited 1 time in total.
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337


on 06.09.2007, 09:12

Postby tronicgr on 06.09.2007, 09:12

Update:

Just finished making the homemade PCB!!!

Thanos


Next is soldering the parts to start programming it...
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337


on 06.09.2007, 11:33

Postby egoexpress on 06.09.2007, 11:33

Hi Thanos

Nice to see some progress!

If the implementation of the LCD and IR-remote would take too much time, I'd appreciate if you could release the pcb without this features. They could be implemented via a firmware update later as well.

I have ordererd a dual motor-driver, and looking forward to use it with your interface ;)

regards
ego
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 24.05.2013, 03:38
Obtained thanks: 287


on 06.09.2007, 15:09

Postby Raceray on 06.09.2007, 15:09

Hi Thanos,

i ordered the same Dual-Motor-Driver as Ego (hope it arrives today) and i am very exciting for your next updates. The whipper motors still arrived this week.

I haven´t told it up to now, but it is really really cool, that you adapt your interface to the Atmel :wink:

Will you publish the source code for the Atmel later, for making own "changes"? I don´t wanna call it "improvements", because it is very impressive what you have done so far. :D

regards
René
User avatar
Raceray
Site Admin
 
Posts: 1767
Joined: 08.11.2006, 20:12
Location:Germany Hamburg - Germany
Local time: 24.05.2013, 03:38
Obtained thanks: 209


on 06.09.2007, 16:11

Postby tronicgr on 06.09.2007, 16:11

Hi Rene,

What model is the dual motor driver that you and Ego ordered? I might buy the same to do tests on my own on them instead to relay on you feedback for the results...

Using AVR will be many times better than BS2 for sure...

I can do an exception for you and share the code if you are able to point any improvements on it... :-)

Just be patient on it, as I have to start from ground-up, as the code I already have for BS2 is useless in the new design...

Regards, Thanos



RaceRay wrote:Hi Thanos,

i ordered the same Dual-Motor-Driver as Ego (hope it arrives today) and i am very exciting for your next updates. The whipper motors still arrived this week.

I haven´t told it up to now, but it is really really cool, that you adapt your interface to the Atmel :wink:

Will you publish the source code for the Atmel later, for making own "changes"? I don´t wanna call it "improvements", because it is very impressive what you have done so far. :D

regards
René
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337


on 06.09.2007, 16:18

Postby tronicgr on 06.09.2007, 16:18

Hello Ego,

The LCD will be there for debugging reasons (for start) and will be fully supported only after I finished with the servo motor driving features...
the same apllies for the IR receiver...

Regards
Thanos



egoexpress wrote:Hi Thanos

Nice to see some progress!

If the implementation of the LCD and IR-remote would take too much time, I'd appreciate if you could release the pcb without this features. They could be implemented via a firmware update later as well.

I have ordererd a dual motor-driver, and looking forward to use it with your interface ;)

regards
ego
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337


on 06.09.2007, 17:34

Postby Raceray on 06.09.2007, 17:34

Jassou Thanos,

we have ordered that PCB:
http://www.shop.robotikhardware.de/shop ... cts_id=112

It is available as kit, or complete ready built. It uses the driver VNH2SP30 which tolerates up to 30A and 41 Vmax , when the driver gets an additional good cooler, and some modifications of the resistors. Due to the standard non-cooling of the board, it is rated for 16V.
http://www.shop.robotikhardware.de/shop ... cts_id=108

Here is a diagramm:

If you need some translation for the site and further specifications for the driver, please ask me, i will do it.

I don´t know, if shop.robotikhardware.de will ship to greece. If not, tell me which components do you need (compelte kit, ready assembled, only the VNH2SP30 etc. ), and i will order it and send it to you.

Thank you for your "code exception". Bad word for an programmer:-)

so long
René

tronicgr wrote:Hi Rene,

What model is the dual motor driver that you and Ego ordered? I might buy the same to do tests on my own on them instead to relay on you feedback for the results...

Using AVR will be many times better than BS2 for sure...

I can do an exception for you and share the code if you are able to point any improvements on it... :-)

Just be patient on it, as I have to start from ground-up, as the code I already have for BS2 is useless in the new design...

Regards, Thanos


User avatar
Raceray
Site Admin
 
Posts: 1767
Joined: 08.11.2006, 20:12
Location:Germany Hamburg - Germany
Local time: 24.05.2013, 03:38
Obtained thanks: 209


on 07.09.2007, 10:18

Postby tronicgr on 07.09.2007, 10:18

Hi Rene,

This motor controller is awesome... in fact it uses the same chip (VNH2SP30) as the HB-25 are using! And costs the half money with two VNH2SP30 chips on the same board! I have bought the two HB-25 for 150euro last year. I want one of these RN-VN2 DualMotor!!


Image

Can you check if they can sent to Greece cause I can't translate all their pages... If they not, I would be very obligee if you ordered it for me (I could sent you the money for the board and the shipment costs to your Bank account or something...).


Regards, Thanos
Last edited by tronicgr on 16.01.2008, 16:04, edited 1 time in total.
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 23.05.2013, 17:38
Obtained thanks: 337



Next

Similar topics

Return to X-Simulator compatible hardware


Add this Thread to:
Add this page to Mr. Wong Add this page to Del.icio.us Add this page to Webnews Add this page to Icio Add this page to Oneview Add this page to Linkarena Add this page to Newskick Add this page to Folkd Add this page to Yigg Add this page to Digg Add this page to Reddit Add this page to Simpy Add this page to StumbleUpon Add this page to Slashdot Add this page to Netscape Add this page to Furl Add this page to Yahoo Add this page to Spurl Add this page to Google Add this page to Blinklist Add this page to Blogmarks Add this page to Diigo Add this page to Technorati Add this page to Newsvine Add this page to Blinkbits Add this page to Ma.Gnolia Add this page to Smarking Add this page to Netvouz

Who is online

Users browsing this forum: No registered users and 1 guest

cron