In this tutorial, you will learn how to create a control system for a laser using a joystick, servos, and Arduino.
During this step by step, I will guide you through the entire process, from initial setup to final programming, so you can control a laser using a joystick and servos. We'll explore how to connect the servos in conjunction with the Arduino, so you can move the laser in any direction you want.
This tutorial is designed to be accessible and exciting for everyone. Additionally, you'll discover how to write simple but effective code in Arduino to synchronize the movement of the servos with the joystick inputs, allowing you to aim and control the laser with ease.
You'll be able to use your joystick-controlled laser to create interactive light shows, precision games, or even for educational purposes.
Electronic components
Arduino mini proSocket for arduino nano
dupont cables
Laser Module ky-008
This module specially designed for Arduino easily, quickly and accurately emits a laser beam produced by this component.
It is a Laser Emitting Diode that operates at 5V and emits at a wavelength of 650nm.
Technical characteristics:
Operating voltage: 5VWavelength: 650nmPower 5 mWColor: RedMaterial: PCBDimensions: 2.3×1.5×0.9cm
A Servo sg90
Characteristics
- Dimensions (L x W xH) = 22.0 x 11.5 x 27 mm (0.86 x 0.45 x 1.0 inches)
- Weight: 9 grams
- Weight with cable and connector: 10.6 grams
- Torque at 4.8 volts: 16.7 oz/in or 1.2 kg/cm
- Operating voltage: 4.0 to 7.2 volts
- Turning speed at 4.8 volts: 0.12 sec / 60º
- Universal connector for most radio control receivers
- Compatible with boards such as Arduino and microcontrollers that operate at 5 volts.
How to control a servomotor?
You can position the servo axis at various angles from 0 to 180º. The servos are controlled using a pulse width modulation (PWM) signal. This means that the PWM signal sent to the motor will determine the position of the shaft.
male pins
A ky-023 Joystick module
The Joystick module allows you to build a manual controller in 2 directions: X and Y. It also has the push-button function that is activated when pressing the Joystick.It has two potentiometers each with its analog outputs for the direction (VRx-VRy) and a digital output for the button (SW). To read the position it is necessary to convert the analog values using a microcontroller ADC.
Used in robotics, control, automation, video game projects.
- Operating Voltage: 3.3 – 5V DC
- 2 Potentiometers
- 1 Push Button
Two-axis joystick sensor module by using PS2 rocker potentiometer, with (X, y) 2-axis analog output, (Z) 1 digital output button. With the Arduino sensor expansion board you can produce remote control and other interactive works. In addition, this product to allow customers to more easily with the arduino expansion board and other standard interfaces, in the design of the X, Y, Z axis of the circuit are separate tracks, the user can use ARDUINO's special line of 3 pins on the expansion board.
Product performance:- Input voltage range: DC 3.3V to 5V
- Output signal: the module two-way analog output and a digital output interface, the output value corresponding to the biaxial offset (X, Y), the type of analog; keys that user press Z axis, its type is digital switch.
- Arduino controller, sensor expansion board connector can be programmed, complete with creative interactive works.
- Cross joystick is a 10K bidirectional resistance, with the rocker in different directions, the resistance tap with changing. This module uses 5V power supply, the original state of Press arrows in the opposite direction, read the voltage decreases, the minimum is 0 V.
PCB
Download gerber file –> ir alarm pcb
3D Parts
Download STL files –> Laser_gun_bracket_501701
Comments
Please log in or sign up to comment.