Dear DAVID Community,

As you are probably aware, the entire DAVID company, team and product range has been integrated into HP Inc.
This forum is now read-only. Relevant content has been migrated to HP and merged into HP's Support Forums on November 1, 2016.

To start new discussions for 3D Scanning, please register and post your new topic at the HP Support Forums

Simple Turntable with Arduino

Which camera works? Where can you buy an adequate laser? And more...

Simple Turntable with Arduino

Postby WalterMo » Wed Oct 27, 2010 3:40 pm

Here we have a simple turntable, controlled by an Arduino. The table consists of a platform with a 1.8° stepper motor underneath and a disk with a diameter of 227mm. There isn't any gear, the plate is directly attached to the motor shaft. The bipolar motor is a bit stronger, it has a 6.35mm shaft and I think it can carry loads up to 1kg. Due to 1/8 step microstepping the movement of the plate is rather smooth.
The motor driver behind the Arduino is again an EasyDriver V4 like here:
viewtopic.php?p=12366#p12366

Also you will find a lot of things as in the post just mentioned. But new here is a LCD display which gives an info of the current disk position and of the number of the position itself. It has 2x16 charaters which are illuminated from behind by built-in LEDs. If you like to recreate the controller you will find a lot of these LCD displays. Mine came from here:
http://www.pollin.de/shop/dt/Nzc1OTc4OT ... 2A_09.html

They differ in the number of charaters and also a bit in the supply current for the backlight illumination. Mine could be directly connected with its kathode pin to Gnd and with its anode to 5V. That means R3 on my diagram wasn't necessary, it was already included on the display board.
Very often R3 is necessary, so have a look on the data sheet what voltage and current is rated! If you feel uneasy so please start with 180 Ohm for R3.
The 10k potentiometer is necessary to adjust a fine and contrasty visibility of the characters.
Now, in opposite to my circuit diagram of the „Simple Laser Scanner with Arduino“, I have drawn the plus pin in the centre of the power connector.
There are two pushbuttons in series for Reset to avoid an unwanted operation.

Walter

Edit 1 : The circuit diagram was modified a bit. Nov. 1th, 2010
Edit 2: Instead of the Arduino Duemilanove we can use its successor, the Arduino Uno. The Uno is completely hard- and software compatible.
Edit 3: If you are using a motor with a gear: Download the sketch which I presented on Jan 19th, 2011.
Edit 4: Instead of the EasyDriver it's better to use the stronger Pololu A4988 board. March 2012.

Code: Select all
//  Program Turntable. Version 2.           30 Oct.2010
//  by WalterMo

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
 
int k;                    // k as integer. Number of steps to reach next position.
int i;                    // i as integer for the for - next loop.
int outDirection = 2;     // Digital output for out direction at pin 2
int outClock = 3;         // Digital output for motor clock (steps) at pin 3
int keyStep = 4;          // Pushbutton for single step at pin 4
int toggleSwitch = 5;     // Toggle switch for direction at pin 5
int keyNextPos = 6;       // Pushbutton for "Next Position" at pin 6
int oldVal = 0;           // Define a start "old value" for pushbutton "Next Position".
int oldVal2 = 0;          // Define a start "old value2" for pushbutton "Step".

int turnDirection;        // H or L from „Direction“ toggle switch
int makeStep;             // H or L from pushbutton "Step"
int nextPos;              // H or L from pushbutton "Next Position"
int dirSign;              // Sign, +1 or -1 for turn direction
int currentPos;           // Number of the current postion. The initial one = 0 th pos.
float microAngle;         // Value of the microstep angle
float currentAngle;       // Value of the current angle (in degree).
float motorAngle;         // Value of motor step angle (in degree).
float incrementAngle;     // Value of angle increment (in degree).

// The setup() method runs once, when the sketch starts

void setup()   {               
  // initialize the digital pin as an output:
 
  pinMode(outClock, OUTPUT);         //Define outClock as an output
  pinMode(outDirection, OUTPUT);    //Define outDirection as an output
  pinMode(toggleSwitch, INPUT);      //Define direction switch as a digital Input
  pinMode(keyNextPos, INPUT);        // Define key "Next Pos." as a digital Input
  pinMode(keyStep, INPUT);           // Define key "Step" als Input
  digitalWrite(keyNextPos, HIGH);      // Set internal input pull-up resistor to High
  digitalWrite(keyStep, HIGH);         // Set internal input pull-up resistor to High
  digitalWrite(toggleSwitch, HIGH);    // Set internal input pull-up resistor to High
   
  //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEFINE HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   incrementAngle = 45.0;         // Define angle increment (in degrees)
   motorAngle = 1.8;              // Motor-step angle (in degree).
   lcd.begin(16, 2);              // Define your LCD Display here! Characters and rows.
   //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   microAngle = motorAngle/8;           // Used micro step angle.
   k = incrementAngle/motorAngle*8;     // Number of steps needed to go to next pos.
   currentAngle = 0;                    // Initial value = 0
   currentPos = 0;
    }

