Go Down

Topic: SoftwareServo (Read 2355 times) previous topic - next topic

ianphil397

Hi guys,

I'm using an Arduino Uni and an ETC to drive servo motors on an RC car, this worked fine using the servo library, however I needed to use timer1 for a 100ms interrupt and so resorted to using SoftwareServo to drive my servos. My steering servo works just fine, (it doesn't connect to the ETC) however the ETC I'm using to drive the rear wheels is just beeping, indicating it's not receiving any useful signal. I've checked all the wiring multiple times, the ETC is powered by a separate 7.4V LiPo, I've tried the ETC with the radio receiver and it is working fine. The code I'm currently testing is as follows:
Code: [Select]

#include <SoftwareServo.h>

SoftwareServo myservo;

int val;

void setup()
{
  myservo.attach(10); 
}

void loop()
{
  val = 95;
  myservo.write(val);               
  delay(15);

  SoftwareServo::refresh();
}


Can anybody help me please?

ETC Manual: http://www.zonacrawling.com/ManualTamiyaTEU-101BK.pdf

AWOL

ETC is an acronym I haven't heard before - what makes it different to an ESC?

ianphil397

I believe it's the same thing, I must have misread somewhere.

AWOL

What happens if you substitute a servo for the ESC?
Is 95 your programmed neutral point?

ianphil397

95 is the neutral point yes, With just a servo it works correctly.

AWOL

And the grounds are connected?
Can you confirm that the ESC behaves the same as if you turn the transmitter off?

ianphil397

Yeah, It's wired fine, If I change the code to use the regular servo library it works. However I can't use the regular servo library because it uses the 16bit timer1, which I need for reading time critical ultrasound sensors.

AWOL

I haven't used the software servo library for a very long time.
You could try checking that its "95" corresponds to the standard library's "95" "angle" timing, by marking the position of a servo and checking it with a couple of simple sketches, if you haven't got access to a scope (preferred).

DuaneB

How critical is the 100ms interrupt ? If you can tolerate tiny errors in the signal I would go back to using the standard servo library and use the blink without delay approach to generate the 100ms interrupt.

Duane B

rcarduino.blogspot.com
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

ianphil397

I just resorted to buying a Leonardo. Has 2 16bit timers.

Go Up