In the lesson I will show you how I made a toy on arduino that will suit beginners. If you start working with sensors, then this toy will suit you as a homemade product.
Step 1: Watch the Video
Step 2: Material:
- PVC tube
- power supply +5V
- aluminum tube (10mm)
- resistors 10 kOm
Step 3: Box
First you need to cut two rectangles "A" (36x4 cm) out of plywood, two rectangles "B" (8x3.5 cm), one rectangle "C" (36x8 cm), one rectangle "D" (35x8 cm). In the “D” rectangle, drill a 10mm hole in the center and two holes at a distance of 12 cm from the center. Similarly, you need to drill in the details "A". For the beauty and protection of wood, I varnished the box.
Step 4: Assembly of the Pushing Mechanism
From plywood, you need to cut three rectangles (8 x 1 cm) and drill them into the center of the hole (10 mm). They need to be glued so that the holes coincide with the holes of the part "D" at a depth of 1 cm. Under it you need to glue the servo as shown in the photo. Just need to make three parts (3 cm) of the aluminum tube.
Step 5: Intsllation Photoresistors
Solder the long wires to the photoresistors and then glue them to the “A” part.
Step 6: Laser Gun Assembly
To the button you need to solder two long wires that need to be connected to the contacts of the laser button. From plywood you need to cut out three templates of the handle of a pistol taken from the Internet. In one of the template you need to make a hole for the wire. Then you need to glue everything as shown in the video. The barrel I made from trimming PVC pipe. After gluing, the surface needs to be treated and painted.
Step 7: Circuit and Software
All electronics need to be assembled according to the circuit.
To configure the sensors, open Serial port in Arduino IDE. Then you need, shining a laser at the sensor, to remember the value and write it in the sketch in the row where it is written analogRead (foto) > value
Step 8: Principle of Operation
When a laser beam hits the sensor, the ardino gives a signal to the servo, turning, thereby pushing the piston up and causing the can to fall.
This is an entry in the