// the loop() method runs over and over again, as long as the Arduino has power

void loop() {
      lcd.setCursor(0,0);            // Cursor to top left
      lcd.print("Angle:");           // Display the word 'Angle'
      lcd.setCursor(7,0);            // Cursor to 7th position, first row
      lcd.print((currentAngle));     // Display the value of 'angle'
 
   
  int turnDirection = digitalRead(toggleSwitch);    // Read the direction switch
  if (turnDirection == HIGH) {
     dirSign = -1;
     digitalWrite(outDirection,HIGH);     // Set direction output = High
     }
     else {
     dirSign = 1; 
     digitalWrite(outDirection,LOW);      // Set direction output = Low
     }
     int makeStep = digitalRead(keyStep);        // Read the key „Step“
  if (makeStep != oldVal2 && makeStep == LOW) {
     
     
     digitalWrite(outClock, HIGH);             // Set motor clock output = H
     currentAngle=currentAngle + microAngle*dirSign;
     delay(10);                                 // 10ms delay
     digitalWrite(outClock, LOW);               // Set clock output  = L
     delay(10);                     
     }
     oldVal2 = makeStep;     
     lcd.setCursor(0,1);              //Set cursor in second row to left
     lcd.print("Position:");          // Display the word 'Position'
     lcd.setCursor(11,1);             //Set cursor in second row to the 11 th position
     lcd.print((currentPos));         // Display the value of 'current position'
  int nextPos = digitalRead(keyNextPos);     // Read input of key „Next Position“
    if (nextPos != oldVal && nextPos == LOW) {
     
     for (i = 0;i < k;i++){        // Output by a loop of k clock impulses (motor steps)
     
     digitalWrite(outClock,HIGH);          // Set clock output = H
     currentAngle=currentAngle + microAngle*dirSign;
     lcd.setCursor(7,0);                   // Set cursor to first row, 7th position
     lcd.print((currentAngle));            // Display the value of 'angle'
     delay(10);                            // 10ms delay
     
     digitalWrite(outClock,LOW);           // Clock output  = L
     delay(10);                         
     }
     lcd.setCursor(0,1);               //Set cursor to second row, left
     lcd.print("Position:     ");
     lcd.setCursor(11,1);              //Set cursor to second row, 11 th pos.
     currentPos = currentPos +1*dirSign;
     lcd.print((currentPos));          //Display the value of 'current pos'
     }
     oldVal = nextPos;
     }   
   
   

#include
Attachments
Turntable Controller Ardu5.jpg
ARDUTUR2.jpg
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Thu Oct 28, 2010 2:23 pm

Hi Walter,
Again the breath taking work you have done on the turntable and a generous attitude to share with us... I am really thankful for the efforts for promoting David Laser Scanner...
Currently i am in other city without my hardware setup so having no scans to show..
Regards
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby WalterMo » Fri Oct 29, 2010 7:55 pm

If a bigger motor is needed for the turntable it's better not to drive it by an EasyDriver. It could be overburdened. E.g. the microstep driver from Marcus Mechatronics is a better choice:
http://www.markusmechatronics.com/Tosdriver_eng.html

It can drive 1.5 A per phase and its IC can easily be equipped with a suitable heatsink. By means of microswitches on the board you can select four different step modes. The driver board doesn't come as a ready device but as a kit. And the kit consists only of a printed circuit board and the IC, a TA8435HQ.
I have tested both, the EasyDriver V4 and the Markus Mechatronics board. The latter I have left for the controller.

There are less differences to the EasyDriver V4:
The board needs an external 5V supply which comes from the Arduino.
The motor current cannot be adjusted by a potentiometer but is determined by two resistors. I have chosen 2 x 1.5 Ohm (equal to 0.5A per phase).

Walter

Edit 1: The circuit diagram was modified a bit. Nov. 1th, 2010.
Edit 2: I have attached a circuit diagram with the Pololu A4988 as the motor driver. March 2012. The Markus Mechatronics Driver isn't still available. :(
Edit 3: Instead of the diode 1N4001 at the lower picture margin use a 1N5400. Only that one at the input jack.
Edit 4: The Markus Mechatronics board is not available anymore.
Attachments
TurntableControllerArdu5 open2.jpg
Opened device
ARDUTUR.jpg
ARDUTU3.jpg
Pololu board in 1/8 micro step mode
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Sun Jan 09, 2011 4:55 pm

