Open the X-Sim notifier or download it!
motion simulator DIY community Follow us on  Twitter Add to iGoogle
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.

Moderator: egoexpress

on 30.08.2007, 09:30

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

New postby tronicgr on 30.08.2007, 09:30

I designed the AVR controller to support either 4 servos or 4 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.

I also have the feedback input selectable between 4 potentiometers and 4 quadrature encoders, as also requested, by using again dip switches.

The major features are:

- 10bit (1024) motor speed resolution
-4 actuators/motors support
-4 full PWM channels
-4 servo signal outputs
-4 encoder inputs (implemented on a second extension board soon)
-4 potentiometer inputs (that sets the max travel angle and the proportional speed.)
-LCD support (not yet decided its use, maybe LCD menu for settings)
-4 trim potetiometers (for various settings or buttons for the LCD menu)



(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 4120 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 2547 times


And here in text format only:
AVRmotioncontrollerpartlist1_5c.txt
(2.28 KiB) Downloaded 1578 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...


I also prepared a new AVR motion controller v1.5b layout that contains additional circuits to handle four external H-bridges if you own a commercial type ones:



ImageAVRmotionsimulatorcontroller1_5b.pdf (375.17 KB)

ImageAVRmotionsimulatorcontroller1_5b_botttom.pdf (50.77 KB)

ImageAVRmotionsimulatorcontroller1_5b_botttom_filled.pdf (73.06 KB)


Its the same as version v1.5 in dimensions except from the extra PCB in the bottom that contains the simple H-bridge driving circuits.


And in case that you already ordered a AVR motion controller v1.5 layout here is a separate extension PCB that has this extra circuitry to drive four simple H-bridges:



ImagePWM_to_simple_hbridge_dual.pdf (121.09 KB)

ImagePWM_to_simple_hbridge_dual_bottom.pdf (28.12 KB)


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

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)
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 2786 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
(20.38 KiB) Downloaded 1622 times




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


Thanos
Last edited by tronicgr on 17.03.2009, 01:11, edited 38 times in total.
User avatar
tronicgr
X-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269
The following user would like to thank tronicgr for this post
banquer, christian, egoexpress, jimiTES, Michael N., Nima, pointer4, Raceray, rappa, rfsalter, suleyman_trk, willynovi


on 30.08.2007, 11:49

New 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: 3833
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 30.07.2010, 10:13
Obtained thanks: 244


on 30.08.2007, 13:32

New 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-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269


on 06.09.2007, 09:12

New 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-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269


on 06.09.2007, 11:33

New 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: 3833
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 30.07.2010, 10:13
Obtained thanks: 244


on 06.09.2007, 15:09

New 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: 1531
Joined: 08.11.2006, 20:12
Location:Germany Hamburg - Germany
Local time: 30.07.2010, 10:13
Obtained thanks: 169


on 06.09.2007, 16:11

New 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-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269


on 06.09.2007, 16:18

New 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-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269


on 06.09.2007, 17:34

New 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: 1531
Joined: 08.11.2006, 20:12
Location:Germany Hamburg - Germany
Local time: 30.07.2010, 10:13
Obtained thanks: 169


on 07.09.2007, 10:18

New 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-SIM developer
 
Posts: 1232
Joined: 11.05.2007, 17:33
Location:Greece Greece, Athens
Local time: 30.07.2010, 11:13
Obtained thanks: 269


Next

Similar topics

Return to X-Sim compatible hardware


Social Bookmarking
Bookmark bei: Mr. Wong Bookmark bei: Del.icio.us Bookmark bei: Webnews Bookmark bei: Icio Bookmark bei: Oneview Bookmark bei: Linkarena Bookmark bei: Newskick Bookmark bei: Folkd Bookmark bei: Yigg Bookmark bei: Digg Bookmark bei: Reddit Bookmark bei: Simpy Bookmark bei: StumbleUpon Bookmark bei: Slashdot Bookmark bei: Netscape Bookmark bei: Furl Bookmark bei: Yahoo Bookmark bei: Spurl Bookmark bei: Google Bookmark bei: Blinklist Bookmark bei: Blogmarks Bookmark bei: Diigo Bookmark bei: Technorati Bookmark bei: Newsvine Bookmark bei: Blinkbits Bookmark bei: Ma.Gnolia Bookmark bei: Smarking Bookmark bei: Netvouz

Who is online

Users browsing this forum: No registered users and 0 guests