Arduino Rotary Table for Dummies

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Noitoen - It's certainly possible to add a stop function from a programming point of view, but there are two problems with this.

The first problem is that the AccelStepper.h function which works best with stepper motors is a "blocking" function - there is no option to insert code to check for a stop button.

The second problem is that while there are other AccelStepper.h non-blocking functions which can be used in a while loop, inserting a check for a button press into the loop introduces a delay which adversely affects stepper motor function. This is especially true if checking for a keypad press because a keypad scan takes a long time (in computer terms). This option is implemented for the continuous run mode, but it results in greatly reduced maximum motor speed.

It may be that using an interrupt would resolve this issue, but I have not had time to try this yet.

Finally, I suppose the main reason I did not implement a stop function for index mode is that I did not really see a need for it. This may be because my main use for the indexer is to cut gear teeth, so the index moves are relatively small and are generally completed before I would have time to hit a stop button anyway. IS there a need for a stop button in index mode that I am not seeing?
 
One option you might consider for a "panic stop" button is to wire a button to the reset switch.

I am implementing a separate emergency stop that will be wired directly into the stepper controller. In my case, the rotating table has a 90:1 gear ratio. It can take quite a while until the stepper stops depending on the number of divisions or angle input which is why I was asking for a stop button, preferably one of the keypad buttons. The intent would be to halt the current operation and go back to some prior menu level. When I was testing the unit for positional accuracy I found it easier to power down and reset the unit rather than wait for it to make 90 revoutions when I had input incorrect data and asked for 360 degrees. That is why I brought up the issue. It certainly is not a necessity and definitely should not be used for an emergency stop. E-stop should always be performed at as close a point to the driven load as practical.

Thanks again for posting such a useful program.
 
SailplaneDriver - thanks for the clarification. You said that you are wiring an emergency stop into the stepper controller - what is the benefit of this as opposed to just using a power off switch?
 
SailplaneDriver - thanks for the clarification. You said that you are wiring an emergency stop into the stepper controller - what is the benefit of this as opposed to just using a power off switch?

I plan on shutting off the stepper controller directly either by killing its power or logic input; the logic input is easier on the contacts. A general power shutoff can work depending upon where you do it. If at the input to the power supply you still have stored energy in the capacitors which will allow continued operation for some period. Contacts have to be suitably rated and any DC "kickback" has to be addressed.
 
If you require an emergency stop, then purchase a miniature emergency stop button and wire it between +5 volts and the other side to the +enable (EN) connection on the stepper controler board. The -EN needs to be commoned up with the -ELK and -DIR.

When operated, the stepper stops instantly and will restart once the stop button is released.

Bruce W-S
 
Добрый день!
Нарисуйте пожалуйста полную схему подключения всех компонентов по версии (Arduino_Rotary_Table_Control_2019_V2-Rev4.69B.ino) и можно ли подключить Microstep Driver 8060 + Nema 34 8.6 Nm
(
Good day!
Please draw the complete wiring diagram of all components at version (Arduino_Rotary_Table_Control_2019_v2-Rev4.69B.ino) and can I connect 8060 Microstep Driver + Nema 34 8,6 Nm)
 
Last edited:
my stepper motor is a 8 wire , will i work with this ?
tks
animal
 
To Strannik2 and Animal12

The connection of an emergency stop is very simple and can be tried easily by simply connecting the -EN to either
- Clk or - Dir. Connect a wire to +5 volts then initiate the rotary table and while the stepper is moving, touch the five volts to the + EN and the stepper will instantly stop and remain stop until the +5 volts is removed.

The enable control, is a logical gate that controls the clock and direction signals into the controler circuit.

The input signals to the stepper controller are independent of the output circuit that drives the stepper. Therefore, it doesn't matter if the controller is 4 wire, 6 wire or 8 wire.

I can post a diagram of how its wired tomorrow if required. The purpose of the emergency stop is to stop movement of the rotary table instantly because something seriously wrong has happened.

This happened to me about two weeks ago when machining the little end of a connecting rod, the tool started to extract itself from the collect. I had only tightened it by hand when I was interrupted, then when I went back to what I was doing proceeded without further tightening.

BruceWS
 
BruceWS - Am I correct in thinking that the while the emergency stop will stop the stepper motor from moving, the Arduino will continue to run it's program with the result that when the motor comes back on the Arduino will no longer "know" the correct table position?
 
