View previous topic :: View next topic |
Author |
Message |
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Mon Jul 11, 2011 1:01 pm Post subject: |
|
|
OK! |
|
Back to top |
|
|
Kiedro
Joined: 08 Mar 2006 Posts: 81
|
Posted: Wed Jul 13, 2011 4:19 pm Post subject: |
|
|
Nice video Didn't know this hack before - good hint for making inexpensive swarms! |
|
Back to top |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Fri Jul 15, 2011 1:29 am Post subject: servo controller |
|
|
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 |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Fri Jul 15, 2011 2:17 am Post subject: |
|
|
Wow!
18-channel servo controller!
Would be handy when dealing with multiple legs robots! |
|
Back to top |
|
|
Kiedro
Joined: 08 Mar 2006 Posts: 81
|
Posted: Fri Jul 15, 2011 2:21 am Post subject: |
|
|
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 |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Fri Jul 15, 2011 5:02 am Post subject: servo controller |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Jul 22, 2011 9:54 am Post subject: |
|
|
no need for my permission on youtube. I love to see project movies on youtube. A movie tells more then a thousand pictures
Watched this one : http://www.youtube.com/watch?v=lcYnrZms7l8 _________________ Mark |
|
Back to top |
|
|
Kay
Joined: 06 Jun 2006 Posts: 82
|
Posted: Sat Apr 28, 2012 2:35 am Post subject: |
|
|
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 |
|
|
|