Hi Walter,
Almost completed the seperate Turntable Arduino based controller (Just copied your work), only am waiting for 16X2 LCD display... Attach is the picture of Solid Aluminum Turntable (Rotary indexer with Unipolar Stepper Motor) i purchased from the salvage yard with a bargain price... As i already have SLA7062M based Unipolar stepper driver so i tested the Turntable with 1/2 step mode of stepper driver..

Unfortunately i do not know about the gearing ratio of that rotary indexer (DCI Model 6R45)... Now can you tell me How can i find the gear ratio of that rotary indexer?

My Motor is 1.8 degree with 1/2 step mode, Considering the gear ratio 40:1 am i right to put the following values in the code:

Code: Select all
 microAngle = motorAngle/80;           // Used micro step angle.
   k = incrementAngle/motorAngle*80;     // Number of steps needed to go to next pos



Without changes the above code, my motor takes few steps and then stop.. I think it reaches 45 degree and stop as in the code but my rotary indexer moves very less due to unknown gearing ratio.. I also want to speed-up the move.. How, can you help me?


Thanks for such a nice turntable...
Attachments
DSC06169.jpg
DSC06170.jpg
DSC06172.jpg
Last edited by Khalid Khattak on Sun Jan 09, 2011 4:59 pm, edited 1 time in total.
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Sun Jan 09, 2011 4:56 pm

internal closeup..
Attachments
DSC06175.jpg
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby WalterMo » Sun Jan 09, 2011 9:38 pm

Hi Khalid,
You have got a very professional and high loadable turntable! Nice device!

How to determine the worm gear ratio? I think by testing it with a known number of steps.
My code was programmed for a 1.8° motor in 1/8th microstep mode. And the rotation increment was set to 45°. That means for 45° we needed 200 single steps.
So make a test and push several times (but count it) the 'Next Pos' button. If the table has made nearly a 360° rotation, measure the angle difference to 360°. You know that your 1.8° motor in half step mode would need 400 steps (without a gear) for 360°. Taking all this into account you can determine the gear ratio.

But before increase the speed and reduce all the 10 ms delays in the sketch to 1ms. If this isn't still fast enough, let the motor rotate in full step mode.

Edit: Yes Khalid, you should change the two lines which you had already mentioned in your last post:

microAngle = motorAngle/80; // Used micro step angle.
k = incrementAngle/motorAngle*80; // Number of steps needed to go to next pos

Or wait until you can use the LCD display. Then put a laser on the table and let it rotate along the room walls for 360°. This will be more precise.
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Mon Jan 10, 2011 5:17 pm

Thanks Walter for admiring the turntable...I think i have to rotate the Worm shaft and count the No of rotation to get one complete rotation of turntable..I ordered on 12th August from Sparkfun but so far not received the Display and Easydriver:(
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Sun Jan 16, 2011 2:47 pm

Hi Walter,
Today i worked on the turntable and it tooks 720 steps for covering 45 degree of travel... so i changed:
Code: Select all
microAngle = motorAngle/720;           // Used micro step angle.
   k = incrementAngle/motorAngle*720;     // Number of steps needed to go to next pos


Now my controller can not run in full step mode so i run it in 1/2 step mode. can you tell me what will be the gear ratio?

is my following Math is correct:
45 degree= 720 steps
1 degree= 720/45= 16 steps
360 degree= 16 x 360 steps= 5760 steps
200 x 2 x Z= 5760 ' where Z= turntable gear ratio, 2= half step mode and 200= No. of steps/360 deg of stepper Motor
Z=5760/400
Z=14.4???

Can you tell me what gear ratio of my Gear Box?
Regards

PS:
I have changed all the Delays into delayMicroseconds(3), now it takes 1 minute to rotate 45 degree..this is still very slow?..I have not installed the LCD display so far, i don't know whether the delayMicrosecondsfunction will work with LCD or not?
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby WalterMo » Mon Jan 17, 2011 1:05 pm

Hi Khalid,
Yes your math seems to be correct, but a gear ratio of 14.4? I think it must be an integer.
But:
microAngle = motorAngle/(2 x 14.4); // Used micro step angle. 2 = halfstep.

Maybe you can increase the speed a bit by completely deleting all delay lines. The display will also work for this case. But the main time consuming commands of the sketch are those which deal with the LCD display. Therefore, because you don't have this display yet, delete all (or some) of these commands in the void loop. I mean only for a test. Later on, if the speed is still not sufficient, we could change the code in such a way that the display isn't updated for each motor step change.
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Mon Jan 17, 2011 1:40 pm

thanks Walter.. I was also amazed to see the gearing ratio..it should be in integer as it is designed by a reputable company.. I will see further with a sharp thin line to check its repeatability and adjust it...

i will delete all the delays and check whether the speed is improved or not... Thanks for helping me in code:)
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby WalterMo » Wed Jan 19, 2011 6:44 pm

Hello Khalid,
Have just modified the code a bit for a turntable with a gear. For testing I have used this equipment and presettings:
1.8° motor with a 64:1 planetary gear: http://en.nanotec.com/planetary_gear_gple40.html
Motor driver board in half step mode: http://www.markusmechatronics.com/Tosdriver_eng.html

Angle increment if the „Next Pos.“ button is pressed: 22.5°.
Angle increment if the „Step“ button is pressed: 1°.

Measured time for a 45° rotation: 12 sec. Of course with the LCD display.
These lines must be filled out in the sketch:

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEFINE HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
incrementAngle = 22.5; // Define angle increment (in degrees)
motorAngle = 1.8; // Motor-step angle (in degree).
lcd.begin(16, 2); // Define your LCD Display here! Characters and rows.
z = 64; // Define gear ratio
microStepMode = 2; // 1 = fullstep, 2 = halfstep, 4 = 1/4 step, 8 = 1/8 step
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

If you like, please check it.

Walter
Attachments
TurntableControllerForumV3.zip
(1.94 KiB) Downloaded 457 times
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simple Turntable with Arduino

Postby pledgy2000 » Wed Jan 19, 2011 10:35 pm

Hi

I have just finished my very first program for the aurdino.
It is to control Walters turntable and uses the same pins except the lcd pins are reversed.
The difference is that it will listen for the "T" comming from David and rotate to the next position.
I have also used a push button on pin 7 to zero the angle and position.
My aim is to add this into the "laser scanner for planeless scanning" but I have a lot more learning to do.

Dave

Code: Select all
// DLS Turntable Controller
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
int S;  //Steps per segment
int A;  //loop
int DirectionOut = 2;  //Direction output pin 2
int Step = 3;  //step output pin 3
int SingleStep = 4;  //Single Step Input Pin 4
int DirectionIn =5;  //Direction Input Pin 5
int NextPosition = 6;  //Next Position Input Pin 6
int ZeroIn = 7;
int oldval = 0;
int oldval2 = 0;

int Ser;
int TurnDirection;
int MakeStep;
int NextPos;
int DirSign;
int CurrentPos;
int Zero;
float MicroAngle;
float CurrentAngle;
int IncrementAngle;

void setup()
{
  pinMode(DirectionOut, OUTPUT);
  pinMode(Step, OUTPUT);
  pinMode(SingleStep, INPUT);
  pinMode(DirectionIn, INPUT);
  pinMode(NextPosition, INPUT);
  pinMode(ZeroIn, INPUT);
  digitalWrite(SingleStep, HIGH);
  digitalWrite(DirectionIn, HIGH);
  digitalWrite(NextPosition, HIGH);
  digitalWrite(ZeroIn, HIGH);
  Serial.begin(9600);
  IncrementAngle = 45.0;
  lcd.begin(20,2);
  MicroAngle = 1.8/8;
  S = IncrementAngle/0.225;
  CurrentAngle = 0;
  CurrentPos = 0;
}

