-
1Step 1
Assembling the Gimbal
Note: These instructions will soon change. A rough draft for a laser cut version of the project is in works. This will emulate the way that many acrylic 3d printers are made for easy assembly.
Original gimbal instructions:
To start with, it is necessary to print out the gimbal vector SVG file that has the dimensions for the project. Make sure to print this file at normal size. To compare this, the large platform is 6 inches. Measure this platform carefully to make sure your printed copy matches that scale. The file was made to match a 12" by 12" sheet of plastic. You may need to use more than 1 sheet of plastic to print the file or you may need to print individual shapes onto pieces of paper. Alternatively, you can simply use the file as a template and hand measure all the pieces. Or you can laser cut the file.
Next, it is necessary to cut out the plastic pieces to the specifications in the file. The original project was done with a jigsaw. Any sort of cutting method will work.
Next, drill all the holes that are specified. The first version of the file does not have the drill hole sizes indicated. A tap and drill bit guide will indicate which size holes to use for the screw holes. The motor shaft holes need to be greater than 7mm to prevent friction. To drill motor mount holes print out a nema 17 layout and tape it to the plastic piece to be drilled making sure to center the motor shaft very carefully. Then drill using a 3mm bit.
After drilling holes I glued pieces together that needed to be glued. This includes the base that connects to the Tripod and the vertical uprights.
After the glue was set I tapped all holes to the right thread. Then I assembled the device.
[Need updates but will probably wait until laser cut version of mount is designed]
-
2Step 2
Setting the Stepper Driver Current
If possible, it is recommended to wire the stepper driver on a breadboard to set the current before you solder the driver into the project. It is best to solder in the stepper driver to the main board after soldering in the 5V regulator, but before soldering in any of the other components. This way, if you make any mistakes in orientation of the chips you will not burn out any of your sensitive components. Use a multimeter to make sure that there is not any leakage of 12 volts onto any of the 5 volt traces.
See: Instructables Instruction Link
I am successfully running my motors with a Vref of 0.60V with my 1.2A 15.6 oz.in motors on a 12V power supply. This project does not require an exceptional amount of current to function. The yaw motor appears to require at lest 1ms movement time between each eighth step in order for the motor to move when commanded. The pitch motor is currently running with a 250us delay, but I haven't tried less than that yet.
-
3Step 3
Setting up the bluetooth module
Tools: TTL (or FTDI) cable, TinySine Bluetooth Module, computer with usb port, serial monitor
First things first, the bluetooth module comes with a default BAUD rate of 9600. Yeah, that's not going to do. So lets speed things up.
To start this we begin by wiring the bluetooth module to our USB to TTL converter (I'm using an FTDI converter that also programs the Trinket Pro). The wiring is VCC->VCC, GND->GND, TX->TX, RX->RX. Seems obvious, but this is NOT how we will hook it up to the Arduino later.
Next, plug the USB cable in and the bluetooth module should start flashing.
Open a serial monitor program (I'm using the one built into the Arduino software) and make sure the port is set to the right one. For the settings the BAUD rate needs to be 9600 and the monitor needs to be set to "No line ending".
Send the "AT" command to see if it is working. The module should reply "OK".
Send "AT+BAUD?" to see the current BAUD rate. It should return a "2" which corresponds to 9600 [from the datasheet].
Send "AT+BAUD6" to change the BAUD rate to 38400. Re-power the module for the settings to take effect. You can use "AT+RESET".
Set your serial monitor to 38400! Otherwise you won't be able to talk to the module anymore. (Note: I had to set the rate of my serial monitor, close the window, and re-open the window).
Send "AT" and make sure it responds back "OK".
If you want to set a BLE password or change the EDR password you can do that now too.
EDR: "AT-PINEmypassword"
BLE: "AT-PINBmypassword"
-
4Step 4
Assembling the Circuit Board
Note: Before ordering a circuit board make sure to add mounting holes to the file in KiCad. Alternatively, you can drill the holes manually later wherever they will fit.
Note: The holes in the provided file were too small for the screw mount terminals. I had to file the terminals for 5 seconds. Next iteration will require larger PCB holes or a different connector.
For this tutorial it is going to be assumed that you can order your own PCB board. The files are included in the document section in a zip file. If you don't want to make any changes to my files you simply send the zip to the company, enter the board dimensions of 2.5" x 4.0", and send them money and your shipping address.
Assembling the board is pretty straight forward, but there are a few things you can do to make sure everything works before it is soldered in place.
First, hook your motor driver up on a breadboard and set the limiting current (see previous instruction for links).
Next, set the settings on your Bluetooth dongle BEFORE you solder it. Alternatively, use a female header strip so that you can remove the Bluetooth module later to make setting changes. The board is wired with the TX/RX pins of the Bluetooth connected to the TX/RX pins of the Arduino which will likely cause problems if you try to change the Bluetooth settings after you solder.
Start by soldering all the components that touch the 12V power sources. This is the regulator, the screw terminals, the motor drivers, and the capacitors. Solder these components and then use a multimeter to ensure that you have 12V everywhere marked as 12V, 5V everywhere marked as 5V, and that you don't have any high voltages anywhere. 12V on a 5V pin will burn up a component.
Next, solder everything else. For prototyping I used header pins for everything that wasn't expected to generate much heat.
Things to make sure of:
* Motors are connected with proper wires to proper terminals marked 1A,1B,2A,2B.
* SF30 is plugged in with 5V to Vcc, Gnd to Gnd, etc. Do NOT send signals from a 5V Arduino pin to the SF30 module!!!! The SF30 module has 3.3V logic. This PCB board is NOT wired to send anything to the SF30 modue. It is receive only. Violate at your own risk. Tie the TX pin of the Arduino to ground to prevent accidental damage. Or install a level converter between the pcb and the SF30 if you need to have bi-directional communication. This can be done easily.
* Ensure that the bluetooth module and microSD card modules are plugged in the right direction. The PCB has silkscreen notes to show which side is which.
* Use JST non-reversible cables and connectors wherever possible to prevent plugged a device in backwards.
* Do NOT plug a device into a header that was made for another device. The power pins are NOT all the same!
-
5Step 5
Programming the Arduino [clone]
Follow your favorite instructions https://learn.adafruit.com/introducing-pro-trinket/starting-the-bootloader for installing the .ino file from https://github.com/caveradam/OpenLidar.
If you want to change any settings for Bluetooth (default at 115200 baud), motor speed, motor steps (default to 400 steps per rotation), SF30 rate (default to 38400 baud), etc....change the settings in the ino file to match what your hardware is set at.
There are other tutorials for uploading code and it's a bit out of scope for the prototype phase of this project to provide step by step detail here. If you follow the other instructions for settings and the links from Adafruit this should be plug-n-play.
-
6Step 6
Setting the Hall Effect Sensor
The hall effect switch sensor is very easy to set up. You simply need to wire it according to the wiring diagram and ensure that the magnet is close enough to the switch to trigger the switch. Then you need to turn the carriage until the switch first latches. Measure the angle that the carriage is turned and update the Arduino code to set this angle as the carriage stop angle (more detailed instructions to be provided at a later date).
[Need update, this will be implemented in the near future. Hand moving the carriage to a starting position down is working for now]
-
7Step 7
Configuring and Connecting the SF30-B
The best instructions for configuring the SF30-B over usb are found on the Parralax website at https://www.parallax.com/product/28057 under the download section. The additional set-up instructions walk through how to set up the mode for the sensor.
Change to read:
Active data port - Serial
Snapshot resolution - 0.03 m
Serial port update rate - 2289 (rev 6) or 1665 (rev 7)
Serial port update rate - 38400Note: everytime you plug in the usb port you need to ensure active data port is set to Serial. Plugging this in can cause it to change to usb automatically and you'll be wondering why you don't have any data to your Arduino.
-
8Step 8
Connecting to a Phone Via Bluetooth
The TinySine chip works over either EDR or BLE modes. From iOS only the BLE mode is available. From Windows 10 I can only use the EDR mode because the computer cannot connect with a blank pin number. The defaults for this chip are EDR password of "1234" and no BLE password.
[Need update]
-
9Step 9
ScanRoom
To scan the room: Turn on the device, connect to BlueTooth, send the "ScanRoom" command.
If you have an SF30 module it will go into a 30 second warmup period to warm up the sensor. If you have a LidarLite it will skip this section. Then you will hear the motors engage and it will begin scanning. Remember to stay out of the shot (or to stay VERY still if you want a portrait). Warning: This is a laser...bad for eyes!
-
10Step 10
Processing output file
Download the OL#.CSV file from the SD card onto a computer.
The file needs to be in the folder /processing/data/ where /processing is where the processing sketch is (see gitHub) and /data is where you put the data file. The output file will be in /processing.
Open the sketch in processing and click run. It should tell you that the conversion is done.
Open the OL#xyz.CSV file in CloudCompare (free). Select the columns for x,y,z,grey when the load file menu requests instructions. Now clean up the file and save as your favorite point cloud format.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.