Introduction: Satellite-spotting Laser
(FOR THE SAKE OF PEACE, I GOT RID OF THE CANNON TITLE - I wonder if the number of viewers will reduce drastically :)
(Credits for picture and video - katjahommel.com)
This is a laser mounted on a cannon-like structure made for a single purpose: Point to the sky and trace the position of a satellite. It gets data form a small program via Serial port and shoots to the infinity. It's not easy if you haven't done anything with electronics, but if you learn a couple of things, it's pretty basic. The design has two major drawbacks, that could be improved later:
• The code works but the movement is Jaggy when tracking in realtime. Converting angles expressed in doubles (A decimal point number with a lot of digits like 225.365844E) to the limited steps of a motor is just impossible. Possible gearing and fine-tuning to make movement smoother on slow tracking situations are still lacking
• The cabling is still cumbersome and it won't allow fluid 360° movement in the Base (Azimuth) axis. So when passing from 359.9° to 0° the motor will have to go a whole revolution back in order to keep the track.
Being warned, we can start:
Step 1: Find the Components
• 1 Arduino, (The bluetooth version would spare the need for a BT module, but wireless control is optional)
•1 Adafruit Motorshield, You can look on the site to get a distributor and will need to assemble the thing yourself (DIY from the very beginning). Making it is good for your self esteem.
• 1 Green Laser pointer, Depending on your country this may get hard to get on a store, but you can always trust in Ebay where they are cheap and easy to find.
• 1 Stepper Motor Recommended to buy a standard Stepper like the linked one from Sparkfun. I chose this for the base (azimuth) that needs to fully rotate 360°, because it has a decent step "resolution" and it's also a lot easier to control than a 360° servo.
• 1 Servo Motor Standard servomotors are the easiest motors to control and they are light to mount in different orientations. They also have an absolute 0° position so you know it will always go back to the same position after you reset. For the elevation rotor this is ideal and their 180° range is more than enough.
• 1 Pan/Tilt BracketThis is useful to mount the laser on the Servo.
•1 Lithium Batteryor external power source. Depending on your stepper motor, this should give you between 7.4V and 12V with 600mAh - 1000mAh. The link shows the battery I used, but it discharged quite quickly and chargers aren't cheap. My household tip is to use your Video camera battery. That saved me in one presentation and the battery didn't even noticed it. Warning: A standard 9V Battery you'd use for prototyping will not offer you enough current to move the Motor flawlessly, so don't try too much with it else the stepper will behave erratically.
• 1 Bluetooth modem(Optional) If you work with a non BT Arduino and want to incorporate wireless communication, then let's try this.
1 Accelerometer compass(Optional and experimental) This gives you the chance to tell your cannon where the north is located, so it is more precise. But there are some issues to it and you're not really trying to shoot the sat down, so it's all up to you wether you want precision or not.
•Prototyping wires (Jumper) A bag of 30cm-long and one of 15cm-long capped wires will be ok. These help keep things in place and some order. Yo'd like to have also a couple of wire rolls, just to patch something else or build the circuit for the laser.
1 Mounting hub for stepper Motor and some L Servo Brackets to assemble them motors...
1 Custom laser holder. This was self made and printed in a hacklab in Berlin, You might want to find a solution with some other holder or download the .stl find a 3D printer near you
4 acrylic plates of approx. 10x10 cm or bigger for the case
Bolts and nuts + steel angles + a driller and a screwdriver (See pictures in step 4 if this is not clear)
A silicon gun or a cold-silicon tube.
Step 2: Motors
1. Check electronics: Plug your arduino and test it with a basic example and check/assemble your Motor Shield. All necessary steps for soldering and testing it are provided here.
2. Connect your Motorshield to the Arduino and test your Motors:
2.1. Plug the Stepper Motor to the stepper Motor terminal on the left of your Shield (M1 and M2), and plug the Servo to the second Servo port (See graphic)
2.2. Plug the arduino to your Battery / External power source
2.3. Open the MotorParty example and upload it to the Arduino. Both Motors should move now. If not, check the Power or go back to the check Electronics step!
Step 3: Laser
0. Grab the laser pointer and unscrew it in half. Take the laser part and look for the Spring coming out of it.
1. Take a short jumper cable and solder it to that spring (-).
2. Take another jumper cable with a different color and solder it to the outer ring that screws this part to the other (+).
3. Fold some tape around the button and make sure that it remains pressed, so the pointer is always in ON mode.
4. Build the circuit you see in the second picture. This is just a transistor (C33725) and a resistor (680 Ohm) which amplify the current of Arduino's 3V. For schematics see pic or just download the attached Fritzing file (.zip). You should have the Arduino and the Motor shield plugged by now. The idea to complete the circuit in the picture is to use the extension pins on top of the motor shield, but I show you just the arduino for the sake of clarity.
5. To test your laser, upload the arduino example BlinkWithoutDelay.* Change the ledPin to be 10 and to use that same pin on your board. 13 is the default pin for the arduino internal led that lights up and down on input, so it might interfere with your code in more complex setups.
This is basically it. The next is how to mount this (case and cannon assembly)
*TIP of the week: If uploading falis i.e. you get an "timeOut() error", disconnect briefly the Motor Shield from the arduino, upload and plug it again. That happened a lot to me...
Step 4: Assembly a - Base
So now you need to put this all together, and it is somehow up to you to decide the final look. I'll just explain the solution I designed:
1. Take two of the Acrylic plates and open 2 holes at 3cm from the top, one at 2cm from the side you first choose and one at 2cm from the opposite side.
1.1. Open two more holes at 8cm from the top, one at 2cm from the side you first choose and one at 2cm from the opposite side.
2. install the angles, all pointing in the same direction. Then take the two remaining plates and open holes accodingly, so they match the position of the angle's holes...
3. Take one of the latter plates and open holes that match your arduino's fixing holes. Screw the Arduino along with the mounted motorshield to it.
4. Fix this plate between the plates with the angles at the lowest level and screw it.
5. Take the last plate and open a hole of around 1cm in diameter. This will be to pass the cables to the upper level.
6. Pass the cables from the Arduino through the big hole on the loose plate, and in case of the motor cables, briefly disconnect element by element from your arduino, pass the cables through the hole and plug them again.
7. If everything is well connected and you checked the motors are moving and the laser is turning on and off, fix the loose plate to the upper level of our case. That gives you a solid base where to install the cannon...
Step 5: Assembly B - Cannon
(ATTENTION, the red circuit you see on the pictures is a Bluetooth Modem. It's optional so I don't include it in the instructions. Plugging it to the arduino is really easy with the instructions from the seller, you don't even need to add anything to the code)
1. Glue the Stepper Motor to the upper plate of the base. I didn't use hot glue for that but some kind of silicon that I cannot precisely recall. But I guess the hot one should be ok. Place the Aluminum Hub on top. Screw the Servo to it with the help of a Servo L Bracket. Keep the servo in a horizontal position.
2. Install a Tilt bracket on the servo, be sure that it's on its 0° Position (facing up because the motor is lying on its side - we'll invert this in the code so it works properly) See picture. After powering the cannon up you might need to fix this so don't worry now
3. Glue the laser circuit to the servo using hot glue.
4. The custom laser holder that you should 3D-print comes now handy. Remember to measure your laser and modify the mouth's inner diameter in case it varies from the model's. You just need to screw its base on the center of the upper part of the tilt bracket, pass the cables through the hole and continue pressing the laser through the holding mouth all the way to the bottom. If the diameter is the same, the laser should hold perfectly.
5. Connect the laser wires to the circuit mounted on the servo. Try to keep it centered and that all the cables going to the laser are free and on the same path and not entangled with something.
That's it from the construction side.
Step 6: Code
(Before starting: If you don't care about the satellite tracking or you want to first test the thing, you can forget the Processing part and just send serial commands to the cannon via the arduino serial monitor)
1. Download Arduino if you don't still have it.
1.1 Download Processing if you don't still have it.
2. Download the Cannon Code from here ad save it to your project's folder.
3. Download and install the satelistica library for processing from here: http://github.com/Protonumerique/Satelistica
4. Open the .pde file with processing and open the .ino file with arduino.
5. If you have a bluetooth Arduino or module installed, it's time to sync it with your computer.
6. Plug the battery or power surce to your Arduino board, and upload the code to it via USB. If you have BT you can unplug the USB after the upload and switch the serial port to be BT. Then press cmmd+shift+m (ctrl+shift+m on WIN - Linux) to open the Serial Monitor. Set it to 57600 Baud or the serial speed specified on the code (might be 115200).
7. Manually position your cannon pointing to the North. Compass calibration is the next obligated step because of precision. the code isn't still perfect though.
8. Run the processing file and check the visualization. If all went well you'll see which sats are over your head and the cannon should fire a green beam in the direction of the highest one!
9. If you haven't configured the Processing part, you can simply type the angles preceded by letters on the Serial monitor. If you type
A220 (any number from 0 to 360) - stands for Azimuth = 220°
E24 (any number from 0 to 90) - stands for Elevation = 24°
F1 - is for FIRE the laser.
F0 - is for turning the laser off.
And that would be it. Explore it and take it out some night and watch the sky, there's pretty much to see up there.
*Again: If uploading falis i.e. you get an "timeOut() error", disconnect briefly the Motor Shield from the arduino, upload and plug it again.
We have a be nice policy.
Please be positive and constructive.
is it illegal to point lasers into the sky without government approval