Bionic Robot Kit For Arduino - Lizard New

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

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 build your own project. If you have interest in open source or making
something cool, welcome to join us! Visit www.sunfounder.com for more!

About This Kit


This learning kit focuses on the popular open source platform Arduino. You can learn the
knowledge of the Arduino servo by applying this kit.

In this book, we will show you how to build the bionic robot via description, illustrations
of physical components, 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.

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
[email protected]. You're also welcomed to share your projects on FORUM.
Content

Components ............................................................................................................................................................ 1
i. Structural Plate ........................................................................................................................................ 1
ii. Mechanical Fasteners ........................................................................................................................... 2
iii. Electrical Components ......................................................................................................................... 3
iv. Battery(Not Included) ...................................................................................................................... 4
Introduction .............................................................................................................................................................. 5

Get Started ............................................................................................................................................................... 6


i. Arduino Description ............................................................................................................................... 6
ii. Arduino Board – SunFounder Compatible ...................................................................................... 6
iii. Install Arduino IDE ................................................................................................................................... 6
iv. Install the Driver ....................................................................................................................................... 7
v. Add Libraries ............................................................................................................................................ 7
Test .............................................................................................................................................................................. 9
i. Build Circuit ............................................................................................................................................... 9
ii. Upload the code .................................................................................................................................. 10
iii. Servo Test ................................................................................................................................................ 12
iv. IR Receiver Test...................................................................................................................................... 13
Assembly ................................................................................................................................................................. 14
i. Assemble the forefeet ......................................................................................................................... 14
ii. Assemble the back feet ..................................................................................................................... 15
iii. Lizard body ............................................................................................................................................. 16
iv. Assemble head and neck.................................................................................................................. 19
v. Body+ head+ limb+ tail ....................................................................................................................... 23
vi. Assemble battery.................................................................................................................................. 25
vii. Assemble expansion board ............................................................................................................... 26
Adjusting ................................................................................................................................................................. 29
Case 1: The forefeet are inclined............................................................................................................. 29
Case 2: The back foot is inclined ............................................................................................................. 31
Case 3: The Lizard can’t stand steadily.................................................................................................. 33
Components
i. Structural Plate

1
ii. Mechanical Fasteners

Name Components Qty.

M1.5 x 5 Self-tapping Screw 12

M2 x 8 Screw 6

M2 x 14 Screw 4

M2.5 x 8 Screw 14

M3 x 6 Screw 4

M3 x 10 Screw 6

M2 Nut 8

M3 Self-locking Nut 6

M2.5 x 19 Copper Standoff 8

M3 x 25 Aluminum Standoff 1

2
iii. Electrical Components

Name Components Qty.

SF006C Servo 3

Nano board 1

Expansion board 1

Cable Spiral Wrap 1

Mini USB Cable 1

IR Remote Control 1

3
IR Receiver Module 1

3Pin-Anti-reverse Cable 1

Battery buckle wire 1

Phillips Screw Driver 1

Cross Socket Wrench 1

iv. Battery(Not Included)

Name Components Qty.

9V battery 1

4
Introduction
This is a bionic robot – Lizard. It is control walking by three servos, the walking shape imitates
Lizard and looks flexible and vivid. Infrared module is equipped, you can control the Lizard
walk by the remote controller.

Before using it, you need to assemble according to the tutorial. After assembling and adjusting,
you can control it walk by the remote controller.

You can also add other sensors on the Lizard, like obstacles avoiding, line following and so on.
There are remaining pins on the sensor shield. You can find the schematic diagram of Sensor
Shield at the file of Circuit.

Besides, in order to control the robot in a more simple way, there is a tutorial wrote for the
visual programming: How to use Lizard robot with Mixly. Visual programming is a kind of
modularize programming software, users do not need to have much basis on programming,
but just logic.

5
Get Started
Note: Before starting your own project, you must download the Bionic Robot Kit for Arduino -
Lizard.zip package on our website by visiting LEARN -> Get Tutorials -> Lizard and unzip it.

i. Arduino Description
Arduino is an open source platform that applies simple software and hardware. You can get it
in a short time even when you know little about it. It provides an integrated development
environment (IDE) for code editing and compiling, compatible with multiple control boards. So
you can just download the Arduino IDE, upload the sketches (i.e. the code files) to the board,
and then you can see experimental phenomena. For more information, you can refer to
http://www.arduino.cc.

ii. Arduino Board – SunFounder Compatible


Arduino senses the environment by receiving inputs from many sensors, and affects its
surroundings by controlling lights, motors, and other actuators.

In this kit, the SunFounder Nano board is used.

iii. Install Arduino IDE


The code in this kit is written based on Arduino, so you need to install the IDE at the very
beginning. Skip if you have done this.

Now go to the arduino.cc website and click DOWNLOAD. On the page, check the software list
on the right side under Download the Arduino Software.

