Introduction: Explore Simple 3D Dog Robot and Multiple Servo Motor Control Board

About: Maker 101; Beginner and intermediate level Maker projects! You can find projects such as "How to" and "DIY" on programmable boards such as Arduino, ESP8266, ESP32 and Raspberry Pi on this channel. The projects…

Hi there! In this project, you will find 3D part assembly, source code, and Android application of a simple dog model robot that can perform basic movements such as walking, turning, descending, ascending, and greeting... In the project, I used the Arduino Nano-based multi-servo motor control board that I designed earlier. This board can control up to 9 servo motors, as well as wireless servo motor control via Bluetooth module. Also, it is possible to control different types of servo motors through the adjustable voltage module on the board.

Step 1: Arduino Nano Based Multiple Servo Motor Control Board

The board I designed allows you to control up to 9 Servo motors and also allows you to control the motors wirelessly using the Bluetooth module mounted on it.

If we take a closer look at the circuit diagram of the design, there is an adjustable voltage regulator module on the board. The converter module makes it possible to adjust the voltage in line with the power needs of the Servo motors independently of the Arduino Nano. The required voltage level can be adjusted with the potentiometer on the module. A Schottky diode is added to the servo motor power line, its function is to increase the reliability of the circuit by helping to control power line fluctuations, voltage reverse flow, and electromagnetic noise. I have also added two capacitors to the circuit. Servo motors can require large amounts of current during sudden movements. Capacitors can be used to meet such sudden power demands stabilize the power supply and also help to reduce power supply fluctuations. 

I also added a resistor to each servo motor signal leg. The resistors act as a protection resistor in the circuit. The resistor protects the servomotor's signal leg from overcurrent and harmful voltages by limiting the signal from the microcontroller in some way. 

Since servo motors and Arduino Nano commonly use the power line of the circuit, a jumper is added to disconnect the power line to which the servo motors are connected when programming the microcontroller. The same applies to the Bluetooth module, since the TX and RX pins are busy during programming, a jumper was added to the Bluetooth power input to prevent communication errors, making it possible to cut the Bluetooth power during programming. Finally, a capacitor was added to the Arduino Nano VIN supply input to reduce power fluctuations.

The print quality is as important as the design of the printed circuit board. I have been successfully cooperating with PCBWay for PCB printing services for many years. I regularly upload all necessary files and details of my projects to PCBWay's project-sharing page. In this context, you can use the link provided to access the detailed information and design file of the project, review the project and if you wish, you can have this circuit board using only PCB or assembled PCB services. You can visit the link to go to the project page and download the design file.

Step 2: Robot Dog 3D Parts Assembly

There are 4 legs in total, so you need to print 4 sets of the leg parts. The parts are quite easy to assemble, maybe the joints can be smoothed with a little rasp or sandpaper. I used a rasp and sandpaper, and this made the joints of the parts move more freely. This also reduces the load on the servo and makes it easier to move.

I used quick adhesive to fix the servo motor arms to the legs, screwing would have been difficult and I didn't have the right length of screws in my workshop. 

When applying the adhesive, do not overflow! Apply a small amount of adhesive to the 3D part apply freeze spray to the servo arm, and fit it into the arm slot. A 10-second drying time will be sufficient. I also applied a very small amount of adhesive to prevent the 3D part joining pins from coming out of the hole.

Step 3: Fixing Servo Motors on the Body

9 MG90S servo motors were used in the robot. MG90S Micro Servo Motor is the advanced version of SG90 micro servo motor, which is the most widely used servo. Servo motors are low-cycle (fast), high-torque motors. Therefore, they are frequently preferred in robotic applications. RC car, RC airplane, Robot arm, RC ship, etc. It has many usage areas.

  • Model: Tower Pro MG90S Servo Motor
  • Operating Voltage: 4.8V - 6V
  • Weight 13.4 gr
  • Size: 22.8x12.2x28.5mm (Approx.)
  • No-Load Speed: 0.1 second/60 degrees (4.8V), 0.08 second/60 degrees (6V)
  • Torque: 1.8 kg.cm (4.8V), 2.2 kg.cm (6V)
  • Angle Range: 0° - 180° (Standard)
  • Metal Gear

Place the servo motors on the robot body as shown in the video or images. I used the screws that came with the servo motors to fix the servos to the body.

Step 4: Initial Position of Servo Motors

After fixing the servos to the body, you need to upload the shared source code to move all servos to the initial position before attaching the legs. I have marked the servo pins to know which Arduino Nano digital input pin the servos are connected to. Important, as I mentioned before, before connecting the board to the USB port, remove the SERVO_PWR (Servo motor power) and BLE_PWR (Bluetooth power) jumpers. Otherwise, if the Servo motors are connected to the board, they may over-current and damage your USB port, and the Bluetooth module may cause communication problems during code upload.

Also, the shared image shows which servo is connected to which leg and their initial positions.

  • Leg1F = 80 degree
  • Leg1B = 100 degree
  • Leg2F = 100 degree
  • Leg2B = 80 degree
  • Leg3F = 80 degree
  • Leg3B = 100 degree
  • Leg4F = 100 degree
  • Leg4B = 80
  • Headservo = 90

Step 5: Mounting the Legs to Servos

After uploading the code, connect the battery to the circuit ( 2x 3.7V 18650 Li-Ion Batteries were used). Then connect the jumper SERVO_PWR and the servo motors should come to the initial position.

Fold both ends of the legs as shown in the image or video. Turn the body on its side and attach it to the servomotor with both ends of the leg at 90 degrees, it will look like an inverted triangle. There is still power in the circuit when attaching the legs, this is to avoid movement of the servo positions.

Step 6: Dog Robot Head Assembly

After assembling the legs, I gathered the servo motor wires with the cable tie, placed the battery in the lower part of the body, and fixed it. Now let's attach the dog robot head!

I recommend scaling the 3D head part to 106% before printing so that the HC-SR04 ultrasonic distance sensor and servo arm will fit more easily.

Mount the double-ended servo arm to the head, again using quick adhesive. Then place the head on the servo on the body, and fix the head with the servo motor arm screw.

The HC-SR04 ultrasonic distance sensor has no function at the moment. However, in the coming days, I will update the robot, project code, and mobile application for the distance sensor, so I left plenty of input-output pins for additional sensors on the board.

Step 7: Source Code and Mobile Application

Download the shared main application source code and open it with the Arduino IDE, (important) again remove the SERVO_PWR and BLE_PWR jumpers before connecting the board to the USB port. Then connect the board and upload the code.

Go to MIT App Inventor, it is a free platform where you can easily create mobile applications. Include the shared (.aia) application project file. If you want, you can make changes to both the UI and the backend, but this requires intermediate experience.

Then create the Android App (.apk) file from the Build tab, both download and code scanning options are available to get the app installation file.

The App Inventor aia extension is not supported here, so you can download the file from here - https://www.pcbway.com/project/shareproject/Explore_using_a_customized_Arduino_Nano_based_board.html

Step 8: Launch the App and Move the Dog Robot

After uploading the code and installing the application, reconnect the board's power jumpers. Turn on the Bluetooth connection of your Android device and pair it with the Bluetooth module named HC-06x from the list. It may ask for a password during pairing, usually the default password is 1234 (or 0000). Then open the Dog Robot app, list the Bluetooth devices, find the Bluetooth module in the list, and select it.

If the connection is successful, the application switches to the control interface. Now you can move your dog robot, try making it say Hi! Thanks for reading, don't forget to like and follow!