Hi,
Today I've been trying to control these cheap servos I just received :
http://www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/stores/sg90_datasheet.pdf
I tried with these pd patches, without success :

alt text

alt text

[adc 3] is a potentiometer. I know from the scope my duty cycle is between 1 and 2 ms. I tried with different outputs, including digital at message rate, and analog. Any idea about what i'm doing wrong? I've never used servos, so maybe i'm missing something obvious.

    I think you need a space between 11 and ~ when sending to bela_setDigital: double check against the example. To make sure you are generating the expected signal, you could connect the digital output back to an analog input with a wire and send the new analog input to the scope ([dac~ 27 28 29 30]).

    However, the digital outputs are 3.3V. The (minimal) datasheet indicates "Voltage: 4.8V - 6V", so I would try to send a 5V signal, instead of 3.3V. You could either use a transistor to do level shifting on the digital outputs or use the analog outputs, which are 5V. These can be addressed with [dac~ 3] to [dac~ 10] from PureData.

    10 days later

    LucienR
    Hey LucienR,
    do you have it working now, could you share the patch? That would be amazing!
    all the best
    vince

    Hi Vince, i've been working on something else lately, i'll give it another try this week end and get back to you. Still, i don't know what could be wrong from my first try, as I know as a fact I was sending the servos 1 - 2 ms pulses at 50 hz. Did you try my pd patch? Do you have the same servos (sg90) ?
    Lucien