usbpe308
Posts: 3
Joined: Thu Feb 13, 2020 1:57 am

Wiring help for R701 Stepper Motor Driver

Thu Feb 13, 2020 2:04 am

I have picked up a old Pan Tilt module and inside it has two RMS R701 stepper motor drivers. I haven't been able to figure out the proper wiring for it to a Pi since it was built before Pi's were around. Can anyone take a look and see if you can tell? I attached an image of the device and the link to the manual.

https://www.linengineering.com/wp-conte ... Manual.pdf

Thanks for any help you can provide!
Attachments
R701.jpg
R701
R701.jpg (18.8 KiB) Viewed 268 times

njh
Posts: 69
Joined: Wed Aug 09, 2017 2:07 pm

Re: Wiring help for R701 Stepper Motor Driver

Fri Feb 14, 2020 12:54 pm

From a quick look at that datasheet, it appears to be driven through opto-isolators that expect a common 5V rail, and current sink control signals (this is not unlike many kinds of relay driver boards). There are 2 control signals per motor (direction, step). But the Pi uses 3.3V logic levels on its GPIOs, and can be damaged by 5V or more.

So it looks like you will need four external NPN transistors, each driven from a Pi GPIO output (via a resistor of course), in an "open collector" configuration; with the Pi's 5V rail connected to the 5V terminal, and the drivers configured for "Common 5V input" (you may need to move some jumpers before connecting it up). See figure 3 in the datasheet. Do not connect the GPIOs directly and do not connect GND or any other wires between the Pi and the motors.

Edit: P.S. from a software point of view: generating regular pulses at speed, for smooth motion in the desired profile, might be tricky on the Pi. Do you know what kind of pulse rate you will need?

usbpe308
Posts: 3
Joined: Thu Feb 13, 2020 1:57 am

Re: Wiring help for R701 Stepper Motor Driver

Fri Feb 14, 2020 7:45 pm

I dont think my reply went thru.

Thank you for the response. Im not sure of the motor specs yet, should be finding out next week.

I did try starting with just 1 stepper. 5v to 5v, ground to metal case of PT, a gpio pin to direction and one to step. Did a 100 hz PWM and stepped up each pin individually and together. Went from 0 and slowly stepped the duty cycle to 100% but no movement.

Any other ideas i should try?

pcmanbob
Posts: 8324
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Wiring help for R701 Stepper Motor Driver

Fri Feb 14, 2020 10:22 pm

As shown in the linked pdf you need to use a transistor driver circuit and 5V to drive the logic of the stepper controller.

A simple 2N2222 and a 1K resistor will be all you need for each driver circuit.

I can draw you a diagram tomorrow if you need one.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

njh
Posts: 69
Joined: Wed Aug 09, 2017 2:07 pm

Re: Wiring help for R701 Stepper Motor Driver

Fri Feb 14, 2020 10:48 pm

Yes, I would defintely use a transistor, otherwise there's a real risk of pulling the GPIOs above 3.3v and it takes little or no current to damage them! I hope that has not happened already. A ground connection shouldn't be needed if I understood that diagram in the pdf.

It's hard to debug this stuff at a distance, but here are some vague suggestions: You'll need either a scope or a multimeter that can measure DC, AC and Hz. Check the GPIOs and transistors really are switching. Vce (transisor collector voltage compared to Pi ground) should switch between more than 3v when the transistor is off, to less than 0.5v when the transistor is on, with average somewhere in between when PWM is used. Check some current flows through the control inputs to the driver module when each transistor is on (should be several mA).

Once you've verified you can send current pulses through the Step input, try setting it to (say) 50Hz 50% PWM. if still no movement, check all the other connections to the driver module, including the disable switch isn't on. Check if any of the motor coils are being activated.

usbpe308
Posts: 3
Joined: Thu Feb 13, 2020 1:57 am

Re: Wiring help for R701 Stepper Motor Driver

Sat Feb 15, 2020 5:47 am

Thank you both for the comments, you two have been big helps! I did check my gpio pins when testing and thought it weird they went to 5v instead of 3.3 so probably killed that one, but thankfully they arent crazy expensive. Ill get another one and make sure i have the other parts (think i have them but will make sure b4 i test again.)

I think i see the wiring in my head but you two know way more than me so feel free to send the diagram you were talking about.

This thing is so tightly packed with so many different pcbs in there, ive been trying to not take it completely apart for frear i cant get it back together, but im thinking i might have to risk it. I haven't even been able to find the leads from the motors, other than where they go to the stepper modules.

Ill update in a week or so when i get back to it. Really appreciate the help!

pcmanbob
Posts: 8324
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Wiring help for R701 Stepper Motor Driver

Sat Feb 15, 2020 11:00 am

So this is the diagram I was talking about

Image

and this is what it would look like using the 2N2222 transistor as the interface.

Image

Gpio chosen for ease of drawing, you can use which ever you choose.

You will need to do this for each controller, the inputs are optically isolated within the controller , so don't connect any grounds between the pi and the controller/motor power supply.

You may also need to check that the controller internal jumpers have not been changed to common ground, page 5

the specifications for the step and direction pulses are on page 6
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Interfacing (DSI, CSI, I2C, etc.)”