Tips for Arduno software for Rotary Table Controllers

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.
Correct, the pins used by the Freetronics board are:
3, 4, 5, 6, 7, 8, 9 and Analog 0

This meant I had to move one of the stepper signals off Pin 3

Okay so I dont have a stepper driver hooked up yet, so maybe this is why I'm not getting conflict when I have changed the stepPin to pin 3

I'm really not sure what you mean when you say freetronics uses pin 3, what does it use pin 3 for? I know that Freetronics uses the same pins as the sainsmart LCD; 8, 9, 4, 5, 6, 7 and A0 for the buttons.

If I cant change the software i cant use the 3 boards I just ordered... without hacking up the board to cut traces anyway
 
Okay so I dont have a stepper driver hooked up yet, so maybe this is why I'm not getting conflict when I have changed the stepPin to pin 3

I'm really not sure what you mean when you say freetronics uses pin 3, what does it use pin 3 for? I know that Freetronics uses the same pins as the sainsmart LCD; 8, 9, 4, 5, 6, 7 and A0 for the buttons.

If I cant change the software i cant use the 3 boards I just ordered... without hacking up the board to cut traces anyway

I don't think its an issue to worry about if this is the LCD board you have
http://www.sainsmart.com/sainsmart-...rduino-duemilanove-uno-mega2560-mega1280.html

Looks like Sainsmart and Freetronics use the same pins for the LCD and the same resistor values for the buttons but use a different method for enabling the backlight.

I pulled down the zip file and the PDF diagram shows Sainsmart has hardwired the backlight. Freetronics uses Pin 3 so you can turn it on and off from within the sketch.

For Sainsmart users it would be a good idea to change the #define darkoford found to point to an unused pin so the LCD library does not send spurious signals to your stepper!
 
So tell me again why I'm writing this software?

DSC_5245_zpsaff064cc.jpg


I started with a square piece of 6mm aluminium same size as the stepper, centred it under the mill spindle and drilled all the holes using the PCD function. I also used the tapping feature of my SX3 mill to thread the holes.

Complete kit and the collar from the Rotary table.

DSC_5243_zps0e6d0d49.jpg

And here it is attached to my 6" Vertex Rotary table

DSC_5257_zps997aeeae.jpg


So now I got this far, the left button on my display has died and starts pressing buttons all on its own....

It was changing direction in front of my eyes half way through a divisions. So I need to make sure the direction cannot be changed while doing dividing steps.
 
So tell me again why I'm writing this software?

DSC_5245_zpsaff064cc.jpg


I started with a square piece of 6mm aluminium same size as the stepper, centred it under the mill spindle and drilled all the holes using the PCD function. I also used the tapping feature of my SX3 mill to thread the holes.

Complete kit and the collar from the Rotary table.

DSC_5243_zps0e6d0d49.jpg

And here it is attached to my 6" Vertex Rotary table

DSC_5257_zps997aeeae.jpg


So now I got this far, the left button on my display has died and starts pressing buttons all on its own....

It was changing direction in front of my eyes half way through a divisions. So I need to make sure the direction cannot be changed while doing dividing steps.

That looks like a great set-up.

Does this look like a vertex rotary table? The vendor doesn't list the manufacturer...

http://www.accusizetools.com/horizontal-vertical-precision-rotary-table/
 
I don't think its an issue to worry about if this is the LCD board you have
http://www.sainsmart.com/sainsmart-...rduino-duemilanove-uno-mega2560-mega1280.html

Looks like Sainsmart and Freetronics use the same pins for the LCD and the same resistor values for the buttons but use a different method for enabling the backlight.

I pulled down the zip file and the PDF diagram shows Sainsmart has hardwired the backlight. Freetronics uses Pin 3 so you can turn it on and off from within the sketch.

For Sainsmart users it would be a good idea to change the #define darkoford found to point to an unused pin so the LCD library does not send spurious signals to your stepper!

That's the LCD shield I have, and what I modeled my own boards after, except I may use a serial interface and need to substitute a different lcd library
 
That's the LCD shield I have, and what I modeled my own boards after, except I may use a serial interface and need to substitute a different lcd library

I don't think that will be an issue. Just modify the LCD class to use your board. You'll see internally LiquidCrystal.h is used. I am no expert but I think a serial interface display will just substitute different Liquidcrystal code.

The real smarts in the libraries used is in the keyboard handling and that is all on the analog port. That is configurable in LCD.h

Code:
#define LCD_BUTTON_PIN          A0       // Button state is on A0

I found a bug. If you just accept the default value of 3 in #steppers, nothing happens (with stepper connected) as I'm not initialising the steps per division. Working on it....
 
That looks like a great set-up.

Does this look like a vertex rotary table? The vendor doesn't list the manufacturer...

http://www.accusizetools.com/horizontal-vertical-precision-rotary-table/

Thanks, Looks very similar. I got mine here so compare the dimensions
http://www.machineryhouse.com.au/R006
even the diagrams look the same.

Anyway, the mounting will be much the same I am sure. The collar is held on by two grub screws.

Pretty sure I've finished my debugging attached to a real rotary table. Found a few things. I think it is good now.

Also added a new feature <Jog Step>
This lets you enter the step angle (in degrees) you want to use to jog the table round in single step mode. Defaults to 30 seconds (0.5 degrees).

I'll post up Version 5 soon.
 
Ok Guys Here is the latest version. I think it is pretty clean now.

New Features
1. <Jog Step> - Allows you to set the angle for each step. Default 30 seconds (0.5 degrees)
2. <Contin Turn> - Turns continuously in the last direction selected. To select the direction, simply use <Jog> to choose the direction of travel

Tested on a 6" Vertex rotary table and seems to be working well. I've run the table with an electric drill, washed it out re-oiled and aligned the stepper. I've also run it continuously in both directions to bed the table in and it seems to be stepping reliably with quite a small stepper on a 19 volt laptop supply.

Let me know if there are any more bugs. I hope I've squashed them all.

View attachment RotaryTableChuck5.zip
 
Hi Rod

Your motor mount looks good :)

Some weirdness with the latest code. Did you upload the wrong file ? it says 4. I changed it to 5 when I downloaded. I did not see the new features.
Also, a bunch of stuff does not work.
First thing I did was set home
then I went to divide# and left it at 3 neither the left or right buttons did any thing. did not move.
went to enter angle, entered 120 hit right and it went 120. Went to "home" and hit goto and it went forward to about 155 and stopped. hit it again and it went to 180 and stopped.

I will be setting up a job on the mill today that may take a week to finish so I may not be able to hook this up again for awhile.

Thank you so much for all your hard work !!

Scott
 
I have been running the other software from Chuck's posts for a couple years and have made parts using it. This is a great upgrade but will not run on my home made controller so I will make a new one. I have just got hold of a couple Pro-Micro boards and was wondering if there was any reason this software won't run on these boards. At $7 each it beats using an Uno. If not then I can perf board up an Atmaga328 and go that way. Thanks, Carl
 
Which LCD error?

Try this.
1. Download LCD.zip
2. Unzip
3. Manually move the folder to your Arduino Library folder.
4. Restart the Arduino IDE

In my system, the library is in
\Documents\Arduino\libraries

Hi Rod
her is what I get

thanks

Luc

arduino lcd.jpg
 
I have been running the other software from Chuck's posts for a couple years and have made parts using it. This is a great upgrade but will not run on my home made controller so I will make a new one. I have just got hold of a couple Pro-Micro boards and was wondering if there was any reason this software won't run on these boards. At $7 each it beats using an Uno. If not then I can perf board up an Atmaga328 and go that way. Thanks, Carl

This version should work equally well on the Micro. I'd thought of using the micro myself but then settled on the nano for the onboard usb connection.
 
Hi Rod
her is what I get

thanks

Luc


So you do not have a library of LCD.

You might not be well placed lcd.h a library.

At the beginning of the program have this:

#include <BoolField.h>
#include <DegreeField.h>
#include <Field.h>
#include <Form.h>
#include <IntField.h>
#include <LCD.h>
#include <ListField.h>
#include <TextField.h>
#include <TimeField.h>
#include <GetIntField.h>
#include <TimerOne.h>

And on the hard disk directory "Arduino" you need to set up a library of the lcd.h:

Screen_Shot_02_21_15_at_07_14_PM.png

Link is in post # 20 for LCD and TimerOne.
 
So you do not have a library of LCD.

You might not be well placed lcd.h a library.

At the beginning of the program have this:

#include <BoolField.h>
#include <DegreeField.h>
#include <Field.h>
#include <Form.h>
#include <IntField.h>
#include <LCD.h>
#include <ListField.h>
#include <TextField.h>
#include <TimeField.h>
#include <GetIntField.h>
#include <TimerOne.h>

And on the hard disk directory "Arduino" you need to set up a library of the lcd.h:

Screen_Shot_02_21_15_at_07_14_PM.png

Link is in post # 20 for LCD and TimerOne.

I do have that at the top of my program:wall::wall:
I can't see your picture clearly:(
Can someone email me the program
I'll try it on another computor

Thanks
 
Hi Rod
Some weirdness with the latest code. Did you upload the wrong file ? it says 4. I changed it to 5 when I downloaded. I did not see the new features.
Also, a bunch of stuff does not work.

Thank you so much for all your hard work !!

Scott


Ooops Sorry. It was the wrong file. Rather than add yet another file to confuse people, I have put the right file on Post #108

http://www.homemodelenginemachinist.com/showpost.php?p=262304&postcount=108

If the file name ends in 4, refresh your browser as it is now
RotaryTableChuck5.zip
 
Hi Rod
her is what I get

thanks

Luc


Luc, I've had similar problems getting libraries installed. Try moving the LCD folder out of the libraries and arduinos folders and from the Arduino IDE, try to add a new library.

Sketch/Import Library/New Library

Then navigate to the LCD folder

It will copy it to the Libraries folder and should update the config internally.

I'm sure if you google some stuff you'll get some tips to get this sorted.

Nothing to do with the code, just a configuration error at your end
 
I started working on Version 6 of the controller which saves configuration data to the EEPROM and includes a data entry form to change the setup parameters.

The framework is now done.
1. Default data is created and saved to EEPROM if it does not exist.
2. Data is retrieved from EEPROM if it exists.
3. Designed to store multiple stepper setups so you can move the controller to multiple devices.
4. Data entry form is tested and working.
5. User is prompted to saves Changes to the EEPROM (Yes/No)
6. Saving of changed data confirmed working.

But I still need to edit the sketch to actually use this configuration data!

I did get some stack overflow issues and the Form class is not particularly helpful here as it uses a String class and I can't see how to get it to recognise variables in program memory. I seem to have got enough memory for now so I think we'll make it without running out of dynamic memory as there is not much left to do.
 
This version should work equally well on the Micro. I'd thought of using the micro myself but then settled on the nano for the onboard usb connection.
My Pro Micro are USB. Were you thinking of the Pro Mini? Carl
 
Rod, did I find a bug or don't I understand correctly. When I bring up "set Speed" and set a number, I then click on Select. When I go back to "Set Speed the number is about one half the previous setting. Go back to "Select" and back it halfed again. IE... I set speed to 70% /select/set speed/50%/select/set speed/28%/select/set speed/ 13%/select/ set speed/5%. Etc. Some times after boot my set speed is 0%. Hope you understand what I am trying to point out. Carl
 

Latest posts

Back
Top