The picture following is just an example, please download the latest edition IDE.

6
Find the one that suits your operation system and click to download. There are two versions of
Arduino for Windows: Installer or ZIP file. You're recommended to download the former. Just
download the package, and run the executable file to start installation. It will download the
driver needed to run Arduino IDE. After downloading, follow the prompts to install. For the
details of installing steps, you can refer to the guide on Learning->Getting Started with
Arduino, scroll down and see Install the Arduino Software.

After installing, you will see Arduino icon on your desk and double click to open it.

iv. Install the Driver


If the driver is not installed, the Nano board will not be recognized by your computer.
Therefore, before using it, please install appropriate driver.

For Windows users, run PL2303_Prolific_DriverInstaller_v1180B in the folder Driver.

For Mac users, refer to the folder PL2303_MacOSX_1_6_1_20170620 in the folder Driver.

v. Add Libraries
1) Select Sketch -> Include Library -> Management Libraries

7
2) Input IRremote, then the library will appear, click Install button to install it.

3) You can see the libraries just imported have appeared on the list by going to
Sketch->Include Library->IRremote.

8
Test
i. Build Circuit

1) Insert SunFounder Nano board into the expansion board. Note: The USB port should be at

the same side with blue power supply terminal.

2) Connect the 9V battery to the battery buckle wire。

3) Connect the 9V battery buckle wire and the red JST wire on the expansion board.

4) Connect 3 servos and Infrared receive module with expansion board. Insert 3 rocker arms

into servos in that observe if they are rotate or not.

Servo Sensor Shield IR Receiver Sensor Shield

Orange 2,3,4 SIG 7

Red + VCC +

Brown - GND -

9
Pay attention to the colors and the directions of the anti-reverse cable.

ii. Upload the code


5) If everything looks good, connect the Sensor Shield to your PC with a USB cable, then the
blue LED on SunFounder Nano board will light up.

If there display “USB Device not recognized”, it means that you haven’t installed the driver, thus
you need to install the driver below:

For Windows users, run PL2303_Prolific_DriverInstaller_v1180B in the folder Driver.

For Mac users, refer to the folder PL2303_MacOSX_1_6_1_20170620 in the folder Driver.

10
6) Open the Arduino Software (IDE), Select File->Open. On the pop-up window, go to the
Bionic Robot Kit for Arduino – Lizard -> Code -> Test directory and find Test.ino. Click it to
open.

7) Select a board. Here we select Arduino Nano. The Processor is ATmega328.

8) Go to Tools -> Port to select the port. Your serial port may be different from what's shown
here (right-click My Computer on desktop, click Properties>Device Manager>Ports).

11
9) Click the following button to upload.

10) Wait for a moment until the following information appears at the bottom of the window,
which indicates it is uploaded successfully.

iii. Servo Test


11) Switch on the power, you will find the 3 servos rotate from 0 degree to 180 degree and
then stop at 90 degree. If you haven’t seen clear of the process, you can press the Reset button
on the Nano board, the servo will rotate again.

12
iv. IR Receiver Test
12) Click File -> Preference to enable display line numbers, then select OK.

13) Comment line 31 by “//”, uncomment line 32 and then upload the code again.

14) Open the Serial Monitor on the top-right of Arduino IDE, set the baud rate as
115200 held and press the button of the IR Remote Controller toward IR receive module.

15) You will see it display the value of button on the Serial Monitor.

Note: Press the button on the remote controller gently. If you press the button forcefully, it will
be default as long press and display FFFFFFF.

After testing, extract the servo and the Infrared Module.

Note: The axis of the servos is not moved accidentally in the subsequent installation. If the axes
are moved, adjust them again before the installation.

Now let’s begin to assemble the Lizard robot.

13
Assembly
Note:In order to conveniently recognize, here number every structural plate as shown
below. In the following description, the number will be used. There is an independent picture
of the following one, you can refer to Plate.png.

i. Assemble the forefeet

1) Assemble the rocker arm (packaged 2) Note: The direction of the plate 7 can’t
with the servo) to the plate 7, then connect be put on reverse side. Please tighten the
them by M1.5 x 5 self-tapping screw. screwsin strict accordance with the following
figure.

14
3) Assemble the other forefoot at the 4) It looks as the picture shown below after
same way. assembling.

ii. Assemble the back feet

1) Assemble the rocker arm (packaged 2) After installation, as shown in the figure:
with the servo) to the plate 12, then
connect them by M1.5 x 5 self-tapping
screw.

3) Assemble the other back foot at the 4) It looks as the picture shown below after
same way. assembling.

15
iii. Lizard body

1) Assemble the servo onto the plate 4 by the M2 x 10 2) The effect is as follows:
screw and M2 nut.

3) Assemble the servo onto the plate 11, then assemble them with plate 4.

4) After assembling, it looks as shown below:

Note:1)servo axis should be upward; 2)Plain side of plate 11 should be downward

16
5) Insert the M2 x 14 screw and M2 nut as shown below:

Tips: The installation method is preferably as follows:

6) Use M2.5 x 8 screw to install the 2.5 x 19mm Bi-pass copper standoff on plate 4.

7) After installation, as shown in the 8) Bottom View


figure:

17
9) Put the plate 16 on the servo shaft, and assemble the two parts shown in the above
figure with screws of the servo. (The smallest screws in the packaged with the servo)

10) Use M2x14 screw and M2 nut to assemble plate 5 and 11.

18
iv. Assemble head and neck

1) Install the Servo on plate 1 with M2x8mm screw and M2 nut. Note the installation
direction of the servo.

2) Fasten the M2.5x8 screw and M2.5x13 copper standoff into the plate 1.

3) Put the plate 16 on the servo shaft, and assemble the installed forefeet and the body
with screws of the servo.

19
4) After assembling, it looks as shown 5) Top view:
below: Note: The feet should be forward.

6) Mount the Servo rocker arm on plate 9 with M1.5 x 5 self-tapping screw.

7) Insert one end of plate 9 into plate 2 and then insert the other end.

20
8) Put the plate 16 on the servo shaft, and assemble the two parts shown in the above
figure with screws of the servo.

9) Insert plate 3 into plate 1 and 2. Note: Insert one end and then the other end.

10) The effect is as follows:

21
11) Insert plate 3 into plate 1 and 2.

12) Now, most have been completed:

22
v. Body+ head+ limb+ tail

1) Insert Plate 10 and 14 into Plate 6 and insert the M3x25mm black aluminum standoff
into the round hole of Plate 10 and 14.

2) Fix the aluminum standoff by M3 x 6 screw.

3) Install plate 10 , 12, 13 and 14 together with M3x10 screw and M3 self-lock nut.

23
4) Tighten the other screw and nut. Note:Self-locking screw do not need to be
tightened too much, as it need to swing.

5) Fix the IR receiver module with M2.5 x 8 screw as shown in the figure.

24
vi. Assemble battery

1) Battery wiring (battery is not included in this kit).

2) Fix the battery.

25
vii. Assemble expansion board

1) Connect the Sensor Shield into the copper standoff by M2.5 x 8 screw

2) Insert the three servos into the Sensor Shield, the numbers on the servos are as shown
below. Insert the 1 servo to the pin 4, 2 servo to pin 3, 3 servo to the pin 5, and IR
receiver module to pin 7.

26
Servo Sensor Shield IR Receiver Sensor Shield

Orange 4,3,2 Orange 7

Red + Red +

Brown - BLACK -

27
3) Connect the red port of the battery buckle wire to the red interface on the circuit board.

4) In order to be clean, you can tie all the wires together by cable pipe.

28
Adjusting
In the process of assembling, there may occur the two feet are not on the ground or inclined to
another direction, thus you can adjust by the way as shown below:

Case 1: The forefeet are inclined


1) The left foot is in front, but the right one is behind

Step 1: Open Lizard_robot.ino file under the path Bionic Robot Kit for Arduino -
Lizard\Code\Lizard_robot, you will see Crawl.ino, it will open at the same time with Lizard
robot.ino.

Step 2: Find the statement: int array_setup[] = {90,90,90};//Set the original angle of the servo.

The three 90 inside the array stands for the angle of the three servos, the forefeet are
controlled by number 1 servo. When the left foot is in front and the right one is behind, you
should minus the first value of 90, but do not decrease too much in one time.

29
Step 3: Upload the code to the Sensor Shield.

If it looks still inclined then continue to decrease until it looks vertical to its body.

2) The left foot is behind but the right is in front.

You need to increase the value of the first servo.

30
Case 2: The back foot is inclined
1) The left foot is in front, the right foot is behind

The back leg is controlled by servo 3, when the left leg is in front but the right one is behind,
the third value in the array need be decreased.

31
2) The left leg is in back, but the right one is in front

Increase the value of the third 90 in the array.

32
Case 3: The Lizard can’t stand steadily
When the head is deviation counter-clockwise and one of the forefoot can’t stand steadily, the
second 90 in the array need to be decrease.

If it is clockwise, the second 90 need to be increased. When finishing adjusting, you can control
the Lizard by remote controller.

Note: Before using the remote controller, the white patches on the tail should be pulled out,
thus the remote controller can work.

33
Copyright Notice
All contents including but not limited to texts, images, and code in this manual are owned by
the SunFounder Company. You should only use it for personal study, investigation, enjoyment,
or other non-commercial or nonprofit purposes, under the related regulations and copyrights
laws, without infringing the legal rights of the author and relevant right holders. For any
individual or organization that uses these for commercial profit without permission, the
Company reserves the right to take legal action.

34

You might also like