Freenove Raspberry Pi Model A User manual

Need support? support@freenove.com
1
List
█www.freenove.com
Welcome
Thank you for choosing Freenove products!
About Battery
First, read the document About_Battery.pdf in the unzipped folder.
If you did not download the zip file, please download it and unzip it via link below.
https://github.com/Freenove/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/archive/master.zip
Get Support and Offer Input
Freenove provides free and responsive product and technical support, including but not limited to:
Product quality issues
Product use and build issues
Questions regarding the technology employed in our products for learning and education
Your input and opinions are always welcome
We also encourage your ideas and suggestions for new products and product improvements
For any of the above, you may send us an email to:
support@freenove.com
Safety and Precautions
Please follow the following safety precautions when using or storing this product:
Keep this product out of the reach of children under 6 years old.
This product should be used only when there is adult supervision present as young children lack necessary
judgment regarding safety and the consequences of product misuse.
This product contains small parts and parts, which are sharp. This product contains electrically conductive
parts. Use caution with electrically conductive parts near or around power supplies, batteries and
powered (live) circuits.
When the product is turned ON, activated or tested, some parts will move or rotate. To avoid injuries to
hands and fingers, keep them away from any moving parts!
It is possible that an improperly connected or shorted circuit may cause overheating. Should this happen,
immediately disconnect the power supply or remove the batteries and do not touch anything until it
cools down! When everything is safe and cool, review the product tutorial to identify the cause.
Only operate the product in accordance with the instructions and guidelines of this tutorial, otherwise
parts may be damaged or you could be injured.
Store the product in a cool dry place and avoid exposing the product to direct sunlight.
After use, always turn the power OFF and remove or unplug the batteries before storing.

Need support? support@freenove.com
2
List
www.freenove.com █
About Freenove
Freenove provides open source electronic products and services worldwide.
Freenove is committed to assist customers in their education of robotics, programming and electronic circuits
so that they may transform their creative ideas into prototypes and new and innovative products. To this end,
our services include but are not limited to:
Educational and Entertaining Project Kits for Robots, Smart Cars and Drones
Educational Kits to Learn Robotic Software Systems for Arduino, Raspberry Pi and micro: bit
Electronic Component Assortments, Electronic Modules and Specialized Tools
Product Development and Customization Services
You can find more about Freenove and get our latest news and updates through our website:
http://www.freenove.com
Copyright
All the files, materials and instructional guides provided are released under Creative Commons Attribution-
NonCommercial-ShareAlike 3.0 Unported License. A copy of this license can be found in the folder containing
the Tutorial and software files associated with this product.
This means you can use these resource in your own derived works, in part or completely, but NOT for the
intent or purpose of commercial use.
Freenove brand and logo are copyright of Freenove Creative Technology Co., Ltd. and cannot be used without
written permission.
Free your innovation
Raspberry Pi®is a trademark of Raspberry Pi Foundation (https://www.raspberrypi.org/).
○
R

Need support? support@freenove.com
1
List
█www.freenove.com
Contents
List........................................................................................................................................................................................... 2
Robot Shield for Raspberry Pi ................................................................................................................................... 2
Machinery Parts ........................................................................................................................................................... 3
Transmission Parts....................................................................................................................................................... 4
Acrylic Parts .................................................................................................................................................................. 4
Electronic Parts............................................................................................................................................................. 5
Tools............................................................................................................................................................................... 5
Required but NOT Contained Parts ......................................................................................................................... 6
Preface ................................................................................................................................................................................... 7
Introduction to Raspberry Pi ..................................................................................................................................... 8
Chapter 0 Raspberry Pi Preparation ...............................................................................................................................18
Install a System...........................................................................................................................................................18
Remote desktop & VNC ............................................................................................................................................ 25
Robot Shield for Raspberry Pi ................................................................................................................................. 38
Chapter 1 Install Python Libraries (Required) ...............................................................................................................42
Step 1 Obtain the Code............................................................................................................................................42
Step 2 Enable I2C and Camera ............................................................................................................................... 45
Step 3 Run the Installation Program...................................................................................................................... 49
Chapter 2 Assemble Robot .............................................................................................................................................. 50
Step 1 Install Disk Servo Arms................................................................................................................................. 50
Step 2 Install Body Bracket ......................................................................................................................................53
Step 3 Install Shield...................................................................................................................................................54
Step 4 Install MPU6050 ............................................................................................................................................55
Step 5 Install LED module........................................................................................................................................55
Step 6 Install Raspberry Pi........................................................................................................................................57
Step 7 Install Connector........................................................................................................................................... 58
Step 8 Install Servo to Acrylic Board...................................................................................................................... 60
Step 9 Run Servo Program (Necessary) ................................................................................................................63
Step 10 Assemble Legs to Body .............................................................................................................................66
Step 11 Assemble Head ........................................................................................................................................... 70
Step 12 Assemble Head to Body............................................................................................................................71
Step 13 Wiring............................................................................................................................................................72
Step 14 Install Calibration Support......................................................................................................................... 75
Step 15 Verify Assembly........................................................................................................................................... 76
Chapter 3 Module test (Required) ..................................................................................................................................77
Chapter 4 Robot Dog........................................................................................................................................................ 88
Server ...........................................................................................................................................................................89
Client............................................................................................................................................................................97
Free your innovation...............................................................................................................................................125
Android and iOS app..............................................................................................................................................131
What's Next?.....................................................................................................................................................................133

Need support? support@freenove.com
3
List
█www.freenove.com
Machinery Parts
Note: You may receive M1.4*4 or M1.4*5. Both are suitable.

Need support? support@freenove.com
4
List
www.freenove.com █
Transmission Parts
ES08MA Ⅱservo package x12
S90 servo package x1
Acrylic Parts

Need support? support@freenove.com
5
List
█www.freenove.com
Electronic Parts
LED module
Camera
HC-SR04 ultrasonic module
Connector
Jumper wire F/F(4) for ultrasonic module
10cm 3Pin LED cable (same direction)
25cm 15Pin camera cable (reversed direction)
Tools
Cross screwdriver (3mm) x1
Cross screwdriver (2mm) x1
Cable tidy x80cm
Red ball

Need support? support@freenove.com
6
List
www.freenove.com █
Required but NOT Contained Parts
Two 18650 lithium batteries without protected board.
The continuous discharge current >10A
It is not easy to find proper batteries on Amazon. Search 18650 3.7V high drain on eBay or other
websites.
Raspberry Pi (Recommended model: Raspberry 4B / 3B+/ 3A+ /3B ) x1

Need support? support@freenove.com
7
Preface
█www.freenove.com
Preface
Welcome to use Freenove Robot Dog Kit for Raspberry Pi. Following this tutorial, you can make a very cool
robot dog with many functions.
This kit is based on Raspberry Pi, a popular control panel, so you can share and exchange your experience
and design ideas with many enthusiasts all over the world. This kit contains all electronic components, modules,
and mechanical components required for making the robot dog. And all of them are packaged individually.
There are detailed instructions for assembly and configuration in this book.
If you encounter any problems, please feel free to contact us for quick and free technical support.
support@freenove.com
This book can help enthusiasts with little technical knowledge to make a robot dog. If you are very
interested in Raspberry Pi, and want to learn how to program and build the circuit, please visit our website
www.freenove.com or contact us to buy the kits designed for beginners:
Freenove Basic\LCD1602\Super\Ultrasonic\RFID\Ultimate Starter Kit for Raspberry Pi

Need support? support@freenove.com
8
Preface
www.freenove.com █
Introduction to Raspberry Pi
Raspberry Pi (or RPi, RPI, RasPi, which will be also referenced in this tutorial), a micro-computer with size of a
card, quickly swept the world since it was launched. It is widely used in desktop workstation, media center,
smart household, robots, and even the servers, etc. It can do almost everything, which continues to attract
fans to explore it. Raspberry Pi is used to be running with Linux system and along with the release of windows
10 IoT, we can also run it with Windows. Raspberry Pi (with interfaces USB, network, HDMI, camera, audio,
display and GPIO), as a microcomputer, can be run in command line mode and desktop system mode.
Additionally, it is easy to operate just like Arduino, and you can even directly operate the GPIO of CPU.
So far, at this writing, Raspberry Pi has advanced to its fourth generation product offering. Version changes
are accompanied by increases in upgrades in hardware and capabilities.
The A type and B type versions of the first generation products have been discontinued due to various reasons.
What is most important is that other popular and currently available versions are consistent in the order and
number of pins and their assigned designation of function, making compatibility of peripheral devices greatly
enhanced between versions.
Below are the Raspberry Pi pictures and model pictures supported by this product.
Practicality picture of Raspberry Pi 4 Model B:
Model diagram of Raspberry Pi 4 Model B:

Need support? support@freenove.com
9
Preface
█www.freenove.com
Practicality picture of Raspberry Pi 3 Model B+:
Model diagram of Raspberry Pi 3 Model B+:
Practicality picture of Raspberry Pi 3 Model B:
Model diagram of Raspberry Pi 3 Model B:

Need support? support@freenove.com
10
Preface
www.freenove.com █
Practicality picture of Raspberry Pi 2 Model B:
Model diagram of Raspberry Pi 2 Model B:
Practicality picture of Raspberry Pi 1 Model B+:
Model diagram of Raspberry Pi 1 Model B+:

Need support? support@freenove.com
11
Preface
█www.freenove.com
Practicality picture of Raspberry Pi 3 Model A+:
Model diagram of Raspberry Pi 3 Model A+:
Practicality picture of Raspberry Pi 1 Model A+:
Model diagram of Raspberry Pi 1 Model A+:

Need support? support@freenove.com
12
Preface
www.freenove.com █
Practicality picture of Raspberry Pi Zero W:
Model diagram of Raspberry Pi Zero W:
Practicality picture of Raspberry Pi Zero:
Model diagram of Raspberry Pi Zero:

Need support? support@freenove.com
13
Preface
█www.freenove.com
Hardware interface diagram of RPi 4B is shown below:
Hardware interface diagram of RPi 3B+/3B/2B/1B+ are shown below:
GPIO
Connector
Display
Connector
Power
Connector
HDMI
Connector
Camera
Connector
Ethernet
Connector
GPIO
Connector
Display
Connector
Power
Connector
MINI HDMI
Connector x2
Camera
Connector
Ethernet
Connector
USB
Connector x4
Audio
Connector
USB
Connector
Audio
Connector

Need support? support@freenove.com
14
Preface
www.freenove.com █
Hardware interface diagram of RPi 3A+/A+ is shown below:
Hardware interface diagram of RPi Zero/Zero W is shown below:
GPIO
Connector
Power
Connector
HDMI
Connector
Camera
Connector
USB
Connector
GPIO
Connector
Display
Connector
Power
Connector
HDMI
Connector
Camera
Connector
Audio
Connector
USB
Connector

Need support? support@freenove.com
15
Preface
█www.freenove.com
GPIO
GPIO: General purpose input/output. We will introduce the specific feature of the pins on the Raspberry Pi
and how you can utilize them in all sorts of ways in your projects. Most RPi Module pins can be used as either
an input or output, depending on your program and its functions. When programming the GPIO pins, there
are 3 different ways to reference them: GPIO numbering, physical numbering, WiringPi GPIO Numbering.
BCM GPIO Numbering
The Raspberry Pi CPU uses Broadcom (BCM) processing chips BCM2835, BCM2836 or BCM2837. GPIO pin
numbers are assigned by the processing chip manufacturer and are how the computer recognizes each pin.
The pin numbers themselves do not make sense or have meaning as they are only a form of identification.
Since their numeric values and physical locations have no specific order, there is no way to remember them,
so you will need to have a printed reference or a reference board that fits over the pins.
Each pin is defined as below:
For more details about pin definition of GPIO, please refer to http://pinout.xyz/

Need support? support@freenove.com
16
Preface
www.freenove.com █
PHYSICAL Numbering
Another way to refer to the pins is by simply counting across and down from pin 1 at the top left (nearest to
the SD card). This is 'physical numbering', as shown below:
WiringPi GPIO Numbering
Different from the previous two types of GPIO serial numbers, RPi GPIO serial number of the WiringPi are
numbered according to the BCM chip use in RPi.
(For more details, please refer to https://projects.drogon.net/raspberry-pi/wiringpi/pins/ )

Need support? support@freenove.com
18
Chapter 0 Raspberry Pi Preparation
www.freenove.com █
Chapter 0 Raspberry Pi Preparation
Install a System
Firstly, install a system for your RPi.
Component List
Required Components
Raspberry Pi 4B / 3B+/ 3B /3A+ (Recommended)
5V/3A Power Adapter. Different versions of
Raspberry Pi have different power requirements.
Micro USB Cable x1
Micro SD Card (TF Card) x1, Card Reader x1
This robot also supports the following versions of the Raspberry Pi, but additional accessories need to be
prepared by yourself.
Raspberry
Additional accessories
Raspberry Pi Zero W
Camera cable(>25cm) for zero w, 15 Pin 1.0mm Pitch to 22 Pin 0.5mm
https://www.amazon.com/dp/B076Q595HJ/
Raspberry Pi Zero 1.3
wireless network adapter,
Camera cable(>25cm) for zero w, 15 Pin 1.0mm Pitch to 22 Pin 0.5mm,
OTG cable (USB Type micro B to USB Type A)
Raspberry Pi 2 Model B
wireless network adapter
Raspberry Pi 1 Model A+
wireless network adapter
Raspberry Pi 1 Model B+
wireless network adapter
This manual suits for next models
8
Table of contents
Other Freenove Microcontroller manuals
Popular Microcontroller manuals by other brands

Pololu
Pololu A-Star 32U4 Series Schematic diagram

Texas Instruments
Texas Instruments CC1120 quick start guide

Cypress
Cypress Perform PSOC 5LP PROTOTYPING KIT quick start guide

Mediatek Labs
Mediatek Labs LinkIt 7687 HDK V30 user guide

Abov
Abov MC96F6432S Series user manual

Calliope
Calliope Calliope mini Starter Guide