void loop()
{
lcd.setCursor(0,0);
lcd.print("Angle");
lcd.setCursor(7,0);
lcd.print((CurrentAngle));
lcd.setCursor(0,1);
lcd.print("Position:");
lcd.setCursor(11,1);
lcd.print((CurrentPos));

//Setting Direction pin
TurnDirection = digitalRead(DirectionIn);
if (TurnDirection == HIGH)
{
DirSign = -1;
digitalWrite(DirectionOut,HIGH);
}
else
{
DirSign =1;
digitalWrite(DirectionOut,LOW);
}

//jog movement
MakeStep = digitalRead(SingleStep);
if (MakeStep != oldval2 && MakeStep == LOW)
{
digitalWrite(Step,HIGH);
CurrentAngle = CurrentAngle + MicroAngle * DirSign;
delay(10);
digitalWrite(Step,LOW);
delay(10);
}
oldval2 = MakeStep;


// Segment Move
NextPos = digitalRead(NextPosition);
if (NextPos != oldval && NextPos == LOW)
{
for (A = 0; A < S;A++)
{
digitalWrite(Step,HIGH);
CurrentAngle = CurrentAngle + MicroAngle * DirSign;
lcd.setCursor(0,0);
lcd.print("Angle");
lcd.setCursor(7,0);
lcd.print((CurrentAngle));
delay(10);
digitalWrite(Step,LOW);
delay(10);
}
lcd.setCursor(0,1);
lcd.print("Position");
lcd.setCursor(11,1);
CurrentPos = CurrentPos +1 * DirSign;
lcd.print((CurrentPos));
}
oldval = NextPos;

// Auto segment move
if (Serial.available() >0)
{
Ser = Serial.read();
}
if (Ser == 'T')
{
for (A = 0; A < S;A++)
{
digitalWrite(Step,HIGH);
CurrentAngle = CurrentAngle + MicroAngle * DirSign;
lcd.setCursor(7,0);
lcd.print((CurrentAngle));
delay(10);
digitalWrite(Step,LOW);
delay(10);
}
lcd.setCursor(0,1);
lcd.print("Position");
lcd.setCursor(11,1);
CurrentPos = CurrentPos +1 * DirSign;
lcd.print((CurrentPos));
Ser = ' ';
}

// Zero
Zero = digitalRead(ZeroIn);
if(Zero == LOW)
{
  CurrentPos = 0;
  CurrentAngle = 0;
  lcd.setCursor(7,0);
  lcd.print("      ");
  lcd.setCursor(11,1);
  lcd.print("  ");
}
}
pledgy2000
 
Posts: 13
Joined: Tue Nov 02, 2010 12:03 pm

Re: Simple Turntable with Arduino

Postby Khalid Khattak » Thu Jan 20, 2011 3:16 pm

Walter,
Thank you very much for such a brilliant changes i have found final settings that worked perfect:)
Code: Select all
   incrementAngle = 45;         // Define angle increment (in degrees)         
   motorAngle = 1.8;              // Motor-step angle (in degree).
   lcd.begin(16, 2);              // Define your LCD Display here! Characters and rows.
   z = 45;                        // Define gear ratio
   microStepMode = 2; 

Again thanks:) Today i will mount the LCD display and my turntable will be completed:)
PC: Dell Inspiron i3, 2.27GHz,4GB RAM,64 bit windows 7
CAMERA:
David CCD Mono USB
LASER:
David 5mW Green line laser
PROJECTOR:
3D LED Mini Projector 250lumens, Native 1024x600
[b]http://free3dscans.blogspot.com/
Khalid Khattak
 
Posts: 942
Joined: Thu Apr 23, 2009 1:30 pm
Location: Pakistan

Re: Simple Turntable with Arduino

Postby mipu » Sun May 15, 2011 5:57 pm

dear waltermo,

i just wired my arduino up acording to your diagram and code - it works! thank you very much for sharing!
windows 7 quadcore, benq beamer, canon dslr, automatic rotating table.
mipu
 
Posts: 101
Joined: Thu Apr 21, 2011 8:15 pm
Location: Tirol, Austria

Re: Simple Turntable with Arduino

Postby mipu » Thu Jun 02, 2011 9:39 am

hi there again,

i did a little redesign of my turntable and have a problem now. my turntable now is running with a gear. the first wheel has 13 cogs (which is connected to a stepper motor), the second wheel has 139 cogs (the one connected to the rotating table).

my idea was 139 / 13 = 1 / x -> x = 139 / 13 -> x = 10.6923

the motor is driven by a easydriver v4.2 board. nothing is connected to the ms-pins.

i then modified the arduino code like this to make the rotating table rotate 360 degrees when the button is pressed (just for testing):

Code: Select all
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEFINE HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   incrementAngle = 360;         // Define angle increment (in degrees)         
   motorAngle = 1.8;              // Motor-step angle (in degree).
   lcd.begin(16, 2);              // Define your LCD Display here! Characters and rows.
   z = 10.6923;                        // Define gear ratio
   microStepMode = 8;             // 1 = fullstep, 2 = halfstep, 4 = 1/4 step, 8 = 1/8 step
   //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


result is, that the table does not rotate 360 degrees but something like 350 degrees. my conclusion is that i am to stupid to calculate the gear ratio and therefore i would be very happy if someone would help me here.

have a nice day!
windows 7 quadcore, benq beamer, canon dslr, automatic rotating table.
mipu
 
Posts: 101
Joined: Thu Apr 21, 2011 8:15 pm
Location: Tirol, Austria

Next

Return to Laser and Camera Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron