SunFounder Smart Video Car Kit Raspberry Pi DIY Robot Kit for Kids Adults Compatible User manual

Type
User manual
Preface
About SunFounder
SunFounder is a technology company focused on Raspberry Pi and Arduino open source
community development. Committed to the promotion of open source culture, we strive to bring
the fun of electronics making to people all around the world and enable everyone to be a maker.
Our products include learning kits, development boards, robots, sensor modules and
development tools. In addition to high quality products, SunFounder also offers video tutorials to
help you make your own project. If you have interest in open source or making something cool,
welcome to join us!
About This Kit
The kit is suitable for the Raspberry Pi model B+, 2 model B and 3 model B.
In this book, we will show you how to build the smart car via description, illustrations of physical
components, and schematic diagrams of circuits, in both hardware and software respects. You
may visit our website www.sunfounder.com to download the related code and view the user
manual on LEARN -> Get Tutorials and watch related videos under VIDEO, or clone the code on
our page of github.com at
https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi
Free Support
If you have any TECHNICAL questions, add a topic under FORUM section on our website
and we'll reply as soon as possible.
For NON-TECH questions like order and shipment issues, please send an email to
service@sunfounder.com. You're also welcomed to share your projects on FORUM.
Contents
Introduction ........................................................................................................................................ 1
Components ...................................................................................................................................... 2
i. Acrylic Plates ........................................................................................................................ 2
ii. Mechanical Fasteners ......................................................................................................... 3
iii. Drive Parts ............................................................................................................................. 4
iv. Electrical Components ....................................................................................................... 5
v. Self-provided Parts ............................................................................................................... 8
Assembly ............................................................................................................................................. 9
i. Mechanical Assembly......................................................................................................... 9
1.
Car Assembly ................................................................................................................................ 9
2. Mount Assembly ........................................................................................................................ 22
3. Mount + Car ................................................................................................................................ 27
ii. Electrical Module Assembly ............................................................................................. 29
iii. Circuit Connecting ............................................................................................................ 30
Electrical Components Basics ........................................................................................................ 40
i. Raspberry Pi ........................................................................................................................ 40
ii. Step-down DC-DC Converter Module ........................................................................... 41
iii. Servo .................................................................................................................................... 41
iv. DC Motor Driver ................................................................................................................. 42
v. USB Wi-Fi Adaptor .............................................................................................................. 42
vi. Servo Controller ................................................................................................................. 43
vii. 18650*2 Battery Holder ...................................................................................................... 43
Software Related ............................................................................................................................. 44
i. Download and Install Raspbian on a TF Card ............................................................... 44
ii. Get Source Code .............................................................................................................. 44
iii. Basic Software Environment ............................................................................................. 45
Operation on PC
............................................................................................................................... 45
Prepare the PC for remote ............................................................................................................ 45
Operation on Raspberry Pi ............................................................................................................ 46
Install python-dev, python-smbus ............................................................................................... 46
Setup I2C port .................................................................................................................................... 46
MJPG-streamer .................................................................................................................................. 46
iv. Calibration .......................................................................................................................... 49
Preparation ......................................................................................................................................... 49
Start Calibration ................................................................................................................................. 52
Motor Adjustment ............................................................................................................................. 52
Turning Adjustment ........................................................................................................................... 52
Mount Adjustment ............................................................................................................................ 53
Get on the Road! .............................................................................................................................. 54
v. Program Analysis and Explanation ................................................................................. 58
Abstract
................................................................................................................................................ 58
Introduction of Socket ..................................................................................................................... 58
1. Server ............................................................................................................................................. 58
2. Client.............................................................................................................................................. 60
Summary ........................................................................................................................................... 62
1
Introduction
The SunFounder Smart Video Car Kit for Raspberry Pi is composed of Raspberry Pi, step-down DC-
DC converter module, USB camera, DC motor driver, and PCA9685-based servo controller. From
the perspective of software, the smart car is of client/server (C/S) structure. The TCP server
program is run on Raspberry Pi for direct control of the car. And the video data are acquired and
delivered via the open source software MJPG-streamer in a real-time manner. The TCP client
program is run on PC to send the control command. Both the client and server programs are
developed in Python.
The smart car is developed based on the open source hardware Raspberry Pi and integrates the
k
nowledge of mechanics, electronics and computer, thus having profound educational
significance.
2
Components
i. Acrylic Plates
3
ii. Mechanical Fasteners
Parts Name Qty.
M1.2*4 self-tapping screw 8
M2*8 screw 6
M2.5*6 screw 16
M3*10 countersunk screw 2
M3*8 screw 8
M3*10 screw 6
M3*30 screw 4
M4*25 screw 2
M2.5*8 copper pillar 16
M3*24 copper pillar 8
M2 nut 6
M2.5 nut 16
M3 nut 20
M4 self-locking nut 2
F694ZZ flange bearing 2
4
iii. Drive Parts
Parts Name Qty.
Tower Pro
Micro Servo
SG90
3
Gear reducer
2
Driven wheel
2
Active wheel
2
5
iv. Electrical Components
Parts Name Qty.
Raspberry Pi
Model B+
1
16-Channel 12-bit
PWM driver
(servo controller)
1
L298N DC motor
driver
1
Step-down DC-DC
converter module
1
6
USB Wi-Fi
adapter
1
USB camera
1
18650*2
Battery holder
1
Ribbon
1
USB cable
1
7
Cross socket
wrench
1
Cross
screwdriver
1
Heat shrink
tubing
1
20cm jumper wire
(F to F)
4
10cm jumper wire
(F to F)
5
10cm jumper wire
(M to F)
2
20cm jumper wire
(M to M)
2
8
v. Self-provided Parts
The following parts are not included in the set.
Parts Name Qty. Needed
18650 3.7V
rechargeable
Li-ion battery
2
TF Card
1
9
Assembly
i. Mechanical Assembly
1. Car Assembly
Front Wheels
a) Fasten the F694ZZ flange bearing, driven wheel and following acrylic plates with an M4*25
screw and an M4 self-locking nut in the way as shown below. Use the cross socket wrench to
fasten the M4 self-locking nut.
b) When completed, the assembly
should look like the figure below.
c) Bear in mind that DO NOT over-tighten the nut or
else the wheel cannot turn flexibly. Neither too loose,
in case the gap between the parts is too large.
Pay attention to
the direction of
this plate
10
a) Fasten the F694ZZ flange bearing, driven wheel and following acrylic plates with an M4*25
screw and an M4 self-locking nut in the way shown as below.
b) When completed, the assembly
should look like the figure below.
c) Bear in mind that DO NOT over tighten the nut or
else the wheel cannot turn flexibly. Neither too
loose, in case the gap between the parts is too
large.
Note: The acrylic plates next to the bearing in the two wheels are of opposite faces, as shown in
the following figure.
Pay attention to
the direction of
this plate
11
Back Half Chassis + Rear Wheels
a) Assemble the following two acrylic
plates
b) When completed, the assembly should
look like the figure below.
c) Assemble the gear reducer, the active wheel and following acrylic plates with two
M3*30 screws and M3 nuts.
d) When completed, the assembly should look like the figure below.
12
e) Assemble the following two acrylic
plates
f) When completed, the assembly should look
like the figure below.
g) Assemble the gear reducer, the active wheel and the previously assembled part with
two M3*30 screws and M3 nuts.
h) When completed, the assembly should look like the figure below.
13
Back Half Chassis + Copper Standoffs
a) Assemble 4 M3*24 copper standoffs and
4 M3 nuts into the acrylic plate part as
shown below.
b) When completed, the assembly should
look like the figure below.
Servo Adjustment
Before installing the servos, we need to adjust them to 90°. But why? The reason is that the servo
we used rotates in a range of 0-180°. If the rotating in usage is beyond the allowed range, the
servo may burn out. So before assembly, we need to adjust the servo shaft to 90°, and install the
servo based on the instructions, ensuring the assembly won't go beyond limitations.
Method 1
The easiest way is to connect the servo to a Raspberry Pi and PCA9685 PWM driver board, or an
Arduino board, and give the servo PWM signals so as to adjust the shaft to 90°. So it'll be done!
Method 2
There is a tricky way to do this, as the method 1 may be a little troublesome. Follow the tutorial
below carefully. It may seem complex, but once you start, you will find it quite simple.
Prepare a servo and a 1-arm rocker arm.
a) Insert the rocker arm into the servo shaft,
rotate the arm counter-clockwise until it
cannot move. It may be like this:
14
b) It may be in the position as shown
below:
c) No matter which position the rocker arm is in,
just pull it out softly, and do not rotate the shaft.
Then insert it in the position as shown below,
which is in the middle of the servo or a little
down:
Don’t worry about the precision. Fine
adjustment will be made by software in
calibration part. Just try to put it in an
approximate position.
d) Rotate the rocker arm clockwise until it
cannot move. It should be in a position
close to this:
If what you get is quite different from that,
you need to retake the steps above.
e) If it’s almost that position, you can rotate the
rocker arm counter-clockwise to the upper
position.
Thus the servo shaft will be in the 90° position. For fine adjustment, just leave it to related code.
At last, remove the rocker arm without moving the shaft. If the shaft moves just a little, it is
acceptable. Minor mistaken movement needs no adjustments.
You're recommended to take all those three servos out from the package for adjustment prior to
assembly, so the whole process will be simpler.
15
Steering Linkage + Servo Rocker Arm
a) Connect the following acrylic plate to the second hole of the rocker arm (see the figure
below) with an M2*8 self-tapping screw.
The M2*8 self-tapping screw is contained in the package of the servo; it is one of the two
longest screws.
Also the rocker arm is packaged together with the servo. Note: Be careful with the screw
of pricking your fingers.
b) Tighten the screw first, then loosen it a little to ensure the Steering Linkage’s movement, the
assembly should look like the figure below.
16
Steering Servo + Upper Plate
a) Connect the servo to the acrylic plate below with two M2*8 screws and M2 nuts.
Pay attention to the face of the plate. Refer to the small hole in the plate as pointed by the
arrow in the following figure.
b) When completed, the assembly should look like the figure below.
Note: The servo should be placed with its output shaft toward the front of the plate (see the
following figure).
17
Steering Servo + Steering Linkage
a) Connect the following parts with an M2*4 screw.
The M2*4 screw is contained in the package of the servo; it is the shortest of the screws in
the package.
b) When completed, the assembly should look like the figure below.
Pay attention to the orientation during the assembly. If you find any error in the assembly,
do not try to turn the axis of the servo; instead, you should disassemble it and then assemble
the parts again.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66

SunFounder Smart Video Car Kit Raspberry Pi DIY Robot Kit for Kids Adults Compatible User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI