The body of the dancing robot
Download the STL files of the body parts of the dancing robot and print them on your 3D printer. The finished kit looks like the picture below (the color can be any color).
Prepare tools and components for assembly according to the list below
1. Phillips head screwdriver.
3. NANO board CH340 and mini USB.
4. Arduino Nano Prototype Shield V3.0.
5. HC-SR04.
6. RGB LED.
7. Four MG90S servos.
8. Two SG90 servo drives.
9. LED matrix max7219 with controller board.
10. Connection wires male to male.
11. Passive Piezo Buzzer 5V.
Preparing the board, servo motors and matrix
2. Connect the board to the computer via mini usb.
3. Run the Arduino IDE.
4. In the Tools > Board menu, select the correct board name.
- For a marked board, in Tools > Board > select Arduino NANO.
- For unmarked board in Tools > Board > you need to select Nullab Nano / Marker-Nano. You will need to add these boards to Arudino IDE. To do this, go to File > Options > Additional Links for Board Manager and enter the link: https://raw.githubusercontent.com/nulllaborg/arduino_nulllab/master/package_nulllab_boards_index.json. Install the package you found.
5. Select the appeared port in the Tools > Port > select the port of the connected device.
You can view the assigned device port in the Device Manager. If you have only one device connected to the computer, the Arduino IDE will display only one device port.
- No changes are required for the Arduino Nano board.
- For the Nullab Nano board in the PROSH_OTTO.ino code, you need to uncomment the seventh line (delete // at the beginning of the line) and uncomment the eighth line (add // at the beginning of the line).
Be careful!
Observe the polarity!
- The brown wire = "G"
- The red wire = "V".
- The yellow wire = "S".
10. Connect the 6HR61 9V battery to the board.
Assembling the electronics into the body
- The thickenings on the legs should look at each other.
- Make sure the screw is tight enough so that the part does not turn on its own, but not too tight so that it does not "squeeze" the mechanism.
- Look at the position of the LED board in relation to the HC-SR04.
- To avoid short circuits, put duct tape on the LED board on the side where it contacts the rangefinder board.
Connecting electronics to Arduino
- D discrete ports D are highlighted in blue and numbered TX1, RX0, D2 - D13.
- Analog ports A are highlighted in green and numbered A0 - A7.
- brown servo wire corresponds to the "G" mark on the board;
- red servo wire corresponds to "V";
- yellow wire of the servo drive is "S".
2. Connect the HC-SR04 according to the table.
Pin detail |
Arduino port |
Echo |
D2 |
Trig |
D9 |
GND |
G (any GND) |
VCC |
V (любой VCC) |
3. Connect
the LED matrix according to the table.
Pin detail |
Arduino port |
GND |
G (any GND) |
VCC |
V (any VCC) |
CS |
D10 |
CLK |
D11 |
DIN |
D12 |
4. Connect the Passive Piezo Buzzer according to the table.
Pin detail |
Arduino port |
Signal |
D13 |
GND |
G (any GND) |
5. Connect the RGB LED according to the table.
Pin detail |
Arduino port |
R |
D3 |
G |
D5 |
B |
D6 |
GND |
G (any GND) |
A robot
with connected parts would look similar.
6. Connect the 9V battery with the 9V adapter to the robot.
7. Plug the battery into the power connector and connect the head and body. When power is applied, all servos will rotate 90*C.
The dancing robot is ready!