Page 1 of 1

Rambo servo Pin. Update

Posted: Thu Jan 29, 2015 4:55 pm
by Holy1
Does anyone know what the pin # is for the servo control on the Rambo 1.3 and where it is on the board? I am messing around with a z-probe.
Also is it turned on in the pins.h file?
Thanks

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 5:10 pm
by Earthbound
Pin 5 is your best bet.

It is accessible on the PWM Extension header on the RAMBo. This is located just "above" the largest chip on the RAMBo.

Do not alter the pins.h file. Not sure what all needs to be done to enable the probe functions, but the definition for the servo pin would be done in Configuration.h file.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 5:35 pm
by Holy1
Earthbound wrote:Pin 5 is your best bet.
ok, thanks. How do I locate where it is on the board?

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 5:54 pm
by Earthbound
On the PWM header:

1: VCC (5v)
2: GND (local ground)
3: digital pin 13 (shared with yellow LED on RAMBo)
4: digital pin 2 (saved for FAN-2 control)
5: digital pin 5 (available, and conveniently has same # as physical position on this header)
6: digital pin 4

So servo connection would be pins 1,2,5 on the PWM header.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 6:03 pm
by Holy1
Earthbound wrote:On the PWM header:

1: VCC (5v)
2: GND (local ground)
3: digital pin 13 (shared with yellow LED on RAMBo)
4: digital pin 2 (saved for FAN-2 control)
5: digital pin 5 (available, and conveniently has same # as physical position on this header)
6: digital pin 4

So servo connection would be pins 1,2,5 on the PWM header.

Thanks very much! I have the probe figured out but wanted a servo to deploy it.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 6:29 pm
by Holy1
Got the servo working. I'm tickled, much appreciated Earthbound!

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 6:30 pm
by Earthbound
So I looked around in Configuration.h and found the relevant area. Appears (at least in Repetier 0.91) that it was added to support the RAMPS board, which uses some different pins on the microcontroller.

Servo section begins at line 1051, and I've copied the whole section into this post.

You'll need to change the FEATURE_SERVO line from false to true. You can leave the pin defines alone, just use ID2, since that matches up to pin #5.

Then you can control the servo via gcode M340.

M340 P2 S1500 would drive servo on pin#5 to center of travel.



/* Servos

If you need to control servos, enable this feature. You can control up to 4 servos.
Control the servos with
M340 P<servoId> S<pulseInUS>
servoID = 0..3
Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.

WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
*/

#define FEATURE_SERVO false
// Servo pins on a RAMPS board are 11,6,5,4
#define SERVO0_PIN 11
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#define SERVO3_PIN 4

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 6:31 pm
by Earthbound
Sounds like you got it figured out while I was typing.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 6:52 pm
by Holy1
yup, made some quick gcode and I've been watching it spin back and forth!

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 7:05 pm
by Holy1
here is some thing odd - when I send M340 P2 S1500, it works the servo fine but also zeros the z height and writes that to the epprom . Z max length 0 . it shows it doing it in the log.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 7:40 pm
by Earthbound
Looks like a bug in Commands.cpp file. Try to find #endif // FEATURE_SERVO which should be about line 1346.

Insert a new line above it that contains just break; and be sure to include that semicolon. Compile and upload with that change and the Z issue should be gone.

Re: Rambo servo Pin

Posted: Thu Jan 29, 2015 7:59 pm
by Holy1
Earthbound wrote:Looks like a bug in Commands.cpp file. Try to find #endif // FEATURE_SERVO which should be about line 1346.

Insert a new line above it that contains just break; and be sure to include that semicolon. Compile and upload with that change and the Z issue should be gone.
Sweet, I'll give it a go tomorrow.

Re: Rambo servo Pin

Posted: Fri Jan 30, 2015 4:15 pm
by Holy1
Yes, that worked. I am in your debt.

Re: Rambo servo Pin

Posted: Fri Jan 30, 2015 4:41 pm
by Earthbound
Glad to hear that solved the problem.

Re: Rambo servo Pin

Posted: Fri Jan 30, 2015 8:02 pm
by Holy1
The Y axis Motor has started acting up. It only goes one direction. I have swapped it with one of the other motors and the motor itself is fine. The problem followed to the other motor.
I have reassigned the motor plug to the spare extruder E1 plug, changed the pin assignments and the motor current in the configuration.h file. The motor acts the same. It may give a little tiny noise when you want it to move. Any other tricks or do we think the RAMBo has failed?

Thanks

Re: Rambo servo Pin

Posted: Sat Jan 31, 2015 12:11 am
by Earthbound
Does the Y axis only move down? Did you run new wires or move wires that could now be falsely tripping the Y tower end stop? If you disable the servo feature, does it restore normal Y movement?

Re: Rambo servo Pin

Posted: Sat Jan 31, 2015 7:54 am
by Holy1
The servo was disconnected, completely unplugged. I even unplugged the end stop wires from the board to be sure there wasn't crosstalk . Still only moves down.

Re: Rambo servo Pin. Update

Posted: Sat Jan 31, 2015 9:15 am
by Holy1
Ok, found the problem. The limit switch is defective. It sounded funny when I clicked it, not the the same click as the others. Ran the m119 and it confirmed. As always one should check the simplest things first!! Live and learn.