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 11.09.2007, 14:30

Postby tronicgr on 11.09.2007, 14:30

egoexpress wrote:
My HB-25 does produce noice during low PWM signals...

Which PWM frequency do you use currently?

1024 steps is borderlined.

In the datasheet of the Atmega8535, I found these specs:
– Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

How to get 4 Encoder inputs with 10bit resolution?

Perhaps an external decoder IC could be a solution?

10bit is not enough for sure :(


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.
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 21.05.2013, 23:20
Obtained thanks: 337


on 11.09.2007, 14:43

Postby tronicgr on 11.09.2007, 14:43

RaceRay wrote:
some frequency dividers in the firmware set to dip switches so that different users can select PWM freq suitable for them...


like the idea, i imagine a dynamic PWM frequency, setable via poti and the frequency can be seen at a little matrix lcd.
That should be suitable for every possible combination of motor and motordriver ;-)

I understand that you prefer to buy near of you. The voltage and Current of the driver are higher than from our RNV2-Dual, too and price is nearly the same, without shippingcosts.

I think Thanos is on the right way to make a universal X-Sim interface.

regards
Ray


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
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 21.05.2013, 23:20
Obtained thanks: 337


on 11.09.2007, 15:31

Postby egoexpress on 11.09.2007, 15:31

an addon board with several small Attiny AVR 's to take care of the counting of the encoders

Perhaps a decoder IC would be an option?
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 22.05.2013, 09:20
Obtained thanks: 287


on 11.09.2007, 15:50

Postby tronicgr on 11.09.2007, 15:50

egoexpress wrote:
an addon board with several small Attiny AVR 's to take care of the counting of the encoders

Perhaps a decoder IC would be an option?


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
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 21.05.2013, 23:20
Obtained thanks: 337


on 11.09.2007, 17:43

Postby egoexpress on 11.09.2007, 17:43

Are these the Atmels that you are going to use?

ATMEGA8535-16-PU

ATTINY 2313-20

They are cheap indeed!
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 22.05.2013, 09:20
Obtained thanks: 287


on 11.09.2007, 17:58

Postby tronicgr on 11.09.2007, 17:58

Yeah, a lot cheaper than using Basic Stamp2!!!

Thanos
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 21.05.2013, 23:20
Obtained thanks: 337


on 12.09.2007, 16:14

Postby tronicgr on 12.09.2007, 16:14

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
User avatar
tronicgr
X-SIMER
 
Posts: 1481
Joined: 11.05.2007, 17:33
Local time: 21.05.2013, 23:20
Obtained thanks: 337


on 13.09.2007, 02:10

Postby egoexpress on 13.09.2007, 02:10

perhaps less than 5ms in each code round


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
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 22.05.2013, 09:20
Obtained thanks: 287


on 13.09.2007, 02:22

Postby EvanF on 13.09.2007, 02:22

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.
User avatar
EvanF
X-SIMER
 
Posts: 199
Joined: 10.06.2007, 12:47
Location:International New Zealand
Local time: 22.05.2013, 20:20
Obtained thanks: 7


on 13.09.2007, 03:30

Postby egoexpress on 13.09.2007, 03:30

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 :)
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3851
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 22.05.2013, 09:20
Obtained thanks: 287



PreviousNext

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 0 guests

cron