If you require an emergency stop, then purchase a miniature emergency stop button and wire it between +5 volts and the other side to the +enable (EN) connection on the stepper controler board. The -EN needs to be commoned up with the -ELK and -DIR.

When operated, the stepper stops instantly and will restart once the stop button is released.

Bruce W-S

Sounds like you had the issue I was concerned about. I've got a mushroom head E-stop switch in hand. I'll locate it nest to the stepper motor for easy and quick access. Thanks for confirming the controller board pins, saves me looking them up.
 
Добрый день!
Нарисуйте пожалуйста полную схему подключения всех компонентов по версии (Arduino_Rotary_Table_Control_2019_V2-Rev4.69B.ino) и можно ли подключить Microstep Driver 8060 + Nema 34 8.6 Nm
(
Good day!
Please draw the complete wiring diagram of all components at version (Arduino_Rotary_Table_Control_2019_v2-Rev4.69B.ino) and can I connect 8060 Microstep Driver + Nema 34 8,6 Nm)

strannik2, go back to the beginning of this thread. There are complete instructions including pictures with wiring shown and materials list.
 
BruceWS - Am I correct in thinking that the while the emergency stop will stop the stepper motor from moving, the Arduino will continue to run it's program with the result that when the motor comes back on the Arduino will no longer "know" the correct table position?
I have not read this thread of looked at the code. Having said that: One should have 2 stop buttons. A true emergency stop with cuts the power and a switch connected to an arduino input which will cause the code to enter a loop waiting for the switch to be reset. This 'should' not be difficult to code. And perhaps it already exists.
 
[QUOTE = "weir-smith, post: 323695, member: 20776"] Страннику2 и Животному12

Подключение аварийного останова очень просто, и его можно легко проверить, просто подключив -EN к
- Clk или - Dir. Подсоедините провод к +5 Вольт, затем запустите поворотный стол и, пока движущийся шагер, коснитесь пяти вольт до + EN, и шаговый двигатель мгновенно остановится и останется остановленным, пока не будет удалено +5 Вольт.

Элемент управления разрешением - это логический элемент, который управляет тактовыми сигналами и сигналами направления в цепи контроллера.

Входные сигналы в контроллер шагового двигателя не зависят от выходной цепи, которая управляет шаговым двигателем. Следовательно, не имеет значения, является ли контроллер 4-проводным, 6-проводным или 8-проводным.

Я могу опубликовать диаграмму того, как это будет проводиться завтра, если потребуется. Целью аварийной остановки является немедленное прекращение движения поворотного стола, потому что произошло что-то серьезное.

Это случилось со мной около двух недель назад, когда обрабатывая маленький конец шатуна, инструмент начал извлекать себя из коллектора. Я затягивал его только рукой, когда меня прерывали, а затем, когда я вернулся к тому, что делал, продолжал без дальнейшего затягивания.

BruceWS [/ QUOTE]
Спасибо!
Скажите пожалуйста,а по такой схеме подключения драйвер будет работать? (
Thank you!
Tell please,and according to such scheme of connection the driver will work?)
 

Attachments

  • Схема монтажная - копия.JPG
    Схема монтажная - копия.JPG
    71.3 KB · Views: 1,524
I have attached the wiring diagram for fitting a Stop Switch for anyone who is interested. Further, I have had a discussion with a friend where it was pointed out that such a switch was not an Emergency Stop (poor use of words) rather it is a stop switch to which I concur.
To answer a previous question, yes the program continues to run to complete the step. Therefore, you would need to start the machining from the last position. To holt the program as such, you would need to implement an interrupt which has been previously described. To my mind, the only time you would need to stop the machining process is when something has gone wrong and the most common thing is that the work piece has moved as a result of the cutting pressure or similar. This is particularly common when machining an odd shaped casting which is difficult to hold. If the job has moved, your back to resetting it up if it is practicable and starting again. I cut a keyway in the gear blank when cutting gears so that I always have a reliable reference.
The only benefit of a stop switch, is that it is quick to operate rather than use the keypad to enter the required command. Just my thoughts.

Bruce W-S
 

Attachments

  • Arduino Wiring Diagram with Stop SW.pdf
    23.6 KB · Views: 957
Спасибо!
Как с совместимостью драйверов?
(
Thank you!
How about driver compatibility?
)
 

