[PD] pd/arduino pwm > servo motor

Hans-Christoph Steiner hans at eds.org
Sat Oct 21 04:10:59 CEST 2006


On Oct 19, 2006, at 8:52 PM, tim wrote:

> I have a servo motor which is to be driven by pduino / Arduino.
> The following firmware directly uploaded to the arduino (near  
> bottom of page):
> http://itp.nyu.edu/physcomp/Labs/Servo
> runs well.
> With some modifications the motor moves between 2 positions  
> smoothly enough.
> However, trying the same from pd using the pduino (fermata)  
> firmware and the arduino help pd patch, it's quite a different story.
> The pulse-train needed for the PWM control of the servo motor seems  
> too irregular (due to pd/comport timing?) such that the motor is  
> not positioned cleanly but jumps around. (at least, that's my  
> interpretation)
> I tried both sending PWM from ports 9,10 or 11 (the Amtel-built-in  
> pwm) and generating some software pwm on other digital out ports.
> Is there a way to get rid of this jitter?
> ( last attempts were running pd 0.39.2 on ubuntu, comport from:  
> http://wikihost/wikis/techartsound/var/gebo/data/file/ 
> comport.pd_linux )

Serial ports are not fast enough and have too much jitter for the  
servo pulses to be generated by Pd and transmitted over the serial  
port to the Arduino.  The Atmel needs to handle the pulse generation  
for it to work well.

.hc


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

Using ReBirth is like trying to play an 808 with a long stick.    - 
David Zicarelli






More information about the Pd-list mailing list