Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

8 chan servo controller for a tiny2313 - 1 uSec resolution
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
luizabbadia

Bascom Member



Joined: 11 Dec 2007
Posts: 112
Location: rio de janeiro

brazil.gif
PostPosted: Mon Jul 11, 2011 1:01 pm    Post subject: Reply with quote

OK! Very Happy
Back to top
View user's profile MSN Messenger
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Wed Jul 13, 2011 4:19 pm    Post subject: Reply with quote

Nice video Very Happy Didn't know this hack before - good hint for making inexpensive swarms!
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 883
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Fri Jul 15, 2011 1:29 am    Post subject: servo controller Reply with quote

It is possible to build servo controllers without internal PWM control or ASM exclusively with Bascom commands.
I have recently developed an 18-channel servo controller for a pulse width of 200 usec. to 2.5 msec. with 1 usec resolution without jitter (at least I can not detect any with the scope) with my favorite cheap Atmega168. Data transfer in ASCII or binary and multiple controllers on the same line.
Actually it is a controller ( and selectable as simulator to test channels at different pulse length ranges) which can accept high baud rates of up to 250 Kbaud without disrupting the pulses.
Bascom like any other programing environment has a learning curve and pitfalls for a microprocessor based mind but I like it.
It cuts development time by weeks or even months compared to Assembly Language.
Hubert
Back to top
View user's profile
luizabbadia

Bascom Member



Joined: 11 Dec 2007
Posts: 112
Location: rio de janeiro

brazil.gif
PostPosted: Fri Jul 15, 2011 2:17 am    Post subject: Reply with quote

Wow!
18-channel servo controller!
Would be handy when dealing with multiple legs robots!
Back to top
View user's profile MSN Messenger
Kiedro

Bascom Member



Joined: 08 Mar 2006
Posts: 81

germany.gif
PostPosted: Fri Jul 15, 2011 2:21 am    Post subject: Reply with quote

Sure. When I wrote the corresponding code for Xmega - 1.5 years ago - Bascom did not have this support. Now single slope support exists for Xmega - and so life has become much easier. In any case I agree with Mark that if HW is available, it should be used. So let me stick to fast/single slope PWM after having tested alternatives for a long time. When I say rock stable, jitter free, and perfectly precise, I mean it - literally. Including the embedding in a complex application with lots of number-crunching and interrupts.
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 883
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Fri Jul 15, 2011 5:02 am    Post subject: servo controller Reply with quote

It is not my intention to compete here. Everybody does things different, that is the reason that every car does not (or did not) look the same. Just wanted to post what I did.
I am still doing reliability testing in different environments (like temperature stability and so on).
The controller will be a commercial item and I intend to post it on Youtube with programming reference to Bascom but need to ask Mark Alberts first for permission. This is also the reason I do not post the schematics and code here.
If I am not too busy with other things, it might be done by the end of next month.
If the at168 had more pins available it probably would have more channels but I think 18 is enough for the usual stuff and there is always a second one. Could have done an even wider pulse range but would not be practical.
By the way, the data input is in micoseconds directly. If you send a value of 1500 to the channel then you get a 1500 usec pulse at about 23 msec stable repeat time no matter what any other channel is.
Keep up the good work.
Hubert
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5278
Location: Holland

blank.gif
PostPosted: Fri Jul 22, 2011 9:54 am    Post subject: Reply with quote

no need for my permission on youtube. I love to see project movies on youtube. A movie tells more then a thousand pictures Smile

Watched this one : http://www.youtube.com/watch?v=lcYnrZms7l8

_________________
Mark
Back to top
View user's profile Visit poster's website
Kay

Bascom Member



Joined: 06 Jun 2006
Posts: 82

germany.gif
PostPosted: Sat Apr 28, 2012 2:35 am    Post subject: Reply with quote

Hi,

i try to port your Code to an atmega32 / 16Mhz. But the Timers are different. Can you help me to port your code to my atmega32 ?

Thanks
Kay
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum