Advanced Turntable

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

Advanced Turntable

Postby WalterMo » Fri Mar 30, 2012 6:48 pm

This new turntable is in principle a downgraded version of the 2-axis positioner:
http://www.david-laserscanner.com/forum ... f=6&t=4154

I had written 'advanced' because 1 1/2 years ago I had posted a 'Simple Turntable':
http://www.david-laserscanner.com/forum ... f=6&t=2383

To the table:
I have chosen a 1.8° stepper motor with a 6.35 mm shaft to drive the disk with loads up to 1kg. Maybe heavier loads would be possible but I thought 1kg is ok and my tests were without any losing of motor steps.
The table's disk (215 mm in diameter) is directly mounted at the motor shaft by a flange. All parts were made of hard PVC.

To the controller:
Again I have used my standard box with an Arduino Uno, a 2 x 16 characters LCD display and a Pololu A4988 to drive the motor. Precautionally I have glued a small SMD heatsink onto the Pololu IC. I had made several tests with different step modes and I ended on 1/2 step mode because I found a rather smooth movement.
Regarding R3: If you aren't sure whether your display has an already built-in current limiting resistor for the LED illumination, then use 180 Ohms for R3.

To the operation:
Three angle increments are preselectable: 1.8° for fine positioning, 36° and 45° for scanning.
As you can see on the display: The first row shows the number of the current scan position and the second row the angle of the table disk in degrees. A reset of both values is possible by first pressing the RESET button and then simultaneously one of the 'Start Increment' buttons.
If the controller is connected via an USB cable to your PC, DAVID will send a command (the letter Z) after saving a scan. This will cause the table to do the next angle increment.

Walter

Edit (April 12th, 2012): I have attached a new Arduino code called 'Turntable_Leo1 version 2'. It requires the Arduino software version 1.0 or newer.

Code: Select all
//  Turntable Leo 1, Version 2               
//  Motor driver with the Pololu board A4988. LCD display with 16x2 characters.
//  Display of the number of the scan position and the angle of the disk in degree.
//  Motor: 1.8° driven by Pololu in 1/2 step mode.
//  By WalterMo, March 2012

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

// initialize the library with the numbers of the interface pins
LiquidCrystal g_lcd (8, 9, 10, 11, 12, 13);

int i;                       // i as integer for the for - next loop.
int outDir = 2;              // Digital output for direction of the motor at pin 2
int outClock = 3;            // Digital output for clock (steps) of the motor at pin 3
int Button_reset = 7;        // Digital input for Reset
int Button_up = A2;          // Motor Button up
int Button_down = A3;        // Motor Button down
int incrementSwitch = A4;    // Increment switch at Analog pin A4
int incrementValue = 0;      // Variable to store the analog value of the increment switch
int turnDirection;           // Direction of rotation the motor
int resetA1;                 // Variable of the result of Button_up
int resetA2;                 // Variable of the result of Button_down
int reset;                   // Variable of the result of the RESET button
int incrSteps;               // Variable of the result of the motor steps for the next inctrement
int currentPos;              // Current number of the object position
float currentAngle;          // Current angle of the table's disk (in degree)
int ch = 0;                  // Define the incoming byte
//************************************************************************************************************

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

void setup()   {               
  // initialize the analog and digital pins as an input or output:
 
  pinMode(outClock, OUTPUT);           //Define outClock as an output
  pinMode(outDir, OUTPUT);             //Define outDir as an output
  pinMode(A2, INPUT);                  //Define A2 as an input
  pinMode(A3, INPUT);                  //Define A3 as an input
  pinMode(A4, INPUT);                  //Define A4 as an (analog) input
  pinMode(Button_reset, INPUT);        //Define Button_reset as an input
  digitalWrite(Button_reset,HIGH);     //Pull this input up
  Serial.begin (9600);                 // Set the COM baudrate to 9600
   
  g_lcd.begin(16, 2);                  // Define your LCD Display! Characters and rows.
   
   // Show welcome message:
  g_lcd.clear();
  g_lcd.setCursor(0,0);
  g_lcd.print("TURNTABLE Leo 1");
  g_lcd.setCursor(0,1);
  g_lcd.print("Version 2");
  delay(3000);
  g_lcd.clear();
 
 
  currentPos = 0;                           // The initial object position is the zeroth
       g_lcd.setCursor(0,0);                // Cursor to top left
       g_lcd.print("Position:  ");     // Display the word 'Position'
       g_lcd.setCursor(12,0);               // Cursor to 12th position, first row
       g_lcd.print((currentPos));           // Display the value of 'Motor position'
  currentAngle = 0;                         // Initial angle of the disk = 0°
       g_lcd.setCursor(0,1);                // Cursor to left, second row
       g_lcd.print("Angl(DGR):      ");     // Display the word 'Angl in degree'
       g_lcd.setCursor(12,1);               // Cursor to 12th position, second row
       g_lcd.print((currentAngle));         // Display the value of 'Motor position'
       
   }

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

void loop() {
   //*****  Read the increment switch and define the number of steps for the motor for this switch position **********
        incrementValue = analogRead (incrementSwitch);    // Possible analog values from 0 to 1023 
        if (incrementValue < 200){
           incrSteps = 2;       // 2 steps for a 1.8° rotation
           
        }
        if (incrementValue > 800){
           incrSteps = 50;      // 50 steps for a 45° rotation
         
        }
         if (incrementValue > 200 & incrementValue < 800){
           incrSteps = 40;     // 40 steps for a 36° rotation
         
        }
  //***** Read the incoming byte and move motor for an angle increment if a 'Z' was transmitted from DAVID ******
           ch = 0;
         if(Serial.available()>0){
           ch = Serial.read();
         }
         if ('Z' == ch){
           digitalWrite(outDir,LOW);           // Set direction of the motor = Low, = counterclockwise rotation
           delay (100);
       for (i = 0; i<incrSteps; i++){       
       g_lcd.setCursor(0,0);
       g_lcd.print("Wait,Motor is on");        // Print: Wait!!
       digitalWrite(outClock,HIGH);            // Impulses by high and low levels
       delay (20);
       digitalWrite(outClock,LOW);
       delay (20);
       currentAngle = (currentAngle + 0.9);   // 0.9° = 0ne 1/2 step
   }
       currentPos = currentPos + 1;
       g_lcd.setCursor(0,0);                // Cursor to top left
       g_lcd.print("Position:       ");     // Display the word 'Position'
       g_lcd.setCursor(12,0);               // Cursor to 12th position, first row
       g_lcd.print((currentPos));           // Display the value of 'Motor position'
       
       g_lcd.setCursor(0,1);                // Cursor to left, second row
       g_lcd.print("Angl(DGR):      ");     // Display the word 'Angl in degree'
       g_lcd.setCursor(12,1);               // Cursor to 12th position, second row
       g_lcd.print((currentAngle));         // Display the value of 'Motor position'
    }
   
           
 
  //****************************** MOTOR counterclockwise (upwards) *****************************************
     turnDirection = digitalRead(Button_up);      // Read the direction button 'Up' for the MOTOR
     reset = digitalRead (Button_reset);          // Read reset button
  if (turnDirection == LOW & reset == HIGH) {
     digitalWrite(outDir,LOW);             // Set direction output of the motor = Low
     delay (200);
   for (i = 0; i<incrSteps; i++){                 
       digitalWrite(outClock,HIGH);        // Impulses by high and low levels
       g_lcd.setCursor(0,0);
       delay (20);
       digitalWrite(outClock,LOW);
       delay (20);                           
       g_lcd.print("Wait,Motor is on");       // Print: Wait!!
       currentAngle = (currentAngle + 0.9);   // 0.9° = 0ne 1/2 step
       
   }
       currentPos = currentPos + 1;
       g_lcd.setCursor(0,0);                // Cursor to top left
       g_lcd.print("Position:       ");     // Display the word 'Position'
       g_lcd.setCursor(12,0);               // Cursor to 12th position, first row
       g_lcd.print((currentPos));           // Display the value of 'Motor position'
     
       g_lcd.setCursor(0,1);                // Cursor to left, second row
       g_lcd.print("Angl(DGR):      ");     // Display the words 'Angle in degrees'
       g_lcd.setCursor(10,1);               // Cursor to 9th position, second row
       g_lcd.print((currentAngle));         // Display the current disk angle
  }
//**************************************** MOTOR clockwise (downwards) **********************************   
      turnDirection = digitalRead(Button_down);    // Read the direction button 'Down' for the MOTOR
      reset = digitalRead (Button_reset);            // Read reset button
  if (turnDirection == LOW & reset == HIGH) {
     digitalWrite(outDir,HIGH);             // Set direction output for the motor = High
     delay (200);                           // Wait 200 msec
     for (i = 0; i<incrSteps; i++){         
       digitalWrite(outClock,HIGH);         // Impulses by high and low levels
       delay (20);                           // Wait 20 msec
       g_lcd.setCursor(0,0);
       digitalWrite(outClock,LOW);
       delay (20);                           
       g_lcd.print("Wait,Motor is on");       // Print: Wait!!
       currentAngle = (currentAngle - 0.9);   // 0.9° = one 1/2 step
   }
       currentPos = currentPos - 1;
       g_lcd.setCursor(0,0);                // Cursor to top left
       g_lcd.print("Position:       ");     // Display the word 'Position'
       g_lcd.setCursor(12,0);               // Cursor to 12th position, first row
       g_lcd.print((currentPos));           // Display the value of 'Motor position'
       
       g_lcd.setCursor(0,1);                // Cursor to left, second row
       g_lcd.print("Angl(DGR):      ");     // Display the words 'Angle in degrees'
       g_lcd.setCursor(10,1);               // Cursor to 9th position, first row
       g_lcd.print((currentAngle));         // Display the current disk angle
  }
       
 //***************   RESET of the motor (display) counter ******************************************
      resetA1 = digitalRead (Button_up);
      resetA2 = digitalRead (Button_down);
      reset = digitalRead (Button_reset);
   if ((resetA1 == LOW | resetA2 == LOW) & reset == LOW) {
        currentPos = 0;                      // Set initial object scan position to zero
        g_lcd.setCursor(0,0);                // Cursor to top left
        g_lcd.print("Position:       ");     // Display the word 'Position'
        g_lcd.setCursor(12,0);               // Cursor to 12th position, first row
        g_lcd.print((currentPos));           // Display the value of 'Motor position'
       
        currentAngle = 0;                    // Set display angle of the disk = 0°
        g_lcd.setCursor(0,1);                // Cursor to left, second row
        g_lcd.print("Angl(DGR):      ");     // Display the words 'Angle in degrees'
        g_lcd.setCursor(10,1);               // Cursor to 9th position, first row
        g_lcd.print((currentAngle));         // Display the current disk angle
               
        delay (1000);                        // Wait 1 second
   }
 
}
       
         
9° = 0ne 1/2 step

}
currentPos = currentPos + 1;
g_lcd
Attachments
Turntable Leo1 Photo2.jpg
Turntable Leo1.jpg
Turntable_Leo1_2.zip
The Arduino code
(2.25 KiB) Downloaded 213 times
Side view_redu.jpg
One of the 4 legs is adjustable
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby _jack_ » Sat Mar 31, 2012 1:06 am

Marvellous !!
_jack_
 
Posts: 7
Joined: Mon Mar 12, 2012 2:37 pm

Re: Advanced Turntable

Postby benoy » Sun Apr 01, 2012 6:10 am

Sir,

What are the differences?
1) It is single axis.
2) The load bearing capacity is more?. Is that all or is there something else?
Thankyou

Benoy
benoy
 
Posts: 139
Joined: Wed Feb 11, 2009 8:03 pm
Location: India

Re: Advanced Turntable

Postby WalterMo » Sun Apr 01, 2012 6:57 am

Hello Dr. Benoy,

To your questions:
1) Yes, it's only a single axis, simply „halved“.
2) The load in relation to my 2-axis positioner is of course more because it's a bigger motor. In relation to my 'Simple Turntable with Arduino' it's the same loading. But this turntable Leo 1 has two improvements on the just mentioned 'Simple Turntable':
A. Three preselectable angle increments.
B. Triggerable by DAVID.

The main reason why I posted this device is that the „know-how“ is just present in my head and the code in my PC because I had just built the device. And, I was asked by two guys to present a downgraded version for an easier reproduction:
viewtopic.php?f=1&t=4256

Walter
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby hyppyayo » Tue Nov 06, 2012 5:49 pm

the code still works in this configuration?

http://bildr.org/2011/06/easydriver/
Windows 7 pc
Acer P1165 projector + Logitech C920 cam
Black & Decker Laser Line Level
hyppyayo
 
Posts: 38
Joined: Fri Oct 26, 2012 3:02 pm
Location: Riccione (italy)

Re: Advanced Turntable

Postby WalterMo » Tue Nov 06, 2012 6:38 pm

No, "Turntable_Leo1_2" works only in this:
download/file.php?id=5309&mode=view
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby hyppyayo » Wed Nov 07, 2012 4:05 pm

in the simple one i posted is possible to trigger by david?
Windows 7 pc
Acer P1165 projector + Logitech C920 cam
Black & Decker Laser Line Level
hyppyayo
 
Posts: 38
Joined: Fri Oct 26, 2012 3:02 pm
Location: Riccione (italy)

Re: Advanced Turntable

Postby hyppyayo » Sun Nov 11, 2012 7:02 pm

Walter could you sell me one of this turntable?
Windows 7 pc
Acer P1165 projector + Logitech C920 cam
Black & Decker Laser Line Level
hyppyayo
 
Posts: 38
Joined: Fri Oct 26, 2012 3:02 pm
Location: Riccione (italy)

Re: Advanced Turntable

Postby WalterMo » Sun Nov 11, 2012 7:51 pm

Sorry, at present I haven't sufficient time to build a turntable.

Maybe someone else has an interest to build one for you?
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby Mike_A » Sat Dec 29, 2012 2:51 pm

Hi All,
I hope you had a great Christmas break and I wish you all the best for 2013 ! This is a remarkable forum for a great product !

I built my first Arduino based David laser scanner a while back, but am now focusing on the SL solution, its faster, easier, cleaner, very impressive !
I have now built my own turntable using a Stepper-Bee board and stepper-motor, these are controlled by "Autostep" software.
All available from http://www.pc-control.co.uk/stepperbee_info.htm

I have had these items sitting around doing nothing for a few years, now they provide a very quick and easy method of driving my turntable.
I connect the turntable to my laptop using USB, I can set a number of steps, the step speed in milliseconds, click go , and the turntable turns to correct angle.

How can I trigger this rotation using the David SL interface ?

I have attached some images from a recent scan of a small sea shell.(8 scans)
The screen grabs are from a 3D Pdf and a 3D HTML webpage created using Simlab software.

Regards,
Mike Annear.
Attachments
pdf_3d.jpg
web_3d.jpg
532nm 5mw 3V Green line laser
Stepper-11YPG302S-LW4-R100 with 100:1 gear ratio Gearbox
Mono Camera - DMK31AU03. 1024 x 768 / 30fps
Arduino UNO/EasyDriver V4
Acer K11 Projector.
www.mikeannear.com
Perth, Western Australia.
User avatar
Mike_A
 
Posts: 55
Joined: Fri Sep 10, 2010 2:07 am

Re: Advanced Turntable

Postby WalterMo » Sun Dec 30, 2012 2:30 pm

Hi Mike,

I have never worked with Stepper-Bee, maybe you will find some hints here:

viewtopic.php?p=6271


Walter
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby Mike_A » Mon Dec 31, 2012 4:32 am

Hi Walter,
Thanks for the link.
I have decided it is easy enough to just click the "GO" Button :)
The "Alignment Around-Y" method of alignment is fantastic !!

Have a great 2013 !
Cheers,
Mike.
532nm 5mw 3V Green line laser
Stepper-11YPG302S-LW4-R100 with 100:1 gear ratio Gearbox
Mono Camera - DMK31AU03. 1024 x 768 / 30fps
Arduino UNO/EasyDriver V4
Acer K11 Projector.
www.mikeannear.com
Perth, Western Australia.
User avatar
Mike_A
 
Posts: 55
Joined: Fri Sep 10, 2010 2:07 am

Re: Advanced Turntable

Postby WalterMo » Sat Sep 21, 2013 7:30 pm

This new turntable and its controller have two advantages over the turntable at the beginning of this thread:
1. The table can carry loads up to about 10 kg.
2. The controller can be used in manual mode and, more important, it can control DAVID to do (and save) a series of scans.

Regarding the table: It is equipped with two bearings: A conical roller bearing to carry the vertical force of the weight and a ball bearing to absorb radial forces. Latter will occur, specially at the lower end of the turntable arbor, if the emphasis of the load is outside the center of the table plate. The stepper motor drives it by a toothed belt. Gear ratio = 3:1.

The controller.
In principle it's nearly the same as the Leo 1. As you can see on the photo I have changed one of the 3 angle increments. Now it's possible to set the toggle switch to 22.5°, 36° or 45°. And by means of a new button, labeled „Start Scanning“, a series of scans can be started. This requires a communication with DAVID, it was explained here:
viewtopic.php?f=15&t=5784

Depending on the chosen angle increment DAVID will do 16, 10 or 8 scans over a revolution and save them in the before created folder. During this automatism the table plate will rotate counterclockwise. Therefore it's necessary in Shape Fusion later on to set a minus sign for the used angle (Alignment Around Y-Axis).

For people who like to recreate the controller:
It's not necessary to build-in the LCD display. If you omit it you don't have to modify the Arduino code.
Regarding R3: If you aren't sure whether your display has an already built-in current limiting resistor for the LED illumination, then use 180 Ohms for R3.

Reset of the display position counter: First press 'RESET' and then simultaneously one of the 'Start increment' buttons. In this manner also a reset of the automatic mode (with DAVID) is caused.
Of course DAVID will also grab the texture, simply set a hook in DAVID at 'Enable Texturing'.

Walter

Edit: I forgot to draw in two 1kOhm resistors. Each from the input pins 6 and 7 to 5 Volts. You can avoid the usage of the resistors if you download the new software, version 2.
Attachments
TurntableControllerDiagram.jpg
Circuit diagram
Ausschnitt1reduziert.jpg
Turntable_Leo2_2.zip
The Arduino code
(3.27 KiB) Downloaded 84 times
Bottom view.jpg
Bottom view
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Advanced Turntable

Postby WalterMo » Sat Sep 21, 2013 8:08 pm

And here an automatic scan made on the table just posted before. DAVID was requested to scan the carved elephant at 10 positions à 36°.
Used equipment: Acer K11, modified Logitech C600 at 800x600 pixels @15fps.
Attachments
Aufbau2reduz.jpg
Used set-up
ScreenDump10Scans.jpg
The 10 single scans
Ohne&Mit_Textur.jpg
Fused result without and with texture
User avatar
WalterMo
Moderator
 
Posts: 2249
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Postby hal » Sat Sep 28, 2013 9:02 am

Great device! Good job.
Mattia
User avatar
hal
Moderator
 
Posts: 1467
Joined: Thu Mar 01, 2007 4:08 pm
Location: Cavaria con Premezzo (VA), Italy.

Next

Return to Laser and Camera Hardware

Who is online

Users browsing this forum: No registered users and 0 guests