Attachments

  • O.jpg
    O.jpg
    62.6 KB · Views: 1,781
All stepper drivers in terms of their digital input connections, are the same eg En, Cl and Dir. The microstep range can vary as can the output connections eg 4 wire, 6 wire and 8 wire.

Bruce
 
Len

I can see that you are having a few problems with this project. I have made several of these units without difficulty however, if it is all new then its a case of plodding through all of the issues.

A quick fix for the sketch for 90:1 rotary tables is to edit the file by making the "Multiplier = 100" rather than "Multiplier = (StepsPerRotation* TableRatio)/360". Just scroll down to the "const int" and the fifth is the Multiplier. There is an issue with the code when you set the variables for 90:1 and while I am sure of the solution, I need to test it across a range of numbers to be sure. I will do that in the next couple of weeks. For 90:1, the multiplier needs to be 100 if you are using the setting on the stepper driver of "2". On the stepper controller module, you can set the max current and the stepping mode some times shown as excitation mode via dip switches. You can select 1, 2, 8, or 16 and you require 2.

So for a 90:1 rotary table, 4 deg is equal to 1 complete turn of the stepper or 200 steps for the standard stepper motor. So 4 deg x 100 = 400 and this is what you will read on your display. The stepper controller will divide the input steps by 2 e.g. 400 steps /2 = 200 or one revolution.

My fix is a quick one however is works without problems and as I said before, I will put in a correction which is easier to implement. I have two rotary tables of different ratios and I want to use the same controller so I will need an extra menu etc. I have also added an additional feature in my controller that provides continuous rotation with forward and reverse etc.

Also happy to answer any more of your questions.

Bruce


View attachment 108104
 
Bruce,
I am using an HBS860H Hybrid servo drive and I am having issues with the rotation of the stepper. It rotates to the same direction. I am pretty sure I am not wiring it correctly.
I have tried different connections but haven't been successful.
This is the code I am using.
Thank you,
Miguel
 

Attachments

  • FWD-REV.jpg
    FWD-REV.jpg
    54.4 KB · Views: 878
Hi friends! I am new in this forum!
One Ukrainian gay makes version 2 of this module:
01.4_.jpg.cdb39fc9192ed2f8cc546ceddc8eefb0.jpg 000.jpg.054264cc56a4e66c61faca96b0c921e2.jpg 02.jpg.21bd2ee1a07d80a645fe688802bce9e4.jpg
Make a video and ready to noncommercial seel them on world way!
I hope you describe to channel and liked his video:
Best Regards!
 
Bruce,
I am using an HBS860H Hybrid servo drive and I am having issues with the rotation of the stepper. It rotates to the same direction. I am pretty sure I am not wiring it correctly.
I have tried different connections but haven't been successful.
This is the code I am using.
Thank you,
Miguel

Miguel

I have had a look at what you are doing and one of us is confused however please note the following:-

The code you are using includes the use of the Arduino Nano so I will assume this is so. The output pins that have been declared in the Sketch pgm are digital outputs 12 for Step (Pul) and 13 for Direction (Dir) and you also need a ground connection to the Nano.

Your controller is the HBS860H which used Pul for Step (e.g. the pulses that drive the stepper) and Dir for direction. If you look up the connections in the manual for PNP sourcing control and have some basic understanding of electronics, you will see that the interface on the HBS Driver are optical coupled. That is, current will only flow one way so reversing the connections has no effect except that nothing will happen.

The Pul or step is a series of pulses which the Nano counts. Each pulse drives the stepper forward (or reverse depending on the state of Dir signal ). Each step is equivalent to a micro step.

The Dir signal (pin 13 on the Nano) will be either + 5 volts (approx) or 0 volts. This signal simply instructs the controller as to the direction of the stepper motor. It simply phase shifts the stepper outputs that causes the stepper motor to reverse direction.

So to get your stepper wired correctly, do the following:-

1. Connect pin 12 (Step) of the Nano to PUL + on the Driver.

2. Connect pin 13 (Dir) of the Nano to DIR + on the Driver.

3. Connect ground of the Nano to PUL -, Dir - on the Driver e.g. just loop between - Dir and - PUL and then back to the ground on the Nano. Note, there is only (I think) one ground connection on the Nano which you also need for the display, so you may need to join this wire.

So providing the Sketch works, your system should now work.

Bruce W-S
 

Latest posts

Back
Top