Help needed automating a 2 axis David Laser scanner turntable

Discuss about cameras, projectors, calibration panels, turntables etc.
Post Reply
loddie
Posts: 5
Joined: 03 Jan 2017, 02:25

Help needed automating a 2 axis David Laser scanner turntable

Post by loddie »

Hi All,

I have a David Laser SLS-1 scanner and have built a two axis rotary table for scanning objects. I plan on scanning similar size/shaped objects, so my workflow will always be the same. However, I'd like to automate the workflow with an Arduino. Unfortunately, the very friendly and helpful David forum is no longer active, so I'm hope I'm not too late to the party and can find assistance on the software side here.

I'm decent with mechanicals, and they are mostly complete other than 3D printing an enclosure for the Arduino (will design and print one soon). I have a small Intel Nuc to run David 3.10.4, an Arduino Mega 2560, and an AdaFruit Motor Shield V2.0 for the stepper motors (NEMA 17).

Similar automated multiple axis turntables have been documented before, but my project is a little different. First, the A and B rotary axis aren't perpendicular to each other. The B axis is 45 degrees to the A axis, each axis driven by a 50:1 worm gear reduction. Hopefully this is understood from the photos. The axis orientation doesn't really affect the programming except the sequence of scans. The scan sequence will always be the same:

Scan 1: A axis: 0º; B axis:0º
Scan 2: A axis: 45º; B axis:0º
Scan 3: A axis: 90º; B axis:0º
Scan 4: A axis: 135º; B axis:0º
Scan 5: A axis: 180º; B axis:0º
Scan 6: A axis: 225º; B axis:0º
Scan 7: A axis: 270º; B axis:0º
Scan 8: A axis: 315º; B axis:0º, then B axis rotates,
Scan 9: A axis: 0º; B axis:180º
Scan 10: A axis: 180º; B axis:180º

Second, I've added a roller limit switch on each axis so it can "home" on start or before each scan, so the scans are consistently at the same angles. I don't recall any other similar projects with a homing function with limit switches, so addition coding may be necessary. It would be nice to add a "home" function button to the project.

Unfortunately, programming is not in my current skill set. I could learn, but as I have many other challenges to solve in my workflow, I'd rather someone with Arduino/David Laser skills do the programming. I'd be happy to try set up the Arduino, but my preference would be to ship it to someone so they can do it. Of course I am willing to compensate for the skills required. I'm located in Denver, CO and it is unlikely there is anyone to help locally. I'm hopeful someone such as Gunter, Sven, or WalterMo may be willing to take this on. For those that have done it before, it will be simple and would only require tweaking the code to the scan sequence about and adding homing function. Anyone interested? I can follow-up with more details if needed.

Of course, if there aren't any takers, I would be very grateful for any assistance tweaking the Arduino coding of similar projects to make it work. I simply don't have Arduino experience, so I'll have homework to get up to speed.

Thank-you!
Attachments
IMG_1369.jpg
IMG_1368.jpg
User avatar
Micr0
Posts: 586
Joined: 15 Nov 2016, 15:20
Location: New York City

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by Micr0 »

I posted my 2ax arduino code to the old forum. I can fake my way through coding but I don't like it and it make my brain hurt. That said I've worked on fairly complicated arduino (and real micro controller) stuff and when the chips are down hired real coders to get get things right. When I have needed help personally I have found guys at the local makers spaces who are far better coders than I am and some times they will work on a cool project for steak and beer. The official arduino forum is also a good place to find coders or really good help if you decide to do it yourself. Getting the adafruit shield to move a stepper at single number of steps in response to a push of a button or a character from COM is dead simple. You may want to give it a try.
µ
User avatar
VDX
Posts: 36
Joined: 05 Feb 2017, 10:43

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by VDX »

... you can get one of the 3D-printing controllers, connect the STEP+DIR pins to your stepper drivers and adjust the "steps per mm" so, that it will fit a deg instead of a mm.

Then you can "feed" it with plain G-code.

For example - homing the motors ist then:
"G28 X0 Y0" for booth or "G28 Y0" for the B-axis only.

With proper steps/mm settings the angular moving of your A-axis for 45 degrees will then be as simple as "G0 X45" ... or any other (angular) value or axis.

Then write your moving sequence into a string and send it to the controller with a terminal program - I'm using TeraTerm for such setups, as it can use "macros" or automated scripting for complex actions ...
Viktor
loddie
Posts: 5
Joined: 03 Jan 2017, 02:25

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by loddie »

Mirc0, thanks for the tips. Before posting, I had looked at various Arduino/microcontroller startups in the Denver area and they had been inactive for 6 months. However, I just found an active coding group at the Denver Library, so I'm going try them as well.
loddie
Posts: 5
Joined: 03 Jan 2017, 02:25

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by loddie »

VDX wrote: 03 Apr 2017, 14:07 Then write your moving sequence into a string and send it to the controller with a terminal program - I'm using TeraTerm for such setups, as it can use "macros" or automated scripting for complex actions ...
Hi VDX, I am familiar with G-code. Using this approach, would it be possible to send and receive commands from the David Laser Scanner software?

The goal, which I neglected to state in my first post, is to make operation as simple as possible. That way, anyone besides myself, could be taught to hit a start button (hardware or software), and the whole sequence would happen automatically, homing first and then scanning all the scans until finished. This would require the communication back and forth between Arduino and David Laser and perhaps TeraTerm (in your example).
User avatar
VDX
Posts: 36
Joined: 05 Feb 2017, 10:43

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by VDX »

... for bi-/tri-directional handshaking you'll need a software for synchronisation - this can be a simple script on your PC in Java or Processing or ...

I've done some of this "handshaking" style applications with different hardware-bases and softwares, so no problem, if you're familiar with serial communication and at least one of the basic programming IDE's or one of the "lab-tools" for controlling+quering multimeters with serial ports.

With an Arduino this could be done too without problems - read trough the samples for serial communication ...

Viktor
Viktor
loddie
Posts: 5
Joined: 03 Jan 2017, 02:25

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by loddie »

Viktor,

I'm familiar with G-code (for cnc router), but that's about it. Not familiar with bi-directional programming.

However, I going to try get the stepper mode shield working. Baby steps, just wrote first Arduino sketch tonight to make the LED flash faster. :)

LODDIE
User avatar
VDX
Posts: 36
Joined: 05 Feb 2017, 10:43

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by VDX »

... this "bi-directional" isn't really hard - look into the serial communicatin samples.

e.g. - the "MultiSerial" sample to receive from one port and send to another:
/*
Multple Serial test

Receives from the main serial port, sends to the others.
Receives from serial port 1, sends to the main serial (Serial 0).

This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc

The circuit:
* Any serial device attached to Serial port 1
* Serial monitor open on Serial port 0:

created 30 Dec. 2008
modified 20 May 2012
by Tom Igoe & Jed Roach
modified 27 Nov 2015
by Arturo Guadalupi

This example code is in the public domain.
*/

void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(9600);
}

void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}

// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.write(inByte);
}
}


Viktor
Viktor
loddie
Posts: 5
Joined: 03 Jan 2017, 02:25

Re: Help needed automating a 2 axis David Laser scanner turntable

Post by loddie »

Thanks for pointing me in the right direction. Hopefully, I'll have time tonight to try uploading code.
Post Reply